diff --git a/arjs/index.html b/arjs/index.html
index 4558e19151cfe11d23367a97ca89a6d1c8333024..2564bbb526b55548ea05e37e14485845de44eb8e 100644
--- a/arjs/index.html
+++ b/arjs/index.html
@@ -19,7 +19,7 @@
         <a-entity
           position="0 0 0"
           scale="0.5 0.5 0.5"
-          gltf-model="vending_machine_-_ps1_low_poly/scene.gltf"
+          gltf-model="vivian_kane_-_legendary_pandoras_box_model/scene.gltf"
         ></a-entity>
       </a-marker>
       <a-entity camera></a-entity>
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/license.txt b/arjs/vivian_kane_-_legendary_pandoras_box_model/license.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8afa5265bd0a9e6725867ad260375c0112083c1c
--- /dev/null
+++ b/arjs/vivian_kane_-_legendary_pandoras_box_model/license.txt
@@ -0,0 +1,11 @@
+Model Information:
+* title:	Vivian Kane - Legendary: Pandora's Box Model
+* source:	https://sketchfab.com/3d-models/vivian-kane-legendary-pandoras-box-model-489026de44924d6b85f333833488920b
+* author:	Vladlen230 (https://sketchfab.com/iLLex_911)
+
+Model License:
+* license type:	CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
+* requirements:	Author must be credited. Commercial use is allowed.
+
+If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
+This work is based on "Vivian Kane - Legendary: Pandora's Box Model" (https://sketchfab.com/3d-models/vivian-kane-legendary-pandoras-box-model-489026de44924d6b85f333833488920b) by Vladlen230 (https://sketchfab.com/iLLex_911) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
\ No newline at end of file
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.bin b/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.bin
new file mode 100644
index 0000000000000000000000000000000000000000..0a5a03f786698a31bbada42718ea9f99d009fd01
Binary files /dev/null and b/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.bin differ
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.gltf b/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.gltf
new file mode 100644
index 0000000000000000000000000000000000000000..0ffb8ba6bef478d02b45e94b28ed5e55826d8ea4
--- /dev/null
+++ b/arjs/vivian_kane_-_legendary_pandoras_box_model/scene.gltf
@@ -0,0 +1,3465 @@
+{
+  "accessors": [
+    {
+      "bufferView": 3,
+      "componentType": 5126,
+      "count": 9918,
+      "max": [
+        0.10371094942092896,
+        1.7745546102523804,
+        0.11042286455631256
+      ],
+      "min": [
+        -0.10371101647615433,
+        1.4274786710739136,
+        -0.0808405801653862
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 3,
+      "byteOffset": 119016,
+      "componentType": 5126,
+      "count": 9918,
+      "max": [
+        0.997426450252533,
+        0.9997221827507019,
+        0.9991626143455505
+      ],
+      "min": [
+        -0.9974262118339539,
+        -0.9996887445449829,
+        -0.9956377744674683
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 2,
+      "componentType": 5126,
+      "count": 9918,
+      "max": [
+        0.99658203125,
+        0.9928092956542969
+      ],
+      "min": [
+        0.0034427642822265625,
+        0.0087890625
+      ],
+      "type": "VEC2"
+    },
+    {
+      "bufferView": 1,
+      "componentType": 5125,
+      "count": 9918,
+      "type": "SCALAR"
+    },
+    {
+      "bufferView": 3,
+      "byteOffset": 238032,
+      "componentType": 5126,
+      "count": 16349,
+      "max": [
+        0.555797815322876,
+        1.5295780897140503,
+        0.17260491847991943
+      ],
+      "min": [
+        -0.555797815322876,
+        -0.001617165980860591,
+        -0.11457297205924988
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 3,
+      "byteOffset": 434220,
+      "componentType": 5126,
+      "count": 16349,
+      "max": [
+        0.9999819397926331,
+        1.0,
+        0.9990872144699097
+      ],
+      "min": [
+        -0.9999819397926331,
+        -1.0,
+        -0.9998018145561218
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 2,
+      "byteOffset": 79344,
+      "componentType": 5126,
+      "count": 16349,
+      "max": [
+        0.99169921875,
+        0.9890213012695313
+      ],
+      "min": [
+        0.016845703125,
+        0.0126953125
+      ],
+      "type": "VEC2"
+    },
+    {
+      "bufferView": 1,
+      "byteOffset": 39672,
+      "componentType": 5125,
+      "count": 16362,
+      "type": "SCALAR"
+    },
+    {
+      "bufferView": 3,
+      "byteOffset": 630408,
+      "componentType": 5126,
+      "count": 2382,
+      "max": [
+        0.09687735885381699,
+        1.7892744541168213,
+        0.09629326313734055
+      ],
+      "min": [
+        -0.09268100559711456,
+        1.5366417169570923,
+        -0.11501377820968628
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 3,
+      "byteOffset": 658992,
+      "componentType": 5126,
+      "count": 2382,
+      "max": [
+        0.9994429349899292,
+        0.9969781041145325,
+        0.9905661344528198
+      ],
+      "min": [
+        -0.9993210434913635,
+        -0.928624153137207,
+        -0.9922242164611816
+      ],
+      "type": "VEC3"
+    },
+    {
+      "bufferView": 2,
+      "byteOffset": 210136,
+      "componentType": 5126,
+      "count": 2382,
+      "max": [
+        1.9736328125,
+        0.9948577880859375
+      ],
+      "min": [
+        -0.9912109375,
+        -0.994140625
+      ],
+      "type": "VEC2"
+    },
+    {
+      "bufferView": 1,
+      "byteOffset": 105120,
+      "componentType": 5125,
+      "count": 2382,
+      "type": "SCALAR"
+    },
+    {
+      "bufferView": 5,
+      "componentType": 5126,
+      "count": 162,
+      "max": [
+        100.0,
+        0.9971935749053955,
+        0.3560279607772827,
+        0.0,
+        0.999807596206665,
+        100.0,
+        0.5853281617164612,
+        0.0,
+        0.6660317778587341,
+        0.16860496997833252,
+        100.0,
+        0.0,
+        1.014153242111206,
+        1.6634045839309692,
+        0.10055067390203476,
+        1.0
+      ],
+      "min": [
+        -0.20115862786769867,
+        -0.9973381757736206,
+        -0.35974565148353577,
+        0.0,
+        -0.9998523592948914,
+        -1.0,
+        -0.043900467455387115,
+        0.0,
+        -0.6593214273452759,
+        -0.005430129822343588,
+        -0.9999569058418274,
+        0.0,
+        -1.0297449827194214,
+        -1.7286040782928467,
+        -0.4565073847770691,
+        1.0
+      ],
+      "type": "MAT4"
+    },
+    {
+      "bufferView": 0,
+      "componentType": 5123,
+      "count": 9918,
+      "type": "VEC4"
+    },
+    {
+      "bufferView": 4,
+      "componentType": 5126,
+      "count": 9918,
+      "max": [
+        1.0,
+        0.49803924560546875,
+        0.3294117748737335,
+        0.1764705926179886
+      ],
+      "min": [
+        0.29411765933036804,
+        0.0,
+        0.0,
+        0.0
+      ],
+      "type": "VEC4"
+    },
+    {
+      "bufferView": 0,
+      "byteOffset": 79344,
+      "componentType": 5123,
+      "count": 16349,
+      "type": "VEC4"
+    },
+    {
+      "bufferView": 4,
+      "byteOffset": 158688,
+      "componentType": 5126,
+      "count": 16349,
+      "max": [
+        1.0,
+        0.49803924560546875,
+        0.30980390310287476,
+        0.13725490868091583
+      ],
+      "min": [
+        0.3607843220233917,
+        0.0,
+        0.0,
+        0.0
+      ],
+      "type": "VEC4"
+    },
+    {
+      "bufferView": 0,
+      "byteOffset": 210136,
+      "componentType": 5123,
+      "count": 2382,
+      "type": "VEC4"
+    },
+    {
+      "bufferView": 4,
+      "byteOffset": 420272,
+      "componentType": 5126,
+      "count": 2382,
+      "max": [
+        1.0,
+        0.46666669845581055,
+        0.30980390310287476,
+        0.1568627506494522
+      ],
+      "min": [
+        0.34117648005485535,
+        0.0,
+        0.0,
+        0.0
+      ],
+      "type": "VEC4"
+    }
+  ],
+  "asset": {
+    "extras": {
+      "author": "Vladlen230 (https://sketchfab.com/iLLex_911)",
+      "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
+      "source": "https://sketchfab.com/3d-models/vivian-kane-legendary-pandoras-box-model-489026de44924d6b85f333833488920b",
+      "title": "Vivian Kane - Legendary: Pandora's Box Model"
+    },
+    "generator": "Sketchfab-15.10.0",
+    "version": "2.0"
+  },
+  "bufferViews": [
+    {
+      "buffer": 0,
+      "byteLength": 229192,
+      "byteStride": 8,
+      "name": "shortBufferViews",
+      "target": 34962
+    },
+    {
+      "buffer": 0,
+      "byteLength": 114648,
+      "byteOffset": 229192,
+      "name": "floatBufferViews",
+      "target": 34963
+    },
+    {
+      "buffer": 0,
+      "byteLength": 229192,
+      "byteOffset": 343840,
+      "byteStride": 8,
+      "name": "floatBufferViews",
+      "target": 34962
+    },
+    {
+      "buffer": 0,
+      "byteLength": 687576,
+      "byteOffset": 573032,
+      "byteStride": 12,
+      "name": "floatBufferViews",
+      "target": 34962
+    },
+    {
+      "buffer": 0,
+      "byteLength": 458384,
+      "byteOffset": 1260608,
+      "byteStride": 16,
+      "name": "floatBufferViews",
+      "target": 34962
+    },
+    {
+      "buffer": 0,
+      "byteLength": 10368,
+      "byteOffset": 1718992,
+      "name": "floatBufferViews"
+    }
+  ],
+  "buffers": [
+    {
+      "byteLength": 1729360,
+      "uri": "scene.bin"
+    }
+  ],
+  "extensionsUsed": [
+    "KHR_materials_unlit"
+  ],
+  "images": [
+    {
+      "uri": "textures/Vivian_head_material_baseColor.png"
+    },
+    {
+      "uri": "textures/Vivian_body_combat_material_baseColor.png"
+    },
+    {
+      "uri": "textures/Vivian_hum_material_baseColor.png"
+    }
+  ],
+  "materials": [
+    {
+      "doubleSided": true,
+      "extensions": {
+        "KHR_materials_unlit": {}
+      },
+      "name": "Vivian_head_material",
+      "pbrMetallicRoughness": {
+        "baseColorTexture": {
+          "index": 0
+        },
+        "metallicFactor": 0.0
+      }
+    },
+    {
+      "doubleSided": true,
+      "extensions": {
+        "KHR_materials_unlit": {}
+      },
+      "name": "Vivian_body_combat_material",
+      "pbrMetallicRoughness": {
+        "baseColorTexture": {
+          "index": 1
+        },
+        "metallicFactor": 0.0
+      }
+    },
+    {
+      "doubleSided": true,
+      "extensions": {
+        "KHR_materials_unlit": {}
+      },
+      "name": "Vivian_hum_material",
+      "pbrMetallicRoughness": {
+        "baseColorTexture": {
+          "index": 2
+        },
+        "metallicFactor": 0.0
+      }
+    }
+  ],
+  "meshes": [
+    {
+      "name": "CHA_hum_VivianCombat_standard.mo_Vivian_head_material_0",
+      "primitives": [
+        {
+          "attributes": {
+            "JOINTS_0": 13,
+            "NORMAL": 1,
+            "POSITION": 0,
+            "TEXCOORD_0": 2,
+            "WEIGHTS_0": 14
+          },
+          "indices": 3,
+          "material": 0,
+          "mode": 4
+        }
+      ]
+    },
+    {
+      "name": "CHA_hum_VivianCombat_standard.mo_Vivian_body_combat_material_0",
+      "primitives": [
+        {
+          "attributes": {
+            "JOINTS_0": 15,
+            "NORMAL": 5,
+            "POSITION": 4,
+            "TEXCOORD_0": 6,
+            "WEIGHTS_0": 16
+          },
+          "indices": 7,
+          "material": 1,
+          "mode": 4
+        }
+      ]
+    },
+    {
+      "name": "CHA_hum_VivianCombat_standard.mo_Vivian_hum_material_0",
+      "primitives": [
+        {
+          "attributes": {
+            "JOINTS_0": 17,
+            "NORMAL": 9,
+            "POSITION": 8,
+            "TEXCOORD_0": 10,
+            "WEIGHTS_0": 18
+          },
+          "indices": 11,
+          "material": 2,
+          "mode": 4
+        }
+      ]
+    }
+  ],
+  "nodes": [
+    {
+      "children": [
+        1
+      ],
+      "matrix": [
+        1.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        2.220446049250313e-16,
+        -1.0,
+        0.0,
+        0.0,
+        1.0,
+        2.220446049250313e-16,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "Sketchfab_model"
+    },
+    {
+      "children": [
+        2
+      ],
+      "matrix": [
+        0.009999999776482582,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.009999999776482582,
+        0.0,
+        0.0,
+        -0.009999999776482582,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "vivian.fbx"
+    },
+    {
+      "children": [
+        3,
+        6,
+        8,
+        11,
+        13
+      ],
+      "name": "RootNode"
+    },
+    {
+      "children": [
+        4
+      ],
+      "matrix": [
+        -29.08647719990347,
+        -5.518906457566863,
+        -95.51711910171437,
+        0.0,
+        56.63930913109449,
+        79.46723428563203,
+        -21.83912397841966,
+        0.0,
+        77.11008775993375,
+        -60.45246356562044,
+        -19.98834696773717,
+        0.0,
+        407.6245422363281,
+        590.38623046875,
+        -100.54539489746094,
+        1.0
+      ],
+      "name": "Light"
+    },
+    {
+      "children": [
+        5
+      ],
+      "matrix": [
+        1.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        2.220446049250313e-16,
+        1.0,
+        0.0,
+        0.0,
+        -1.0,
+        2.220446049250313e-16,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "Object_4"
+    },
+    {
+      "name": "Object_5"
+    },
+    {
+      "children": [
+        7
+      ],
+      "matrix": [
+        -65.15583280329096,
+        -44.52713576570858,
+        -61.41703047373549,
+        0.0,
+        -32.40134137821245,
+        89.53957451233616,
+        -30.542088974418615,
+        0.0,
+        68.59205472129975,
+        -1.0718647115348782e-05,
+        -72.7676336239627,
+        0.0,
+        735.88916015625,
+        495.8309326171875,
+        692.5791015625,
+        1.0
+      ],
+      "name": "Camera"
+    },
+    {
+      "name": "Object_7"
+    },
+    {
+      "children": [
+        9
+      ],
+      "matrix": [
+        -29.086464451752825,
+        -5.518900446507607,
+        -95.51711534357838,
+        0.0,
+        56.63932116211723,
+        79.46722801901794,
+        -21.839115578886208,
+        0.0,
+        77.11007701143383,
+        -60.452467701511644,
+        -19.98833775504079,
+        0.0,
+        407.6245422363281,
+        590.38623046875,
+        -100.54539489746094,
+        1.0
+      ],
+      "name": "Light.001"
+    },
+    {
+      "children": [
+        10
+      ],
+      "matrix": [
+        1.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        2.220446049250313e-16,
+        1.0,
+        0.0,
+        0.0,
+        -1.0,
+        2.220446049250313e-16,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "Object_9"
+    },
+    {
+      "name": "Object_10"
+    },
+    {
+      "children": [
+        12
+      ],
+      "matrix": [
+        -65.15583048631922,
+        -44.52712848496765,
+        -61.41702578798792,
+        0.0,
+        -32.401335185591705,
+        89.53956278095312,
+        -30.542079976777014,
+        0.0,
+        68.592052790029,
+        -9.470078337315971e-06,
+        -72.76763544441263,
+        0.0,
+        735.88916015625,
+        495.8309326171875,
+        692.5791015625,
+        1.0
+      ],
+      "name": "Camera.001"
+    },
+    {
+      "name": "Object_12"
+    },
+    {
+      "children": [
+        14
+      ],
+      "matrix": [
+        100.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        99.99999999999972,
+        -7.5497901264043296e-06,
+        0.0,
+        0.0,
+        7.5497901264043296e-06,
+        99.99999999999972,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "CHA_hum_VivianCombat_standard.ao"
+    },
+    {
+      "children": [
+        15,
+        178,
+        179,
+        180,
+        177
+      ],
+      "name": "Object_14"
+    },
+    {
+      "children": [
+        16
+      ],
+      "name": "_rootJoint"
+    },
+    {
+      "children": [
+        17
+      ],
+      "name": "JO_positionTracker_02"
+    },
+    {
+      "children": [
+        18,
+        157,
+        162,
+        167,
+        170,
+        172,
+        174
+      ],
+      "name": "JO_Hip_03",
+      "translation": [
+        -1.6527990845930816e-15,
+        0.9575479626655579,
+        -0.006301669403910637
+      ]
+    },
+    {
+      "children": [
+        19
+      ],
+      "name": "JO_SpineA_04",
+      "translation": [
+        -6.765675666193724e-20,
+        0.10961228609085083,
+        0.009993220679461956
+      ]
+    },
+    {
+      "children": [
+        20
+      ],
+      "name": "JO_spineB_05",
+      "translation": [
+        -1.3880752423129847e-19,
+        0.1422635316848755,
+        -0.0444892942905426
+      ]
+    },
+    {
+      "children": [
+        21,
+        47,
+        75,
+        77,
+        155
+      ],
+      "name": "JO_spineC_06",
+      "translation": [
+        -8.60426655732759e-18,
+        0.14233684539794922,
+        -0.014717157930135727
+      ]
+    },
+    {
+      "children": [
+        22
+      ],
+      "name": "JO_clavicle_L_07",
+      "rotation": [
+        -0.0034445084165781736,
+        -0.0479305200278759,
+        -0.07159695029258728,
+        0.9962754249572754
+      ],
+      "scale": [
+        1.0,
+        0.9999999403953552,
+        1.0
+      ],
+      "translation": [
+        0.07682090997695923,
+        0.10936880111694336,
+        0.006201878190040588
+      ]
+    },
+    {
+      "children": [
+        23
+      ],
+      "name": "JO_shoulder_L_08",
+      "rotation": [
+        -0.004340117331594229,
+        -0.2314540296792984,
+        -0.30761125683784485,
+        0.9229222536087036
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0
+      ],
+      "translation": [
+        0.06937704980373383,
+        -1.2289486051031417e-07,
+        -1.862645149230957e-09
+      ]
+    },
+    {
+      "children": [
+        24
+      ],
+      "name": "JO_humerus_L_09",
+      "rotation": [
+        6.938897212629679e-18,
+        -3.725290742551124e-09,
+        -8.009374141693115e-08,
+        1.0
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.11479150503873825,
+        2.6542693376541138e-08,
+        -1.3115815818309784e-05
+      ]
+    },
+    {
+      "children": [
+        25
+      ],
+      "name": "JO_elbow_L_010",
+      "rotation": [
+        0.5040823221206665,
+        -0.5514640212059021,
+        0.13346129655838013,
+        0.6511347889900208
+      ],
+      "scale": [
+        1.0000001192092896,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        0.1696377396583557,
+        8.195638656616211e-07,
+        -7.450580596923828e-09
+      ]
+    },
+    {
+      "children": [
+        26
+      ],
+      "name": "JO_ulnaRadius_L_011",
+      "rotation": [
+        -4.632198724802746e-16,
+        -0.0001166500078397803,
+        -1.5683472156524658e-06,
+        1.0
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        0.10043996572494507,
+        -9.872019290924072e-08,
+        -1.3217329978942871e-05
+      ]
+    },
+    {
+      "children": [
+        27,
+        31,
+        35,
+        39,
+        43
+      ],
+      "name": "JO_wrist_L_012",
+      "rotation": [
+        8.48703593597716e-20,
+        0.00011667794751701877,
+        1.5646218116671662e-06,
+        1.0
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0000001192092896
+      ],
+      "translation": [
+        0.09579005092382431,
+        2.1979212760925293e-07,
+        -4.3213367462158203e-07
+      ]
+    },
+    {
+      "children": [
+        28
+      ],
+      "name": "JO_thumbA_L_013",
+      "rotation": [
+        -0.015077675692737103,
+        -0.35722705721855164,
+        -0.1735745072364807,
+        0.91762375831604
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.03344950079917908,
+        -0.016824185848236084,
+        0.036512285470962524
+      ]
+    },
+    {
+      "children": [
+        29
+      ],
+      "name": "JO_thumbB_L_014",
+      "rotation": [
+        -1.0730123278790415e-07,
+        0.1950903981924057,
+        -3.798273340294145e-08,
+        0.9807853698730469
+      ],
+      "scale": [
+        0.9999998807907104,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.032646194100379944,
+        7.450580596923828e-08,
+        1.1175870895385742e-08
+      ]
+    },
+    {
+      "children": [
+        30
+      ],
+      "name": "JO_ThumbC_L_015",
+      "rotation": [
+        9.592621807996693e-08,
+        -4.6566128730773926e-08,
+        2.7567148208618164e-07,
+        1.0
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        0.030401982367038727,
+        1.7136335372924805e-07,
+        7.450580596923828e-09
+      ]
+    },
+    {
+      "name": "JO_ThumbC_L_end_0106",
+      "rotation": [
+        2.7755575615628914e-17,
+        -7.703719777548943e-34,
+        -2.7755575615628914e-17,
+        1.0
+      ],
+      "translation": [
+        0.0,
+        0.05000004172325134,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        32
+      ],
+      "name": "JO_indexA_L_016",
+      "rotation": [
+        -0.00030839323881082237,
+        -0.019631285220384598,
+        -0.01570459082722664,
+        0.9996839165687561
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.09652531892061234,
+        -0.004981294274330139,
+        0.031473688781261444
+      ]
+    },
+    {
+      "children": [
+        33
+      ],
+      "name": "JO_indexB_L_017",
+      "rotation": [
+        -2.0858564653281064e-08,
+        -1.896232859621705e-08,
+        -0.1873815506696701,
+        0.9822872281074524
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        0.9999998807907104
+      ],
+      "translation": [
+        0.04397621750831604,
+        -1.4901161193847656e-07,
+        7.450580596923828e-09
+      ]
+    },
+    {
+      "children": [
+        34
+      ],
+      "name": "JO_indexC_L_018",
+      "rotation": [
+        -1.7066094315509872e-08,
+        -9.481164298108524e-09,
+        -0.18738116323947906,
+        0.9822872877120972
+      ],
+      "scale": [
+        0.9999998807907104,
+        0.9999998211860657,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.03496112301945686,
+        3.725290298461914e-09,
+        3.725290298461914e-08
+      ]
+    },
+    {
+      "name": "JO_indexC_L_end_0107",
+      "rotation": [
+        5.551115123125783e-17,
+        2.7755575615628914e-17,
+        2.7755575615628914e-17,
+        1.0
+      ],
+      "translation": [
+        3.3306690738754696e-16,
+        0.05000004172325134,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        36
+      ],
+      "name": "JO_middleA_L_019",
+      "rotation": [
+        5.588626006414188e-09,
+        -1.4903003275890114e-08,
+        -0.015707552433013916,
+        0.9998767375946045
+      ],
+      "scale": [
+        0.9999998807907104,
+        0.9999999403953552,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.09477894008159637,
+        -0.003210127353668213,
+        0.010675102472305298
+      ]
+    },
+    {
+      "children": [
+        37
+      ],
+      "name": "JO_middleB_L_020",
+      "rotation": [
+        1.88827065095154e-09,
+        -3.77654130190308e-09,
+        -0.16418713331222534,
+        0.9864292144775391
+      ],
+      "scale": [
+        0.9999999403953552,
+        0.9999999403953552,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.050651341676712036,
+        -1.601874828338623e-07,
+        -0.0003364160656929016
+      ]
+    },
+    {
+      "children": [
+        38
+      ],
+      "name": "JO_middleC_L_021",
+      "rotation": [
+        -3.77654085781387e-09,
+        1.888270517724777e-08,
+        -0.16418704390525818,
+        0.9864292144775391
+      ],
+      "translation": [
+        0.03413226082921028,
+        1.2665987014770508e-07,
+        2.9802322387695313e-08
+      ]
+    },
+    {
+      "name": "JO_middleC_L_end_0108",
+      "rotation": [
+        -5.551115123125783e-17,
+        -3.0814879110195774e-33,
+        5.551115123125783e-17,
+        1.0
+      ],
+      "translation": [
+        0.0,
+        0.050000015646219254,
+        -1.1102230246251565e-16
+      ]
+    },
+    {
+      "children": [
+        40
+      ],
+      "name": "JO_ringA_L_022",
+      "rotation": [
+        2.0529611788333568e-08,
+        -9.331641237508848e-09,
+        -0.06279068440198898,
+        0.9980267286300659
+      ],
+      "scale": [
+        1.0,
+        0.9999999403953552,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.09437410533428192,
+        -0.004856318235397339,
+        -0.009817034006118774
+      ]
+    },
+    {
+      "children": [
+        41
+      ],
+      "name": "JO_ringB_L_023",
+      "rotation": [
+        7.495847498262265e-09,
+        -3.747924193220342e-09,
+        -0.10973433405160904,
+        0.993960976600647
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0
+      ],
+      "translation": [
+        0.04973375052213669,
+        2.9802322387695313e-08,
+        -2.9802322387695313e-08
+      ]
+    },
+    {
+      "children": [
+        42
+      ],
+      "name": "JO_ringC_L_024",
+      "rotation": [
+        1.1243774800107076e-08,
+        -2.0528237214679544e-17,
+        -0.10973459482192993,
+        0.9939609169960022
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.04128962382674217,
+        8.195638656616211e-08,
+        -7.450580596923828e-09
+      ]
+    },
+    {
+      "name": "JO_ringC_L_end_0109",
+      "rotation": [
+        2.7755575615628914e-17,
+        -2.7755575615628914e-17,
+        -5.551115123125783e-17,
+        1.0
+      ],
+      "translation": [
+        -2.220446049250313e-16,
+        0.05000000819563866,
+        -1.1102230246251565e-16
+      ]
+    },
+    {
+      "children": [
+        44
+      ],
+      "name": "JO_pinkyA_L_025",
+      "rotation": [
+        1.8673085300235925e-09,
+        -9.336541317850333e-09,
+        -0.07062681019306183,
+        0.9975028038024902
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.09387537091970444,
+        -0.0069668591022491455,
+        -0.029918789863586426
+      ]
+    },
+    {
+      "children": [
+        45
+      ],
+      "name": "JO_pinkyB_L_026",
+      "rotation": [
+        2.2487549600214152e-08,
+        2.436150836615525e-08,
+        -0.10973484069108963,
+        0.9939609169960022
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.030773982405662537,
+        0.0,
+        4.470348358154297e-08
+      ]
+    },
+    {
+      "children": [
+        46
+      ],
+      "name": "JO_pinkyC_L_027",
+      "rotation": [
+        -1.1243773023750236e-08,
+        7.495848386440684e-09,
+        -0.10973460972309113,
+        0.9939609169960022
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0
+      ],
+      "translation": [
+        0.02823494002223015,
+        1.043081283569336e-07,
+        2.9802322387695313e-08
+      ]
+    },
+    {
+      "name": "JO_pinkyC_L_end_0110",
+      "rotation": [
+        -2.7755575615628914e-17,
+        -7.703719777548943e-34,
+        2.7755575615628914e-17,
+        1.0
+      ],
+      "translation": [
+        1.1102230246251565e-16,
+        0.050000037997961044,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        48
+      ],
+      "name": "JO_clavicle_R_028",
+      "rotation": [
+        -0.003289808053523302,
+        0.046856336295604706,
+        0.0699608102440834,
+        0.9964432716369629
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        1.0
+      ],
+      "translation": [
+        -0.07682090997695923,
+        0.10936880111694336,
+        0.006201878190040588
+      ]
+    },
+    {
+      "children": [
+        49
+      ],
+      "name": "JO_shoulder_R_029",
+      "rotation": [
+        0.10776032507419586,
+        0.26294174790382385,
+        0.2509397268295288,
+        0.9253532290458679
+      ],
+      "scale": [
+        1.0000001192092896,
+        1.0000001192092896,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.06975003331899643,
+        1.2848268227116932e-07,
+        -1.862645149230957e-09
+      ]
+    },
+    {
+      "children": [
+        50
+      ],
+      "name": "JO_humerus_R_030",
+      "rotation": [
+        -2.8405338525772095e-08,
+        -6.98490265627072e-10,
+        1.4156103134155273e-07,
+        1.0
+      ],
+      "scale": [
+        1.0000001192092896,
+        1.0,
+        1.0
+      ],
+      "translation": [
+        -0.114791639149189,
+        -1.1455267667770386e-07,
+        -1.308787614107132e-05
+      ]
+    },
+    {
+      "children": [
+        51
+      ],
+      "name": "JO_elbow_R_031",
+      "rotation": [
+        0.04914245381951332,
+        0.5358374714851379,
+        0.05121181532740593,
+        0.8413326144218445
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        1.0
+      ],
+      "translation": [
+        -0.16926011443138123,
+        9.5367431640625e-07,
+        -5.4016709327697754e-08
+      ]
+    },
+    {
+      "children": [
+        52
+      ],
+      "name": "JO_ulnaRadius_R_032",
+      "rotation": [
+        3.166496753692627e-08,
+        0.00011643394827842712,
+        1.4789401348025422e-06,
+        1.0
+      ],
+      "translation": [
+        -0.10050477832555771,
+        -1.4901161193847656e-07,
+        -1.3167038559913635e-05
+      ]
+    },
+    {
+      "children": [
+        53,
+        57,
+        61,
+        65,
+        69,
+        73
+      ],
+      "name": "JO_wrist_R_033",
+      "rotation": [
+        -2.2351738238057806e-08,
+        -0.00011643021571217105,
+        -1.3336539268493652e-06,
+        1.0
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.09579005837440491,
+        2.905726432800293e-07,
+        -4.3585896492004395e-07
+      ]
+    },
+    {
+      "children": [
+        54
+      ],
+      "name": "JO_thumbA_R_034",
+      "rotation": [
+        -0.01588846929371357,
+        0.35296183824539185,
+        0.173503115773201,
+        0.9192726016044617
+      ],
+      "scale": [
+        1.0000001192092896,
+        1.0,
+        1.0
+      ],
+      "translation": [
+        -0.03336336463689804,
+        -0.01784384250640869,
+        0.03568527102470398
+      ]
+    },
+    {
+      "children": [
+        55
+      ],
+      "name": "JO_thumbB_R_035",
+      "rotation": [
+        1.8991372030541243e-07,
+        -0.19509044289588928,
+        -1.0255339333298252e-07,
+        0.9807853698730469
+      ],
+      "scale": [
+        0.9999999403953552,
+        0.9999998807907104,
+        0.9999998807907104
+      ],
+      "translation": [
+        -0.032550014555454254,
+        7.078051567077637e-08,
+        -1.1175870895385742e-08
+      ]
+    },
+    {
+      "children": [
+        56
+      ],
+      "name": "JO_ThumbC_R_036",
+      "rotation": [
+        2.7755562380739113e-17,
+        1.4901161193847656e-08,
+        -2.4586915969848633e-07,
+        1.0
+      ],
+      "translation": [
+        -0.030689984560012817,
+        -3.725290298461914e-08,
+        -2.9802322387695313e-08
+      ]
+    },
+    {
+      "name": "JO_ThumbC_R_end_0111",
+      "rotation": [
+        5.551115123125783e-17,
+        -9.71445146547012e-17,
+        -5.551115123125783e-17,
+        1.0
+      ],
+      "translation": [
+        -5.551115123125783e-17,
+        0.05000001937150955,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        58
+      ],
+      "name": "JO_indexA_R_037",
+      "rotation": [
+        -0.0006167482933960855,
+        0.01962398923933506,
+        0.0314050130546093,
+        0.9993138909339905
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.09655985981225967,
+        -0.0049829185009002686,
+        0.031485073268413544
+      ]
+    },
+    {
+      "children": [
+        59
+      ],
+      "name": "JO_indexB_R_038",
+      "rotation": [
+        9.229532338395074e-08,
+        -3.57879841317299e-08,
+        0.1486717164516449,
+        0.9888865947723389
+      ],
+      "scale": [
+        0.9999998807907104,
+        0.9999999403953552,
+        1.0
+      ],
+      "translation": [
+        -0.043976157903671265,
+        5.21540641784668e-08,
+        2.9802322387695313e-08
+      ]
+    },
+    {
+      "children": [
+        60
+      ],
+      "name": "JO_indexC_R_039",
+      "rotation": [
+        -1.8835784487691853e-08,
+        3.013725802247791e-08,
+        0.1486724466085434,
+        0.9888865947723389
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        1.0
+      ],
+      "translation": [
+        -0.03496103733778,
+        2.60770320892334e-08,
+        1.043081283569336e-07
+      ]
+    },
+    {
+      "name": "JO_indexC_R_end_0112",
+      "rotation": [
+        1.1555579666323415e-33,
+        -2.0816681711721685e-17,
+        5.551115123125783e-17,
+        1.0
+      ],
+      "translation": [
+        0.0,
+        0.050000015646219254,
+        1.6653345369377348e-16
+      ]
+    },
+    {
+      "children": [
+        62
+      ],
+      "name": "JO_middleA_R_040",
+      "rotation": [
+        5.0316248945136977e-08,
+        -2.4226341821531605e-08,
+        0.031410686671733856,
+        0.9995066523551941
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.09481287747621536,
+        -0.0032111629843711853,
+        0.010678999125957489
+      ]
+    },
+    {
+      "children": [
+        63
+      ],
+      "name": "JO_middleB_R_041",
+      "rotation": [
+        -2.2863899218350525e-08,
+        2.66745470156593e-08,
+        0.21047180891036987,
+        0.9776000380516052
+      ],
+      "scale": [
+        1.0,
+        0.9999999403953552,
+        1.0
+      ],
+      "translation": [
+        -0.05065125972032547,
+        3.725290298461914e-08,
+        -0.00033650919795036316
+      ]
+    },
+    {
+      "children": [
+        64
+      ],
+      "name": "JO_middleC_R_042",
+      "rotation": [
+        1.047928499531281e-08,
+        -4.3822463879905627e-08,
+        0.21047160029411316,
+        0.9775999784469604
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        1.0
+      ],
+      "translation": [
+        -0.0341324508190155,
+        9.685754776000977e-08,
+        8.568167686462402e-08
+      ]
+    },
+    {
+      "name": "JO_middleC_R_end_0113",
+      "rotation": [
+        -1.3877787807814457e-17,
+        4.336808689942018e-17,
+        -1.3877787807814457e-17,
+        1.0
+      ],
+      "translation": [
+        -1.1102230246251565e-16,
+        0.04999997466802597,
+        -5.551115123125783e-17
+      ]
+    },
+    {
+      "children": [
+        66
+      ],
+      "name": "JO_ringA_R_043",
+      "rotation": [
+        3.176288032591401e-08,
+        -2.428926215714e-08,
+        0.078458771109581,
+        0.9969173669815063
+      ],
+      "scale": [
+        0.9999999403953552,
+        1.0,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.09440793842077255,
+        -0.004857949912548065,
+        -0.00982053205370903
+      ]
+    },
+    {
+      "children": [
+        67
+      ],
+      "name": "JO_ringB_R_044",
+      "rotation": [
+        5.644245959501859e-09,
+        -5.644245515412649e-09,
+        0.1409013271331787,
+        0.990023672580719
+      ],
+      "scale": [
+        0.9999999403953552,
+        0.9999999403953552,
+        0.9999999403953552
+      ],
+      "translation": [
+        -0.04973375052213669,
+        -5.21540641784668e-08,
+        7.078051567077637e-08
+      ]
+    },
+    {
+      "children": [
+        68
+      ],
+      "name": "JO_ringC_R_045",
+      "rotation": [
+        -1.7873443169946768e-08,
+        1.6932734325791898e-08,
+        0.14090126752853394,
+        0.990023672580719
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        0.9999999403953552
+      ],
+      "translation": [
+        -0.02792567014694214,
+        2.9802322387695313e-08,
+        -2.60770320892334e-08
+      ]
+    },
+    {
+      "name": "JO_ringC_R_end_0114",
+      "rotation": [
+        -6.938893903907228e-18,
+        6.938893903907228e-18,
+        4.81482486096809e-35,
+        1.0
+      ],
+      "translation": [
+        0.0,
+        0.05000000819563866,
+        -1.1102230246251565e-16
+      ]
+    },
+    {
+      "children": [
+        70
+      ],
+      "name": "JO_pinkyA_R_046",
+      "rotation": [
+        5.23493000059716e-08,
+        -1.8696180603683388e-08,
+        0.08628617972135544,
+        0.9962704181671143
+      ],
+      "scale": [
+        1.0,
+        1.0000001192092896,
+        1.0000001192092896
+      ],
+      "translation": [
+        -0.09390898048877716,
+        -0.006969355046749115,
+        -0.029929526150226593
+      ]
+    },
+    {
+      "children": [
+        71
+      ],
+      "name": "JO_pinkyB_R_047",
+      "rotation": [
+        -2.2529393461923064e-08,
+        9.387247423831013e-09,
+        0.12533317506313324,
+        0.9921147227287292
+      ],
+      "scale": [
+        0.9999998807907104,
+        0.9999999403953552,
+        0.9999999403953552
+      ],
+      "translation": [
+        -0.03077395260334015,
+        1.4901161193847656e-08,
+        1.4901161193847656e-08
+      ]
+    },
+    {
+      "children": [
+        72
+      ],
+      "name": "JO_pinkyC_R_048",
+      "rotation": [
+        -5.632349253659186e-09,
+        -3.754899058350247e-09,
+        0.12533356249332428,
+        0.9921146631240845
+      ],
+      "scale": [
+        1.0,
+        0.9999998807907104,
+        0.9999999403953552
+      ],
+      "translation": [
+        -0.028234973549842834,
+        -1.1102230246251565e-16,
+        2.2351741790771484e-08
+      ]
+    },
+    {
+      "name": "JO_pinkyC_R_end_0115",
+      "rotation": [
+        -6.938893903907228e-18,
+        2.42861286636753e-17,
+        1.6851887013388314e-34,
+        1.0
+      ],
+      "translation": [
+        1.1102230246251565e-16,
+        0.04999997466802597,
+        5.551115123125783e-17
+      ]
+    },
+    {
+      "children": [
+        74
+      ],
+      "name": "JO_Gun_049",
+      "rotation": [
+        -0.02045334503054619,
+        -0.02993883565068245,
+        -0.4180656969547272,
+        0.9076929092407227
+      ],
+      "scale": [
+        1.0000001192092896,
+        0.9999999403953552,
+        1.0
+      ],
+      "translation": [
+        -0.24967241287231445,
+        0.08164309710264206,
+        0.016418620944023132
+      ]
+    },
+    {
+      "name": "JO_Gun_end_0116",
+      "rotation": [
+        -5.551115123125783e-17,
+        6.938893903907228e-18,
+        -2.7755575615628914e-17,
+        1.0
+      ],
+      "translation": [
+        -1.1102230246251565e-16,
+        0.050000011920928955,
+        -1.1102230246251565e-16
+      ]
+    },
+    {
+      "children": [
+        76
+      ],
+      "name": "JO_chest_L_050",
+      "translation": [
+        0.08152934163808823,
+        -0.015793561935424805,
+        0.15528136491775513
+      ]
+    },
+    {
+      "name": "JO_chest_L_end_0117",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        78
+      ],
+      "name": "JO_neck_051",
+      "translation": [
+        4.01175979643318e-19,
+        0.16184008121490479,
+        0.010337211191654205
+      ]
+    },
+    {
+      "children": [
+        79,
+        81,
+        83,
+        85,
+        91,
+        93,
+        95,
+        97,
+        99,
+        101,
+        103,
+        105,
+        107,
+        109,
+        111,
+        113,
+        115,
+        117,
+        119,
+        121,
+        123,
+        125,
+        127,
+        129,
+        131,
+        133,
+        135,
+        137,
+        139,
+        141,
+        143,
+        145,
+        147,
+        149,
+        151,
+        153
+      ],
+      "name": "JO_head_052",
+      "translation": [
+        2.286988957586611e-20,
+        0.09550058841705322,
+        0.03138944134116173
+      ]
+    },
+    {
+      "children": [
+        80
+      ],
+      "name": "JO_eye_L_053",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.029197728261351585,
+        0.06626951694488525,
+        0.07695963978767395
+      ]
+    },
+    {
+      "name": "JO_eye_L_end_0118",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        82
+      ],
+      "name": "JO_eye_R_054",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.029548408463597298,
+        0.06622922420501709,
+        0.07694979012012482
+      ]
+    },
+    {
+      "name": "JO_eye_R_end_0119",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        84
+      ],
+      "name": "JO_camera_055",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.0017831522272899747,
+        0.0,
+        -0.3838818073272705
+      ]
+    },
+    {
+      "name": "JO_camera_end_0120",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        5.551115123125783e-17
+      ]
+    },
+    {
+      "children": [
+        86
+      ],
+      "name": "JO_jaw_056",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.00034710383624769747,
+        0.009963154792785645,
+        0.02295655570924282
+      ]
+    },
+    {
+      "children": [
+        87
+      ],
+      "name": "JO_Tongue_01_057",
+      "translation": [
+        0.0008573122322559357,
+        -0.02710878849029541,
+        0.025518594309687614
+      ]
+    },
+    {
+      "children": [
+        88
+      ],
+      "name": "JO_Tongue_02_058",
+      "rotation": [
+        -6.617444900424222e-24,
+        -0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -8.968287147581577e-06,
+        0.017531633377075195,
+        0.007785208523273468
+      ]
+    },
+    {
+      "children": [
+        89
+      ],
+      "name": "JO_Tongue_03_059",
+      "translation": [
+        -3.241782542318106e-05,
+        0.0038052797317504883,
+        0.01814091205596924
+      ]
+    },
+    {
+      "children": [
+        90
+      ],
+      "name": "JO_Tongue_04_060",
+      "rotation": [
+        -6.617444900424222e-24,
+        -0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.00027227692771703005,
+        -0.004053711891174316,
+        0.0164526104927063
+      ]
+    },
+    {
+      "name": "JO_Tongue_04_end_0121",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        92
+      ],
+      "name": "JO_Lf_Cheek_061",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.037623800337314606,
+        0.03573024272918701,
+        0.0829133689403534
+      ]
+    },
+    {
+      "name": "JO_Lf_Cheek_end_0122",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        94
+      ],
+      "name": "JO_Lf_Nostril_062",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.013841088861227036,
+        0.027219176292419434,
+        0.10265389084815979
+      ]
+    },
+    {
+      "name": "JO_Lf_Nostril_end_0123",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        96
+      ],
+      "name": "JO_Lf_EyeLid_Top_063",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.029383869841694832,
+        0.07297670841217041,
+        0.08994089066982269
+      ]
+    },
+    {
+      "name": "JO_Lf_EyeLid_Top_end_0124",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        98
+      ],
+      "name": "JO_Lf_EyeLid_Bottom_064",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.029487330466508865,
+        0.058255791664123535,
+        0.08509820699691772
+      ]
+    },
+    {
+      "name": "JO_Lf_EyeLid_Bottom_end_0125",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        100
+      ],
+      "name": "JO_Lf_Top_Lip_065",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.012991446070373058,
+        0.0029985904693603516,
+        0.1011790782213211
+      ]
+    },
+    {
+      "name": "JO_Lf_Top_Lip_end_0126",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        102
+      ],
+      "name": "JO_Lf_Bottom_Lip_066",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.008357229642570019,
+        -0.004590034484863281,
+        0.09896054863929749
+      ]
+    },
+    {
+      "name": "JO_Lf_Bottom_Lip_end_0127",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        104
+      ],
+      "name": "JO_Lf_Corner_Lip_067",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.021374931558966637,
+        -0.003300905227661133,
+        0.09139707684516907
+      ]
+    },
+    {
+      "name": "JO_Lf_Corner_Lip_end_0128",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        106
+      ],
+      "name": "JO_Cn_Top_Lip_068",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0004920514184050262,
+        0.007111310958862305,
+        0.10637511312961578
+      ]
+    },
+    {
+      "name": "JO_Cn_Top_Lip_end_0129",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        108
+      ],
+      "name": "JO_Cn_Bottom_Lip_069",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.00035621190909296274,
+        -0.004053711891174316,
+        0.10173900425434113
+      ]
+    },
+    {
+      "name": "JO_Cn_Bottom_Lip_end_0130",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        110
+      ],
+      "name": "JO_Cn_Wrinkle_Nose_070",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0005210842937231064,
+        0.02879786491394043,
+        0.11904861032962799
+      ]
+    },
+    {
+      "name": "JO_Cn_Wrinkle_Nose_end_0131",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        112
+      ],
+      "name": "JO_Rt_Mid_Brow_071",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.031870581209659576,
+        0.08474195003509521,
+        0.0983428955078125
+      ]
+    },
+    {
+      "name": "JO_Rt_Mid_Brow_end_0132",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        114
+      ],
+      "name": "JO_Rt_Outer_Brow_072",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.0496683306992054,
+        0.07472825050354004,
+        0.06890023499727249
+      ]
+    },
+    {
+      "name": "JO_Rt_Outer_Brow_end_0133",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        116
+      ],
+      "name": "JO_Rt_Inner_Brow_073",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.0067462013103067875,
+        0.07917177677154541,
+        0.10651381313800812
+      ]
+    },
+    {
+      "name": "JO_Rt_Inner_Brow_end_0134",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        118
+      ],
+      "name": "JO_Rt_Cheek_074",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.03792222589254379,
+        0.03573274612426758,
+        0.08339469134807587
+      ]
+    },
+    {
+      "name": "JO_Rt_Cheek_end_0135",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        120
+      ],
+      "name": "JO_Rt_Nostril_075",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.01386997476220131,
+        0.027217745780944824,
+        0.1027858555316925
+      ]
+    },
+    {
+      "name": "JO_Rt_Nostril_end_0136",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        122
+      ],
+      "name": "JO_Rt_Lower_Cheek_076",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.045661188662052155,
+        -0.0003648996353149414,
+        0.0672667920589447
+      ]
+    },
+    {
+      "name": "JO_Rt_Lower_Cheek_end_0137",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -6.938893903907228e-18
+      ]
+    },
+    {
+      "children": [
+        124
+      ],
+      "name": "JO_Rt_EyeLid_Top_077",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.029558992013335228,
+        0.07297611236572266,
+        0.09021243453025818
+      ]
+    },
+    {
+      "name": "JO_Rt_EyeLid_Top_end_0138",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        126
+      ],
+      "name": "JO_Rt_EyeLid_Bottom_078",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.029672961682081223,
+        0.05825638771057129,
+        0.08537851274013519
+      ]
+    },
+    {
+      "name": "JO_Rt_EyeLid_Bottom_end_0139",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        128
+      ],
+      "name": "JO_Rt_Top_Lip_079",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.013046026229858398,
+        0.0029954910278320313,
+        0.10131847858428955
+      ]
+    },
+    {
+      "name": "JO_Rt_Top_Lip_end_0140",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        130
+      ],
+      "name": "JO_Rt_Bottom_Lip_080",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.009344150312244892,
+        -0.00458681583404541,
+        0.09896098077297211
+      ]
+    },
+    {
+      "name": "JO_Rt_Bottom_Lip_end_0141",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        132
+      ],
+      "name": "JO_Rt_Corner_Lip_081",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.021492518484592438,
+        -0.00330352783203125,
+        0.09161476790904999
+      ]
+    },
+    {
+      "name": "JO_Rt_Corner_Lip_end_0142",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        134
+      ],
+      "name": "JO_Lf_Inner_Brow_082",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0067184134386479855,
+        0.07916772365570068,
+        0.10643993318080902
+      ]
+    },
+    {
+      "name": "JO_Lf_Inner_Brow_end_0143",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        136
+      ],
+      "name": "JO_Lf_Mid_Brow_083",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.03182478994131088,
+        0.08474195003509521,
+        0.09810192883014679
+      ]
+    },
+    {
+      "name": "JO_Lf_Mid_Brow_end_0144",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        138
+      ],
+      "name": "JO_Lf_Outer_Brow_00",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.04945787042379379,
+        0.07472825050354004,
+        0.0684555321931839
+      ]
+    },
+    {
+      "name": "JO_Lf_Outer_Brow_end_0145",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        140
+      ],
+      "name": "JO_Lf_Lower_Cheek_01",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.045305103063583374,
+        -0.0003650188446044922,
+        0.0668088048696518
+      ]
+    },
+    {
+      "name": "JO_Lf_Lower_Cheek_end_0146",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        6.938893903907228e-18
+      ]
+    },
+    {
+      "children": [
+        142
+      ],
+      "name": "JO_Cn_Chin_084",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0003939723246730864,
+        -0.02822113037109375,
+        0.09838318824768066
+      ]
+    },
+    {
+      "name": "JO_Cn_Chin_end_0147",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        144
+      ],
+      "name": "JO_Ft_Hair_085",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -4.960976680861871e-17,
+        0.10537290573120117,
+        0.06157485023140907
+      ]
+    },
+    {
+      "name": "JO_Ft_Hair_end_0148",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -6.938893903907228e-18
+      ]
+    },
+    {
+      "children": [
+        146
+      ],
+      "name": "JO_Lf_Hair_086",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.03813000023365021,
+        0.11298298835754395,
+        0.004155302420258522
+      ]
+    },
+    {
+      "name": "JO_Lf_Hair_end_0149",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.734723475976807e-18
+      ]
+    },
+    {
+      "children": [
+        148
+      ],
+      "name": "JO_Rt_Hair_087",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.0385797843337059,
+        0.11298298835754395,
+        0.004155302420258522
+      ]
+    },
+    {
+      "name": "JO_Rt_Hair_end_0150",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.734723475976807e-18
+      ]
+    },
+    {
+      "children": [
+        150
+      ],
+      "name": "JO_Bk_Hair_088",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0013874550350010395,
+        0.11950290203094482,
+        -0.06796655058860779
+      ]
+    },
+    {
+      "name": "JO_Bk_Hair_end_0151",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        152
+      ],
+      "name": "JO_Rt_NoseBridge_089",
+      "rotation": [
+        6.617444900424222e-24,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        -0.01059224084019661,
+        0.05430638790130615,
+        0.0988541841506958
+      ]
+    },
+    {
+      "name": "JO_Rt_NoseBridge_end_0152",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        154
+      ],
+      "name": "JO_Lf_NoseBridge_090",
+      "rotation": [
+        0.9999892115592957,
+        -2.0304152803518605e-10,
+        -0.004645048640668392,
+        -4.371091932853233e-08
+      ],
+      "translation": [
+        0.010729999281466007,
+        0.05430328845977783,
+        0.09885413944721222
+      ]
+    },
+    {
+      "name": "JO_Lf_NoseBridge_end_0153",
+      "rotation": [
+        -8.271806125530277e-25,
+        -0.0,
+        9.693522803355793e-26,
+        1.0
+      ],
+      "translation": [
+        -1.734723475976807e-18,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        156
+      ],
+      "name": "JO_chest_R_091",
+      "translation": [
+        -0.08152934163808823,
+        -0.015793561935424805,
+        0.15528136491775513
+      ]
+    },
+    {
+      "name": "JO_chest_R_end_0154",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        1.3877787807814457e-17
+      ]
+    },
+    {
+      "children": [
+        158
+      ],
+      "name": "JO_upperLeg_L_092",
+      "rotation": [
+        -0.007243660744279623,
+        0.08236953616142273,
+        0.054546937346458435,
+        0.9950816035270691
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        0.09062235057353973,
+        -0.05109506845474243,
+        0.017915301024913788
+      ]
+    },
+    {
+      "children": [
+        159
+      ],
+      "name": "jo_knee_L_093",
+      "rotation": [
+        0.03384876251220703,
+        -2.446123525956523e-09,
+        1.7996478973714147e-08,
+        0.9994269609451294
+      ],
+      "scale": [
+        1.0,
+        1.0,
+        0.9999999403953552
+      ],
+      "translation": [
+        -6.05359673500061e-09,
+        -0.3597128689289093,
+        -0.0002730041742324829
+      ]
+    },
+    {
+      "children": [
+        160
+      ],
+      "name": "JO_ankle_L_094",
+      "rotation": [
+        -0.006238187197595835,
+        0.014212661422789097,
+        -0.06544128060340881,
+        0.9977357983589172
+      ],
+      "scale": [
+        0.9999999403953552,
+        0.9999997615814209,
+        0.9999999403953552
+      ],
+      "translation": [
+        -3.259629011154175e-08,
+        -0.43220847845077515,
+        1.30385160446167e-08
+      ]
+    },
+    {
+      "children": [
+        161
+      ],
+      "name": "JO_ball_L_095",
+      "rotation": [
+        -5.289679393172264e-06,
+        -1.2030068319290876e-06,
+        -9.6810981631279e-07,
+        1.0
+      ],
+      "translation": [
+        4.94765117764473e-09,
+        -0.08452896028757095,
+        0.10766027122735977
+      ]
+    },
+    {
+      "name": "JO_ball_L_end_0155",
+      "rotation": [
+        -1.8055593228630336e-35,
+        -1.3877787807814457e-17,
+        -1.3010426069826053e-18,
+        1.0
+      ],
+      "translation": [
+        -2.7755575615628914e-17,
+        0.05000000074505806,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        163
+      ],
+      "name": "JO_upperLeg_R_096",
+      "rotation": [
+        -0.007243623025715351,
+        -0.08236952871084213,
+        -0.054546941071748734,
+        0.9950816035270691
+      ],
+      "translation": [
+        -0.09062235057353973,
+        -0.05109506845474243,
+        0.017915301024913788
+      ]
+    },
+    {
+      "children": [
+        164
+      ],
+      "name": "jo_knee_R_097",
+      "rotation": [
+        0.03384869173169136,
+        -4.83400564021963e-09,
+        -1.2026773354989473e-08,
+        0.9994269609451294
+      ],
+      "translation": [
+        2.561137080192566e-08,
+        -0.3597128093242645,
+        -0.00027301255613565445
+      ]
+    },
+    {
+      "children": [
+        165
+      ],
+      "name": "JO_ankle_R_098",
+      "rotation": [
+        -0.006238113157451153,
+        -0.014212646521627903,
+        0.06544124335050583,
+        0.9977357983589172
+      ],
+      "scale": [
+        1.0,
+        0.9999998211860657,
+        1.0
+      ],
+      "translation": [
+        2.8405338525772095e-08,
+        -0.4322085976600647,
+        7.450580596923828e-09
+      ]
+    },
+    {
+      "children": [
+        166
+      ],
+      "name": "JO_ball_R_099",
+      "rotation": [
+        -5.364185653888853e-06,
+        1.1778612361013074e-06,
+        9.867363814919372e-07,
+        1.0
+      ],
+      "scale": [
+        0.9999999403953552,
+        0.9999998807907104,
+        0.9999999403953552
+      ],
+      "translation": [
+        1.4726538211107254e-08,
+        -0.08452893048524857,
+        0.10766024142503738
+      ]
+    },
+    {
+      "name": "JO_ball_R_end_0156",
+      "rotation": [
+        -3.469446951953614e-18,
+        1.3877787807814457e-17,
+        4.81482486096809e-35,
+        1.0
+      ],
+      "translation": [
+        -2.7755575615628914e-17,
+        0.05000000074505806,
+        0.0
+      ]
+    },
+    {
+      "children": [
+        168
+      ],
+      "name": "JO_prop_0100",
+      "rotation": [
+        -0.022120218724012375,
+        -0.0,
+        0.0,
+        0.999755322933197
+      ],
+      "scale": [
+        1.0,
+        0.9999999403953552,
+        1.0
+      ],
+      "translation": [
+        0.633383572101593,
+        -0.9721600413322449,
+        -0.35644230246543884
+      ]
+    },
+    {
+      "children": [
+        169
+      ],
+      "name": "JO_Prop_Socket_0101",
+      "rotation": [
+        -1.862645149230957e-09,
+        -0.0,
+        0.0,
+        1.0
+      ],
+      "translation": [
+        0.0,
+        7.450580596923828e-09,
+        6.810296326875687e-09
+      ]
+    },
+    {
+      "name": "JO_Prop_Socket_end_0157",
+      "translation": [
+        0.0,
+        0.05000000074505806,
+        -5.551115123125783e-17
+      ]
+    },
+    {
+      "children": [
+        171
+      ],
+      "name": "JO_genericA_0102",
+      "translation": [
+        0.006441337522119284,
+        0.0,
+        -0.024899695068597794
+      ]
+    },
+    {
+      "name": "JO_genericA_end_0158",
+      "translation": [
+        0.0,
+        0.050000011920928955,
+        -3.469446951953614e-18
+      ]
+    },
+    {
+      "children": [
+        173
+      ],
+      "name": "JO_genericB_0103",
+      "translation": [
+        -0.006000000052154064,
+        0.0,
+        -0.024899695068597794
+      ]
+    },
+    {
+      "name": "JO_genericB_end_0159",
+      "translation": [
+        0.0,
+        0.050000011920928955,
+        -3.469446951953614e-18
+      ]
+    },
+    {
+      "children": [
+        175
+      ],
+      "name": "JO_GunHolster_Base_0104",
+      "translation": [
+        -0.16564935445785522,
+        0.0550500750541687,
+        0.006301669403910637
+      ]
+    },
+    {
+      "children": [
+        176
+      ],
+      "name": "JO_GunHolster_Flap_0105",
+      "translation": [
+        0.004879698157310486,
+        0.07389247417449951,
+        -7.770203802078121e-20
+      ]
+    },
+    {
+      "name": "JO_GunHolster_Flap_end_0160",
+      "translation": [
+        0.0,
+        0.04999995231628418,
+        -1.3234889800848443e-23
+      ]
+    },
+    {
+      "matrix": [
+        100.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        100.0,
+        -7.5497900979826235e-06,
+        0.0,
+        0.0,
+        7.5497900979826235e-06,
+        100.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+      ],
+      "name": "Object_177"
+    },
+    {
+      "mesh": 0,
+      "name": "Object_178",
+      "skin": 0
+    },
+    {
+      "mesh": 1,
+      "name": "Object_179",
+      "skin": 0
+    },
+    {
+      "mesh": 2,
+      "name": "Object_180",
+      "skin": 0
+    }
+  ],
+  "samplers": [
+    {
+      "magFilter": 9729,
+      "minFilter": 9987,
+      "wrapS": 10497,
+      "wrapT": 10497
+    }
+  ],
+  "scene": 0,
+  "scenes": [
+    {
+      "name": "Sketchfab_Scene",
+      "nodes": [
+        0
+      ]
+    }
+  ],
+  "skins": [
+    {
+      "inverseBindMatrices": 12,
+      "joints": [
+        15,
+        16,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        32,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        48,
+        49,
+        50,
+        51,
+        52,
+        53,
+        54,
+        55,
+        56,
+        57,
+        58,
+        59,
+        60,
+        61,
+        62,
+        63,
+        64,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        80,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        96,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        112,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        128,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        144,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        160,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        176
+      ],
+      "skeleton": 15
+    }
+  ],
+  "textures": [
+    {
+      "sampler": 0,
+      "source": 0
+    },
+    {
+      "sampler": 0,
+      "source": 1
+    },
+    {
+      "sampler": 0,
+      "source": 2
+    }
+  ]
+}
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_body_combat_material_baseColor.png b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_body_combat_material_baseColor.png
new file mode 100644
index 0000000000000000000000000000000000000000..52d5d7d9ed7104438ccedb5e4a18322fb4dece5b
Binary files /dev/null and b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_body_combat_material_baseColor.png differ
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_head_material_baseColor.png b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_head_material_baseColor.png
new file mode 100644
index 0000000000000000000000000000000000000000..be980fea23d83236ce8a2ef49c7c245c39e65c52
Binary files /dev/null and b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_head_material_baseColor.png differ
diff --git a/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_hum_material_baseColor.png b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_hum_material_baseColor.png
new file mode 100644
index 0000000000000000000000000000000000000000..337fabc6d599795db0298c554c475c1e75bb6403
Binary files /dev/null and b/arjs/vivian_kane_-_legendary_pandoras_box_model/textures/Vivian_hum_material_baseColor.png differ
diff --git a/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/0.pack b/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/0.pack
deleted file mode 100644
index 241f5df5e239aa4332118e2799a1f34175d0f912..0000000000000000000000000000000000000000
Binary files a/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/0.pack and /dev/null differ
diff --git a/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/index.pack b/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/index.pack
deleted file mode 100644
index 0ccbfd4df0685a36c7ebd8c83378218e0e91fc4f..0000000000000000000000000000000000000000
Binary files a/takima-AR/.angular/cache/15.2.4/angular-webpack/bfc77abcb81fd605f0000e8a6b04617d6f5aed22/index.pack and /dev/null differ
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/003d704ab48496fbae64a4c92bae6533ee1db20fc06ce265ab9bb4af5485a395.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/003d704ab48496fbae64a4c92bae6533ee1db20fc06ce265ab9bb4af5485a395.json
deleted file mode 100644
index 81002b3277a4b436419a2195bcfce81cbd3cbc36..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/003d704ab48496fbae64a4c92bae6533ee1db20fc06ce265ab9bb4af5485a395.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport const NEVER = new Observable(noop);\nexport function never() {\n  return NEVER;\n}\n//# sourceMappingURL=never.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/008267fce442bf75c7e1e82db73580578235d6ef2d723762a70d71ddac78fbde.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/008267fce442bf75c7e1e82db73580578235d6ef2d723762a70d71ddac78fbde.json
deleted file mode 100644
index 70a0f7aa76edd412bc7a10cb4ba9f460e42cc193..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/008267fce442bf75c7e1e82db73580578235d6ef2d723762a70d71ddac78fbde.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/firestore';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/010b47180144db60cda91fbc848b81cb5096e8041d40e3a6b5c147062e79d31c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/010b47180144db60cda91fbc848b81cb5096e8041d40e3a6b5c147062e79d31c.json
deleted file mode 100644
index 80506d3752d44a93421020de8a2172d8c87aeb2e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/010b47180144db60cda91fbc848b81cb5096e8041d40e3a6b5c147062e79d31c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { mergeMap } from './mergeMap';\nimport { toArray } from './toArray';\nexport function joinAllInternals(joinFn, project) {\n  return pipe(toArray(), mergeMap(sources => joinFn(sources)), project ? mapOneOrManyArgs(project) : identity);\n}\n//# sourceMappingURL=joinAllInternals.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/01e26313b2eaf93c2592f6dca886705ac440ca6cdaef8362c668e52a06d8a011.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/01e26313b2eaf93c2592f6dca886705ac440ca6cdaef8362c668e52a06d8a011.json
deleted file mode 100644
index 0abac36a1f2a1ec04b9cba10bdf2104d1307af3b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/01e26313b2eaf93c2592f6dca886705ac440ca6cdaef8362c668e52a06d8a011.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { combineLatest } from '../observable/combineLatest';\nimport { joinAllInternals } from './joinAllInternals';\nexport function combineLatestAll(project) {\n  return joinAllInternals(combineLatest, project);\n}\n//# sourceMappingURL=combineLatestAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/02e2260c2c696ef9aaf40e88b2b0a2a7c54be8de66670c66b5a448f7b3d552a3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/02e2260c2c696ef9aaf40e88b2b0a2a7c54be8de66670c66b5a448f7b3d552a3.json
deleted file mode 100644
index 0cda92885af314e31caa399f799b500badb57db6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/02e2260c2c696ef9aaf40e88b2b0a2a7c54be8de66670c66b5a448f7b3d552a3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/remote-config';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/03da6441e6f86449884848b46ba5ed49d7535b809d148454a6503f8d73b94581.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/03da6441e6f86449884848b46ba5ed49d7535b809d148454a6503f8d73b94581.json
deleted file mode 100644
index 6944dee74dc8638e374ff2bf0ca283758c64c4b6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/03da6441e6f86449884848b46ba5ed49d7535b809d148454a6503f8d73b94581.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n  return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0665c11859ee483f0c14bab002cfc9509ba69b8e21704e6b51d9bdf75800996f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0665c11859ee483f0c14bab002cfc9509ba69b8e21704e6b51d9bdf75800996f.json
deleted file mode 100644
index ba8bb9a074775d9b1be924bae03013c4040e1dd7..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0665c11859ee483f0c14bab002cfc9509ba69b8e21704e6b51d9bdf75800996f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export { audit } from '../internal/operators/audit';\nexport { auditTime } from '../internal/operators/auditTime';\nexport { buffer } from '../internal/operators/buffer';\nexport { bufferCount } from '../internal/operators/bufferCount';\nexport { bufferTime } from '../internal/operators/bufferTime';\nexport { bufferToggle } from '../internal/operators/bufferToggle';\nexport { bufferWhen } from '../internal/operators/bufferWhen';\nexport { catchError } from '../internal/operators/catchError';\nexport { combineAll } from '../internal/operators/combineAll';\nexport { combineLatestAll } from '../internal/operators/combineLatestAll';\nexport { combineLatest } from '../internal/operators/combineLatest';\nexport { combineLatestWith } from '../internal/operators/combineLatestWith';\nexport { concat } from '../internal/operators/concat';\nexport { concatAll } from '../internal/operators/concatAll';\nexport { concatMap } from '../internal/operators/concatMap';\nexport { concatMapTo } from '../internal/operators/concatMapTo';\nexport { concatWith } from '../internal/operators/concatWith';\nexport { connect } from '../internal/operators/connect';\nexport { count } from '../internal/operators/count';\nexport { debounce } from '../internal/operators/debounce';\nexport { debounceTime } from '../internal/operators/debounceTime';\nexport { defaultIfEmpty } from '../internal/operators/defaultIfEmpty';\nexport { delay } from '../internal/operators/delay';\nexport { delayWhen } from '../internal/operators/delayWhen';\nexport { dematerialize } from '../internal/operators/dematerialize';\nexport { distinct } from '../internal/operators/distinct';\nexport { distinctUntilChanged } from '../internal/operators/distinctUntilChanged';\nexport { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged';\nexport { elementAt } from '../internal/operators/elementAt';\nexport { endWith } from '../internal/operators/endWith';\nexport { every } from '../internal/operators/every';\nexport { exhaust } from '../internal/operators/exhaust';\nexport { exhaustAll } from '../internal/operators/exhaustAll';\nexport { exhaustMap } from '../internal/operators/exhaustMap';\nexport { expand } from '../internal/operators/expand';\nexport { filter } from '../internal/operators/filter';\nexport { finalize } from '../internal/operators/finalize';\nexport { find } from '../internal/operators/find';\nexport { findIndex } from '../internal/operators/findIndex';\nexport { first } from '../internal/operators/first';\nexport { groupBy } from '../internal/operators/groupBy';\nexport { ignoreElements } from '../internal/operators/ignoreElements';\nexport { isEmpty } from '../internal/operators/isEmpty';\nexport { last } from '../internal/operators/last';\nexport { map } from '../internal/operators/map';\nexport { mapTo } from '../internal/operators/mapTo';\nexport { materialize } from '../internal/operators/materialize';\nexport { max } from '../internal/operators/max';\nexport { merge } from '../internal/operators/merge';\nexport { mergeAll } from '../internal/operators/mergeAll';\nexport { flatMap } from '../internal/operators/flatMap';\nexport { mergeMap } from '../internal/operators/mergeMap';\nexport { mergeMapTo } from '../internal/operators/mergeMapTo';\nexport { mergeScan } from '../internal/operators/mergeScan';\nexport { mergeWith } from '../internal/operators/mergeWith';\nexport { min } from '../internal/operators/min';\nexport { multicast } from '../internal/operators/multicast';\nexport { observeOn } from '../internal/operators/observeOn';\nexport { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';\nexport { pairwise } from '../internal/operators/pairwise';\nexport { partition } from '../internal/operators/partition';\nexport { pluck } from '../internal/operators/pluck';\nexport { publish } from '../internal/operators/publish';\nexport { publishBehavior } from '../internal/operators/publishBehavior';\nexport { publishLast } from '../internal/operators/publishLast';\nexport { publishReplay } from '../internal/operators/publishReplay';\nexport { race } from '../internal/operators/race';\nexport { raceWith } from '../internal/operators/raceWith';\nexport { reduce } from '../internal/operators/reduce';\nexport { repeat } from '../internal/operators/repeat';\nexport { repeatWhen } from '../internal/operators/repeatWhen';\nexport { retry } from '../internal/operators/retry';\nexport { retryWhen } from '../internal/operators/retryWhen';\nexport { refCount } from '../internal/operators/refCount';\nexport { sample } from '../internal/operators/sample';\nexport { sampleTime } from '../internal/operators/sampleTime';\nexport { scan } from '../internal/operators/scan';\nexport { sequenceEqual } from '../internal/operators/sequenceEqual';\nexport { share } from '../internal/operators/share';\nexport { shareReplay } from '../internal/operators/shareReplay';\nexport { single } from '../internal/operators/single';\nexport { skip } from '../internal/operators/skip';\nexport { skipLast } from '../internal/operators/skipLast';\nexport { skipUntil } from '../internal/operators/skipUntil';\nexport { skipWhile } from '../internal/operators/skipWhile';\nexport { startWith } from '../internal/operators/startWith';\nexport { subscribeOn } from '../internal/operators/subscribeOn';\nexport { switchAll } from '../internal/operators/switchAll';\nexport { switchMap } from '../internal/operators/switchMap';\nexport { switchMapTo } from '../internal/operators/switchMapTo';\nexport { switchScan } from '../internal/operators/switchScan';\nexport { take } from '../internal/operators/take';\nexport { takeLast } from '../internal/operators/takeLast';\nexport { takeUntil } from '../internal/operators/takeUntil';\nexport { takeWhile } from '../internal/operators/takeWhile';\nexport { tap } from '../internal/operators/tap';\nexport { throttle } from '../internal/operators/throttle';\nexport { throttleTime } from '../internal/operators/throttleTime';\nexport { throwIfEmpty } from '../internal/operators/throwIfEmpty';\nexport { timeInterval } from '../internal/operators/timeInterval';\nexport { timeout } from '../internal/operators/timeout';\nexport { timeoutWith } from '../internal/operators/timeoutWith';\nexport { timestamp } from '../internal/operators/timestamp';\nexport { toArray } from '../internal/operators/toArray';\nexport { window } from '../internal/operators/window';\nexport { windowCount } from '../internal/operators/windowCount';\nexport { windowTime } from '../internal/operators/windowTime';\nexport { windowToggle } from '../internal/operators/windowToggle';\nexport { windowWhen } from '../internal/operators/windowWhen';\nexport { withLatestFrom } from '../internal/operators/withLatestFrom';\nexport { zip } from '../internal/operators/zip';\nexport { zipAll } from '../internal/operators/zipAll';\nexport { zipWith } from '../internal/operators/zipWith';\n//# sourceMappingURL=index.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/06dc7b0555c556670d00a6b23eac81ae84bfcb3ec15da40b52fd1c40bf10ba35.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/06dc7b0555c556670d00a6b23eac81ae84bfcb3ec15da40b52fd1c40bf10ba35.json
deleted file mode 100644
index 743761393b9156e62f1c795f6de6485a5e7a8c30..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/06dc7b0555c556670d00a6b23eac81ae84bfcb3ec15da40b52fd1c40bf10ba35.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { combineLatestAll } from './combineLatestAll';\nexport const combineAll = combineLatestAll;\n//# sourceMappingURL=combineAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/079ef6bbfaa2e3717932d85778c05082a776dd357c932cced6fbfdb88729ca1f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/079ef6bbfaa2e3717932d85778c05082a776dd357c932cced6fbfdb88729ca1f.json
deleted file mode 100644
index afbbd2929b38863d6b8ada887e0adc4a0bd658c3..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/079ef6bbfaa2e3717932d85778c05082a776dd357c932cced6fbfdb88729ca1f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { Deferred } from '@firebase/util';\n\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\nclass Component {\n  /**\r\n   *\r\n   * @param name The public service name, e.g. app, auth, firestore, database\r\n   * @param instanceFactory Service factory responsible for creating the public interface\r\n   * @param type whether the service provided by the component is public or private\r\n   */\n  constructor(name, instanceFactory, type) {\n    this.name = name;\n    this.instanceFactory = instanceFactory;\n    this.type = type;\n    this.multipleInstances = false;\n    /**\r\n     * Properties to be added to the service namespace\r\n     */\n    this.serviceProps = {};\n    this.instantiationMode = \"LAZY\" /* InstantiationMode.LAZY */;\n    this.onInstanceCreated = null;\n  }\n  setInstantiationMode(mode) {\n    this.instantiationMode = mode;\n    return this;\n  }\n  setMultipleInstances(multipleInstances) {\n    this.multipleInstances = multipleInstances;\n    return this;\n  }\n  setServiceProps(props) {\n    this.serviceProps = props;\n    return this;\n  }\n  setInstanceCreatedCallback(callback) {\n    this.onInstanceCreated = callback;\n    return this;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\nclass Provider {\n  constructor(name, container) {\n    this.name = name;\n    this.container = container;\n    this.component = null;\n    this.instances = new Map();\n    this.instancesDeferred = new Map();\n    this.instancesOptions = new Map();\n    this.onInitCallbacks = new Map();\n  }\n  /**\r\n   * @param identifier A provider can provide mulitple instances of a service\r\n   * if this.component.multipleInstances is true.\r\n   */\n  get(identifier) {\n    // if multipleInstances is not supported, use the default name\n    const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n    if (!this.instancesDeferred.has(normalizedIdentifier)) {\n      const deferred = new Deferred();\n      this.instancesDeferred.set(normalizedIdentifier, deferred);\n      if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {\n        // initialize the service if it can be auto-initialized\n        try {\n          const instance = this.getOrInitializeService({\n            instanceIdentifier: normalizedIdentifier\n          });\n          if (instance) {\n            deferred.resolve(instance);\n          }\n        } catch (e) {\n          // when the instance factory throws an exception during get(), it should not cause\n          // a fatal error. We just return the unresolved promise in this case.\n        }\n      }\n    }\n    return this.instancesDeferred.get(normalizedIdentifier).promise;\n  }\n  getImmediate(options) {\n    var _a;\n    // if multipleInstances is not supported, use the default name\n    const normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\n    const optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\n    if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {\n      try {\n        return this.getOrInitializeService({\n          instanceIdentifier: normalizedIdentifier\n        });\n      } catch (e) {\n        if (optional) {\n          return null;\n        } else {\n          throw e;\n        }\n      }\n    } else {\n      // In case a component is not initialized and should/can not be auto-initialized at the moment, return null if the optional flag is set, or throw\n      if (optional) {\n        return null;\n      } else {\n        throw Error(`Service ${this.name} is not available`);\n      }\n    }\n  }\n  getComponent() {\n    return this.component;\n  }\n  setComponent(component) {\n    if (component.name !== this.name) {\n      throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);\n    }\n    if (this.component) {\n      throw Error(`Component for ${this.name} has already been provided`);\n    }\n    this.component = component;\n    // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\n    if (!this.shouldAutoInitialize()) {\n      return;\n    }\n    // if the service is eager, initialize the default instance\n    if (isComponentEager(component)) {\n      try {\n        this.getOrInitializeService({\n          instanceIdentifier: DEFAULT_ENTRY_NAME\n        });\n      } catch (e) {\n        // when the instance factory for an eager Component throws an exception during the eager\n        // initialization, it should not cause a fatal error.\n        // TODO: Investigate if we need to make it configurable, because some component may want to cause\n        // a fatal error in this case?\n      }\n    }\n    // Create service instances for the pending promises and resolve them\n    // NOTE: if this.multipleInstances is false, only the default instance will be created\n    // and all promises with resolve with it regardless of the identifier.\n    for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\n      const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n      try {\n        // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n        const instance = this.getOrInitializeService({\n          instanceIdentifier: normalizedIdentifier\n        });\n        instanceDeferred.resolve(instance);\n      } catch (e) {\n        // when the instance factory throws an exception, it should not cause\n        // a fatal error. We just leave the promise unresolved.\n      }\n    }\n  }\n  clearInstance(identifier = DEFAULT_ENTRY_NAME) {\n    this.instancesDeferred.delete(identifier);\n    this.instancesOptions.delete(identifier);\n    this.instances.delete(identifier);\n  }\n  // app.delete() will call this method on every provider to delete the services\n  // TODO: should we mark the provider as deleted?\n  delete() {\n    var _this = this;\n    return _asyncToGenerator(function* () {\n      const services = Array.from(_this.instances.values());\n      yield Promise.all([...services.filter(service => 'INTERNAL' in service) // legacy services\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      .map(service => service.INTERNAL.delete()), ...services.filter(service => '_delete' in service) // modularized services\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      .map(service => service._delete())]);\n    })();\n  }\n  isComponentSet() {\n    return this.component != null;\n  }\n  isInitialized(identifier = DEFAULT_ENTRY_NAME) {\n    return this.instances.has(identifier);\n  }\n  getOptions(identifier = DEFAULT_ENTRY_NAME) {\n    return this.instancesOptions.get(identifier) || {};\n  }\n  initialize(opts = {}) {\n    const {\n      options = {}\n    } = opts;\n    const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\n    if (this.isInitialized(normalizedIdentifier)) {\n      throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);\n    }\n    if (!this.isComponentSet()) {\n      throw Error(`Component ${this.name} has not been registered yet`);\n    }\n    const instance = this.getOrInitializeService({\n      instanceIdentifier: normalizedIdentifier,\n      options\n    });\n    // resolve any pending promise waiting for the service instance\n    for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\n      const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n      if (normalizedIdentifier === normalizedDeferredIdentifier) {\n        instanceDeferred.resolve(instance);\n      }\n    }\n    return instance;\n  }\n  /**\r\n   *\r\n   * @param callback - a function that will be invoked  after the provider has been initialized by calling provider.initialize().\r\n   * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\r\n   *\r\n   * @param identifier An optional instance identifier\r\n   * @returns a function to unregister the callback\r\n   */\n  onInit(callback, identifier) {\n    var _a;\n    const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n    const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\n    existingCallbacks.add(callback);\n    this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\n    const existingInstance = this.instances.get(normalizedIdentifier);\n    if (existingInstance) {\n      callback(existingInstance, normalizedIdentifier);\n    }\n    return () => {\n      existingCallbacks.delete(callback);\n    };\n  }\n  /**\r\n   * Invoke onInit callbacks synchronously\r\n   * @param instance the service instance`\r\n   */\n  invokeOnInitCallbacks(instance, identifier) {\n    const callbacks = this.onInitCallbacks.get(identifier);\n    if (!callbacks) {\n      return;\n    }\n    for (const callback of callbacks) {\n      try {\n        callback(instance, identifier);\n      } catch (_a) {\n        // ignore errors in the onInit callback\n      }\n    }\n  }\n  getOrInitializeService({\n    instanceIdentifier,\n    options = {}\n  }) {\n    let instance = this.instances.get(instanceIdentifier);\n    if (!instance && this.component) {\n      instance = this.component.instanceFactory(this.container, {\n        instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\n        options\n      });\n      this.instances.set(instanceIdentifier, instance);\n      this.instancesOptions.set(instanceIdentifier, options);\n      /**\r\n       * Invoke onInit listeners.\r\n       * Note this.component.onInstanceCreated is different, which is used by the component creator,\r\n       * while onInit listeners are registered by consumers of the provider.\r\n       */\n      this.invokeOnInitCallbacks(instance, instanceIdentifier);\n      /**\r\n       * Order is important\r\n       * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\r\n       * makes `isInitialized()` return true.\r\n       */\n      if (this.component.onInstanceCreated) {\n        try {\n          this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\n        } catch (_a) {\n          // ignore errors in the onInstanceCreatedCallback\n        }\n      }\n    }\n    return instance || null;\n  }\n  normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {\n    if (this.component) {\n      return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n    } else {\n      return identifier; // assume multiple instances are supported before the component is provided.\n    }\n  }\n\n  shouldAutoInitialize() {\n    return !!this.component && this.component.instantiationMode !== \"EXPLICIT\" /* InstantiationMode.EXPLICIT */;\n  }\n}\n// undefined should be passed to the service factory for the default instance\nfunction normalizeIdentifierForFactory(identifier) {\n  return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\nfunction isComponentEager(component) {\n  return component.instantiationMode === \"EAGER\" /* InstantiationMode.EAGER */;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\nclass ComponentContainer {\n  constructor(name) {\n    this.name = name;\n    this.providers = new Map();\n  }\n  /**\r\n   *\r\n   * @param component Component being added\r\n   * @param overwrite When a component with the same name has already been registered,\r\n   * if overwrite is true: overwrite the existing component with the new component and create a new\r\n   * provider with the new component. It can be useful in tests where you want to use different mocks\r\n   * for different tests.\r\n   * if overwrite is false: throw an exception\r\n   */\n  addComponent(component) {\n    const provider = this.getProvider(component.name);\n    if (provider.isComponentSet()) {\n      throw new Error(`Component ${component.name} has already been registered with ${this.name}`);\n    }\n    provider.setComponent(component);\n  }\n  addOrOverwriteComponent(component) {\n    const provider = this.getProvider(component.name);\n    if (provider.isComponentSet()) {\n      // delete the existing provider from the container, so we can register the new component\n      this.providers.delete(component.name);\n    }\n    this.addComponent(component);\n  }\n  /**\r\n   * getProvider provides a type safe interface where it can only be called with a field name\r\n   * present in NameServiceMapping interface.\r\n   *\r\n   * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n   * themselves.\r\n   */\n  getProvider(name) {\n    if (this.providers.has(name)) {\n      return this.providers.get(name);\n    }\n    // create a Provider for a service that hasn't registered with Firebase\n    const provider = new Provider(name, this);\n    this.providers.set(name, provider);\n    return provider;\n  }\n  getProviders() {\n    return Array.from(this.providers.values());\n  }\n}\nexport { Component, ComponentContainer, Provider };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0a850e240889b5ff57c0aadc29a52480c1537d7ca53681f80b1305d95a2a9608.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0a850e240889b5ff57c0aadc29a52480c1537d7ca53681f80b1305d95a2a9608.json
deleted file mode 100644
index 73e9a7b29fd599a7a41490437f18fb0cf08df26f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0a850e240889b5ff57c0aadc29a52480c1537d7ca53681f80b1305d95a2a9608.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferCount(bufferSize, startBufferEvery = null) {\n  startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;\n  return operate((source, subscriber) => {\n    let buffers = [];\n    let count = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      let toEmit = null;\n      if (count++ % startBufferEvery === 0) {\n        buffers.push([]);\n      }\n      for (const buffer of buffers) {\n        buffer.push(value);\n        if (bufferSize <= buffer.length) {\n          toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : [];\n          toEmit.push(buffer);\n        }\n      }\n      if (toEmit) {\n        for (const buffer of toEmit) {\n          arrRemove(buffers, buffer);\n          subscriber.next(buffer);\n        }\n      }\n    }, () => {\n      for (const buffer of buffers) {\n        subscriber.next(buffer);\n      }\n      subscriber.complete();\n    }, undefined, () => {\n      buffers = null;\n    }));\n  });\n}\n//# sourceMappingURL=bufferCount.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0a9a236488de22166afdd52925774c9d729d5ab8eb921d938b03d286b09242ac.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0a9a236488de22166afdd52925774c9d729d5ab8eb921d938b03d286b09242ac.json
deleted file mode 100644
index 9f30348bd1cf2375d7b4ab7cae1f8dfd97707f30..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0a9a236488de22166afdd52925774c9d729d5ab8eb921d938b03d286b09242ac.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n  constructor(scheduler, work) {\n    super(scheduler, work);\n    this.scheduler = scheduler;\n    this.work = work;\n    this.pending = false;\n  }\n  schedule(state, delay = 0) {\n    var _a;\n    if (this.closed) {\n      return this;\n    }\n    this.state = state;\n    const id = this.id;\n    const scheduler = this.scheduler;\n    if (id != null) {\n      this.id = this.recycleAsyncId(scheduler, id, delay);\n    }\n    this.pending = true;\n    this.delay = delay;\n    this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n    return this;\n  }\n  requestAsyncId(scheduler, _id, delay = 0) {\n    return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n  }\n  recycleAsyncId(_scheduler, id, delay = 0) {\n    if (delay != null && this.delay === delay && this.pending === false) {\n      return id;\n    }\n    if (id != null) {\n      intervalProvider.clearInterval(id);\n    }\n    return undefined;\n  }\n  execute(state, delay) {\n    if (this.closed) {\n      return new Error('executing a cancelled action');\n    }\n    this.pending = false;\n    const error = this._execute(state, delay);\n    if (error) {\n      return error;\n    } else if (this.pending === false && this.id != null) {\n      this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n    }\n  }\n  _execute(state, _delay) {\n    let errored = false;\n    let errorValue;\n    try {\n      this.work(state);\n    } catch (e) {\n      errored = true;\n      errorValue = e ? e : new Error('Scheduled action threw falsy error');\n    }\n    if (errored) {\n      this.unsubscribe();\n      return errorValue;\n    }\n  }\n  unsubscribe() {\n    if (!this.closed) {\n      const {\n        id,\n        scheduler\n      } = this;\n      const {\n        actions\n      } = scheduler;\n      this.work = this.state = this.scheduler = null;\n      this.pending = false;\n      arrRemove(actions, this);\n      if (id != null) {\n        this.id = this.recycleAsyncId(scheduler, id, null);\n      }\n      this.delay = null;\n      super.unsubscribe();\n    }\n  }\n}\n//# sourceMappingURL=AsyncAction.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0b9d12df87291d42fd28a812531bfed06707d4c71788c0ced9b03a40dac2c310.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0b9d12df87291d42fd28a812531bfed06707d4c71788c0ced9b03a40dac2c310.json
deleted file mode 100644
index 598427b44c5beabd63424b9b70dfb4a04253ef8e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0b9d12df87291d42fd28a812531bfed06707d4c71788c0ced9b03a40dac2c310.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n  const hasDefaultValue = arguments.length >= 2;\n  return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0ca11c146be614e61d54cc7b6f6eade02084582b1b4d90e76d3934b1846b304b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0ca11c146be614e61d54cc7b6f6eade02084582b1b4d90e76d3934b1846b304b.json
deleted file mode 100644
index 42fb1766163aff4caf543fdda2303775eda89eb5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0ca11c146be614e61d54cc7b6f6eade02084582b1b4d90e76d3934b1846b304b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\n * @license Angular v15.2.3\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';\nlet _DOM = null;\nfunction getDOM() {\n  return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n  if (!_DOM) {\n    _DOM = adapter;\n  }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass DomAdapter {}\n\n/**\n * A DI Token representing the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nconst DOCUMENT = /*#__PURE__*/new InjectionToken('DocumentToken');\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nlet PlatformLocation = /*#__PURE__*/(() => {\n  class PlatformLocation {\n    historyGo(relativePosition) {\n      throw new Error('Not implemented');\n    }\n  }\n  PlatformLocation.ɵfac = function PlatformLocation_Factory(t) {\n    return new (t || PlatformLocation)();\n  };\n  PlatformLocation.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: PlatformLocation,\n    factory: function () {\n      return useBrowserPlatformLocation();\n    },\n    providedIn: 'platform'\n  });\n  return PlatformLocation;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction useBrowserPlatformLocation() {\n  return ɵɵinject(BrowserPlatformLocation);\n}\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = /*#__PURE__*/new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * @publicApi\n */\nlet BrowserPlatformLocation = /*#__PURE__*/(() => {\n  class BrowserPlatformLocation extends PlatformLocation {\n    constructor(_doc) {\n      super();\n      this._doc = _doc;\n      this._location = window.location;\n      this._history = window.history;\n    }\n    getBaseHrefFromDOM() {\n      return getDOM().getBaseHref(this._doc);\n    }\n    onPopState(fn) {\n      const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n      window.addEventListener('popstate', fn, false);\n      return () => window.removeEventListener('popstate', fn);\n    }\n    onHashChange(fn) {\n      const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n      window.addEventListener('hashchange', fn, false);\n      return () => window.removeEventListener('hashchange', fn);\n    }\n    get href() {\n      return this._location.href;\n    }\n    get protocol() {\n      return this._location.protocol;\n    }\n    get hostname() {\n      return this._location.hostname;\n    }\n    get port() {\n      return this._location.port;\n    }\n    get pathname() {\n      return this._location.pathname;\n    }\n    get search() {\n      return this._location.search;\n    }\n    get hash() {\n      return this._location.hash;\n    }\n    set pathname(newPath) {\n      this._location.pathname = newPath;\n    }\n    pushState(state, title, url) {\n      if (supportsState()) {\n        this._history.pushState(state, title, url);\n      } else {\n        this._location.hash = url;\n      }\n    }\n    replaceState(state, title, url) {\n      if (supportsState()) {\n        this._history.replaceState(state, title, url);\n      } else {\n        this._location.hash = url;\n      }\n    }\n    forward() {\n      this._history.forward();\n    }\n    back() {\n      this._history.back();\n    }\n    historyGo(relativePosition = 0) {\n      this._history.go(relativePosition);\n    }\n    getState() {\n      return this._history.state;\n    }\n  }\n  BrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) {\n    return new (t || BrowserPlatformLocation)(i0.ɵɵinject(DOCUMENT));\n  };\n  BrowserPlatformLocation.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: BrowserPlatformLocation,\n    factory: function () {\n      return createBrowserPlatformLocation();\n    },\n    providedIn: 'platform'\n  });\n  return BrowserPlatformLocation;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction supportsState() {\n  return !!window.history.pushState;\n}\nfunction createBrowserPlatformLocation() {\n  return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\n}\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start  URL string\n * @param end    URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n  if (start.length == 0) {\n    return end;\n  }\n  if (end.length == 0) {\n    return start;\n  }\n  let slashes = 0;\n  if (start.endsWith('/')) {\n    slashes++;\n  }\n  if (end.startsWith('/')) {\n    slashes++;\n  }\n  if (slashes == 2) {\n    return start + end.substring(1);\n  }\n  if (slashes == 1) {\n    return start + end;\n  }\n  return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n  const match = url.match(/#|\\?|$/);\n  const pathEndIdx = match && match.index || url.length;\n  const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n  return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param  params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n  return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nlet LocationStrategy = /*#__PURE__*/(() => {\n  class LocationStrategy {\n    historyGo(relativePosition) {\n      throw new Error('Not implemented');\n    }\n  }\n  LocationStrategy.ɵfac = function LocationStrategy_Factory(t) {\n    return new (t || LocationStrategy)();\n  };\n  LocationStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: LocationStrategy,\n    factory: function () {\n      return (() => inject(PathLocationStrategy))();\n    },\n    providedIn: 'root'\n  });\n  return LocationStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_BASE_HREF = /*#__PURE__*/new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}\n * or add a `<base href>` element to the document to override the default.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `<base href='/my/app/'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `<base href>` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nlet PathLocationStrategy = /*#__PURE__*/(() => {\n  class PathLocationStrategy extends LocationStrategy {\n    constructor(_platformLocation, href) {\n      super();\n      this._platformLocation = _platformLocation;\n      this._removeListenerFns = [];\n      this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ?? inject(DOCUMENT).location?.origin ?? '';\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      while (this._removeListenerFns.length) {\n        this._removeListenerFns.pop()();\n      }\n    }\n    onPopState(fn) {\n      this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n      return this._baseHref;\n    }\n    prepareExternalUrl(internal) {\n      return joinWithSlash(this._baseHref, internal);\n    }\n    path(includeHash = false) {\n      const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n      const hash = this._platformLocation.hash;\n      return hash && includeHash ? `${pathname}${hash}` : pathname;\n    }\n    pushState(state, title, url, queryParams) {\n      const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n      this._platformLocation.pushState(state, title, externalUrl);\n    }\n    replaceState(state, title, url, queryParams) {\n      const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n      this._platformLocation.replaceState(state, title, externalUrl);\n    }\n    forward() {\n      this._platformLocation.forward();\n    }\n    back() {\n      this._platformLocation.back();\n    }\n    getState() {\n      return this._platformLocation.getState();\n    }\n    historyGo(relativePosition = 0) {\n      this._platformLocation.historyGo?.(relativePosition);\n    }\n  }\n  PathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) {\n    return new (t || PathLocationStrategy)(i0.ɵɵinject(PlatformLocation), i0.ɵɵinject(APP_BASE_HREF, 8));\n  };\n  PathLocationStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: PathLocationStrategy,\n    factory: PathLocationStrategy.ɵfac,\n    providedIn: 'root'\n  });\n  return PathLocationStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nlet HashLocationStrategy = /*#__PURE__*/(() => {\n  class HashLocationStrategy extends LocationStrategy {\n    constructor(_platformLocation, _baseHref) {\n      super();\n      this._platformLocation = _platformLocation;\n      this._baseHref = '';\n      this._removeListenerFns = [];\n      if (_baseHref != null) {\n        this._baseHref = _baseHref;\n      }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      while (this._removeListenerFns.length) {\n        this._removeListenerFns.pop()();\n      }\n    }\n    onPopState(fn) {\n      this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n      return this._baseHref;\n    }\n    path(includeHash = false) {\n      // the hash value is always prefixed with a `#`\n      // and if it is empty then it will stay empty\n      let path = this._platformLocation.hash;\n      if (path == null) path = '#';\n      return path.length > 0 ? path.substring(1) : path;\n    }\n    prepareExternalUrl(internal) {\n      const url = joinWithSlash(this._baseHref, internal);\n      return url.length > 0 ? '#' + url : url;\n    }\n    pushState(state, title, path, queryParams) {\n      let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n      if (url.length == 0) {\n        url = this._platformLocation.pathname;\n      }\n      this._platformLocation.pushState(state, title, url);\n    }\n    replaceState(state, title, path, queryParams) {\n      let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n      if (url.length == 0) {\n        url = this._platformLocation.pathname;\n      }\n      this._platformLocation.replaceState(state, title, url);\n    }\n    forward() {\n      this._platformLocation.forward();\n    }\n    back() {\n      this._platformLocation.back();\n    }\n    getState() {\n      return this._platformLocation.getState();\n    }\n    historyGo(relativePosition = 0) {\n      this._platformLocation.historyGo?.(relativePosition);\n    }\n  }\n  HashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) {\n    return new (t || HashLocationStrategy)(i0.ɵɵinject(PlatformLocation), i0.ɵɵinject(APP_BASE_HREF, 8));\n  };\n  HashLocationStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: HashLocationStrategy,\n    factory: HashLocationStrategy.ɵfac\n  });\n  return HashLocationStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router.navigate()` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\nlet Location = /*#__PURE__*/(() => {\n  class Location {\n    constructor(locationStrategy) {\n      /** @internal */\n      this._subject = new EventEmitter();\n      /** @internal */\n      this._urlChangeListeners = [];\n      /** @internal */\n      this._urlChangeSubscription = null;\n      this._locationStrategy = locationStrategy;\n      const baseHref = this._locationStrategy.getBaseHref();\n      // Note: This class's interaction with base HREF does not fully follow the rules\n      // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm.\n      // Instead of trying to fix individual bugs with more and more code, we should\n      // investigate using the URL constructor and providing the base as a second\n      // argument.\n      // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters\n      this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));\n      this._locationStrategy.onPopState(ev => {\n        this._subject.emit({\n          'url': this.path(true),\n          'pop': true,\n          'state': ev.state,\n          'type': ev.type\n        });\n      });\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      this._urlChangeSubscription?.unsubscribe();\n      this._urlChangeListeners = [];\n    }\n    /**\n     * Normalizes the URL path for this location.\n     *\n     * @param includeHash True to include an anchor fragment in the path.\n     *\n     * @returns The normalized URL path.\n     */\n    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n    // removed.\n    path(includeHash = false) {\n      return this.normalize(this._locationStrategy.path(includeHash));\n    }\n    /**\n     * Reports the current state of the location history.\n     * @returns The current value of the `history.state` object.\n     */\n    getState() {\n      return this._locationStrategy.getState();\n    }\n    /**\n     * Normalizes the given path and compares to the current normalized path.\n     *\n     * @param path The given URL path.\n     * @param query Query parameters.\n     *\n     * @returns True if the given URL path is equal to the current normalized path, false\n     * otherwise.\n     */\n    isCurrentPathEqualTo(path, query = '') {\n      return this.path() == this.normalize(path + normalizeQueryParams(query));\n    }\n    /**\n     * Normalizes a URL path by stripping any trailing slashes.\n     *\n     * @param url String representing a URL.\n     *\n     * @returns The normalized URL string.\n     */\n    normalize(url) {\n      return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));\n    }\n    /**\n     * Normalizes an external URL path.\n     * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n     * before normalizing. Adds a hash if `HashLocationStrategy` is\n     * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n     *\n     * @param url String representing a URL.\n     *\n     * @returns  A normalized platform-specific URL.\n     */\n    prepareExternalUrl(url) {\n      if (url && url[0] !== '/') {\n        url = '/' + url;\n      }\n      return this._locationStrategy.prepareExternalUrl(url);\n    }\n    // TODO: rename this method to pushState\n    /**\n     * Changes the browser's URL to a normalized version of a given URL, and pushes a\n     * new item onto the platform's history.\n     *\n     * @param path  URL path to normalize.\n     * @param query Query parameters.\n     * @param state Location history state.\n     *\n     */\n    go(path, query = '', state = null) {\n      this._locationStrategy.pushState(state, '', path, query);\n      this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n    }\n    /**\n     * Changes the browser's URL to a normalized version of the given URL, and replaces\n     * the top item on the platform's history stack.\n     *\n     * @param path  URL path to normalize.\n     * @param query Query parameters.\n     * @param state Location history state.\n     */\n    replaceState(path, query = '', state = null) {\n      this._locationStrategy.replaceState(state, '', path, query);\n      this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n    }\n    /**\n     * Navigates forward in the platform's history.\n     */\n    forward() {\n      this._locationStrategy.forward();\n    }\n    /**\n     * Navigates back in the platform's history.\n     */\n    back() {\n      this._locationStrategy.back();\n    }\n    /**\n     * Navigate to a specific page from session history, identified by its relative position to the\n     * current page.\n     *\n     * @param relativePosition  Position of the target page in the history relative to the current\n     *     page.\n     * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n     * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n     * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n     * when `relativePosition` equals 0.\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n     */\n    historyGo(relativePosition = 0) {\n      this._locationStrategy.historyGo?.(relativePosition);\n    }\n    /**\n     * Registers a URL change listener. Use to catch updates performed by the Angular\n     * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n     *\n     * @param fn The change handler function, which take a URL and a location history state.\n     * @returns A function that, when executed, unregisters a URL change listener.\n     */\n    onUrlChange(fn) {\n      this._urlChangeListeners.push(fn);\n      if (!this._urlChangeSubscription) {\n        this._urlChangeSubscription = this.subscribe(v => {\n          this._notifyUrlChangeListeners(v.url, v.state);\n        });\n      }\n      return () => {\n        const fnIndex = this._urlChangeListeners.indexOf(fn);\n        this._urlChangeListeners.splice(fnIndex, 1);\n        if (this._urlChangeListeners.length === 0) {\n          this._urlChangeSubscription?.unsubscribe();\n          this._urlChangeSubscription = null;\n        }\n      };\n    }\n    /** @internal */\n    _notifyUrlChangeListeners(url = '', state) {\n      this._urlChangeListeners.forEach(fn => fn(url, state));\n    }\n    /**\n     * Subscribes to the platform's `popState` events.\n     *\n     * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n     * `Location.onUrlChange()` to subscribe to URL changes instead.\n     *\n     * @param value Event that is triggered when the state history changes.\n     * @param exception The exception to throw.\n     *\n     * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n     *\n     * @returns Subscribed events.\n     */\n    subscribe(onNext, onThrow, onReturn) {\n      return this._subject.subscribe({\n        next: onNext,\n        error: onThrow,\n        complete: onReturn\n      });\n    }\n  }\n  /**\n   * Normalizes URL parameters by prepending with `?` if needed.\n   *\n   * @param  params String of URL parameters.\n   *\n   * @returns The normalized URL parameters string.\n   */\n  Location.normalizeQueryParams = normalizeQueryParams;\n  /**\n   * Joins two parts of a URL with a slash if needed.\n   *\n   * @param start  URL string\n   * @param end    URL string\n   *\n   *\n   * @returns The joined URL string.\n   */\n  Location.joinWithSlash = joinWithSlash;\n  /**\n   * Removes a trailing slash from a URL string if needed.\n   * Looks for the first occurrence of either `#`, `?`, or the end of the\n   * line as `/` characters and removes the trailing slash if one exists.\n   *\n   * @param url URL string.\n   *\n   * @returns The URL string, modified if needed.\n   */\n  Location.stripTrailingSlash = stripTrailingSlash;\n  Location.ɵfac = function Location_Factory(t) {\n    return new (t || Location)(i0.ɵɵinject(LocationStrategy));\n  };\n  Location.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: Location,\n    factory: function () {\n      return createLocation();\n    },\n    providedIn: 'root'\n  });\n  return Location;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction createLocation() {\n  return new Location(ɵɵinject(LocationStrategy));\n}\nfunction _stripBasePath(basePath, url) {\n  if (!basePath || !url.startsWith(basePath)) {\n    return url;\n  }\n  const strippedUrl = url.substring(basePath.length);\n  if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {\n    return strippedUrl;\n  }\n  return url;\n}\nfunction _stripIndexHtml(url) {\n  return url.replace(/\\/index.html$/, '');\n}\nfunction _stripOrigin(baseHref) {\n  // DO NOT REFACTOR! Previously, this check looked like this:\n  // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n  // syntactically incorrect code after Closure Compiler minification.\n  // This was likely caused by a bug in Closure Compiler, but\n  // for now, the check is rewritten to use `new RegExp` instead.\n  const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);\n  if (isAbsoluteUrl) {\n    const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n    return pathname;\n  }\n  return baseHref;\n}\n\n/** @internal */\nconst CURRENCIES_EN = {\n  \"ADP\": [undefined, undefined, 0],\n  \"AFN\": [undefined, \"؋\", 0],\n  \"ALL\": [undefined, undefined, 0],\n  \"AMD\": [undefined, \"֏\", 2],\n  \"AOA\": [undefined, \"Kz\"],\n  \"ARS\": [undefined, \"$\"],\n  \"AUD\": [\"A$\", \"$\"],\n  \"AZN\": [undefined, \"₼\"],\n  \"BAM\": [undefined, \"KM\"],\n  \"BBD\": [undefined, \"$\"],\n  \"BDT\": [undefined, \"৳\"],\n  \"BHD\": [undefined, undefined, 3],\n  \"BIF\": [undefined, undefined, 0],\n  \"BMD\": [undefined, \"$\"],\n  \"BND\": [undefined, \"$\"],\n  \"BOB\": [undefined, \"Bs\"],\n  \"BRL\": [\"R$\"],\n  \"BSD\": [undefined, \"$\"],\n  \"BWP\": [undefined, \"P\"],\n  \"BYN\": [undefined, undefined, 2],\n  \"BYR\": [undefined, undefined, 0],\n  \"BZD\": [undefined, \"$\"],\n  \"CAD\": [\"CA$\", \"$\", 2],\n  \"CHF\": [undefined, undefined, 2],\n  \"CLF\": [undefined, undefined, 4],\n  \"CLP\": [undefined, \"$\", 0],\n  \"CNY\": [\"CN¥\", \"¥\"],\n  \"COP\": [undefined, \"$\", 2],\n  \"CRC\": [undefined, \"₡\", 2],\n  \"CUC\": [undefined, \"$\"],\n  \"CUP\": [undefined, \"$\"],\n  \"CZK\": [undefined, \"Kč\", 2],\n  \"DJF\": [undefined, undefined, 0],\n  \"DKK\": [undefined, \"kr\", 2],\n  \"DOP\": [undefined, \"$\"],\n  \"EGP\": [undefined, \"E£\"],\n  \"ESP\": [undefined, \"₧\", 0],\n  \"EUR\": [\"€\"],\n  \"FJD\": [undefined, \"$\"],\n  \"FKP\": [undefined, \"£\"],\n  \"GBP\": [\"£\"],\n  \"GEL\": [undefined, \"₾\"],\n  \"GHS\": [undefined, \"GH₵\"],\n  \"GIP\": [undefined, \"£\"],\n  \"GNF\": [undefined, \"FG\", 0],\n  \"GTQ\": [undefined, \"Q\"],\n  \"GYD\": [undefined, \"$\", 2],\n  \"HKD\": [\"HK$\", \"$\"],\n  \"HNL\": [undefined, \"L\"],\n  \"HRK\": [undefined, \"kn\"],\n  \"HUF\": [undefined, \"Ft\", 2],\n  \"IDR\": [undefined, \"Rp\", 2],\n  \"ILS\": [\"₪\"],\n  \"INR\": [\"₹\"],\n  \"IQD\": [undefined, undefined, 0],\n  \"IRR\": [undefined, undefined, 0],\n  \"ISK\": [undefined, \"kr\", 0],\n  \"ITL\": [undefined, undefined, 0],\n  \"JMD\": [undefined, \"$\"],\n  \"JOD\": [undefined, undefined, 3],\n  \"JPY\": [\"¥\", undefined, 0],\n  \"KHR\": [undefined, \"៛\"],\n  \"KMF\": [undefined, \"CF\", 0],\n  \"KPW\": [undefined, \"₩\", 0],\n  \"KRW\": [\"₩\", undefined, 0],\n  \"KWD\": [undefined, undefined, 3],\n  \"KYD\": [undefined, \"$\"],\n  \"KZT\": [undefined, \"₸\"],\n  \"LAK\": [undefined, \"₭\", 0],\n  \"LBP\": [undefined, \"L£\", 0],\n  \"LKR\": [undefined, \"Rs\"],\n  \"LRD\": [undefined, \"$\"],\n  \"LTL\": [undefined, \"Lt\"],\n  \"LUF\": [undefined, undefined, 0],\n  \"LVL\": [undefined, \"Ls\"],\n  \"LYD\": [undefined, undefined, 3],\n  \"MGA\": [undefined, \"Ar\", 0],\n  \"MGF\": [undefined, undefined, 0],\n  \"MMK\": [undefined, \"K\", 0],\n  \"MNT\": [undefined, \"₮\", 2],\n  \"MRO\": [undefined, undefined, 0],\n  \"MUR\": [undefined, \"Rs\", 2],\n  \"MXN\": [\"MX$\", \"$\"],\n  \"MYR\": [undefined, \"RM\"],\n  \"NAD\": [undefined, \"$\"],\n  \"NGN\": [undefined, \"₦\"],\n  \"NIO\": [undefined, \"C$\"],\n  \"NOK\": [undefined, \"kr\", 2],\n  \"NPR\": [undefined, \"Rs\"],\n  \"NZD\": [\"NZ$\", \"$\"],\n  \"OMR\": [undefined, undefined, 3],\n  \"PHP\": [\"₱\"],\n  \"PKR\": [undefined, \"Rs\", 2],\n  \"PLN\": [undefined, \"zł\"],\n  \"PYG\": [undefined, \"₲\", 0],\n  \"RON\": [undefined, \"lei\"],\n  \"RSD\": [undefined, undefined, 0],\n  \"RUB\": [undefined, \"₽\"],\n  \"RWF\": [undefined, \"RF\", 0],\n  \"SBD\": [undefined, \"$\"],\n  \"SEK\": [undefined, \"kr\", 2],\n  \"SGD\": [undefined, \"$\"],\n  \"SHP\": [undefined, \"£\"],\n  \"SLE\": [undefined, undefined, 2],\n  \"SLL\": [undefined, undefined, 0],\n  \"SOS\": [undefined, undefined, 0],\n  \"SRD\": [undefined, \"$\"],\n  \"SSP\": [undefined, \"£\"],\n  \"STD\": [undefined, undefined, 0],\n  \"STN\": [undefined, \"Db\"],\n  \"SYP\": [undefined, \"£\", 0],\n  \"THB\": [undefined, \"฿\"],\n  \"TMM\": [undefined, undefined, 0],\n  \"TND\": [undefined, undefined, 3],\n  \"TOP\": [undefined, \"T$\"],\n  \"TRL\": [undefined, undefined, 0],\n  \"TRY\": [undefined, \"₺\"],\n  \"TTD\": [undefined, \"$\"],\n  \"TWD\": [\"NT$\", \"$\", 2],\n  \"TZS\": [undefined, undefined, 2],\n  \"UAH\": [undefined, \"₴\"],\n  \"UGX\": [undefined, undefined, 0],\n  \"USD\": [\"$\"],\n  \"UYI\": [undefined, undefined, 0],\n  \"UYU\": [undefined, \"$\"],\n  \"UYW\": [undefined, undefined, 4],\n  \"UZS\": [undefined, undefined, 2],\n  \"VEF\": [undefined, \"Bs\", 2],\n  \"VND\": [\"₫\", undefined, 0],\n  \"VUV\": [undefined, undefined, 0],\n  \"XAF\": [\"FCFA\", undefined, 0],\n  \"XCD\": [\"EC$\", \"$\"],\n  \"XOF\": [\"F CFA\", undefined, 0],\n  \"XPF\": [\"CFPF\", undefined, 0],\n  \"XXX\": [\"¤\"],\n  \"YER\": [undefined, undefined, 0],\n  \"ZAR\": [undefined, \"R\"],\n  \"ZMK\": [undefined, undefined, 0],\n  \"ZMW\": [undefined, \"ZK\"],\n  \"ZWD\": [undefined, undefined, 0]\n};\n\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberFormatStyle = /*#__PURE__*/(() => {\n  NumberFormatStyle = NumberFormatStyle || {};\n  NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n  NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n  NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n  NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n  return NumberFormatStyle;\n})();\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar Plural = /*#__PURE__*/(() => {\n  Plural = Plural || {};\n  Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n  Plural[Plural[\"One\"] = 1] = \"One\";\n  Plural[Plural[\"Two\"] = 2] = \"Two\";\n  Plural[Plural[\"Few\"] = 3] = \"Few\";\n  Plural[Plural[\"Many\"] = 4] = \"Many\";\n  Plural[Plural[\"Other\"] = 5] = \"Other\";\n  return Plural;\n})();\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar FormStyle = /*#__PURE__*/(() => {\n  FormStyle = FormStyle || {};\n  FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n  FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n  return FormStyle;\n})();\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nvar TranslationWidth = /*#__PURE__*/(() => {\n  TranslationWidth = TranslationWidth || {};\n  /** 1 character for `en-US`. For example: 'S' */\n  TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n  /** 3 characters for `en-US`. For example: 'Sun' */\n  TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n  /** Full length for `en-US`. For example: \"Sunday\" */\n  TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n  /** 2 characters for `en-US`, For example: \"Su\" */\n  TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n  return TranslationWidth;\n})();\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()`\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n */\nvar FormatWidth = /*#__PURE__*/(() => {\n  FormatWidth = FormatWidth || {};\n  /**\n   * For `en-US`, 'M/d/yy, h:mm a'`\n   * (Example: `6/15/15, 9:03 AM`)\n   */\n  FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n  /**\n   * For `en-US`, `'MMM d, y, h:mm:ss a'`\n   * (Example: `Jun 15, 2015, 9:03:01 AM`)\n   */\n  FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n  /**\n   * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n   * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n   */\n  FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n  /**\n   * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n   * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n   */\n  FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n  return FormatWidth;\n})();\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberSymbol = /*#__PURE__*/(() => {\n  NumberSymbol = NumberSymbol || {};\n  /**\n   * Decimal separator.\n   * For `en-US`, the dot character.\n   * Example: 2,345`.`67\n   */\n  NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n  /**\n   * Grouping separator, typically for thousands.\n   * For `en-US`, the comma character.\n   * Example: 2`,`345.67\n   */\n  NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n  /**\n   * List-item separator.\n   * Example: \"one, two, and three\"\n   */\n  NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n  /**\n   * Sign for percentage (out of 100).\n   * Example: 23.4%\n   */\n  NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n  /**\n   * Sign for positive numbers.\n   * Example: +23\n   */\n  NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n  /**\n   * Sign for negative numbers.\n   * Example: -23\n   */\n  NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n  /**\n   * Computer notation for exponential value (n times a power of 10).\n   * Example: 1.2E3\n   */\n  NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n  /**\n   * Human-readable format of exponential.\n   * Example: 1.2x103\n   */\n  NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n  /**\n   * Sign for permille (out of 1000).\n   * Example: 23.4‰\n   */\n  NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n  /**\n   * Infinity, can be used with plus and minus.\n   * Example: ∞, +∞, -∞\n   */\n  NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n  /**\n   * Not a number.\n   * Example: NaN\n   */\n  NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n  /**\n   * Symbol used between time units.\n   * Example: 10:52\n   */\n  NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n  /**\n   * Decimal separator for currency values (fallback to `Decimal`).\n   * Example: $2,345.67\n   */\n  NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n  /**\n   * Group separator for currency values (fallback to `Group`).\n   * Example: $2,345.67\n   */\n  NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n  return NumberSymbol;\n})();\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nvar WeekDay = /*#__PURE__*/(() => {\n  WeekDay = WeekDay || {};\n  WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n  WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n  WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n  WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n  WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n  WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n  WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n  return WeekDay;\n})();\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleId(locale) {\n  return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n  const data = ɵfindLocaleData(locale);\n  const amPmData = [data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]];\n  const amPm = getLastDefinedValue(amPmData, formStyle);\n  return getLastDefinedValue(amPm, width);\n}\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n  const data = ɵfindLocaleData(locale);\n  const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n  const days = getLastDefinedValue(daysData, formStyle);\n  return getLastDefinedValue(days, width);\n}\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,  `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n  const data = ɵfindLocaleData(locale);\n  const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n  const months = getLastDefinedValue(monthsData, formStyle);\n  return getLastDefinedValue(months, width);\n}\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleEraNames(locale, width) {\n  const data = ɵfindLocaleData(locale);\n  const erasData = data[ɵLocaleDataIndex.Eras];\n  return getLastDefinedValue(erasData, width);\n}\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleWeekEndRange(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateFormat(locale, width) {\n  const data = ɵfindLocaleData(locale);\n  return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n\n * @publicApi\n */\nfunction getLocaleTimeFormat(locale, width) {\n  const data = ɵfindLocaleData(locale);\n  return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n  const data = ɵfindLocaleData(locale);\n  const dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n  return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n  const data = ɵfindLocaleData(locale);\n  const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n  if (typeof res === 'undefined') {\n    if (symbol === NumberSymbol.CurrencyDecimal) {\n      return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n    } else if (symbol === NumberSymbol.CurrencyGroup) {\n      return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n    }\n  }\n  return res;\n}\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberFormat(locale, type) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencySymbol(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencyName(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nfunction getLocaleCurrencyCode(locale) {\n  return ɵgetLocaleCurrencyCode(locale);\n}\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleCurrencies(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nconst getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n  if (!data[ɵLocaleDataIndex.ExtraData]) {\n    throw new Error(`Missing extra locale data for the locale \"${data[ɵLocaleDataIndex.LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n  }\n}\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n  const data = ɵfindLocaleData(locale);\n  checkFullData(data);\n  const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || [];\n  return rules.map(rule => {\n    if (typeof rule === 'string') {\n      return extractTime(rule);\n    }\n    return [extractTime(rule[0]), extractTime(rule[1])];\n  });\n}\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n  const data = ɵfindLocaleData(locale);\n  checkFullData(data);\n  const dayPeriodsData = [data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */], data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]];\n\n  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n  return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleDirection(locale) {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.Directionality];\n}\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLastDefinedValue(data, index) {\n  for (let i = index; i > -1; i--) {\n    if (typeof data[i] !== 'undefined') {\n      return data[i];\n    }\n  }\n  throw new Error('Locale data API: locale data undefined');\n}\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n  const [h, m] = time.split(':');\n  return {\n    hours: +h,\n    minutes: +m\n  };\n}\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n  const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n  const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */];\n  if (format === 'narrow' && typeof symbolNarrow === 'string') {\n    return symbolNarrow;\n  }\n  return currency[0 /* ɵCurrencyIndex.Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n  let digits;\n  const currency = CURRENCIES_EN[code];\n  if (currency) {\n    digits = currency[2 /* ɵCurrencyIndex.NbOfDigits */];\n  }\n\n  return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\nconst ISO8601_DATE_REGEX = /^(\\d{4,})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n//    1        2       3         4          5          6          7          8  9     10      11\nconst NAMED_FORMATS = {};\nconst DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\nvar ZoneWidth = /*#__PURE__*/(() => {\n  ZoneWidth = ZoneWidth || {};\n  ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n  ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n  ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n  ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n  return ZoneWidth;\n})();\nvar DateType = /*#__PURE__*/(() => {\n  DateType = DateType || {};\n  DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n  DateType[DateType[\"Month\"] = 1] = \"Month\";\n  DateType[DateType[\"Date\"] = 2] = \"Date\";\n  DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n  DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n  DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n  DateType[DateType[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\n  DateType[DateType[\"Day\"] = 7] = \"Day\";\n  return DateType;\n})();\nvar TranslationType = /*#__PURE__*/(() => {\n  TranslationType = TranslationType || {};\n  TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n  TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n  TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n  TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n  return TranslationType;\n})();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n  let date = toDate(value);\n  const namedFormat = getNamedFormat(locale, format);\n  format = namedFormat || format;\n  let parts = [];\n  let match;\n  while (format) {\n    match = DATE_FORMATS_SPLIT.exec(format);\n    if (match) {\n      parts = parts.concat(match.slice(1));\n      const part = parts.pop();\n      if (!part) {\n        break;\n      }\n      format = part;\n    } else {\n      parts.push(format);\n      break;\n    }\n  }\n  let dateTimezoneOffset = date.getTimezoneOffset();\n  if (timezone) {\n    dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n    date = convertTimezoneToLocal(date, timezone, true);\n  }\n  let text = '';\n  parts.forEach(value => {\n    const dateFormatter = getDateFormatter(value);\n    text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n  });\n  return text;\n}\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year, month, date) {\n  // The `newDate` is set to midnight (UTC) on January 1st 1970.\n  // - In PST this will be December 31st 1969 at 4pm.\n  // - In GMT this will be January 1st 1970 at 1am.\n  // Note that they even have different years, dates and months!\n  const newDate = new Date(0);\n  // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n  // change the internal time of the date.\n  // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n  // - In PST this will now be September 20, 2019 at 4pm\n  // - In GMT this will now be September 20, 2019 at 1am\n  newDate.setFullYear(year, month, date);\n  // We want the final date to be at local midnight, so we reset the time.\n  // - In PST this will now be September 20, 2019 at 12am\n  // - In GMT this will now be September 20, 2019 at 12am\n  newDate.setHours(0, 0, 0);\n  return newDate;\n}\nfunction getNamedFormat(locale, format) {\n  const localeId = getLocaleId(locale);\n  NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n  if (NAMED_FORMATS[localeId][format]) {\n    return NAMED_FORMATS[localeId][format];\n  }\n  let formatValue = '';\n  switch (format) {\n    case 'shortDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n      break;\n    case 'shortTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n      break;\n    case 'short':\n      const shortTime = getNamedFormat(locale, 'shortTime');\n      const shortDate = getNamedFormat(locale, 'shortDate');\n      formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n      break;\n    case 'medium':\n      const mediumTime = getNamedFormat(locale, 'mediumTime');\n      const mediumDate = getNamedFormat(locale, 'mediumDate');\n      formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n      break;\n    case 'long':\n      const longTime = getNamedFormat(locale, 'longTime');\n      const longDate = getNamedFormat(locale, 'longDate');\n      formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n      break;\n    case 'full':\n      const fullTime = getNamedFormat(locale, 'fullTime');\n      const fullDate = getNamedFormat(locale, 'fullDate');\n      formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n      break;\n  }\n  if (formatValue) {\n    NAMED_FORMATS[localeId][format] = formatValue;\n  }\n  return formatValue;\n}\nfunction formatDateTime(str, opt_values) {\n  if (opt_values) {\n    str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n      return opt_values != null && key in opt_values ? opt_values[key] : match;\n    });\n  }\n  return str;\n}\nfunction padNumber(num, digits, minusSign = '-', trim, negWrap) {\n  let neg = '';\n  if (num < 0 || negWrap && num <= 0) {\n    if (negWrap) {\n      num = -num + 1;\n    } else {\n      num = -num;\n      neg = minusSign;\n    }\n  }\n  let strNum = String(num);\n  while (strNum.length < digits) {\n    strNum = '0' + strNum;\n  }\n  if (trim) {\n    strNum = strNum.slice(strNum.length - digits);\n  }\n  return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n  const strMs = padNumber(milliseconds, 3);\n  return strMs.substring(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset = 0, trim = false, negWrap = false) {\n  return function (date, locale) {\n    let part = getDatePart(name, date);\n    if (offset > 0 || part > -offset) {\n      part += offset;\n    }\n    if (name === DateType.Hours) {\n      if (part === 0 && offset === -12) {\n        part = 12;\n      }\n    } else if (name === DateType.FractionalSeconds) {\n      return formatFractionalSeconds(part, size);\n    }\n    const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    return padNumber(part, size, localeMinus, trim, negWrap);\n  };\n}\nfunction getDatePart(part, date) {\n  switch (part) {\n    case DateType.FullYear:\n      return date.getFullYear();\n    case DateType.Month:\n      return date.getMonth();\n    case DateType.Date:\n      return date.getDate();\n    case DateType.Hours:\n      return date.getHours();\n    case DateType.Minutes:\n      return date.getMinutes();\n    case DateType.Seconds:\n      return date.getSeconds();\n    case DateType.FractionalSeconds:\n      return date.getMilliseconds();\n    case DateType.Day:\n      return date.getDay();\n    default:\n      throw new Error(`Unknown DateType value \"${part}\".`);\n  }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form = FormStyle.Format, extended = false) {\n  return function (date, locale) {\n    return getDateTranslation(date, locale, name, width, form, extended);\n  };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\n  switch (name) {\n    case TranslationType.Months:\n      return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n    case TranslationType.Days:\n      return getLocaleDayNames(locale, form, width)[date.getDay()];\n    case TranslationType.DayPeriods:\n      const currentHours = date.getHours();\n      const currentMinutes = date.getMinutes();\n      if (extended) {\n        const rules = getLocaleExtraDayPeriodRules(locale);\n        const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n        const index = rules.findIndex(rule => {\n          if (Array.isArray(rule)) {\n            // morning, afternoon, evening, night\n            const [from, to] = rule;\n            const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n            const beforeTo = currentHours < to.hours || currentHours === to.hours && currentMinutes < to.minutes;\n            // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n            // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n            // 10pm - 5am) where `from` is greater (later!) than `to`.\n            //\n            // In the first case the current time must be BOTH after `from` AND before `to`\n            // (e.g. 8am is after 6am AND before 10am).\n            //\n            // In the second case the current time must be EITHER after `from` OR before `to`\n            // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n            // after 10pm).\n            if (from.hours < to.hours) {\n              if (afterFrom && beforeTo) {\n                return true;\n              }\n            } else if (afterFrom || beforeTo) {\n              return true;\n            }\n          } else {\n            // noon or midnight\n            if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n              return true;\n            }\n          }\n          return false;\n        });\n        if (index !== -1) {\n          return dayPeriods[index];\n        }\n      }\n      // if no rules for the day periods, we use am/pm by default\n      return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];\n    case TranslationType.Eras:\n      return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      const unexpected = name;\n      throw new Error(`unexpected translation type ${unexpected}`);\n  }\n}\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width) {\n  return function (date, locale, offset) {\n    const zone = -1 * offset;\n    const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n    switch (width) {\n      case ZoneWidth.Short:\n        return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.ShortGMT:\n        return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);\n      case ZoneWidth.Long:\n        return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.Extended:\n        if (offset === 0) {\n          return 'Z';\n        } else {\n          return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);\n        }\n      default:\n        throw new Error(`Unknown zone width \"${width}\"`);\n    }\n  };\n}\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n  const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n  return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n  return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased = false) {\n  return function (date, locale) {\n    let result;\n    if (monthBased) {\n      const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n      const today = date.getDate();\n      result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n    } else {\n      const thisThurs = getThursdayThisWeek(date);\n      // Some days of a year are part of next year according to ISO 8601.\n      // Compute the firstThurs from the year of this week's Thursday\n      const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n      const diff = thisThurs.getTime() - firstThurs.getTime();\n      result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n    }\n\n    return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  };\n}\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size, trim = false) {\n  return function (date, locale) {\n    const thisThurs = getThursdayThisWeek(date);\n    const weekNumberingYear = thisThurs.getFullYear();\n    return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);\n  };\n}\nconst DATE_FORMATS = {};\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n  if (DATE_FORMATS[format]) {\n    return DATE_FORMATS[format];\n  }\n  let formatter;\n  switch (format) {\n    // Era name (AD/BC)\n    case 'G':\n    case 'GG':\n    case 'GGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n      break;\n    case 'GGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n      break;\n    case 'GGGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n      break;\n    // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n    case 'y':\n      formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n      break;\n    // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yy':\n      formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n      break;\n    // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yyy':\n      formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n      break;\n    // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n    case 'yyyy':\n      formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n      break;\n    // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n    case 'Y':\n      formatter = weekNumberingYearGetter(1);\n      break;\n    // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n    // 2010 => 10)\n    case 'YY':\n      formatter = weekNumberingYearGetter(2, true);\n      break;\n    // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n    // 2010 => 2010)\n    case 'YYY':\n      formatter = weekNumberingYearGetter(3);\n      break;\n    // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n    case 'YYYY':\n      formatter = weekNumberingYearGetter(4);\n      break;\n    // Month of the year (1-12), numeric\n    case 'M':\n    case 'L':\n      formatter = dateGetter(DateType.Month, 1, 1);\n      break;\n    case 'MM':\n    case 'LL':\n      formatter = dateGetter(DateType.Month, 2, 1);\n      break;\n    // Month of the year (January, ...), string, format\n    case 'MMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n      break;\n    case 'MMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n      break;\n    case 'MMMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n      break;\n    // Month of the year (January, ...), string, standalone\n    case 'LLL':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n      break;\n    case 'LLLL':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n      break;\n    case 'LLLLL':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n      break;\n    // Week of the year (1, ... 52)\n    case 'w':\n      formatter = weekGetter(1);\n      break;\n    case 'ww':\n      formatter = weekGetter(2);\n      break;\n    // Week of the month (1, ...)\n    case 'W':\n      formatter = weekGetter(1, true);\n      break;\n    // Day of the month (1-31)\n    case 'd':\n      formatter = dateGetter(DateType.Date, 1);\n      break;\n    case 'dd':\n      formatter = dateGetter(DateType.Date, 2);\n      break;\n    // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)\n    case 'c':\n    case 'cc':\n      formatter = dateGetter(DateType.Day, 1);\n      break;\n    case 'ccc':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);\n      break;\n    case 'cccc':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n      break;\n    case 'ccccc':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);\n      break;\n    case 'cccccc':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\n      break;\n    // Day of the Week\n    case 'E':\n    case 'EE':\n    case 'EEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n      break;\n    case 'EEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n      break;\n    case 'EEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n      break;\n    case 'EEEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n      break;\n    // Generic period of the day (am-pm)\n    case 'a':\n    case 'aa':\n    case 'aaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n      break;\n    case 'aaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n      break;\n    case 'aaaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n      break;\n    // Extended period of the day (midnight, at night, ...), standalone\n    case 'b':\n    case 'bb':\n    case 'bbb':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n      break;\n    case 'bbbb':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n      break;\n    case 'bbbbb':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n      break;\n    // Extended period of the day (midnight, night, ...), standalone\n    case 'B':\n    case 'BB':\n    case 'BBB':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n      break;\n    case 'BBBB':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n      break;\n    case 'BBBBB':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n      break;\n    // Hour in AM/PM, (1-12)\n    case 'h':\n      formatter = dateGetter(DateType.Hours, 1, -12);\n      break;\n    case 'hh':\n      formatter = dateGetter(DateType.Hours, 2, -12);\n      break;\n    // Hour of the day (0-23)\n    case 'H':\n      formatter = dateGetter(DateType.Hours, 1);\n      break;\n    // Hour in day, padded (00-23)\n    case 'HH':\n      formatter = dateGetter(DateType.Hours, 2);\n      break;\n    // Minute of the hour (0-59)\n    case 'm':\n      formatter = dateGetter(DateType.Minutes, 1);\n      break;\n    case 'mm':\n      formatter = dateGetter(DateType.Minutes, 2);\n      break;\n    // Second of the minute (0-59)\n    case 's':\n      formatter = dateGetter(DateType.Seconds, 1);\n      break;\n    case 'ss':\n      formatter = dateGetter(DateType.Seconds, 2);\n      break;\n    // Fractional second\n    case 'S':\n      formatter = dateGetter(DateType.FractionalSeconds, 1);\n      break;\n    case 'SS':\n      formatter = dateGetter(DateType.FractionalSeconds, 2);\n      break;\n    case 'SSS':\n      formatter = dateGetter(DateType.FractionalSeconds, 3);\n      break;\n    // Timezone ISO8601 short format (-0430)\n    case 'Z':\n    case 'ZZ':\n    case 'ZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Short);\n      break;\n    // Timezone ISO8601 extended format (-04:30)\n    case 'ZZZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Extended);\n      break;\n    // Timezone GMT short format (GMT+4)\n    case 'O':\n    case 'OO':\n    case 'OOO':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'z':\n    case 'zz':\n    case 'zzz':\n      formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n      break;\n    // Timezone GMT long format (GMT+0430)\n    case 'OOOO':\n    case 'ZZZZ':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'zzzz':\n      formatter = timeZoneGetter(ZoneWidth.Long);\n      break;\n    default:\n      return null;\n  }\n  DATE_FORMATS[format] = formatter;\n  return formatter;\n}\nfunction timezoneToOffset(timezone, fallback) {\n  // Support: IE 11 only, Edge 13-15+\n  // IE/Edge do not \"understand\" colon (`:`) in timezone\n  timezone = timezone.replace(/:/g, '');\n  const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n  return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n  date = new Date(date.getTime());\n  date.setMinutes(date.getMinutes() + minutes);\n  return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n  const reverseValue = reverse ? -1 : 1;\n  const dateTimezoneOffset = date.getTimezoneOffset();\n  const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n  return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n *   Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nfunction toDate(value) {\n  if (isDate(value)) {\n    return value;\n  }\n  if (typeof value === 'number' && !isNaN(value)) {\n    return new Date(value);\n  }\n  if (typeof value === 'string') {\n    value = value.trim();\n    if (/^(\\d{4}(-\\d{1,2}(-\\d{1,2})?)?)$/.test(value)) {\n      /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n      before Date creation to avoid time offset and errors in the new Date.\n      If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n      date, some browsers (e.g. IE 9) will throw an invalid Date error.\n      If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n      is applied.\n      Note: ISO months are 0 for January, 1 for February, ... */\n      const [y, m = 1, d = 1] = value.split('-').map(val => +val);\n      return createDate(y, m - 1, d);\n    }\n    const parsedNb = parseFloat(value);\n    // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n    if (!isNaN(value - parsedNb)) {\n      return new Date(parsedNb);\n    }\n    let match;\n    if (match = value.match(ISO8601_DATE_REGEX)) {\n      return isoStringToDate(match);\n    }\n  }\n  const date = new Date(value);\n  if (!isDate(date)) {\n    throw new Error(`Unable to convert \"${value}\" into a date`);\n  }\n  return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n  const date = new Date(0);\n  let tzHour = 0;\n  let tzMin = 0;\n  // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n  const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n  const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n  // if there is a timezone defined like \"+01:00\" or \"+0100\"\n  if (match[9]) {\n    tzHour = Number(match[9] + match[10]);\n    tzMin = Number(match[9] + match[11]);\n  }\n  dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n  const h = Number(match[4] || 0) - tzHour;\n  const m = Number(match[5] || 0) - tzMin;\n  const s = Number(match[6] || 0);\n  // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n  // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n  // becomes `999ms`.\n  const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n  timeSetter.call(date, h, m, s, ms);\n  return date;\n}\nfunction isDate(value) {\n  return value instanceof Date && !isNaN(value.valueOf());\n}\nconst NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {\n  let formattedText = '';\n  let isZero = false;\n  if (!isFinite(value)) {\n    formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n  } else {\n    let parsedNumber = parseNumber(value);\n    if (isPercent) {\n      parsedNumber = toPercent(parsedNumber);\n    }\n    let minInt = pattern.minInt;\n    let minFraction = pattern.minFrac;\n    let maxFraction = pattern.maxFrac;\n    if (digitsInfo) {\n      const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n      if (parts === null) {\n        throw new Error(`${digitsInfo} is not a valid digit info`);\n      }\n      const minIntPart = parts[1];\n      const minFractionPart = parts[3];\n      const maxFractionPart = parts[5];\n      if (minIntPart != null) {\n        minInt = parseIntAutoRadix(minIntPart);\n      }\n      if (minFractionPart != null) {\n        minFraction = parseIntAutoRadix(minFractionPart);\n      }\n      if (maxFractionPart != null) {\n        maxFraction = parseIntAutoRadix(maxFractionPart);\n      } else if (minFractionPart != null && minFraction > maxFraction) {\n        maxFraction = minFraction;\n      }\n    }\n    roundNumber(parsedNumber, minFraction, maxFraction);\n    let digits = parsedNumber.digits;\n    let integerLen = parsedNumber.integerLen;\n    const exponent = parsedNumber.exponent;\n    let decimals = [];\n    isZero = digits.every(d => !d);\n    // pad zeros for small numbers\n    for (; integerLen < minInt; integerLen++) {\n      digits.unshift(0);\n    }\n    // pad zeros for small numbers\n    for (; integerLen < 0; integerLen++) {\n      digits.unshift(0);\n    }\n    // extract decimals digits\n    if (integerLen > 0) {\n      decimals = digits.splice(integerLen, digits.length);\n    } else {\n      decimals = digits;\n      digits = [0];\n    }\n    // format the integer digits with grouping separators\n    const groups = [];\n    if (digits.length >= pattern.lgSize) {\n      groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n    }\n    while (digits.length > pattern.gSize) {\n      groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n    }\n    if (digits.length) {\n      groups.unshift(digits.join(''));\n    }\n    formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n    // append the decimal digits\n    if (decimals.length) {\n      formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n    }\n    if (exponent) {\n      formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n    }\n  }\n  if (value < 0 && !isZero) {\n    formattedText = pattern.negPre + formattedText + pattern.negSuf;\n  } else {\n    formattedText = pattern.posPre + formattedText + pattern.posSuf;\n  }\n  return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n  pattern.maxFrac = pattern.minFrac;\n  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n  return res.replace(CURRENCY_CHAR, currency)\n  // if we have 2 time the currency character, the second one is ignored\n  .replace(CURRENCY_CHAR, '')\n  // If there is a spacing between currency character and the value and\n  // the currency character is suppressed by passing an empty string, the\n  // spacing character would remain as part of the string. Then we\n  // should remove it.\n  .trim();\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n  return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign = '-') {\n  const p = {\n    minInt: 1,\n    minFrac: 0,\n    maxFrac: 0,\n    posPre: '',\n    posSuf: '',\n    negPre: '',\n    negSuf: '',\n    gSize: 0,\n    lgSize: 0\n  };\n  const patternParts = format.split(PATTERN_SEP);\n  const positive = patternParts[0];\n  const negative = patternParts[1];\n  const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)],\n    integer = positiveParts[0],\n    fraction = positiveParts[1] || '';\n  p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));\n  for (let i = 0; i < fraction.length; i++) {\n    const ch = fraction.charAt(i);\n    if (ch === ZERO_CHAR) {\n      p.minFrac = p.maxFrac = i + 1;\n    } else if (ch === DIGIT_CHAR) {\n      p.maxFrac = i + 1;\n    } else {\n      p.posSuf += ch;\n    }\n  }\n  const groups = integer.split(GROUP_SEP);\n  p.gSize = groups[1] ? groups[1].length : 0;\n  p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;\n  if (negative) {\n    const trunkLen = positive.length - p.posPre.length - p.posSuf.length,\n      pos = negative.indexOf(DIGIT_CHAR);\n    p.negPre = negative.substring(0, pos).replace(/'/g, '');\n    p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, '');\n  } else {\n    p.negPre = minusSign + p.posPre;\n    p.negSuf = p.posSuf;\n  }\n  return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n  // if the number is 0, don't do anything\n  if (parsedNumber.digits[0] === 0) {\n    return parsedNumber;\n  }\n  // Getting the current number of decimals\n  const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n  if (parsedNumber.exponent) {\n    parsedNumber.exponent += 2;\n  } else {\n    if (fractionLen === 0) {\n      parsedNumber.digits.push(0, 0);\n    } else if (fractionLen === 1) {\n      parsedNumber.digits.push(0);\n    }\n    parsedNumber.integerLen += 2;\n  }\n  return parsedNumber;\n}\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num) {\n  let numStr = Math.abs(num) + '';\n  let exponent = 0,\n    digits,\n    integerLen;\n  let i, j, zeros;\n  // Decimal point?\n  if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n    numStr = numStr.replace(DECIMAL_SEP, '');\n  }\n  // Exponential form?\n  if ((i = numStr.search(/e/i)) > 0) {\n    // Work out the exponent.\n    if (integerLen < 0) integerLen = i;\n    integerLen += +numStr.slice(i + 1);\n    numStr = numStr.substring(0, i);\n  } else if (integerLen < 0) {\n    // There was no decimal point or exponent so it is an integer.\n    integerLen = numStr.length;\n  }\n  // Count the number of leading zeros.\n  for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {/* empty */\n  }\n  if (i === (zeros = numStr.length)) {\n    // The digits are all zero.\n    digits = [0];\n    integerLen = 1;\n  } else {\n    // Count the number of trailing zeros\n    zeros--;\n    while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n    // Trailing zeros are insignificant so ignore them\n    integerLen -= i;\n    digits = [];\n    // Convert string to array of digits without leading/trailing zeros.\n    for (j = 0; i <= zeros; i++, j++) {\n      digits[j] = Number(numStr.charAt(i));\n    }\n  }\n  // If the number overflows the maximum allowed digits then use an exponent.\n  if (integerLen > MAX_DIGITS) {\n    digits = digits.splice(0, MAX_DIGITS - 1);\n    exponent = integerLen - 1;\n    integerLen = 1;\n  }\n  return {\n    digits,\n    exponent,\n    integerLen\n  };\n}\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, minFrac, maxFrac) {\n  if (minFrac > maxFrac) {\n    throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);\n  }\n  let digits = parsedNumber.digits;\n  let fractionLen = digits.length - parsedNumber.integerLen;\n  const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n  // The index of the digit to where rounding is to occur\n  let roundAt = fractionSize + parsedNumber.integerLen;\n  let digit = digits[roundAt];\n  if (roundAt > 0) {\n    // Drop fractional digits beyond `roundAt`\n    digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n    // Set non-fractional digits beyond `roundAt` to 0\n    for (let j = roundAt; j < digits.length; j++) {\n      digits[j] = 0;\n    }\n  } else {\n    // We rounded to zero so reset the parsedNumber\n    fractionLen = Math.max(0, fractionLen);\n    parsedNumber.integerLen = 1;\n    digits.length = Math.max(1, roundAt = fractionSize + 1);\n    digits[0] = 0;\n    for (let i = 1; i < roundAt; i++) digits[i] = 0;\n  }\n  if (digit >= 5) {\n    if (roundAt - 1 < 0) {\n      for (let k = 0; k > roundAt; k--) {\n        digits.unshift(0);\n        parsedNumber.integerLen++;\n      }\n      digits.unshift(1);\n      parsedNumber.integerLen++;\n    } else {\n      digits[roundAt - 1]++;\n    }\n  }\n  // Pad out with zeros to get the required fraction length\n  for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n  let dropTrailingZeros = fractionSize !== 0;\n  // Minimal length = nb of decimals required + current nb of integers\n  // Any number besides that is optional and can be removed if it's a trailing 0\n  const minLen = minFrac + parsedNumber.integerLen;\n  // Do any carrying, e.g. a digit was rounded up to 10\n  const carry = digits.reduceRight(function (carry, d, i, digits) {\n    d = d + carry;\n    digits[i] = d < 10 ? d : d - 10; // d % 10\n    if (dropTrailingZeros) {\n      // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n      if (digits[i] === 0 && i >= minLen) {\n        digits.pop();\n      } else {\n        dropTrailingZeros = false;\n      }\n    }\n    return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n  }, 0);\n  if (carry) {\n    digits.unshift(carry);\n    parsedNumber.integerLen++;\n  }\n}\nfunction parseIntAutoRadix(text) {\n  const result = parseInt(text);\n  if (isNaN(result)) {\n    throw new Error('Invalid integer literal when parsing ' + text);\n  }\n  return result;\n}\n\n/**\n * @publicApi\n */\nlet NgLocalization = /*#__PURE__*/(() => {\n  class NgLocalization {}\n  NgLocalization.ɵfac = function NgLocalization_Factory(t) {\n    return new (t || NgLocalization)();\n  };\n  NgLocalization.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: NgLocalization,\n    factory: function NgLocalization_Factory(t) {\n      let r = null;\n      if (t) {\n        r = new t();\n      } else {\n        r = (locale => new NgLocaleLocalization(locale))(i0.ɵɵinject(LOCALE_ID));\n      }\n      return r;\n    },\n    providedIn: 'root'\n  });\n  return NgLocalization;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n  let key = `=${value}`;\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n  key = ngLocalization.getPluralCategory(value, locale);\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n  if (cases.indexOf('other') > -1) {\n    return 'other';\n  }\n  throw new Error(`No plural message found for value \"${value}\"`);\n}\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\nlet NgLocaleLocalization = /*#__PURE__*/(() => {\n  class NgLocaleLocalization extends NgLocalization {\n    constructor(locale) {\n      super();\n      this.locale = locale;\n    }\n    getPluralCategory(value, locale) {\n      const plural = getLocalePluralCase(locale || this.locale)(value);\n      switch (plural) {\n        case Plural.Zero:\n          return 'zero';\n        case Plural.One:\n          return 'one';\n        case Plural.Two:\n          return 'two';\n        case Plural.Few:\n          return 'few';\n        case Plural.Many:\n          return 'many';\n        default:\n          return 'other';\n      }\n    }\n  }\n  NgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) {\n    return new (t || NgLocaleLocalization)(i0.ɵɵinject(LOCALE_ID));\n  };\n  NgLocaleLocalization.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: NgLocaleLocalization,\n    factory: NgLocaleLocalization.ɵfac\n  });\n  return NgLocaleLocalization;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nfunction registerLocaleData(data, localeId, extraData) {\n  return ɵregisterLocaleData(data, localeId, extraData);\n}\nfunction parseCookieValue(cookieStr, name) {\n  name = encodeURIComponent(name);\n  for (const cookie of cookieStr.split(';')) {\n    const eqIndex = cookie.indexOf('=');\n    const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n    if (cookieName.trim() === name) {\n      return decodeURIComponent(cookieValue);\n    }\n  }\n  return null;\n}\nconst WS_REGEXP = /\\s+/;\nconst EMPTY_ARRAY = [];\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n *     <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n *     <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n *     <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n *              evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nlet NgClass = /*#__PURE__*/(() => {\n  class NgClass {\n    constructor(\n    // leaving references to differs in place since flex layout is extending NgClass...\n    _iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n      this._iterableDiffers = _iterableDiffers;\n      this._keyValueDiffers = _keyValueDiffers;\n      this._ngEl = _ngEl;\n      this._renderer = _renderer;\n      this.initialClasses = EMPTY_ARRAY;\n      this.stateMap = new Map();\n    }\n    set klass(value) {\n      this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY;\n    }\n    set ngClass(value) {\n      this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value;\n    }\n    /*\n    The NgClass directive uses the custom change detection algorithm for its inputs. The custom\n    algorithm is necessary since inputs are represented as complex object or arrays that need to be\n    deeply-compared.\n       This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance\n    might negatively impact runtime performance of the entire change detection cycle. The design of\n    this algorithm is making sure that:\n    - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when\n    needed), even if references to bound objects change;\n    - there is no memory allocation if nothing changes (even relatively modest memory allocation\n    during the change detection cycle can result in GC pauses for some of the CD cycles).\n       The algorithm works by iterating over the set of bound classes, staring with [class] binding and\n    then going over [ngClass] binding. For each CSS class name:\n    - check if it was seen before (this information is tracked in the state map) and if its value\n    changed;\n    - mark it as \"touched\" - names that are not marked are not present in the latest set of binding\n    and we can remove such class name from the internal data structures;\n       After iteration over all the CSS class names we've got data structure with all the information\n    necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush\n    changes to the DOM and reset internal data structures so those are ready for the next change\n    detection cycle.\n     */\n    ngDoCheck() {\n      // classes from the [class] binding\n      for (const klass of this.initialClasses) {\n        this._updateState(klass, true);\n      }\n      // classes from the [ngClass] binding\n      const rawClass = this.rawClass;\n      if (Array.isArray(rawClass) || rawClass instanceof Set) {\n        for (const klass of rawClass) {\n          this._updateState(klass, true);\n        }\n      } else if (rawClass != null) {\n        for (const klass of Object.keys(rawClass)) {\n          this._updateState(klass, Boolean(rawClass[klass]));\n        }\n      }\n      this._applyStateDiff();\n    }\n    _updateState(klass, nextEnabled) {\n      const state = this.stateMap.get(klass);\n      if (state !== undefined) {\n        if (state.enabled !== nextEnabled) {\n          state.changed = true;\n          state.enabled = nextEnabled;\n        }\n        state.touched = true;\n      } else {\n        this.stateMap.set(klass, {\n          enabled: nextEnabled,\n          changed: true,\n          touched: true\n        });\n      }\n    }\n    _applyStateDiff() {\n      for (const stateEntry of this.stateMap) {\n        const klass = stateEntry[0];\n        const state = stateEntry[1];\n        if (state.changed) {\n          this._toggleClass(klass, state.enabled);\n          state.changed = false;\n        } else if (!state.touched) {\n          // A class that was previously active got removed from the new collection of classes -\n          // remove from the DOM as well.\n          if (state.enabled) {\n            this._toggleClass(klass, false);\n          }\n          this.stateMap.delete(klass);\n        }\n        state.touched = false;\n      }\n    }\n    _toggleClass(klass, enabled) {\n      if (ngDevMode) {\n        if (typeof klass !== 'string') {\n          throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(klass)}`);\n        }\n      }\n      klass = klass.trim();\n      if (klass.length > 0) {\n        klass.split(WS_REGEXP).forEach(klass => {\n          if (enabled) {\n            this._renderer.addClass(this._ngEl.nativeElement, klass);\n          } else {\n            this._renderer.removeClass(this._ngEl.nativeElement, klass);\n          }\n        });\n      }\n    }\n  }\n  NgClass.ɵfac = function NgClass_Factory(t) {\n    return new (t || NgClass)(i0.ɵɵdirectiveInject(i0.IterableDiffers), i0.ɵɵdirectiveInject(i0.KeyValueDiffers), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2));\n  };\n  NgClass.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgClass,\n    selectors: [[\"\", \"ngClass\", \"\"]],\n    inputs: {\n      klass: [\"class\", \"klass\"],\n      ngClass: \"ngClass\"\n    },\n    standalone: true\n  });\n  return NgClass;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Instantiates a {@link Component} type and inserts its Host View into the current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will be destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if it exists.\n *\n * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional\n * NgModule factory to allow loading another module dynamically, then loading a component from that\n * module. Use `ngComponentOutletNgModule` instead.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   injector: injectorExpression;\n *                                   content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized NgModule reference\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   ngModule: ngModuleClass;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\nlet NgComponentOutlet = /*#__PURE__*/(() => {\n  class NgComponentOutlet {\n    constructor(_viewContainerRef) {\n      this._viewContainerRef = _viewContainerRef;\n      this.ngComponentOutlet = null;\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      const {\n        _viewContainerRef: viewContainerRef,\n        ngComponentOutletNgModule: ngModule,\n        ngComponentOutletNgModuleFactory: ngModuleFactory\n      } = this;\n      viewContainerRef.clear();\n      this._componentRef = undefined;\n      if (this.ngComponentOutlet) {\n        const injector = this.ngComponentOutletInjector || viewContainerRef.parentInjector;\n        if (changes['ngComponentOutletNgModule'] || changes['ngComponentOutletNgModuleFactory']) {\n          if (this._moduleRef) this._moduleRef.destroy();\n          if (ngModule) {\n            this._moduleRef = createNgModule(ngModule, getParentInjector(injector));\n          } else if (ngModuleFactory) {\n            this._moduleRef = ngModuleFactory.create(getParentInjector(injector));\n          } else {\n            this._moduleRef = undefined;\n          }\n        }\n        this._componentRef = viewContainerRef.createComponent(this.ngComponentOutlet, {\n          index: viewContainerRef.length,\n          injector,\n          ngModuleRef: this._moduleRef,\n          projectableNodes: this.ngComponentOutletContent\n        });\n      }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      if (this._moduleRef) this._moduleRef.destroy();\n    }\n  }\n  NgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) {\n    return new (t || NgComponentOutlet)(i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n  };\n  NgComponentOutlet.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgComponentOutlet,\n    selectors: [[\"\", \"ngComponentOutlet\", \"\"]],\n    inputs: {\n      ngComponentOutlet: \"ngComponentOutlet\",\n      ngComponentOutletInjector: \"ngComponentOutletInjector\",\n      ngComponentOutletContent: \"ngComponentOutletContent\",\n      ngComponentOutletNgModule: \"ngComponentOutletNgModule\",\n      ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\"\n    },\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return NgComponentOutlet;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Helper function that returns an Injector instance of a parent NgModule.\nfunction getParentInjector(injector) {\n  const parentNgModule = injector.get(NgModuleRef);\n  return parentNgModule.injector;\n}\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * @publicApi\n */\nclass NgForOfContext {\n  constructor($implicit, ngForOf, index, count) {\n    this.$implicit = $implicit;\n    this.ngForOf = ngForOf;\n    this.index = index;\n    this.count = count;\n  }\n  get first() {\n    return this.index === 0;\n  }\n  get last() {\n    return this.index === this.count - 1;\n  }\n  get even() {\n    return this.index % 2 === 0;\n  }\n  get odd() {\n    return !this.even;\n  }\n}\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#asterisk) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n *   <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-per-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For further discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n *  ```\n * <li *ngFor=\"let user of users; index as i; first as isFirst\">\n *    {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nlet NgForOf = /*#__PURE__*/(() => {\n  class NgForOf {\n    /**\n     * The value of the iterable expression, which can be used as a\n     * [template input variable](guide/structural-directives#shorthand).\n     */\n    set ngForOf(ngForOf) {\n      this._ngForOf = ngForOf;\n      this._ngForOfDirty = true;\n    }\n    /**\n     * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n     *\n     * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n     * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n     * as the key.\n     *\n     * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n     * it produces for these items.\n     *\n     * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n     * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n     * primary key), and this iterable could be updated with new object instances that still\n     * represent the same underlying entity (for example, when data is re-fetched from the server,\n     * and the iterable is recreated and re-rendered, but most of the data is still the same).\n     *\n     * @see `TrackByFunction`\n     */\n    set ngForTrackBy(fn) {\n      if (NG_DEV_MODE && fn != null && typeof fn !== 'function') {\n        console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` + `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n      }\n      this._trackByFn = fn;\n    }\n    get ngForTrackBy() {\n      return this._trackByFn;\n    }\n    constructor(_viewContainer, _template, _differs) {\n      this._viewContainer = _viewContainer;\n      this._template = _template;\n      this._differs = _differs;\n      this._ngForOf = null;\n      this._ngForOfDirty = true;\n      this._differ = null;\n    }\n    /**\n     * A reference to the template that is stamped out for each item in the iterable.\n     * @see [template reference variable](guide/template-reference-variables)\n     */\n    set ngForTemplate(value) {\n      // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n      // The current type is too restrictive; a template that just uses index, for example,\n      // should be acceptable.\n      if (value) {\n        this._template = value;\n      }\n    }\n    /**\n     * Applies the changes when needed.\n     * @nodoc\n     */\n    ngDoCheck() {\n      if (this._ngForOfDirty) {\n        this._ngForOfDirty = false;\n        // React on ngForOf changes only once all inputs have been initialized\n        const value = this._ngForOf;\n        if (!this._differ && value) {\n          if (NG_DEV_MODE) {\n            try {\n              // CAUTION: this logic is duplicated for production mode below, as the try-catch\n              // is only present in development builds.\n              this._differ = this._differs.find(value).create(this.ngForTrackBy);\n            } catch {\n              let errorMessage = `Cannot find a differ supporting object '${value}' of type '` + `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n              if (typeof value === 'object') {\n                errorMessage += ' Did you mean to use the keyvalue pipe?';\n              }\n              throw new ɵRuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);\n            }\n          } else {\n            // CAUTION: this logic is duplicated for development mode above, as the try-catch\n            // is only present in development builds.\n            this._differ = this._differs.find(value).create(this.ngForTrackBy);\n          }\n        }\n      }\n      if (this._differ) {\n        const changes = this._differ.diff(this._ngForOf);\n        if (changes) this._applyChanges(changes);\n      }\n    }\n    _applyChanges(changes) {\n      const viewContainer = this._viewContainer;\n      changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n        if (item.previousIndex == null) {\n          // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n          // that a new item needs to be inserted from the iterable. This implies that\n          // there is an iterable value for \"_ngForOf\".\n          viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n        } else if (currentIndex == null) {\n          viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n        } else if (adjustedPreviousIndex !== null) {\n          const view = viewContainer.get(adjustedPreviousIndex);\n          viewContainer.move(view, currentIndex);\n          applyViewChange(view, item);\n        }\n      });\n      for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n        const viewRef = viewContainer.get(i);\n        const context = viewRef.context;\n        context.index = i;\n        context.count = ilen;\n        context.ngForOf = this._ngForOf;\n      }\n      changes.forEachIdentityChange(record => {\n        const viewRef = viewContainer.get(record.currentIndex);\n        applyViewChange(viewRef, record);\n      });\n    }\n    /**\n     * Asserts the correct type of the context for the template that `NgForOf` will render.\n     *\n     * The presence of this method is a signal to the Ivy template type-check compiler that the\n     * `NgForOf` structural directive renders its template with a specific context type.\n     */\n    static ngTemplateContextGuard(dir, ctx) {\n      return true;\n    }\n  }\n  NgForOf.ɵfac = function NgForOf_Factory(t) {\n    return new (t || NgForOf)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.IterableDiffers));\n  };\n  NgForOf.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgForOf,\n    selectors: [[\"\", \"ngFor\", \"\", \"ngForOf\", \"\"]],\n    inputs: {\n      ngForOf: \"ngForOf\",\n      ngForTrackBy: \"ngForTrackBy\",\n      ngForTemplate: \"ngForTemplate\"\n    },\n    standalone: true\n  });\n  return NgForOf;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction applyViewChange(view, record) {\n  view.context.$implicit = record.item;\n}\nfunction getTypeName(type) {\n  return type['name'] || typeof type;\n}\n\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when  false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#asterisk) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following  example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>`  element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * safe-navigation-operator (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n *  ...\n * </div>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"heroes\" [ngIfElse]=\"loading\">\n *  <div class=\"hero-list\">\n *   ...\n *  </div>\n * </ng-template>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nlet NgIf = /*#__PURE__*/(() => {\n  class NgIf {\n    constructor(_viewContainer, templateRef) {\n      this._viewContainer = _viewContainer;\n      this._context = new NgIfContext();\n      this._thenTemplateRef = null;\n      this._elseTemplateRef = null;\n      this._thenViewRef = null;\n      this._elseViewRef = null;\n      this._thenTemplateRef = templateRef;\n    }\n    /**\n     * The Boolean expression to evaluate as the condition for showing a template.\n     */\n    set ngIf(condition) {\n      this._context.$implicit = this._context.ngIf = condition;\n      this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to true.\n     */\n    set ngIfThen(templateRef) {\n      assertTemplate('ngIfThen', templateRef);\n      this._thenTemplateRef = templateRef;\n      this._thenViewRef = null; // clear previous view if any.\n      this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to false.\n     */\n    set ngIfElse(templateRef) {\n      assertTemplate('ngIfElse', templateRef);\n      this._elseTemplateRef = templateRef;\n      this._elseViewRef = null; // clear previous view if any.\n      this._updateView();\n    }\n    _updateView() {\n      if (this._context.$implicit) {\n        if (!this._thenViewRef) {\n          this._viewContainer.clear();\n          this._elseViewRef = null;\n          if (this._thenTemplateRef) {\n            this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n          }\n        }\n      } else {\n        if (!this._elseViewRef) {\n          this._viewContainer.clear();\n          this._thenViewRef = null;\n          if (this._elseTemplateRef) {\n            this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n          }\n        }\n      }\n    }\n    /**\n     * Asserts the correct type of the context for the template that `NgIf` will render.\n     *\n     * The presence of this method is a signal to the Ivy template type-check compiler that the\n     * `NgIf` structural directive renders its template with a specific context type.\n     */\n    static ngTemplateContextGuard(dir, ctx) {\n      return true;\n    }\n  }\n  NgIf.ɵfac = function NgIf_Factory(t) {\n    return new (t || NgIf)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef));\n  };\n  NgIf.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgIf,\n    selectors: [[\"\", \"ngIf\", \"\"]],\n    inputs: {\n      ngIf: \"ngIf\",\n      ngIfThen: \"ngIfThen\",\n      ngIfElse: \"ngIfElse\"\n    },\n    standalone: true\n  });\n  return NgIf;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nclass NgIfContext {\n  constructor() {\n    this.$implicit = null;\n    this.ngIf = null;\n  }\n}\nfunction assertTemplate(property, templateRef) {\n  const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n  if (!isTemplateRefOrNull) {\n    throw new Error(`${property} must be a TemplateRef, but received '${ɵstringify(templateRef)}'.`);\n  }\n}\nclass SwitchView {\n  constructor(_viewContainerRef, _templateRef) {\n    this._viewContainerRef = _viewContainerRef;\n    this._templateRef = _templateRef;\n    this._created = false;\n  }\n  create() {\n    this._created = true;\n    this._viewContainerRef.createEmbeddedView(this._templateRef);\n  }\n  destroy() {\n    this._created = false;\n    this._viewContainerRef.clear();\n  }\n  enforceState(created) {\n    if (created && !this._created) {\n      this.create();\n    } else if (!created && this._created) {\n      this.destroy();\n    }\n  }\n}\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *    <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n *    <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <!-- the same view can be shown in more than one case -->\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *   <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *   <!--default case when there are no matches -->\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *       <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *       <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *       <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *       <ng-container *ngSwitchCase=\"match_expression_3\">\n *         <!-- use a ng-container to group multiple root nodes -->\n *         <inner-element></inner-element>\n *         <inner-other-element></inner-other-element>\n *       </ng-container>\n *       <some-element *ngSwitchDefault>...</some-element>\n *     </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\nlet NgSwitch = /*#__PURE__*/(() => {\n  class NgSwitch {\n    constructor() {\n      this._defaultViews = [];\n      this._defaultUsed = false;\n      this._caseCount = 0;\n      this._lastCaseCheckIndex = 0;\n      this._lastCasesMatched = false;\n    }\n    set ngSwitch(newValue) {\n      this._ngSwitch = newValue;\n      if (this._caseCount === 0) {\n        this._updateDefaultCases(true);\n      }\n    }\n    /** @internal */\n    _addCase() {\n      return this._caseCount++;\n    }\n    /** @internal */\n    _addDefault(view) {\n      this._defaultViews.push(view);\n    }\n    /** @internal */\n    _matchCase(value) {\n      const matched = value == this._ngSwitch;\n      this._lastCasesMatched = this._lastCasesMatched || matched;\n      this._lastCaseCheckIndex++;\n      if (this._lastCaseCheckIndex === this._caseCount) {\n        this._updateDefaultCases(!this._lastCasesMatched);\n        this._lastCaseCheckIndex = 0;\n        this._lastCasesMatched = false;\n      }\n      return matched;\n    }\n    _updateDefaultCases(useDefault) {\n      if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) {\n        this._defaultUsed = useDefault;\n        for (const defaultView of this._defaultViews) {\n          defaultView.enforceState(useDefault);\n        }\n      }\n    }\n  }\n  NgSwitch.ɵfac = function NgSwitch_Factory(t) {\n    return new (t || NgSwitch)();\n  };\n  NgSwitch.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgSwitch,\n    selectors: [[\"\", \"ngSwitch\", \"\"]],\n    inputs: {\n      ngSwitch: \"ngSwitch\"\n    },\n    standalone: true\n  });\n  return NgSwitch;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   ...\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\nlet NgSwitchCase = /*#__PURE__*/(() => {\n  class NgSwitchCase {\n    constructor(viewContainer, templateRef, ngSwitch) {\n      this.ngSwitch = ngSwitch;\n      if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n        throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n      }\n      ngSwitch._addCase();\n      this._view = new SwitchView(viewContainer, templateRef);\n    }\n    /**\n     * Performs case matching. For internal use only.\n     * @nodoc\n     */\n    ngDoCheck() {\n      this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n    }\n  }\n  NgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) {\n    return new (t || NgSwitchCase)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(NgSwitch, 9));\n  };\n  NgSwitchCase.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgSwitchCase,\n    selectors: [[\"\", \"ngSwitchCase\", \"\"]],\n    inputs: {\n      ngSwitchCase: \"ngSwitchCase\"\n    },\n    standalone: true\n  });\n  return NgSwitchCase;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\nlet NgSwitchDefault = /*#__PURE__*/(() => {\n  class NgSwitchDefault {\n    constructor(viewContainer, templateRef, ngSwitch) {\n      if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n        throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n      }\n      ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n    }\n  }\n  NgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) {\n    return new (t || NgSwitchDefault)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(NgSwitch, 9));\n  };\n  NgSwitchDefault.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgSwitchDefault,\n    selectors: [[\"\", \"ngSwitchDefault\", \"\"]],\n    standalone: true\n  });\n  return NgSwitchDefault;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n  throw new ɵRuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the \"${attrName}\" attribute ` + `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` + `(matching \"NgSwitch\" directive)`);\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n *   <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n *   <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n *   matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n *   value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\nlet NgPlural = /*#__PURE__*/(() => {\n  class NgPlural {\n    constructor(_localization) {\n      this._localization = _localization;\n      this._caseViews = {};\n    }\n    set ngPlural(value) {\n      this._updateView(value);\n    }\n    addCase(value, switchView) {\n      this._caseViews[value] = switchView;\n    }\n    _updateView(switchValue) {\n      this._clearViews();\n      const cases = Object.keys(this._caseViews);\n      const key = getPluralCategory(switchValue, cases, this._localization);\n      this._activateView(this._caseViews[key]);\n    }\n    _clearViews() {\n      if (this._activeView) this._activeView.destroy();\n    }\n    _activateView(view) {\n      if (view) {\n        this._activeView = view;\n        this._activeView.create();\n      }\n    }\n  }\n  NgPlural.ɵfac = function NgPlural_Factory(t) {\n    return new (t || NgPlural)(i0.ɵɵdirectiveInject(NgLocalization));\n  };\n  NgPlural.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgPlural,\n    selectors: [[\"\", \"ngPlural\", \"\"]],\n    inputs: {\n      ngPlural: \"ngPlural\"\n    },\n    standalone: true\n  });\n  return NgPlural;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">...</ng-template>\n *   <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\nlet NgPluralCase = /*#__PURE__*/(() => {\n  class NgPluralCase {\n    constructor(value, template, viewContainer, ngPlural) {\n      this.value = value;\n      const isANumber = !isNaN(Number(value));\n      ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n    }\n  }\n  NgPluralCase.ɵfac = function NgPluralCase_Factory(t) {\n    return new (t || NgPluralCase)(i0.ɵɵinjectAttribute('ngPluralCase'), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(NgPlural, 1));\n  };\n  NgPluralCase.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgPluralCase,\n    selectors: [[\"\", \"ngPluralCase\", \"\"]],\n    standalone: true\n  });\n  return NgPluralCase;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\nlet NgStyle = /*#__PURE__*/(() => {\n  class NgStyle {\n    constructor(_ngEl, _differs, _renderer) {\n      this._ngEl = _ngEl;\n      this._differs = _differs;\n      this._renderer = _renderer;\n      this._ngStyle = null;\n      this._differ = null;\n    }\n    set ngStyle(values) {\n      this._ngStyle = values;\n      if (!this._differ && values) {\n        this._differ = this._differs.find(values).create();\n      }\n    }\n    ngDoCheck() {\n      if (this._differ) {\n        const changes = this._differ.diff(this._ngStyle);\n        if (changes) {\n          this._applyChanges(changes);\n        }\n      }\n    }\n    _setStyle(nameAndUnit, value) {\n      const [name, unit] = nameAndUnit.split('.');\n      const flags = name.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n      if (value != null) {\n        this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);\n      } else {\n        this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\n      }\n    }\n    _applyChanges(changes) {\n      changes.forEachRemovedItem(record => this._setStyle(record.key, null));\n      changes.forEachAddedItem(record => this._setStyle(record.key, record.currentValue));\n      changes.forEachChangedItem(record => this._setStyle(record.key, record.currentValue));\n    }\n  }\n  NgStyle.ɵfac = function NgStyle_Factory(t) {\n    return new (t || NgStyle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.KeyValueDiffers), i0.ɵɵdirectiveInject(i0.Renderer2));\n  };\n  NgStyle.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgStyle,\n    selectors: [[\"\", \"ngStyle\", \"\"]],\n    inputs: {\n      ngStyle: \"ngStyle\"\n    },\n    standalone: true\n  });\n  return NgStyle;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\nlet NgTemplateOutlet = /*#__PURE__*/(() => {\n  class NgTemplateOutlet {\n    constructor(_viewContainerRef) {\n      this._viewContainerRef = _viewContainerRef;\n      this._viewRef = null;\n      /**\n       * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n       * object, the object's keys will be available for binding by the local template `let`\n       * declarations.\n       * Using the key `$implicit` in the context object will set its value as default.\n       */\n      this.ngTemplateOutletContext = null;\n      /**\n       * A string defining the template reference and optionally the context object for the template.\n       */\n      this.ngTemplateOutlet = null;\n      /** Injector to be used within the embedded view. */\n      this.ngTemplateOutletInjector = null;\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      if (changes['ngTemplateOutlet'] || changes['ngTemplateOutletInjector']) {\n        const viewContainerRef = this._viewContainerRef;\n        if (this._viewRef) {\n          viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n        }\n        if (this.ngTemplateOutlet) {\n          const {\n            ngTemplateOutlet: template,\n            ngTemplateOutletContext: context,\n            ngTemplateOutletInjector: injector\n          } = this;\n          this._viewRef = viewContainerRef.createEmbeddedView(template, context, injector ? {\n            injector\n          } : undefined);\n        } else {\n          this._viewRef = null;\n        }\n      } else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {\n        this._viewRef.context = this.ngTemplateOutletContext;\n      }\n    }\n  }\n  NgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) {\n    return new (t || NgTemplateOutlet)(i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n  };\n  NgTemplateOutlet.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgTemplateOutlet,\n    selectors: [[\"\", \"ngTemplateOutlet\", \"\"]],\n    inputs: {\n      ngTemplateOutletContext: \"ngTemplateOutletContext\",\n      ngTemplateOutlet: \"ngTemplateOutlet\",\n      ngTemplateOutletInjector: \"ngTemplateOutletInjector\"\n    },\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return NgTemplateOutlet;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nconst COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase];\nfunction invalidPipeArgumentError(type, value) {\n  return new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\nclass SubscribableStrategy {\n  createSubscription(async, updateLatestValue) {\n    return async.subscribe({\n      next: updateLatestValue,\n      error: e => {\n        throw e;\n      }\n    });\n  }\n  dispose(subscription) {\n    subscription.unsubscribe();\n  }\n}\nclass PromiseStrategy {\n  createSubscription(async, updateLatestValue) {\n    return async.then(updateLatestValue, e => {\n      throw e;\n    });\n  }\n  dispose(subscription) {}\n}\nconst _promiseStrategy = /*#__PURE__*/new PromiseStrategy();\nconst _subscribableStrategy = /*#__PURE__*/new SubscribableStrategy();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\nlet AsyncPipe = /*#__PURE__*/(() => {\n  class AsyncPipe {\n    constructor(ref) {\n      this._latestValue = null;\n      this._subscription = null;\n      this._obj = null;\n      this._strategy = null;\n      // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n      // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n      this._ref = ref;\n    }\n    ngOnDestroy() {\n      if (this._subscription) {\n        this._dispose();\n      }\n      // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n      // potential memory leaks in Observables that could otherwise cause the view data to\n      // be retained.\n      // https://github.com/angular/angular/issues/17624\n      this._ref = null;\n    }\n    transform(obj) {\n      if (!this._obj) {\n        if (obj) {\n          this._subscribe(obj);\n        }\n        return this._latestValue;\n      }\n      if (obj !== this._obj) {\n        this._dispose();\n        return this.transform(obj);\n      }\n      return this._latestValue;\n    }\n    _subscribe(obj) {\n      this._obj = obj;\n      this._strategy = this._selectStrategy(obj);\n      this._subscription = this._strategy.createSubscription(obj, value => this._updateLatestValue(obj, value));\n    }\n    _selectStrategy(obj) {\n      if (ɵisPromise(obj)) {\n        return _promiseStrategy;\n      }\n      if (ɵisSubscribable(obj)) {\n        return _subscribableStrategy;\n      }\n      throw invalidPipeArgumentError(AsyncPipe, obj);\n    }\n    _dispose() {\n      // Note: `dispose` is only called if a subscription has been initialized before, indicating\n      // that `this._strategy` is also available.\n      this._strategy.dispose(this._subscription);\n      this._latestValue = null;\n      this._subscription = null;\n      this._obj = null;\n    }\n    _updateLatestValue(async, value) {\n      if (async === this._obj) {\n        this._latestValue = value;\n        // Note: `this._ref` is only cleared in `ngOnDestroy` so is known to be available when a\n        // value is being updated.\n        this._ref.markForCheck();\n      }\n    }\n  }\n  AsyncPipe.ɵfac = function AsyncPipe_Factory(t) {\n    return new (t || AsyncPipe)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef, 16));\n  };\n  AsyncPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"async\",\n    type: AsyncPipe,\n    pure: false,\n    standalone: true\n  });\n  return AsyncPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nlet LowerCasePipe = /*#__PURE__*/(() => {\n  class LowerCasePipe {\n    transform(value) {\n      if (value == null) return null;\n      if (typeof value !== 'string') {\n        throw invalidPipeArgumentError(LowerCasePipe, value);\n      }\n      return value.toLowerCase();\n    }\n  }\n  LowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) {\n    return new (t || LowerCasePipe)();\n  };\n  LowerCasePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"lowercase\",\n    type: LowerCasePipe,\n    pure: true,\n    standalone: true\n  });\n  return LowerCasePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\p{L}]\\S*/gu and also known as Unicode Property Escapes\n// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDF70-\\uDF81\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC71\\uDC72\\uDC75\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])\\S*/g;\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nlet TitleCasePipe = /*#__PURE__*/(() => {\n  class TitleCasePipe {\n    transform(value) {\n      if (value == null) return null;\n      if (typeof value !== 'string') {\n        throw invalidPipeArgumentError(TitleCasePipe, value);\n      }\n      return value.replace(unicodeWordMatch, txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase());\n    }\n  }\n  TitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) {\n    return new (t || TitleCasePipe)();\n  };\n  TitleCasePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"titlecase\",\n    type: TitleCasePipe,\n    pure: true,\n    standalone: true\n  });\n  return TitleCasePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\nlet UpperCasePipe = /*#__PURE__*/(() => {\n  class UpperCasePipe {\n    transform(value) {\n      if (value == null) return null;\n      if (typeof value !== 'string') {\n        throw invalidPipeArgumentError(UpperCasePipe, value);\n      }\n      return value.toUpperCase();\n    }\n  }\n  UpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) {\n    return new (t || UpperCasePipe)();\n  };\n  UpperCasePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"uppercase\",\n    type: UpperCasePipe,\n    pure: true,\n    standalone: true\n  });\n  return UpperCasePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * The default date format of Angular date pipe, which corresponds to the following format:\n * `'MMM d,y'` (e.g. `Jun 15, 2015`)\n */\nconst DEFAULT_DATE_FORMAT = 'mediumDate';\n\n/**\n * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).\n * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.\n *\n * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe\n */\nconst DATE_PIPE_DEFAULT_TIMEZONE = /*#__PURE__*/new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');\n/**\n * DI token that allows to provide default configuration for the `DatePipe` instances in an\n * application. The value is an object which can include the following fields:\n * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`\n * will use the 'mediumDate' as a value.\n * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will\n * use the end-user's local system timezone.\n *\n * @see `DatePipeConfig`\n *\n * @usageNotes\n *\n * Various date pipe default values can be overwritten by providing this token with\n * the value that has this interface.\n *\n * For example:\n *\n * Override the default date format by providing a value using the token:\n * ```typescript\n * providers: [\n *   {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}\n * ]\n * ```\n *\n * Override the default timezone by providing a value using the token:\n * ```typescript\n * providers: [\n *   {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}\n * ]\n * ```\n */\nconst DATE_PIPE_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * `DatePipe` is executed only when it detects a pure change to the input value.\n * A pure change is either a change to a primitive input value\n * (such as `String`, `Number`, `Boolean`, or `Symbol`),\n * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).\n *\n * Note that mutating a `Date` object does not cause the pipe to be rendered again.\n * To ensure that the pipe is executed, you must create a new `Date` object.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n-common-format-data-locale) for more information.\n *\n * The time zone of the formatted value can be specified either by passing it in as the second\n * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS`\n * injection token. The value that is passed in as the second parameter takes precedence over\n * the one defined using the injection token.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * | Option        | Equivalent to                       | Examples (given in `en-US` locale)              |\n * |---------------|-------------------------------------|-------------------------------------------------|\n * | `'short'`     | `'M/d/yy, h:mm a'`                  | `6/15/15, 9:03 AM`                              |\n * | `'medium'`    | `'MMM d, y, h:mm:ss a'`             | `Jun 15, 2015, 9:03:01 AM`                      |\n * | `'long'`      | `'MMMM d, y, h:mm:ss a z'`          | `June 15, 2015 at 9:03:01 AM GMT+1`             |\n * | `'full'`      | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |\n * | `'shortDate'` | `'M/d/yy'`                          | `6/15/15`                                       |\n * | `'mediumDate'`| `'MMM d, y'`                        | `Jun 15, 2015`                                  |\n * | `'longDate'`  | `'MMMM d, y'`                       | `June 15, 2015`                                 |\n * | `'fullDate'`  | `'EEEE, MMMM d, y'`                 | `Monday, June 15, 2015`                         |\n * | `'shortTime'` | `'h:mm a'`                          | `9:03 AM`                                       |\n * | `'mediumTime'`| `'h:mm:ss a'`                       | `9:03:01 AM`                                    |\n * | `'longTime'`  | `'h:mm:ss a z'`                     | `9:03:01 AM GMT+1`                              |\n * | `'fullTime'`  | `'h:mm:ss a zzzz'`                  | `9:03:01 AM GMT+01:00`                          |\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n *  | Field type          | Format      | Description                                                   | Example Value                                              |\n *  |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|\n *  | Era                 | G, GG & GGG | Abbreviated                                                   | AD                                                         |\n *  |                     | GGGG        | Wide                                                          | Anno Domini                                                |\n *  |                     | GGGGG       | Narrow                                                        | A                                                          |\n *  | Year                | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                     | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                     | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                     | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Week-numbering year | Y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                     | YY          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                     | YYY         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                     | YYYY        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Month               | M           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                     | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                     | MMM         | Abbreviated                                                   | Sep                                                        |\n *  |                     | MMMM        | Wide                                                          | September                                                  |\n *  |                     | MMMMM       | Narrow                                                        | S                                                          |\n *  | Month standalone    | L           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                     | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                     | LLL         | Abbreviated                                                   | Sep                                                        |\n *  |                     | LLLL        | Wide                                                          | September                                                  |\n *  |                     | LLLLL       | Narrow                                                        | S                                                          |\n *  | Week of year        | w           | Numeric: minimum digits                                       | 1... 53                                                    |\n *  |                     | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |\n *  | Week of month       | W           | Numeric: 1 digit                                              | 1... 5                                                     |\n *  | Day of month        | d           | Numeric: minimum digits                                       | 1                                                          |\n *  |                     | dd          | Numeric: 2 digits + zero padded                               | 01                                                         |\n *  | Week day            | E, EE & EEE | Abbreviated                                                   | Tue                                                        |\n *  |                     | EEEE        | Wide                                                          | Tuesday                                                    |\n *  |                     | EEEEE       | Narrow                                                        | T                                                          |\n *  |                     | EEEEEE      | Short                                                         | Tu                                                         |\n *  | Week day standalone | c, cc       | Numeric: 1 digit                                              | 2                                                          |\n *  |                     | ccc         | Abbreviated                                                   | Tue                                                        |\n *  |                     | cccc        | Wide                                                          | Tuesday                                                    |\n *  |                     | ccccc       | Narrow                                                        | T                                                          |\n *  |                     | cccccc      | Short                                                         | Tu                                                         |\n *  | Period              | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |\n *  |                     | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |\n *  |                     | aaaaa       | Narrow                                                        | a/p                                                        |\n *  | Period*             | B, BB & BBB | Abbreviated                                                   | mid.                                                       |\n *  |                     | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                     | BBBBB       | Narrow                                                        | md                                                         |\n *  | Period standalone*  | b, bb & bbb | Abbreviated                                                   | mid.                                                       |\n *  |                     | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                     | bbbbb       | Narrow                                                        | md                                                         |\n *  | Hour 1-12           | h           | Numeric: minimum digits                                       | 1, 12                                                      |\n *  |                     | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |\n *  | Hour 0-23           | H           | Numeric: minimum digits                                       | 0, 23                                                      |\n *  |                     | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |\n *  | Minute              | m           | Numeric: minimum digits                                       | 8, 59                                                      |\n *  |                     | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |\n *  | Second              | s           | Numeric: minimum digits                                       | 0... 59                                                    |\n *  |                     | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |\n *  | Fractional seconds  | S           | Numeric: 1 digit                                              | 0... 9                                                     |\n *  |                     | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |\n *  |                     | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |\n *  | Zone                | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |\n *  |                     | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |\n *  |                     | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |\n *  |                     | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |\n *  |                     | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |\n *  |                     | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |\n *  |                     | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |\n *\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }}               // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }}   // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }}       // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n *  selector: 'date-pipe',\n *  template: `<div>\n *    <p>Today is {{today | date}}</p>\n *    <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n *    <p>The time is {{today | date:'h:mm a z'}}</p>\n *  </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n *   today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\nlet DatePipe = /*#__PURE__*/(() => {\n  class DatePipe {\n    constructor(locale, defaultTimezone, defaultOptions) {\n      this.locale = locale;\n      this.defaultTimezone = defaultTimezone;\n      this.defaultOptions = defaultOptions;\n    }\n    transform(value, format, timezone, locale) {\n      if (value == null || value === '' || value !== value) return null;\n      try {\n        const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;\n        const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined;\n        return formatDate(value, _format, locale || this.locale, _timezone);\n      } catch (error) {\n        throw invalidPipeArgumentError(DatePipe, error.message);\n      }\n    }\n  }\n  DatePipe.ɵfac = function DatePipe_Factory(t) {\n    return new (t || DatePipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16), i0.ɵɵdirectiveInject(DATE_PIPE_DEFAULT_TIMEZONE, 24), i0.ɵɵdirectiveInject(DATE_PIPE_DEFAULT_OPTIONS, 24));\n  };\n  DatePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"date\",\n    type: DatePipe,\n    pure: true,\n    standalone: true\n  });\n  return DatePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\nlet I18nPluralPipe = /*#__PURE__*/(() => {\n  class I18nPluralPipe {\n    constructor(_localization) {\n      this._localization = _localization;\n    }\n    /**\n     * @param value the number to be formatted\n     * @param pluralMap an object that mimics the ICU format, see\n     * https://unicode-org.github.io/icu/userguide/format_parse/messages/.\n     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n     * default).\n     */\n    transform(value, pluralMap, locale) {\n      if (value == null) return '';\n      if (typeof pluralMap !== 'object' || pluralMap === null) {\n        throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n      }\n      const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n      return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n    }\n  }\n  I18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) {\n    return new (t || I18nPluralPipe)(i0.ɵɵdirectiveInject(NgLocalization, 16));\n  };\n  I18nPluralPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"i18nPlural\",\n    type: I18nPluralPipe,\n    pure: true,\n    standalone: true\n  });\n  return I18nPluralPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\nlet I18nSelectPipe = /*#__PURE__*/(() => {\n  class I18nSelectPipe {\n    /**\n     * @param value a string to be internationalized.\n     * @param mapping an object that indicates the text that should be displayed\n     * for different values of the provided `value`.\n     */\n    transform(value, mapping) {\n      if (value == null) return '';\n      if (typeof mapping !== 'object' || typeof value !== 'string') {\n        throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n      }\n      if (mapping.hasOwnProperty(value)) {\n        return mapping[value];\n      }\n      if (mapping.hasOwnProperty('other')) {\n        return mapping['other'];\n      }\n      return '';\n    }\n  }\n  I18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) {\n    return new (t || I18nSelectPipe)();\n  };\n  I18nSelectPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"i18nSelect\",\n    type: I18nSelectPipe,\n    pure: true,\n    standalone: true\n  });\n  return I18nSelectPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation.  Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\nlet JsonPipe = /*#__PURE__*/(() => {\n  class JsonPipe {\n    /**\n     * @param value A value of any type to convert into a JSON-format string.\n     */\n    transform(value) {\n      return JSON.stringify(value, null, 2);\n    }\n  }\n  JsonPipe.ɵfac = function JsonPipe_Factory(t) {\n    return new (t || JsonPipe)();\n  };\n  JsonPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"json\",\n    type: JsonPipe,\n    pure: false,\n    standalone: true\n  });\n  return JsonPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction makeKeyValuePair(key, value) {\n  return {\n    key: key,\n    value: value\n  };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nlet KeyValuePipe = /*#__PURE__*/(() => {\n  class KeyValuePipe {\n    constructor(differs) {\n      this.differs = differs;\n      this.keyValues = [];\n      this.compareFn = defaultComparator;\n    }\n    transform(input, compareFn = defaultComparator) {\n      if (!input || !(input instanceof Map) && typeof input !== 'object') {\n        return null;\n      }\n      if (!this.differ) {\n        // make a differ for whatever type we've been passed in\n        this.differ = this.differs.find(input).create();\n      }\n      const differChanges = this.differ.diff(input);\n      const compareFnChanged = compareFn !== this.compareFn;\n      if (differChanges) {\n        this.keyValues = [];\n        differChanges.forEachItem(r => {\n          this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n        });\n      }\n      if (differChanges || compareFnChanged) {\n        this.keyValues.sort(compareFn);\n        this.compareFn = compareFn;\n      }\n      return this.keyValues;\n    }\n  }\n  KeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) {\n    return new (t || KeyValuePipe)(i0.ɵɵdirectiveInject(i0.KeyValueDiffers, 16));\n  };\n  KeyValuePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"keyvalue\",\n    type: KeyValuePipe,\n    pure: false,\n    standalone: true\n  });\n  return KeyValuePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction defaultComparator(keyValueA, keyValueB) {\n  const a = keyValueA.key;\n  const b = keyValueB.key;\n  // if same exit with 0;\n  if (a === b) return 0;\n  // make sure that undefined are at the end of the sort.\n  if (a === undefined) return 1;\n  if (b === undefined) return -1;\n  // make sure that nulls are at the end of the sort.\n  if (a === null) return 1;\n  if (b === null) return -1;\n  if (typeof a == 'string' && typeof b == 'string') {\n    return a < b ? -1 : 1;\n  }\n  if (typeof a == 'number' && typeof b == 'number') {\n    return a - b;\n  }\n  if (typeof a == 'boolean' && typeof b == 'boolean') {\n    return a < b ? -1 : 1;\n  }\n  // `a` and `b` are of different types. Compare their string values.\n  const aString = String(a);\n  const bString = String(b);\n  return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:<br>\n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n *  - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n *  - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * <!--will output '4'-->\n *\n * {{-3.6 | number:'1.0-0'}}\n * <!--will output '-4'-->\n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n-common-locale-id).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\nlet DecimalPipe = /*#__PURE__*/(() => {\n  class DecimalPipe {\n    constructor(_locale) {\n      this._locale = _locale;\n    }\n    /**\n     * @param value The value to be formatted.\n     * @param digitsInfo Sets digit and decimal representation.\n     * [See more](#digitsinfo).\n     * @param locale Specifies what locale format rules to use.\n     * [See more](#locale).\n     */\n    transform(value, digitsInfo, locale) {\n      if (!isValue(value)) return null;\n      locale = locale || this._locale;\n      try {\n        const num = strToNumber(value);\n        return formatNumber(num, locale, digitsInfo);\n      } catch (error) {\n        throw invalidPipeArgumentError(DecimalPipe, error.message);\n      }\n    }\n  }\n  DecimalPipe.ɵfac = function DecimalPipe_Factory(t) {\n    return new (t || DecimalPipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16));\n  };\n  DecimalPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"number\",\n    type: DecimalPipe,\n    pure: true,\n    standalone: true\n  });\n  return DecimalPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\nlet PercentPipe = /*#__PURE__*/(() => {\n  class PercentPipe {\n    constructor(_locale) {\n      this._locale = _locale;\n    }\n    /**\n     *\n     * @param value The number to be formatted as a percentage.\n     * @param digitsInfo Decimal representation options, specified by a string\n     * in the following format:<br>\n     * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n     *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n     * Default is `1`.\n     *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n     * Default is `0`.\n     *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n     * Default is `0`.\n     * @param locale A locale code for the locale format rules to use.\n     * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n     * See [Setting your app locale](guide/i18n-common-locale-id).\n     */\n    transform(value, digitsInfo, locale) {\n      if (!isValue(value)) return null;\n      locale = locale || this._locale;\n      try {\n        const num = strToNumber(value);\n        return formatPercent(num, locale, digitsInfo);\n      } catch (error) {\n        throw invalidPipeArgumentError(PercentPipe, error.message);\n      }\n    }\n  }\n  PercentPipe.ɵfac = function PercentPipe_Factory(t) {\n    return new (t || PercentPipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16));\n  };\n  PercentPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"percent\",\n    type: PercentPipe,\n    pure: true,\n    standalone: true\n  });\n  return PercentPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\nlet CurrencyPipe = /*#__PURE__*/(() => {\n  class CurrencyPipe {\n    constructor(_locale, _defaultCurrencyCode = 'USD') {\n      this._locale = _locale;\n      this._defaultCurrencyCode = _defaultCurrencyCode;\n    }\n    /**\n     *\n     * @param value The number to be formatted as currency.\n     * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n     * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n     * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n     * @param display The format for the currency indicator. One of the following:\n     *   - `code`: Show the code (such as `USD`).\n     *   - `symbol`(default): Show the symbol (such as `$`).\n     *   - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n     * currency.\n     * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n     * locale has no narrow symbol, uses the standard symbol for the locale.\n     *   - String: Use the given string value instead of a code or a symbol.\n     * For example, an empty string will suppress the currency & symbol.\n     *   - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n     *\n     * @param digitsInfo Decimal representation options, specified by a string\n     * in the following format:<br>\n     * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n     *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n     * Default is `1`.\n     *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n     * Default is `2`.\n     *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n     * Default is `2`.\n     * If not provided, the number will be formatted with the proper amount of digits,\n     * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n     * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n     * @param locale A locale code for the locale format rules to use.\n     * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n     * See [Setting your app locale](guide/i18n-common-locale-id).\n     */\n    transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n      if (!isValue(value)) return null;\n      locale = locale || this._locale;\n      if (typeof display === 'boolean') {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n          console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n        }\n        display = display ? 'symbol' : 'code';\n      }\n      let currency = currencyCode || this._defaultCurrencyCode;\n      if (display !== 'code') {\n        if (display === 'symbol' || display === 'symbol-narrow') {\n          currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n        } else {\n          currency = display;\n        }\n      }\n      try {\n        const num = strToNumber(value);\n        return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n      } catch (error) {\n        throw invalidPipeArgumentError(CurrencyPipe, error.message);\n      }\n    }\n  }\n  CurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) {\n    return new (t || CurrencyPipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16), i0.ɵɵdirectiveInject(DEFAULT_CURRENCY_CODE, 16));\n  };\n  CurrencyPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"currency\",\n    type: CurrencyPipe,\n    pure: true,\n    standalone: true\n  });\n  return CurrencyPipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isValue(value) {\n  return !(value == null || value === '' || value !== value);\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n  // Convert strings to numbers\n  if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n    return Number(value);\n  }\n  if (typeof value !== 'number') {\n    throw new Error(`${value} is not a number`);\n  }\n  return value;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\nlet SlicePipe = /*#__PURE__*/(() => {\n  class SlicePipe {\n    transform(value, start, end) {\n      if (value == null) return null;\n      if (!this.supports(value)) {\n        throw invalidPipeArgumentError(SlicePipe, value);\n      }\n      return value.slice(start, end);\n    }\n    supports(obj) {\n      return typeof obj === 'string' || Array.isArray(obj);\n    }\n  }\n  SlicePipe.ɵfac = function SlicePipe_Factory(t) {\n    return new (t || SlicePipe)();\n  };\n  SlicePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"slice\",\n    type: SlicePipe,\n    pure: false,\n    standalone: true\n  });\n  return SlicePipe;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\n */\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nconst COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe];\n\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\nlet CommonModule = /*#__PURE__*/(() => {\n  class CommonModule {}\n  CommonModule.ɵfac = function CommonModule_Factory(t) {\n    return new (t || CommonModule)();\n  };\n  CommonModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: CommonModule\n  });\n  CommonModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n  return CommonModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst PLATFORM_BROWSER_ID = 'browser';\nconst PLATFORM_SERVER_ID = 'server';\nconst PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nconst PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nfunction isPlatformBrowser(platformId) {\n  return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nfunction isPlatformServer(platformId) {\n  return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nfunction isPlatformWorkerApp(platformId) {\n  return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nfunction isPlatformWorkerUi(platformId) {\n  return platformId === PLATFORM_WORKER_UI_ID;\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('15.2.3');\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nlet ViewportScroller = /*#__PURE__*/(() => {\n  class ViewportScroller {}\n  // De-sugared tree-shakable injection\n  // See #23917\n  /** @nocollapse */\n  ViewportScroller.ɵprov = ɵɵdefineInjectable({\n    token: ViewportScroller,\n    providedIn: 'root',\n    factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window)\n  });\n  /**\n   * Manages the scroll position for a browser window.\n   */\n  return ViewportScroller;\n})();\nclass BrowserViewportScroller {\n  constructor(document, window) {\n    this.document = document;\n    this.window = window;\n    this.offset = () => [0, 0];\n  }\n  /**\n   * Configures the top offset used when scrolling to an anchor.\n   * @param offset A position in screen coordinates (a tuple with x and y values)\n   * or a function that returns the top offset position.\n   *\n   */\n  setOffset(offset) {\n    if (Array.isArray(offset)) {\n      this.offset = () => offset;\n    } else {\n      this.offset = offset;\n    }\n  }\n  /**\n   * Retrieves the current scroll position.\n   * @returns The position in screen coordinates.\n   */\n  getScrollPosition() {\n    if (this.supportsScrolling()) {\n      return [this.window.pageXOffset, this.window.pageYOffset];\n    } else {\n      return [0, 0];\n    }\n  }\n  /**\n   * Sets the scroll position.\n   * @param position The new position in screen coordinates.\n   */\n  scrollToPosition(position) {\n    if (this.supportsScrolling()) {\n      this.window.scrollTo(position[0], position[1]);\n    }\n  }\n  /**\n   * Scrolls to an element and attempts to focus the element.\n   *\n   * Note that the function name here is misleading in that the target string may be an ID for a\n   * non-anchor element.\n   *\n   * @param target The ID of an element or name of the anchor.\n   *\n   * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n   * @see https://html.spec.whatwg.org/#scroll-to-fragid\n   */\n  scrollToAnchor(target) {\n    if (!this.supportsScrolling()) {\n      return;\n    }\n    const elSelected = findAnchorFromDocument(this.document, target);\n    if (elSelected) {\n      this.scrollToElement(elSelected);\n      // After scrolling to the element, the spec dictates that we follow the focus steps for the\n      // target. Rather than following the robust steps, simply attempt focus.\n      //\n      // @see https://html.spec.whatwg.org/#get-the-focusable-area\n      // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n      // @see https://html.spec.whatwg.org/#focusable-area\n      elSelected.focus();\n    }\n  }\n  /**\n   * Disables automatic scroll restoration provided by the browser.\n   */\n  setHistoryScrollRestoration(scrollRestoration) {\n    if (this.supportScrollRestoration()) {\n      const history = this.window.history;\n      if (history && history.scrollRestoration) {\n        history.scrollRestoration = scrollRestoration;\n      }\n    }\n  }\n  /**\n   * Scrolls to an element using the native offset and the specified offset set on this scroller.\n   *\n   * The offset can be used when we know that there is a floating header and scrolling naively to an\n   * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n   */\n  scrollToElement(el) {\n    const rect = el.getBoundingClientRect();\n    const left = rect.left + this.window.pageXOffset;\n    const top = rect.top + this.window.pageYOffset;\n    const offset = this.offset();\n    this.window.scrollTo(left - offset[0], top - offset[1]);\n  }\n  /**\n   * We only support scroll restoration when we can get a hold of window.\n   * This means that we do not support this behavior when running in a web worker.\n   *\n   * Lifting this restriction right now would require more changes in the dom adapter.\n   * Since webworkers aren't widely used, we will lift it once RouterScroller is\n   * battle-tested.\n   */\n  supportScrollRestoration() {\n    try {\n      if (!this.supportsScrolling()) {\n        return false;\n      }\n      // The `scrollRestoration` property could be on the `history` instance or its prototype.\n      const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) || getScrollRestorationProperty(Object.getPrototypeOf(this.window.history));\n      // We can write to the `scrollRestoration` property if it is a writable data field or it has a\n      // setter function.\n      return !!scrollRestorationDescriptor && !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);\n    } catch {\n      return false;\n    }\n  }\n  supportsScrolling() {\n    try {\n      return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;\n    } catch {\n      return false;\n    }\n  }\n}\nfunction getScrollRestorationProperty(obj) {\n  return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');\n}\nfunction findAnchorFromDocument(document, target) {\n  const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n  if (documentResult) {\n    return documentResult;\n  }\n  // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n  // have to traverse the DOM manually and do the lookup through the shadow roots.\n  if (typeof document.createTreeWalker === 'function' && document.body && (document.body.createShadowRoot || document.body.attachShadow)) {\n    const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n    let currentNode = treeWalker.currentNode;\n    while (currentNode) {\n      const shadowRoot = currentNode.shadowRoot;\n      if (shadowRoot) {\n        // Note that `ShadowRoot` doesn't support `getElementsByName`\n        // so we have to fall back to `querySelector`.\n        const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n        if (result) {\n          return result;\n        }\n      }\n      currentNode = treeWalker.nextNode();\n    }\n  }\n  return null;\n}\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nclass NullViewportScroller {\n  /**\n   * Empty implementation\n   */\n  setOffset(offset) {}\n  /**\n   * Empty implementation\n   */\n  getScrollPosition() {\n    return [0, 0];\n  }\n  /**\n   * Empty implementation\n   */\n  scrollToPosition(position) {}\n  /**\n   * Empty implementation\n   */\n  scrollToAnchor(anchor) {}\n  /**\n   * Empty implementation\n   */\n  setHistoryScrollRestoration(scrollRestoration) {}\n}\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {}\n\n// Converts a string that represents a URL into a URL class instance.\nfunction getUrl(src, win) {\n  // Don't use a base URL is the URL is absolute.\n  return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);\n}\n// Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).\nfunction isAbsoluteUrl(src) {\n  return /^https?:\\/\\//.test(src);\n}\n// Given a URL, extract the hostname part.\n// If a URL is a relative one - the URL is returned as is.\nfunction extractHostname(url) {\n  return isAbsoluteUrl(url) ? new URL(url).hostname : url;\n}\nfunction isValidPath(path) {\n  const isString = typeof path === 'string';\n  if (!isString || path.trim() === '') {\n    return false;\n  }\n  // Calling new URL() will throw if the path string is malformed\n  try {\n    const url = new URL(path);\n    return true;\n  } catch {\n    return false;\n  }\n}\nfunction normalizePath(path) {\n  return path.endsWith('/') ? path.slice(0, -1) : path;\n}\nfunction normalizeSrc(src) {\n  return src.startsWith('/') ? src.slice(1) : src;\n}\n\n/**\n * Noop image loader that does no transformation to the original src and just returns it as is.\n * This loader is used as a default one if more specific logic is not provided in an app config.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n */\nconst noopImageLoader = config => config.src;\n/**\n * Injection token that configures the image loader function.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n * @publicApi\n */\nconst IMAGE_LOADER = /*#__PURE__*/new InjectionToken('ImageLoader', {\n  providedIn: 'root',\n  factory: () => noopImageLoader\n});\n/**\n * Internal helper function that makes it easier to introduce custom image loaders for the\n * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI\n * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI\n * tokens managing preconnect check functionality.\n * @param buildUrlFn a function returning a full URL based on loader's configuration\n * @param exampleUrls example of full URLs for a given loader (used in error messages)\n * @returns a set of DI providers corresponding to the configured image loader\n */\nfunction createImageLoader(buildUrlFn, exampleUrls) {\n  return function provideImageLoader(path) {\n    if (!isValidPath(path)) {\n      throwInvalidPathError(path, exampleUrls || []);\n    }\n    // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in\n    // the individual loader functions.\n    path = normalizePath(path);\n    const loaderFn = config => {\n      if (isAbsoluteUrl(config.src)) {\n        // Image loader functions expect an image file name (e.g. `my-image.png`)\n        // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,\n        // so the final absolute URL can be constructed.\n        // When an absolute URL is provided instead - the loader can not\n        // build a final URL, thus the error is thrown to indicate that.\n        throwUnexpectedAbsoluteUrlError(path, config.src);\n      }\n      return buildUrlFn(path, {\n        ...config,\n        src: normalizeSrc(config.src)\n      });\n    };\n    const providers = [{\n      provide: IMAGE_LOADER,\n      useValue: loaderFn\n    }];\n    return providers;\n  };\n}\nfunction throwInvalidPathError(path, exampleUrls) {\n  throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode && `Image loader has detected an invalid path (\\`${path}\\`). ` + `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);\n}\nfunction throwUnexpectedAbsoluteUrlError(path, url) {\n  throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode && `Image loader has detected a \\`<img>\\` tag with an invalid \\`ngSrc\\` attribute: ${url}. ` + `This image loader expects \\`ngSrc\\` to be a relative URL - ` + `however the provided value is an absolute URL. ` + `To fix this, provide \\`ngSrc\\` as a path relative to the base URL ` + `configured for this loader (\\`${path}\\`).`);\n}\n\n/**\n * Function that generates an ImageLoader for [Cloudflare Image\n * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular\n * provider. Note: Cloudflare has multiple image products - this provider is specifically for\n * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.\n *\n * @param path Your domain name, e.g. https://mysite.com\n * @returns Provider that provides an ImageLoader function\n *\n * @publicApi\n */\nconst provideCloudflareLoader = /*#__PURE__*/createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);\nfunction createCloudflareUrl(path, config) {\n  let params = `format=auto`;\n  if (config.width) {\n    params += `,width=${config.width}`;\n  }\n  // Cloudflare image URLs format:\n  // https://developers.cloudflare.com/images/image-resizing/url-format/\n  return `${path}/cdn-cgi/image/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for Cloudinary.\n */\nconst cloudinaryLoaderInfo = {\n  name: 'Cloudinary',\n  testUrl: isCloudinaryUrl\n};\nconst CLOUDINARY_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.cloudinary\\.com\\/.+/;\n/**\n * Tests whether a URL is from Cloudinary CDN.\n */\nfunction isCloudinaryUrl(url) {\n  return CLOUDINARY_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.\n *\n * @param path Base URL of your Cloudinary images\n * This URL should match one of the following formats:\n * https://res.cloudinary.com/mysite\n * https://mysite.cloudinary.com\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the Cloudinary loader.\n *\n * @publicApi\n */\nconst provideCloudinaryLoader = /*#__PURE__*/createImageLoader(createCloudinaryUrl, ngDevMode ? ['https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com', 'https://subdomain.mysite.com'] : undefined);\nfunction createCloudinaryUrl(path, config) {\n  // Cloudinary image URLformat:\n  // https://cloudinary.com/documentation/image_transformations#transformation_url_structure\n  // Example of a Cloudinary image URL:\n  // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png\n  let params = `f_auto,q_auto`; // sets image format and quality to \"auto\"\n  if (config.width) {\n    params += `,w_${config.width}`;\n  }\n  return `${path}/image/upload/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for ImageKit.\n */\nconst imageKitLoaderInfo = {\n  name: 'ImageKit',\n  testUrl: isImageKitUrl\n};\nconst IMAGE_KIT_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imagekit\\.io\\/.+/;\n/**\n * Tests whether a URL is from ImageKit CDN.\n */\nfunction isImageKitUrl(url) {\n  return IMAGE_KIT_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.\n *\n * @param path Base URL of your ImageKit images\n * This URL should match one of the following formats:\n * https://ik.imagekit.io/myaccount\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the ImageKit loader.\n *\n * @publicApi\n */\nconst provideImageKitLoader = /*#__PURE__*/createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);\nfunction createImagekitUrl(path, config) {\n  // Example of an ImageKit image URL:\n  // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg\n  let params = `tr:q-auto`; // applies the \"auto quality\" transformation\n  if (config.width) {\n    params += `,w-${config.width}`;\n  }\n  return `${path}/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for Imgix.\n */\nconst imgixLoaderInfo = {\n  name: 'Imgix',\n  testUrl: isImgixUrl\n};\nconst IMGIX_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imgix\\.net\\/.+/;\n/**\n * Tests whether a URL is from Imgix CDN.\n */\nfunction isImgixUrl(url) {\n  return IMGIX_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.\n *\n * @param path path to the desired Imgix origin,\n * e.g. https://somepath.imgix.net or https://images.mysite.com\n * @returns Set of providers to configure the Imgix loader.\n *\n * @publicApi\n */\nconst provideImgixLoader = /*#__PURE__*/createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);\nfunction createImgixUrl(path, config) {\n  const url = new URL(`${path}/${config.src}`);\n  // This setting ensures the smallest allowable format is set.\n  url.searchParams.set('auto', 'format');\n  if (config.width) {\n    url.searchParams.set('w', config.width.toString());\n  }\n  return url.href;\n}\n\n// Assembles directive details string, useful for error messages.\nfunction imgDirectiveDetails(ngSrc, includeNgSrc = true) {\n  const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \\`ngSrc=\"${ngSrc}\"\\`) ` : '';\n  return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;\n}\n\n/**\n * Asserts that the application is in development mode. Throws an error if the application is in\n * production mode. This assert can be used to make sure that there is no dev-mode code invoked in\n * the prod mode accidentally.\n */\nfunction assertDevMode(checkName) {\n  if (!ngDevMode) {\n    throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` + `Please make sure that the prod mode is enabled for production builds.`);\n  }\n}\n\n/**\n * Observer that detects whether an image with `NgOptimizedImage`\n * is treated as a Largest Contentful Paint (LCP) element. If so,\n * asserts that the image has the `priority` attribute.\n *\n * Note: this is a dev-mode only class and it does not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n *\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript.\n */\nlet LCPImageObserver = /*#__PURE__*/(() => {\n  class LCPImageObserver {\n    constructor() {\n      // Map of full image URLs -> original `ngSrc` values.\n      this.images = new Map();\n      // Keep track of images for which `console.warn` was produced.\n      this.alreadyWarned = new Set();\n      this.window = null;\n      this.observer = null;\n      assertDevMode('LCP checker');\n      const win = inject(DOCUMENT).defaultView;\n      if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {\n        this.window = win;\n        this.observer = this.initPerformanceObserver();\n      }\n    }\n    /**\n     * Inits PerformanceObserver and subscribes to LCP events.\n     * Based on https://web.dev/lcp/#measure-lcp-in-javascript\n     */\n    initPerformanceObserver() {\n      const observer = new PerformanceObserver(entryList => {\n        const entries = entryList.getEntries();\n        if (entries.length === 0) return;\n        // We use the latest entry produced by the `PerformanceObserver` as the best\n        // signal on which element is actually an LCP one. As an example, the first image to load on\n        // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n        // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n        const lcpElement = entries[entries.length - 1];\n        // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n        // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n        const imgSrc = lcpElement.element?.src ?? '';\n        // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.\n        if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;\n        const imgNgSrc = this.images.get(imgSrc);\n        if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {\n          this.alreadyWarned.add(imgSrc);\n          logMissingPriorityWarning(imgSrc);\n        }\n      });\n      observer.observe({\n        type: 'largest-contentful-paint',\n        buffered: true\n      });\n      return observer;\n    }\n    registerImage(rewrittenSrc, originalNgSrc) {\n      if (!this.observer) return;\n      this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);\n    }\n    unregisterImage(rewrittenSrc) {\n      if (!this.observer) return;\n      this.images.delete(getUrl(rewrittenSrc, this.window).href);\n    }\n    ngOnDestroy() {\n      if (!this.observer) return;\n      this.observer.disconnect();\n      this.images.clear();\n      this.alreadyWarned.clear();\n    }\n  }\n  LCPImageObserver.ɵfac = function LCPImageObserver_Factory(t) {\n    return new (t || LCPImageObserver)();\n  };\n  LCPImageObserver.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: LCPImageObserver,\n    factory: LCPImageObserver.ɵfac,\n    providedIn: 'root'\n  });\n  return LCPImageObserver;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction logMissingPriorityWarning(ngSrc) {\n  const directiveDetails = imgDirectiveDetails(ngSrc);\n  console.warn(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` + `element but was not marked \"priority\". This image should be marked ` + `\"priority\" in order to prioritize its loading. ` + `To fix this, add the \"priority\" attribute.`));\n}\n\n// Set of origins that are always excluded from the preconnect checks.\nconst INTERNAL_PRECONNECT_CHECK_BLOCKLIST = /*#__PURE__*/new Set(['localhost', '127.0.0.1', '0.0.0.0']);\n/**\n * Injection token to configure which origins should be excluded\n * from the preconnect checks. It can either be a single string or an array of strings\n * to represent a group of origins, for example:\n *\n * ```typescript\n *  {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}\n * ```\n *\n * or:\n *\n * ```typescript\n *  {provide: PRECONNECT_CHECK_BLOCKLIST,\n *   useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}\n * ```\n *\n * @publicApi\n */\nconst PRECONNECT_CHECK_BLOCKLIST = /*#__PURE__*/new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');\n/**\n * Contains the logic to detect whether an image, marked with the \"priority\" attribute\n * has a corresponding `<link rel=\"preconnect\">` tag in the `document.head`.\n *\n * Note: this is a dev-mode only class, which should not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n */\nlet PreconnectLinkChecker = /*#__PURE__*/(() => {\n  class PreconnectLinkChecker {\n    constructor() {\n      this.document = inject(DOCUMENT);\n      /**\n       * Set of <link rel=\"preconnect\"> tags found on this page.\n       * The `null` value indicates that there was no DOM query operation performed.\n       */\n      this.preconnectLinks = null;\n      /*\n       * Keep track of all already seen origin URLs to avoid repeating the same check.\n       */\n      this.alreadySeen = new Set();\n      this.window = null;\n      this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);\n      assertDevMode('preconnect link checker');\n      const win = this.document.defaultView;\n      if (typeof win !== 'undefined') {\n        this.window = win;\n      }\n      const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, {\n        optional: true\n      });\n      if (blocklist) {\n        this.populateBlocklist(blocklist);\n      }\n    }\n    populateBlocklist(origins) {\n      if (Array.isArray(origins)) {\n        deepForEach(origins, origin => {\n          this.blocklist.add(extractHostname(origin));\n        });\n      } else {\n        this.blocklist.add(extractHostname(origins));\n      }\n    }\n    /**\n     * Checks that a preconnect resource hint exists in the head for the\n     * given src.\n     *\n     * @param rewrittenSrc src formatted with loader\n     * @param originalNgSrc ngSrc value\n     */\n    assertPreconnect(rewrittenSrc, originalNgSrc) {\n      if (!this.window) return;\n      const imgUrl = getUrl(rewrittenSrc, this.window);\n      if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin)) return;\n      // Register this origin as seen, so we don't check it again later.\n      this.alreadySeen.add(imgUrl.origin);\n      if (!this.preconnectLinks) {\n        // Note: we query for preconnect links only *once* and cache the results\n        // for the entire lifespan of an application, since it's unlikely that the\n        // list would change frequently. This allows to make sure there are no\n        // performance implications of making extra DOM lookups for each image.\n        this.preconnectLinks = this.queryPreconnectLinks();\n      }\n      if (!this.preconnectLinks.has(imgUrl.origin)) {\n        console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` + `image. Preconnecting to the origin(s) that serve priority images ensures that these ` + `images are delivered as soon as possible. To fix this, please add the following ` + `element into the <head> of the document:\\n` + `  <link rel=\"preconnect\" href=\"${imgUrl.origin}\">`));\n      }\n    }\n    queryPreconnectLinks() {\n      const preconnectUrls = new Set();\n      const selector = 'link[rel=preconnect]';\n      const links = Array.from(this.document.querySelectorAll(selector));\n      for (let link of links) {\n        const url = getUrl(link.href, this.window);\n        preconnectUrls.add(url.origin);\n      }\n      return preconnectUrls;\n    }\n    ngOnDestroy() {\n      this.preconnectLinks?.clear();\n      this.alreadySeen.clear();\n    }\n  }\n  PreconnectLinkChecker.ɵfac = function PreconnectLinkChecker_Factory(t) {\n    return new (t || PreconnectLinkChecker)();\n  };\n  PreconnectLinkChecker.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: PreconnectLinkChecker,\n    factory: PreconnectLinkChecker.ɵfac,\n    providedIn: 'root'\n  });\n  return PreconnectLinkChecker;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Invokes a callback for each element in the array. Also invokes a callback\n * recursively for each nested array.\n */\nfunction deepForEach(input, fn) {\n  for (let value of input) {\n    Array.isArray(value) ? deepForEach(value, fn) : fn(value);\n  }\n}\n\n/**\n * In SSR scenarios, a preload `<link>` element is generated for priority images.\n * Having a large number of preload tags may negatively affect the performance,\n * so we warn developers (by throwing an error) if the number of preloaded images\n * is above a certain threshold. This const specifies this threshold.\n */\nconst DEFAULT_PRELOADED_IMAGES_LIMIT = 5;\n/**\n * Helps to keep track of priority images that already have a corresponding\n * preload tag (to avoid generating multiple preload tags with the same URL).\n *\n * This Set tracks the original src passed into the `ngSrc` input not the src after it has been\n * run through the specified `IMAGE_LOADER`.\n */\nconst PRELOADED_IMAGES = /*#__PURE__*/new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {\n  providedIn: 'root',\n  factory: () => new Set()\n});\n\n/**\n * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It\n * will also track what images have already had preload link tags added so as to not duplicate link\n * tags.\n *\n * In dev mode this service will validate that the number of preloaded images does not exceed the\n * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.\n */\nlet PreloadLinkCreator = /*#__PURE__*/(() => {\n  class PreloadLinkCreator {\n    constructor() {\n      this.preloadedImages = inject(PRELOADED_IMAGES);\n      this.document = inject(DOCUMENT);\n    }\n    /**\n     * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the\n     * server while using Angular Universal and SSR to kick off image loads for high priority images.\n     *\n     * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)\n     * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`\n     * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from\n     * the CDN.\n     *\n     * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}\n     *\n     * @param renderer The `Renderer2` passed in from the directive\n     * @param src The original src of the image that is set on the `ngSrc` input.\n     * @param srcset The parsed and formatted srcset created from the `ngSrcset` input\n     * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag\n     */\n    createPreloadLinkTag(renderer, src, srcset, sizes) {\n      if (ngDevMode) {\n        if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {\n          throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode && `The \\`NgOptimizedImage\\` directive has detected that more than ` + `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` + `This might negatively affect an overall performance of the page. ` + `To fix this, remove the \"priority\" attribute from images with less priority.`);\n        }\n      }\n      if (this.preloadedImages.has(src)) {\n        return;\n      }\n      this.preloadedImages.add(src);\n      const preload = renderer.createElement('link');\n      renderer.setAttribute(preload, 'as', 'image');\n      renderer.setAttribute(preload, 'href', src);\n      renderer.setAttribute(preload, 'rel', 'preload');\n      renderer.setAttribute(preload, 'fetchpriority', 'high');\n      if (sizes) {\n        renderer.setAttribute(preload, 'imageSizes', sizes);\n      }\n      if (srcset) {\n        renderer.setAttribute(preload, 'imageSrcset', srcset);\n      }\n      renderer.appendChild(this.document.head, preload);\n    }\n  }\n  PreloadLinkCreator.ɵfac = function PreloadLinkCreator_Factory(t) {\n    return new (t || PreloadLinkCreator)();\n  };\n  PreloadLinkCreator.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: PreloadLinkCreator,\n    factory: PreloadLinkCreator.ɵfac,\n    providedIn: 'root'\n  });\n  return PreloadLinkCreator;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,\n * an error is thrown. The image content (as a string) might be very long, thus making\n * it hard to read an error message if the entire string is included. This const defines\n * the number of characters that should be included into the error message. The rest\n * of the content is truncated.\n */\nconst BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;\n/**\n * RegExpr to determine whether a src in a srcset is using width descriptors.\n * Should match something like: \"100w, 200w\".\n */\nconst VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\\s*\\d+w\\s*(,|$)){1,})$/;\n/**\n * RegExpr to determine whether a src in a srcset is using density descriptors.\n * Should match something like: \"1x, 2x, 50x\". Also supports decimals like \"1.5x, 1.50x\".\n */\nconst VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\\s*\\d+(\\.\\d+)?x\\s*(,|$)){1,})$/;\n/**\n * Srcset values with a density descriptor higher than this value will actively\n * throw an error. Such densities are not permitted as they cause image sizes\n * to be unreasonably large and slow down LCP.\n */\nconst ABSOLUTE_SRCSET_DENSITY_CAP = 3;\n/**\n * Used only in error message text to communicate best practices, as we will\n * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.\n */\nconst RECOMMENDED_SRCSET_DENSITY_CAP = 2;\n/**\n * Used in generating automatic density-based srcsets\n */\nconst DENSITY_SRCSET_MULTIPLIERS = [1, 2];\n/**\n * Used to determine which breakpoints to use on full-width images\n */\nconst VIEWPORT_BREAKPOINT_CUTOFF = 640;\n/**\n * Used to determine whether two aspect ratios are similar in value.\n */\nconst ASPECT_RATIO_TOLERANCE = .1;\n/**\n * Used to determine whether the image has been requested at an overly\n * large size compared to the actual rendered image size (after taking\n * into account a typical device pixel ratio). In pixels.\n */\nconst OVERSIZED_IMAGE_TOLERANCE = 1000;\n/**\n * Used to limit automatic srcset generation of very large sources for\n * fixed-size images. In pixels.\n */\nconst FIXED_SRCSET_WIDTH_LIMIT = 1920;\nconst FIXED_SRCSET_HEIGHT_LIMIT = 1080;\n/** Info about built-in loaders we can test for. */\nconst BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];\nconst defaultConfig = {\n  breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840]\n};\n/**\n * Injection token that configures the image optimized image functionality.\n *\n * @see `NgOptimizedImage`\n * @publicApi\n * @developerPreview\n */\nconst IMAGE_CONFIG = /*#__PURE__*/new InjectionToken('ImageConfig', {\n  providedIn: 'root',\n  factory: () => defaultConfig\n});\n/**\n * Directive that improves image loading performance by enforcing best practices.\n *\n * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is\n * prioritized by:\n * - Automatically setting the `fetchpriority` attribute on the `<img>` tag\n * - Lazy loading non-priority images by default\n * - Asserting that there is a corresponding preconnect link tag in the document head\n *\n * In addition, the directive:\n * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided\n * - Automatically generates a srcset\n * - Requires that `width` and `height` are set\n * - Warns if `width` or `height` have been set incorrectly\n * - Warns if the image will be visually distorted when rendered\n *\n * @usageNotes\n * The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can\n * be imported directly.\n *\n * Follow the steps below to enable and use the directive:\n * 1. Import it into the necessary NgModule or a standalone Component.\n * 2. Optionally provide an `ImageLoader` if you use an image hosting service.\n * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.\n * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image\n * download.\n *\n * Step 1: import the `NgOptimizedImage` directive.\n *\n * ```typescript\n * import { NgOptimizedImage } from '@angular/common';\n *\n * // Include it into the necessary NgModule\n * @NgModule({\n *   imports: [NgOptimizedImage],\n * })\n * class AppModule {}\n *\n * // ... or a standalone Component\n * @Component({\n *   standalone: true\n *   imports: [NgOptimizedImage],\n * })\n * class MyStandaloneComponent {}\n * ```\n *\n * Step 2: configure a loader.\n *\n * To use the **default loader**: no additional code changes are necessary. The URL returned by the\n * generic loader will always match the value of \"src\". In other words, this loader applies no\n * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.\n *\n * To use an existing loader for a **third-party image service**: add the provider factory for your\n * chosen service to the `providers` array. In the example below, the Imgix loader is used:\n *\n * ```typescript\n * import {provideImgixLoader} from '@angular/common';\n *\n * // Call the function and add the result to the `providers` array:\n * providers: [\n *   provideImgixLoader(\"https://my.base.url/\"),\n * ],\n * ```\n *\n * The `NgOptimizedImage` directive provides the following functions:\n * - `provideCloudflareLoader`\n * - `provideCloudinaryLoader`\n * - `provideImageKitLoader`\n * - `provideImgixLoader`\n *\n * If you use a different image provider, you can create a custom loader function as described\n * below.\n *\n * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI\n * token.\n *\n * ```typescript\n * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';\n *\n * // Configure the loader using the `IMAGE_LOADER` token.\n * providers: [\n *   {\n *      provide: IMAGE_LOADER,\n *      useValue: (config: ImageLoaderConfig) => {\n *        return `https://example.com/${config.src}-${config.width}.jpg}`;\n *      }\n *   },\n * ],\n * ```\n *\n * Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.\n *\n * ```\n * <img ngSrc=\"logo.png\" width=\"200\" height=\"100\">\n * ```\n *\n * @publicApi\n */\nlet NgOptimizedImage = /*#__PURE__*/(() => {\n  class NgOptimizedImage {\n    constructor() {\n      this.imageLoader = inject(IMAGE_LOADER);\n      this.config = processConfig(inject(IMAGE_CONFIG));\n      this.renderer = inject(Renderer2);\n      this.imgElement = inject(ElementRef).nativeElement;\n      this.injector = inject(Injector);\n      this.isServer = isPlatformServer(inject(PLATFORM_ID));\n      this.preloadLinkChecker = inject(PreloadLinkCreator);\n      // a LCP image observer - should be injected only in the dev mode\n      this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;\n      /**\n       * Calculate the rewritten `src` once and store it.\n       * This is needed to avoid repetitive calculations and make sure the directive cleanup in the\n       * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other\n       * instance that might be already destroyed).\n       */\n      this._renderedSrc = null;\n      this._priority = false;\n      this._disableOptimizedSrcset = false;\n      this._fill = false;\n    }\n    /**\n     * For responsive images: the intrinsic width of the image in pixels.\n     * For fixed size images: the desired rendered width of the image in pixels.\n     */\n    set width(value) {\n      ngDevMode && assertGreaterThanZero(this, value, 'width');\n      this._width = inputToInteger(value);\n    }\n    get width() {\n      return this._width;\n    }\n    /**\n     * For responsive images: the intrinsic height of the image in pixels.\n     * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic\n     * height of the image in pixels.\n     */\n    set height(value) {\n      ngDevMode && assertGreaterThanZero(this, value, 'height');\n      this._height = inputToInteger(value);\n    }\n    get height() {\n      return this._height;\n    }\n    /**\n     * Indicates whether this image should have a high priority.\n     */\n    set priority(value) {\n      this._priority = inputToBoolean(value);\n    }\n    get priority() {\n      return this._priority;\n    }\n    /**\n     * Disables automatic srcset generation for this image.\n     */\n    set disableOptimizedSrcset(value) {\n      this._disableOptimizedSrcset = inputToBoolean(value);\n    }\n    get disableOptimizedSrcset() {\n      return this._disableOptimizedSrcset;\n    }\n    /**\n     * Sets the image to \"fill mode\", which eliminates the height/width requirement and adds\n     * styles such that the image fills its containing element.\n     *\n     * @developerPreview\n     */\n    set fill(value) {\n      this._fill = inputToBoolean(value);\n    }\n    get fill() {\n      return this._fill;\n    }\n    /** @nodoc */\n    ngOnInit() {\n      if (ngDevMode) {\n        assertNonEmptyInput(this, 'ngSrc', this.ngSrc);\n        assertValidNgSrcset(this, this.ngSrcset);\n        assertNoConflictingSrc(this);\n        if (this.ngSrcset) {\n          assertNoConflictingSrcset(this);\n        }\n        assertNotBase64Image(this);\n        assertNotBlobUrl(this);\n        if (this.fill) {\n          assertEmptyWidthAndHeight(this);\n          assertNonZeroRenderedHeight(this, this.imgElement, this.renderer);\n        } else {\n          assertNonEmptyWidthAndHeight(this);\n          // Only check for distorted images when not in fill mode, where\n          // images may be intentionally stretched, cropped or letterboxed.\n          assertNoImageDistortion(this, this.imgElement, this.renderer);\n        }\n        assertValidLoadingInput(this);\n        if (!this.ngSrcset) {\n          assertNoComplexSizes(this);\n        }\n        assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);\n        assertNoNgSrcsetWithoutLoader(this, this.imageLoader);\n        assertNoLoaderParamsWithoutLoader(this, this.imageLoader);\n        if (this.priority) {\n          const checker = this.injector.get(PreconnectLinkChecker);\n          checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);\n        } else {\n          // Monitor whether an image is an LCP element only in case\n          // the `priority` attribute is missing. Otherwise, an image\n          // has the necessary settings and no extra checks are required.\n          if (this.lcpObserver !== null) {\n            const ngZone = this.injector.get(NgZone);\n            ngZone.runOutsideAngular(() => {\n              this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);\n            });\n          }\n        }\n      }\n      this.setHostAttributes();\n    }\n    setHostAttributes() {\n      // Must set width/height explicitly in case they are bound (in which case they will\n      // only be reflected and not found by the browser)\n      if (this.fill) {\n        if (!this.sizes) {\n          this.sizes = '100vw';\n        }\n      } else {\n        this.setHostAttribute('width', this.width.toString());\n        this.setHostAttribute('height', this.height.toString());\n      }\n      this.setHostAttribute('loading', this.getLoadingBehavior());\n      this.setHostAttribute('fetchpriority', this.getFetchPriority());\n      // The `data-ng-img` attribute flags an image as using the directive, to allow\n      // for analysis of the directive's performance.\n      this.setHostAttribute('ng-img', 'true');\n      // The `src` and `srcset` attributes should be set last since other attributes\n      // could affect the image's loading behavior.\n      const rewrittenSrc = this.getRewrittenSrc();\n      this.setHostAttribute('src', rewrittenSrc);\n      let rewrittenSrcset = undefined;\n      if (this.sizes) {\n        this.setHostAttribute('sizes', this.sizes);\n      }\n      if (this.ngSrcset) {\n        rewrittenSrcset = this.getRewrittenSrcset();\n      } else if (this.shouldGenerateAutomaticSrcset()) {\n        rewrittenSrcset = this.getAutomaticSrcset();\n      }\n      if (rewrittenSrcset) {\n        this.setHostAttribute('srcset', rewrittenSrcset);\n      }\n      if (this.isServer && this.priority) {\n        this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);\n      }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      if (ngDevMode) {\n        assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority', 'fill', 'loading', 'sizes', 'loaderParams', 'disableOptimizedSrcset']);\n      }\n    }\n    callImageLoader(configWithoutCustomParams) {\n      let augmentedConfig = configWithoutCustomParams;\n      if (this.loaderParams) {\n        augmentedConfig.loaderParams = this.loaderParams;\n      }\n      return this.imageLoader(augmentedConfig);\n    }\n    getLoadingBehavior() {\n      if (!this.priority && this.loading !== undefined) {\n        return this.loading;\n      }\n      return this.priority ? 'eager' : 'lazy';\n    }\n    getFetchPriority() {\n      return this.priority ? 'high' : 'auto';\n    }\n    getRewrittenSrc() {\n      // ImageLoaderConfig supports setting a width property. However, we're not setting width here\n      // because if the developer uses rendered width instead of intrinsic width in the HTML width\n      // attribute, the image requested may be too small for 2x+ screens.\n      if (!this._renderedSrc) {\n        const imgConfig = {\n          src: this.ngSrc\n        };\n        // Cache calculated image src to reuse it later in the code.\n        this._renderedSrc = this.callImageLoader(imgConfig);\n      }\n      return this._renderedSrc;\n    }\n    getRewrittenSrcset() {\n      const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);\n      const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {\n        srcStr = srcStr.trim();\n        const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;\n        return `${this.callImageLoader({\n          src: this.ngSrc,\n          width\n        })} ${srcStr}`;\n      });\n      return finalSrcs.join(', ');\n    }\n    getAutomaticSrcset() {\n      if (this.sizes) {\n        return this.getResponsiveSrcset();\n      } else {\n        return this.getFixedSrcset();\n      }\n    }\n    getResponsiveSrcset() {\n      const {\n        breakpoints\n      } = this.config;\n      let filteredBreakpoints = breakpoints;\n      if (this.sizes?.trim() === '100vw') {\n        // Since this is a full-screen-width image, our srcset only needs to include\n        // breakpoints with full viewport widths.\n        filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);\n      }\n      const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({\n        src: this.ngSrc,\n        width: bp\n      })} ${bp}w`);\n      return finalSrcs.join(', ');\n    }\n    getFixedSrcset() {\n      const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({\n        src: this.ngSrc,\n        width: this.width * multiplier\n      })} ${multiplier}x`);\n      return finalSrcs.join(', ');\n    }\n    shouldGenerateAutomaticSrcset() {\n      return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader && !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      if (ngDevMode) {\n        if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {\n          this.lcpObserver.unregisterImage(this._renderedSrc);\n        }\n      }\n    }\n    setHostAttribute(name, value) {\n      this.renderer.setAttribute(this.imgElement, name, value);\n    }\n  }\n  NgOptimizedImage.ɵfac = function NgOptimizedImage_Factory(t) {\n    return new (t || NgOptimizedImage)();\n  };\n  NgOptimizedImage.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: NgOptimizedImage,\n    selectors: [[\"img\", \"ngSrc\", \"\"]],\n    hostVars: 8,\n    hostBindings: function NgOptimizedImage_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        i0.ɵɵstyleProp(\"position\", ctx.fill ? \"absolute\" : null)(\"width\", ctx.fill ? \"100%\" : null)(\"height\", ctx.fill ? \"100%\" : null)(\"inset\", ctx.fill ? \"0px\" : null);\n      }\n    },\n    inputs: {\n      ngSrc: \"ngSrc\",\n      ngSrcset: \"ngSrcset\",\n      sizes: \"sizes\",\n      width: \"width\",\n      height: \"height\",\n      loading: \"loading\",\n      priority: \"priority\",\n      loaderParams: \"loaderParams\",\n      disableOptimizedSrcset: \"disableOptimizedSrcset\",\n      fill: \"fill\",\n      src: \"src\",\n      srcset: \"srcset\"\n    },\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return NgOptimizedImage;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/***** Helpers *****/\n/**\n * Convert input value to integer.\n */\nfunction inputToInteger(value) {\n  return typeof value === 'string' ? parseInt(value, 10) : value;\n}\n/**\n * Convert input value to boolean.\n */\nfunction inputToBoolean(value) {\n  return value != null && `${value}` !== 'false';\n}\n/**\n * Sorts provided config breakpoints and uses defaults.\n */\nfunction processConfig(config) {\n  let sortedBreakpoints = {};\n  if (config.breakpoints) {\n    sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);\n  }\n  return Object.assign({}, defaultConfig, config, sortedBreakpoints);\n}\n/***** Assert functions *****/\n/**\n * Verifies that there is no `src` set on a host element.\n */\nfunction assertNoConflictingSrc(dir) {\n  if (dir.src) {\n    throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`src\\` and \\`ngSrc\\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \\`src\\` itself based on the value of \\`ngSrc\\`. ` + `To fix this, please remove the \\`src\\` attribute.`);\n  }\n}\n/**\n * Verifies that there is no `srcset` set on a host element.\n */\nfunction assertNoConflictingSrcset(dir) {\n  if (dir.srcset) {\n    throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`srcset\\` and \\`ngSrcset\\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \\`srcset\\` itself based on the value of ` + `\\`ngSrcset\\`. To fix this, please remove the \\`srcset\\` attribute.`);\n  }\n}\n/**\n * Verifies that the `ngSrc` is not a Base64-encoded image.\n */\nfunction assertNotBase64Image(dir) {\n  let ngSrc = dir.ngSrc.trim();\n  if (ngSrc.startsWith('data:')) {\n    if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {\n      ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';\n    }\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`ngSrc\\` is a Base64-encoded string ` + `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \\`ngSrc\\` and using a standard \\`src\\` attribute instead.`);\n  }\n}\n/**\n * Verifies that the 'sizes' only includes responsive values.\n */\nfunction assertNoComplexSizes(dir) {\n  let sizes = dir.sizes;\n  if (sizes?.match(/((\\)|,)\\s|^)\\d+px/)) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`sizes\\` was set to a string including ` + `pixel values. For automatic \\`srcset\\` generation, \\`sizes\\` must only include responsive ` + `values, such as \\`sizes=\"50vw\"\\` or \\`sizes=\"(min-width: 768px) 50vw, 100vw\"\\`. ` + `To fix this, modify the \\`sizes\\` attribute, or provide your own \\`ngSrcset\\` value directly.`);\n  }\n}\n/**\n * Verifies that the `ngSrc` is not a Blob URL.\n */\nfunction assertNotBlobUrl(dir) {\n  const ngSrc = dir.ngSrc.trim();\n  if (ngSrc.startsWith('blob:')) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrc\\` was set to a blob URL (${ngSrc}). ` + `Blob URLs are not supported by the NgOptimizedImage directive. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \\`ngSrc\\` and using a regular \\`src\\` attribute instead.`);\n  }\n}\n/**\n * Verifies that the input is set to a non-empty string.\n */\nfunction assertNonEmptyInput(dir, name, value) {\n  const isString = typeof value === 'string';\n  const isEmptyString = isString && value.trim() === '';\n  if (!isString || isEmptyString) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${name}\\` has an invalid value ` + `(\\`${value}\\`). To fix this, change the value to a non-empty string.`);\n  }\n}\n/**\n * Verifies that the `ngSrcset` is in a valid format, e.g. \"100w, 200w\" or \"1x, 2x\".\n */\nfunction assertValidNgSrcset(dir, value) {\n  if (value == null) return;\n  assertNonEmptyInput(dir, 'ngSrcset', value);\n  const stringVal = value;\n  const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);\n  const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);\n  if (isValidDensityDescriptor) {\n    assertUnderDensityCap(dir, stringVal);\n  }\n  const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;\n  if (!isValidSrcset) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrcset\\` has an invalid value (\\`${value}\\`). ` + `To fix this, supply \\`ngSrcset\\` using a comma-separated list of one or more width ` + `descriptors (e.g. \"100w, 200w\") or density descriptors (e.g. \"1x, 2x\").`);\n  }\n}\nfunction assertUnderDensityCap(dir, value) {\n  const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);\n  if (!underDensityCap) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` contains an unsupported image density:` + `\\`${value}\\`. NgOptimizedImage generally recommends a max image density of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` + `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` + `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);\n  }\n}\n/**\n * Creates a `RuntimeError` instance to represent a situation when an input is set after\n * the directive has initialized.\n */\nfunction postInitInputChangeError(dir, inputName) {\n  let reason;\n  if (inputName === 'width' || inputName === 'height') {\n    reason = `Changing \\`${inputName}\\` may result in different attribute value ` + `applied to the underlying image element and cause layout shifts on a page.`;\n  } else {\n    reason = `Changing the \\`${inputName}\\` would have no effect on the underlying ` + `image element, because the resource loading has already occurred.`;\n  }\n  return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` was updated after initialization. ` + `The NgOptimizedImage directive will not react to this input change. ${reason} ` + `To fix this, either switch \\`${inputName}\\` to a static value ` + `or wrap the image element in an *ngIf that is gated on the necessary value.`);\n}\n/**\n * Verify that none of the listed inputs has changed.\n */\nfunction assertNoPostInitInputChange(dir, changes, inputs) {\n  inputs.forEach(input => {\n    const isUpdated = changes.hasOwnProperty(input);\n    if (isUpdated && !changes[input].isFirstChange()) {\n      if (input === 'ngSrc') {\n        // When the `ngSrc` input changes, we detect that only in the\n        // `ngOnChanges` hook, thus the `ngSrc` is already set. We use\n        // `ngSrc` in the error message, so we use a previous value, but\n        // not the updated one in it.\n        dir = {\n          ngSrc: changes[input].previousValue\n        };\n      }\n      throw postInitInputChangeError(dir, input);\n    }\n  });\n}\n/**\n * Verifies that a specified input is a number greater than 0.\n */\nfunction assertGreaterThanZero(dir, inputValue, inputName) {\n  const validNumber = typeof inputValue === 'number' && inputValue > 0;\n  const validString = typeof inputValue === 'string' && /^\\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;\n  if (!validNumber && !validString) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` has an invalid value ` + `(\\`${inputValue}\\`). To fix this, provide \\`${inputName}\\` ` + `as a number greater than 0.`);\n  }\n}\n/**\n * Verifies that the rendered image is not visually distorted. Effectively this is checking:\n * - Whether the \"width\" and \"height\" attributes reflect the actual dimensions of the image.\n * - Whether image styling is \"correct\" (see below for a longer explanation).\n */\nfunction assertNoImageDistortion(dir, img, renderer) {\n  const removeListenerFn = renderer.listen(img, 'load', () => {\n    removeListenerFn();\n    const renderedWidth = img.clientWidth;\n    const renderedHeight = img.clientHeight;\n    const renderedAspectRatio = renderedWidth / renderedHeight;\n    const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;\n    const intrinsicWidth = img.naturalWidth;\n    const intrinsicHeight = img.naturalHeight;\n    const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;\n    const suppliedWidth = dir.width;\n    const suppliedHeight = dir.height;\n    const suppliedAspectRatio = suppliedWidth / suppliedHeight;\n    // Tolerance is used to account for the impact of subpixel rendering.\n    // Due to subpixel rendering, the rendered, intrinsic, and supplied\n    // aspect ratios of a correctly configured image may not exactly match.\n    // For example, a `width=4030 height=3020` image might have a rendered\n    // size of \"1062w, 796.48h\". (An aspect ratio of 1.334... vs. 1.333...)\n    const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;\n    const stylingDistortion = nonZeroRenderedDimensions && Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;\n    if (inaccurateDimensions) {\n      console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` + `the aspect ratio indicated by the width and height attributes. ` + `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${intrinsicAspectRatio}). \\nSupplied width and height attributes: ` + `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` + `\\nTo fix this, update the width and height attributes.`));\n    } else if (stylingDistortion) {\n      console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` + `does not match the image's intrinsic aspect ratio. ` + `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${intrinsicAspectRatio}). \\nRendered image size: ` + `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` + `${renderedAspectRatio}). \\nThis issue can occur if \"width\" and \"height\" ` + `attributes are added to an image without updating the corresponding ` + `image styling. To fix this, adjust image styling. In most cases, ` + `adding \"height: auto\" or \"width: auto\" to the image styling will fix ` + `this issue.`));\n    } else if (!dir.ngSrcset && nonZeroRenderedDimensions) {\n      // If `ngSrcset` hasn't been set, sanity check the intrinsic size.\n      const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;\n      const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;\n      const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;\n      const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;\n      if (oversizedWidth || oversizedHeight) {\n        console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` + `larger than necessary. ` + `\\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` + `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` + `\\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` + `\\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` + `or consider using the \"ngSrcset\" and \"sizes\" attributes.`));\n      }\n    }\n  });\n}\n/**\n * Verifies that a specified input is set.\n */\nfunction assertNonEmptyWidthAndHeight(dir) {\n  let missingAttributes = [];\n  if (dir.width === undefined) missingAttributes.push('width');\n  if (dir.height === undefined) missingAttributes.push('height');\n  if (missingAttributes.length > 0) {\n    throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` + `are missing: ${missingAttributes.map(attr => `\"${attr}\"`).join(', ')}. ` + `Including \"width\" and \"height\" attributes will prevent image-related layout shifts. ` + `To fix this, include \"width\" and \"height\" attributes on the image tag or turn on ` + `\"fill\" mode with the \\`fill\\` attribute.`);\n  }\n}\n/**\n * Verifies that width and height are not set. Used in fill mode, where those attributes don't make\n * sense.\n */\nfunction assertEmptyWidthAndHeight(dir) {\n  if (dir.width || dir.height) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \\`height\\` and/or \\`width\\` are present ` + `along with the \\`fill\\` attribute. Because \\`fill\\` mode causes an image to fill its containing ` + `element, the size attributes have no effect and should be removed.`);\n  }\n}\n/**\n * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides\n * guidance that this can be caused by the containing element's CSS position property.\n */\nfunction assertNonZeroRenderedHeight(dir, img, renderer) {\n  const removeListenerFn = renderer.listen(img, 'load', () => {\n    removeListenerFn();\n    const renderedHeight = img.clientHeight;\n    if (dir.fill && renderedHeight === 0) {\n      console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` + `This is likely because the containing element does not have the CSS 'position' ` + `property set to one of the following: \"relative\", \"fixed\", or \"absolute\". ` + `To fix this problem, make sure the container element has the CSS 'position' ` + `property defined and the height of the element is not zero.`));\n    }\n  });\n}\n/**\n * Verifies that the `loading` attribute is set to a valid input &\n * is not used on priority images.\n */\nfunction assertValidLoadingInput(dir) {\n  if (dir.loading && dir.priority) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` + `was used on an image that was marked \"priority\". ` + `Setting \\`loading\\` on priority images is not allowed ` + `because these images will always be eagerly loaded. ` + `To fix this, remove the “loading” attribute from the priority image.`);\n  }\n  const validInputs = ['auto', 'eager', 'lazy'];\n  if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {\n    throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` + `has an invalid value (\\`${dir.loading}\\`). ` + `To fix this, provide a valid value (\"lazy\", \"eager\", or \"auto\").`);\n  }\n}\n/**\n * Warns if NOT using a loader (falling back to the generic loader) and\n * the image appears to be hosted on one of the image CDNs for which\n * we do have a built-in image loader. Suggests switching to the\n * built-in loader.\n *\n * @param ngSrc Value of the ngSrc attribute\n * @param imageLoader ImageLoader provided\n */\nfunction assertNotMissingBuiltInLoader(ngSrc, imageLoader) {\n  if (imageLoader === noopImageLoader) {\n    let builtInLoaderName = '';\n    for (const loader of BUILT_IN_LOADERS) {\n      if (loader.testUrl(ngSrc)) {\n        builtInLoaderName = loader.name;\n        break;\n      }\n    }\n    if (builtInLoaderName) {\n      console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` + `${builtInLoaderName} CDN, but your app is not using Angular's ` + `built-in loader for that CDN. We recommend switching to use ` + `the built-in by calling \\`provide${builtInLoaderName}Loader()\\` ` + `in your \\`providers\\` and passing it your instance's base URL. ` + `If you don't want to use the built-in loader, define a custom ` + `loader function using IMAGE_LOADER to silence this warning.`));\n    }\n  }\n}\n/**\n * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).\n */\nfunction assertNoNgSrcsetWithoutLoader(dir, imageLoader) {\n  if (dir.ngSrcset && imageLoader === noopImageLoader) {\n    console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` attribute is present but ` + `no image loader is configured (i.e. the default one is being used), ` + `which would result in the same image being used for all configured sizes. ` + `To fix this, provide a loader or remove the \\`ngSrcset\\` attribute from the image.`));\n  }\n}\n/**\n * Warns if loaderParams is present and no loader is configured (i.e. the default one is being\n * used).\n */\nfunction assertNoLoaderParamsWithoutLoader(dir, imageLoader) {\n  if (dir.loaderParams && imageLoader === noopImageLoader) {\n    console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loaderParams\\` attribute is present but ` + `no image loader is configured (i.e. the default one is being used), ` + `which means that the loaderParams data will not be consumed and will not affect the URL. ` + `To fix this, provide a custom loader or remove the \\`loaderParams\\` attribute from the image.`));\n  }\n}\n\n// These exports represent the set of symbols exposed as a public API.\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_CONFIG, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n//# sourceMappingURL=common.mjs.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0cb600c37658cf976f1b1c3ff917cc78929fb44a0b736470f1e2467da3022a25.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0cb600c37658cf976f1b1c3ff917cc78929fb44a0b736470f1e2467da3022a25.json
deleted file mode 100644
index 46236cdb4ffe801494259d404209a0c2bbd2eb0f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0cb600c37658cf976f1b1c3ff917cc78929fb44a0b736470f1e2467da3022a25.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n  flush(action) {\n    this._active = true;\n    const flushId = this._scheduled;\n    this._scheduled = undefined;\n    const {\n      actions\n    } = this;\n    let error;\n    action = action || actions.shift();\n    do {\n      if (error = action.execute(action.state, action.delay)) {\n        break;\n      }\n    } while ((action = actions[0]) && action.id === flushId && actions.shift());\n    this._active = false;\n    if (error) {\n      while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n        action.unsubscribe();\n      }\n      throw error;\n    }\n  }\n}\n//# sourceMappingURL=AnimationFrameScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/0f45c5f7f6423fac02c4259cd4ee2562c318ab09b626371371337eb33242a0ac.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/0f45c5f7f6423fac02c4259cd4ee2562c318ab09b626371371337eb33242a0ac.json
deleted file mode 100644
index 7cc3481baf94f69a19e0b52b790858456967527c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/0f45c5f7f6423fac02c4259cd4ee2562c318ab09b626371371337eb33242a0ac.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n  return operate((source, subscriber) => {\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n  });\n}\n//# sourceMappingURL=filter.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/106bf15770febb890fe2bb94d35748fac46a071af0b955b46dee29f5071ba638.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/106bf15770febb890fe2bb94d35748fac46a071af0b955b46dee29f5071ba638.json
deleted file mode 100644
index 9c4f3de201b6d1d54b3d178413a347b396783fc0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/106bf15770febb890fe2bb94d35748fac46a071af0b955b46dee29f5071ba638.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n  if (!input) {\n    throw new Error('Iterable cannot be null');\n  }\n  return new Observable(subscriber => {\n    executeSchedule(subscriber, scheduler, () => {\n      const iterator = input[Symbol.asyncIterator]();\n      executeSchedule(subscriber, scheduler, () => {\n        iterator.next().then(result => {\n          if (result.done) {\n            subscriber.complete();\n          } else {\n            subscriber.next(result.value);\n          }\n        });\n      }, 0, true);\n    });\n  });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/10d523bddf64f91d2a537c6cd86bca4b067df6963a6f2cf620ab575bc60cd974.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/10d523bddf64f91d2a537c6cd86bca4b067df6963a6f2cf620ab575bc60cd974.json
deleted file mode 100644
index 5cc61fc3a12cd57381004955be3b655cc3902b4e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/10d523bddf64f91d2a537c6cd86bca4b067df6963a6f2cf620ab575bc60cd974.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const isArrayLike = x => x && typeof x.length === 'number' && typeof x !== 'function';\n//# sourceMappingURL=isArrayLike.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1128c79f60757a62d81b6c867b77629bfd46a59d77c91e638a209e05825021c9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1128c79f60757a62d81b6c867b77629bfd46a59d77c91e638a209e05825021c9.json
deleted file mode 100644
index e8c2540fbb17712bd2ee007c2af6a48aa9a04866..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1128c79f60757a62d81b6c867b77629bfd46a59d77c91e638a209e05825021c9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nimport { timer, from } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { isPlatformServer } from '@angular/common';\nimport { getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';\nexport * from 'firebase/app-check';\nconst APP_CHECK_PROVIDER_NAME = 'app-check';\nclass AppCheck {\n  constructor(appCheck) {\n    return appCheck;\n  }\n}\nclass AppCheckInstances {\n  constructor() {\n    return ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME);\n  }\n}\nconst appCheckInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_APP_CHECK_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.app-check-instances');\nconst APP_CHECK_NAMESPACE_SYMBOL = /*#__PURE__*/Symbol('angularfire2.app-check.namespace');\nfunction defaultAppCheckInstanceFactory(provided, defaultApp) {\n  const defaultAppCheck = ɵgetDefaultInstanceOf(APP_CHECK_PROVIDER_NAME, provided, defaultApp);\n  return defaultAppCheck && new AppCheck(defaultAppCheck);\n}\nconst LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];\nconst isLocalhost = typeof window !== 'undefined' && /*#__PURE__*/LOCALHOSTS.includes(window.location.hostname);\nfunction appCheckInstanceFactory(fn) {\n  // tslint:disable-next-line:ban-types\n  return (zone, injector, platformId) => {\n    var _a;\n    // Node should use admin token provider, browser devmode and localhost should use debug token\n    if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {\n      (_a = globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN) !== null && _a !== void 0 ? _a : globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN = true;\n    }\n    const appCheck = zone.runOutsideAngular(() => fn(injector));\n    return new AppCheck(appCheck);\n  };\n}\nconst APP_CHECK_INSTANCES_PROVIDER = {\n  provide: AppCheckInstances,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES]]\n};\nconst DEFAULT_APP_CHECK_INSTANCE_PROVIDER = {\n  provide: AppCheck,\n  useFactory: defaultAppCheckInstanceFactory,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES], FirebaseApp, PLATFORM_ID]\n};\nlet AppCheckModule = /*#__PURE__*/(() => {\n  class AppCheckModule {\n    constructor() {\n      registerVersion('angularfire', VERSION.full, 'app-check');\n    }\n  }\n  AppCheckModule.ɵfac = function AppCheckModule_Factory(t) {\n    return new (t || AppCheckModule)();\n  };\n  AppCheckModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: AppCheckModule\n  });\n  AppCheckModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [DEFAULT_APP_CHECK_INSTANCE_PROVIDER, APP_CHECK_INSTANCES_PROVIDER]\n  });\n  return AppCheckModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAppCheck(fn, ...deps) {\n  return {\n    ngModule: AppCheckModule,\n    providers: [{\n      provide: PROVIDED_APP_CHECK_INSTANCES,\n      useFactory: appCheckInstanceFactory(fn),\n      multi: true,\n      deps: [NgZone, Injector, PLATFORM_ID, ɵAngularFireSchedulers, FirebaseApps, ...deps]\n    }]\n  };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst getToken = /*#__PURE__*/ɵzoneWrap(getToken$1, true);\nconst initializeAppCheck = /*#__PURE__*/ɵzoneWrap(initializeAppCheck$1, true);\nconst onTokenChanged = /*#__PURE__*/ɵzoneWrap(onTokenChanged$1, true);\nconst setTokenAutoRefreshEnabled = /*#__PURE__*/ɵzoneWrap(setTokenAutoRefreshEnabled$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AppCheck, AppCheckInstances, AppCheckModule, appCheckInstance$, getToken, initializeAppCheck, onTokenChanged, provideAppCheck, setTokenAutoRefreshEnabled };\n//# sourceMappingURL=angular-fire-app-check.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1204a0c37395cdbfce7a05aeb9f771116363da6dbdcb5b62608a5dfa04e9f58d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1204a0c37395cdbfce7a05aeb9f771116363da6dbdcb5b62608a5dfa04e9f58d.json
deleted file mode 100644
index c23fccad51542b3890165caaae844f488a8b9d1c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1204a0c37395cdbfce7a05aeb9f771116363da6dbdcb5b62608a5dfa04e9f58d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export { Observable } from './internal/Observable';\nexport { ConnectableObservable } from './internal/observable/ConnectableObservable';\nexport { observable } from './internal/symbol/observable';\nexport { animationFrames } from './internal/observable/dom/animationFrames';\nexport { Subject } from './internal/Subject';\nexport { BehaviorSubject } from './internal/BehaviorSubject';\nexport { ReplaySubject } from './internal/ReplaySubject';\nexport { AsyncSubject } from './internal/AsyncSubject';\nexport { asap, asapScheduler } from './internal/scheduler/asap';\nexport { async, asyncScheduler } from './internal/scheduler/async';\nexport { queue, queueScheduler } from './internal/scheduler/queue';\nexport { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';\nexport { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';\nexport { Scheduler } from './internal/Scheduler';\nexport { Subscription } from './internal/Subscription';\nexport { Subscriber } from './internal/Subscriber';\nexport { Notification, NotificationKind } from './internal/Notification';\nexport { pipe } from './internal/util/pipe';\nexport { noop } from './internal/util/noop';\nexport { identity } from './internal/util/identity';\nexport { isObservable } from './internal/util/isObservable';\nexport { lastValueFrom } from './internal/lastValueFrom';\nexport { firstValueFrom } from './internal/firstValueFrom';\nexport { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError';\nexport { EmptyError } from './internal/util/EmptyError';\nexport { NotFoundError } from './internal/util/NotFoundError';\nexport { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';\nexport { SequenceError } from './internal/util/SequenceError';\nexport { TimeoutError } from './internal/operators/timeout';\nexport { UnsubscriptionError } from './internal/util/UnsubscriptionError';\nexport { bindCallback } from './internal/observable/bindCallback';\nexport { bindNodeCallback } from './internal/observable/bindNodeCallback';\nexport { combineLatest } from './internal/observable/combineLatest';\nexport { concat } from './internal/observable/concat';\nexport { connectable } from './internal/observable/connectable';\nexport { defer } from './internal/observable/defer';\nexport { empty } from './internal/observable/empty';\nexport { forkJoin } from './internal/observable/forkJoin';\nexport { from } from './internal/observable/from';\nexport { fromEvent } from './internal/observable/fromEvent';\nexport { fromEventPattern } from './internal/observable/fromEventPattern';\nexport { generate } from './internal/observable/generate';\nexport { iif } from './internal/observable/iif';\nexport { interval } from './internal/observable/interval';\nexport { merge } from './internal/observable/merge';\nexport { never } from './internal/observable/never';\nexport { of } from './internal/observable/of';\nexport { onErrorResumeNext } from './internal/observable/onErrorResumeNext';\nexport { pairs } from './internal/observable/pairs';\nexport { partition } from './internal/observable/partition';\nexport { race } from './internal/observable/race';\nexport { range } from './internal/observable/range';\nexport { throwError } from './internal/observable/throwError';\nexport { timer } from './internal/observable/timer';\nexport { using } from './internal/observable/using';\nexport { zip } from './internal/observable/zip';\nexport { scheduled } from './internal/scheduled/scheduled';\nexport { EMPTY } from './internal/observable/empty';\nexport { NEVER } from './internal/observable/never';\nexport * from './internal/types';\nexport { config } from './internal/config';\nexport { audit } from './internal/operators/audit';\nexport { auditTime } from './internal/operators/auditTime';\nexport { buffer } from './internal/operators/buffer';\nexport { bufferCount } from './internal/operators/bufferCount';\nexport { bufferTime } from './internal/operators/bufferTime';\nexport { bufferToggle } from './internal/operators/bufferToggle';\nexport { bufferWhen } from './internal/operators/bufferWhen';\nexport { catchError } from './internal/operators/catchError';\nexport { combineAll } from './internal/operators/combineAll';\nexport { combineLatestAll } from './internal/operators/combineLatestAll';\nexport { combineLatestWith } from './internal/operators/combineLatestWith';\nexport { concatAll } from './internal/operators/concatAll';\nexport { concatMap } from './internal/operators/concatMap';\nexport { concatMapTo } from './internal/operators/concatMapTo';\nexport { concatWith } from './internal/operators/concatWith';\nexport { connect } from './internal/operators/connect';\nexport { count } from './internal/operators/count';\nexport { debounce } from './internal/operators/debounce';\nexport { debounceTime } from './internal/operators/debounceTime';\nexport { defaultIfEmpty } from './internal/operators/defaultIfEmpty';\nexport { delay } from './internal/operators/delay';\nexport { delayWhen } from './internal/operators/delayWhen';\nexport { dematerialize } from './internal/operators/dematerialize';\nexport { distinct } from './internal/operators/distinct';\nexport { distinctUntilChanged } from './internal/operators/distinctUntilChanged';\nexport { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged';\nexport { elementAt } from './internal/operators/elementAt';\nexport { endWith } from './internal/operators/endWith';\nexport { every } from './internal/operators/every';\nexport { exhaust } from './internal/operators/exhaust';\nexport { exhaustAll } from './internal/operators/exhaustAll';\nexport { exhaustMap } from './internal/operators/exhaustMap';\nexport { expand } from './internal/operators/expand';\nexport { filter } from './internal/operators/filter';\nexport { finalize } from './internal/operators/finalize';\nexport { find } from './internal/operators/find';\nexport { findIndex } from './internal/operators/findIndex';\nexport { first } from './internal/operators/first';\nexport { groupBy } from './internal/operators/groupBy';\nexport { ignoreElements } from './internal/operators/ignoreElements';\nexport { isEmpty } from './internal/operators/isEmpty';\nexport { last } from './internal/operators/last';\nexport { map } from './internal/operators/map';\nexport { mapTo } from './internal/operators/mapTo';\nexport { materialize } from './internal/operators/materialize';\nexport { max } from './internal/operators/max';\nexport { mergeAll } from './internal/operators/mergeAll';\nexport { flatMap } from './internal/operators/flatMap';\nexport { mergeMap } from './internal/operators/mergeMap';\nexport { mergeMapTo } from './internal/operators/mergeMapTo';\nexport { mergeScan } from './internal/operators/mergeScan';\nexport { mergeWith } from './internal/operators/mergeWith';\nexport { min } from './internal/operators/min';\nexport { multicast } from './internal/operators/multicast';\nexport { observeOn } from './internal/operators/observeOn';\nexport { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';\nexport { pairwise } from './internal/operators/pairwise';\nexport { pluck } from './internal/operators/pluck';\nexport { publish } from './internal/operators/publish';\nexport { publishBehavior } from './internal/operators/publishBehavior';\nexport { publishLast } from './internal/operators/publishLast';\nexport { publishReplay } from './internal/operators/publishReplay';\nexport { raceWith } from './internal/operators/raceWith';\nexport { reduce } from './internal/operators/reduce';\nexport { repeat } from './internal/operators/repeat';\nexport { repeatWhen } from './internal/operators/repeatWhen';\nexport { retry } from './internal/operators/retry';\nexport { retryWhen } from './internal/operators/retryWhen';\nexport { refCount } from './internal/operators/refCount';\nexport { sample } from './internal/operators/sample';\nexport { sampleTime } from './internal/operators/sampleTime';\nexport { scan } from './internal/operators/scan';\nexport { sequenceEqual } from './internal/operators/sequenceEqual';\nexport { share } from './internal/operators/share';\nexport { shareReplay } from './internal/operators/shareReplay';\nexport { single } from './internal/operators/single';\nexport { skip } from './internal/operators/skip';\nexport { skipLast } from './internal/operators/skipLast';\nexport { skipUntil } from './internal/operators/skipUntil';\nexport { skipWhile } from './internal/operators/skipWhile';\nexport { startWith } from './internal/operators/startWith';\nexport { subscribeOn } from './internal/operators/subscribeOn';\nexport { switchAll } from './internal/operators/switchAll';\nexport { switchMap } from './internal/operators/switchMap';\nexport { switchMapTo } from './internal/operators/switchMapTo';\nexport { switchScan } from './internal/operators/switchScan';\nexport { take } from './internal/operators/take';\nexport { takeLast } from './internal/operators/takeLast';\nexport { takeUntil } from './internal/operators/takeUntil';\nexport { takeWhile } from './internal/operators/takeWhile';\nexport { tap } from './internal/operators/tap';\nexport { throttle } from './internal/operators/throttle';\nexport { throttleTime } from './internal/operators/throttleTime';\nexport { throwIfEmpty } from './internal/operators/throwIfEmpty';\nexport { timeInterval } from './internal/operators/timeInterval';\nexport { timeout } from './internal/operators/timeout';\nexport { timeoutWith } from './internal/operators/timeoutWith';\nexport { timestamp } from './internal/operators/timestamp';\nexport { toArray } from './internal/operators/toArray';\nexport { window } from './internal/operators/window';\nexport { windowCount } from './internal/operators/windowCount';\nexport { windowTime } from './internal/operators/windowTime';\nexport { windowToggle } from './internal/operators/windowToggle';\nexport { windowWhen } from './internal/operators/windowWhen';\nexport { withLatestFrom } from './internal/operators/withLatestFrom';\nexport { zipAll } from './internal/operators/zipAll';\nexport { zipWith } from './internal/operators/zipWith';\n//# sourceMappingURL=index.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/120b6914dfb8c22ddd129fc1d2ccf298b2323a502f1d0488c4bfcdbf80ef8a8c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/120b6914dfb8c22ddd129fc1d2ccf298b2323a502f1d0488c4bfcdbf80ef8a8c.json
deleted file mode 100644
index e6fda8662cc4942ab0068f0abbfe38d7442cf6cc..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/120b6914dfb8c22ddd129fc1d2ccf298b2323a502f1d0488c4bfcdbf80ef8a8c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { fromSubscribable } from '../observable/fromSubscribable';\nconst DEFAULT_CONFIG = {\n  connector: () => new Subject()\n};\nexport function connect(selector, config = DEFAULT_CONFIG) {\n  const {\n    connector\n  } = config;\n  return operate((source, subscriber) => {\n    const subject = connector();\n    innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);\n    subscriber.add(source.subscribe(subject));\n  });\n}\n//# sourceMappingURL=connect.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1761a215bf4ff1b39eefec239adc1d5dea75fb35025ce7ec9ac97caefaa2916c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1761a215bf4ff1b39eefec239adc1d5dea75fb35025ce7ec9ac97caefaa2916c.json
deleted file mode 100644
index e903f67b1eee618d92340212e44ed3270bd44d37..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1761a215bf4ff1b39eefec239adc1d5dea75fb35025ce7ec9ac97caefaa2916c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nimport { timer, from } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { collectionChanges as collectionChanges$1, collection as collection$1, sortedChanges as sortedChanges$1, auditTrail as auditTrail$1, collectionData as collectionData$1, doc as doc$1, docData as docData$1, snapToData as snapToData$1, fromRef as fromRef$1 } from 'rxfire/firestore';\nimport { addDoc as addDoc$1, arrayRemove as arrayRemove$1, arrayUnion as arrayUnion$1, clearIndexedDbPersistence as clearIndexedDbPersistence$1, collection as collection$2, collectionGroup as collectionGroup$1, connectFirestoreEmulator as connectFirestoreEmulator$1, deleteDoc as deleteDoc$1, deleteField as deleteField$1, disableNetwork as disableNetwork$1, doc as doc$2, documentId as documentId$1, enableIndexedDbPersistence as enableIndexedDbPersistence$1, enableMultiTabIndexedDbPersistence as enableMultiTabIndexedDbPersistence$1, enableNetwork as enableNetwork$1, endAt as endAt$1, endBefore as endBefore$1, getDoc as getDoc$1, getDocFromCache as getDocFromCache$1, getDocFromServer as getDocFromServer$1, getDocs as getDocs$1, getDocsFromCache as getDocsFromCache$1, getDocsFromServer as getDocsFromServer$1, getFirestore as getFirestore$1, increment as increment$1, initializeFirestore as initializeFirestore$1, limit as limit$1, limitToLast as limitToLast$1, loadBundle as loadBundle$1, namedQuery as namedQuery$1, onSnapshot as onSnapshot$1, onSnapshotsInSync as onSnapshotsInSync$1, orderBy as orderBy$1, query as query$1, queryEqual as queryEqual$1, refEqual as refEqual$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, setDoc as setDoc$1, setLogLevel as setLogLevel$1, snapshotEqual as snapshotEqual$1, startAfter as startAfter$1, startAt as startAt$1, terminate as terminate$1, updateDoc as updateDoc$1, waitForPendingWrites as waitForPendingWrites$1, where as where$1, writeBatch as writeBatch$1 } from 'firebase/firestore';\nexport * from 'firebase/firestore';\nclass Firestore {\n  constructor(firestore) {\n    return firestore;\n  }\n}\nconst FIRESTORE_PROVIDER_NAME = 'firestore';\nclass FirestoreInstances {\n  constructor() {\n    return ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME);\n  }\n}\nconst firestoreInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_FIRESTORE_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.firestore-instances');\nfunction defaultFirestoreInstanceFactory(provided, defaultApp) {\n  const defaultFirestore = ɵgetDefaultInstanceOf(FIRESTORE_PROVIDER_NAME, provided, defaultApp);\n  return defaultFirestore && new Firestore(defaultFirestore);\n}\nfunction firestoreInstanceFactory(fn) {\n  return (zone, injector) => {\n    const firestore = zone.runOutsideAngular(() => fn(injector));\n    return new Firestore(firestore);\n  };\n}\nconst FIRESTORE_INSTANCES_PROVIDER = {\n  provide: FirestoreInstances,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES]]\n};\nconst DEFAULT_FIRESTORE_INSTANCE_PROVIDER = {\n  provide: Firestore,\n  useFactory: defaultFirestoreInstanceFactory,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES], FirebaseApp]\n};\nlet FirestoreModule = /*#__PURE__*/(() => {\n  class FirestoreModule {\n    constructor() {\n      registerVersion('angularfire', VERSION.full, 'fst');\n    }\n  }\n  FirestoreModule.ɵfac = function FirestoreModule_Factory(t) {\n    return new (t || FirestoreModule)();\n  };\n  FirestoreModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: FirestoreModule\n  });\n  FirestoreModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [DEFAULT_FIRESTORE_INSTANCE_PROVIDER, FIRESTORE_INSTANCES_PROVIDER]\n  });\n  return FirestoreModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideFirestore(fn, ...deps) {\n  return {\n    ngModule: FirestoreModule,\n    providers: [{\n      provide: PROVIDED_FIRESTORE_INSTANCES,\n      useFactory: firestoreInstanceFactory(fn),\n      multi: true,\n      deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps,\n      // Firestore+Auth work better if Auth is loaded first\n      [new Optional(), AuthInstances], [new Optional(), AppCheckInstances], ...deps]\n    }]\n  };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst collectionChanges = /*#__PURE__*/ɵzoneWrap(collectionChanges$1, true);\nconst collectionSnapshots = /*#__PURE__*/ɵzoneWrap(collection$1, true);\nconst sortedChanges = /*#__PURE__*/ɵzoneWrap(sortedChanges$1, true);\nconst auditTrail = /*#__PURE__*/ɵzoneWrap(auditTrail$1, true);\nconst collectionData = /*#__PURE__*/ɵzoneWrap(collectionData$1, true);\nconst docSnapshots = /*#__PURE__*/ɵzoneWrap(doc$1, true);\nconst docData = /*#__PURE__*/ɵzoneWrap(docData$1, true);\nconst snapToData = /*#__PURE__*/ɵzoneWrap(snapToData$1, true);\nconst fromRef = /*#__PURE__*/ɵzoneWrap(fromRef$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst addDoc = /*#__PURE__*/ɵzoneWrap(addDoc$1, true);\nconst arrayRemove = /*#__PURE__*/ɵzoneWrap(arrayRemove$1, true);\nconst arrayUnion = /*#__PURE__*/ɵzoneWrap(arrayUnion$1, true);\nconst clearIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(clearIndexedDbPersistence$1, true);\nconst collection = /*#__PURE__*/ɵzoneWrap(collection$2, true);\nconst collectionGroup = /*#__PURE__*/ɵzoneWrap(collectionGroup$1, true);\nconst connectFirestoreEmulator = /*#__PURE__*/ɵzoneWrap(connectFirestoreEmulator$1, true);\nconst deleteDoc = /*#__PURE__*/ɵzoneWrap(deleteDoc$1, true);\nconst deleteField = /*#__PURE__*/ɵzoneWrap(deleteField$1, true);\nconst disableNetwork = /*#__PURE__*/ɵzoneWrap(disableNetwork$1, true);\nconst doc = /*#__PURE__*/ɵzoneWrap(doc$2, true);\nconst documentId = /*#__PURE__*/ɵzoneWrap(documentId$1, true);\nconst enableIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableIndexedDbPersistence$1, true);\nconst enableMultiTabIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableMultiTabIndexedDbPersistence$1, true);\nconst enableNetwork = /*#__PURE__*/ɵzoneWrap(enableNetwork$1, true);\nconst endAt = /*#__PURE__*/ɵzoneWrap(endAt$1, true);\nconst endBefore = /*#__PURE__*/ɵzoneWrap(endBefore$1, true);\nconst getDoc = /*#__PURE__*/ɵzoneWrap(getDoc$1, true);\nconst getDocFromCache = /*#__PURE__*/ɵzoneWrap(getDocFromCache$1, true);\nconst getDocFromServer = /*#__PURE__*/ɵzoneWrap(getDocFromServer$1, true);\nconst getDocs = /*#__PURE__*/ɵzoneWrap(getDocs$1, true);\nconst getDocsFromCache = /*#__PURE__*/ɵzoneWrap(getDocsFromCache$1, true);\nconst getDocsFromServer = /*#__PURE__*/ɵzoneWrap(getDocsFromServer$1, true);\nconst getFirestore = /*#__PURE__*/ɵzoneWrap(getFirestore$1, true);\nconst increment = /*#__PURE__*/ɵzoneWrap(increment$1, true);\nconst initializeFirestore = /*#__PURE__*/ɵzoneWrap(initializeFirestore$1, true);\nconst limit = /*#__PURE__*/ɵzoneWrap(limit$1, true);\nconst limitToLast = /*#__PURE__*/ɵzoneWrap(limitToLast$1, true);\nconst loadBundle = /*#__PURE__*/ɵzoneWrap(loadBundle$1, true);\nconst namedQuery = /*#__PURE__*/ɵzoneWrap(namedQuery$1, true);\nconst onSnapshot = /*#__PURE__*/ɵzoneWrap(onSnapshot$1, true);\nconst onSnapshotsInSync = /*#__PURE__*/ɵzoneWrap(onSnapshotsInSync$1, true);\nconst orderBy = /*#__PURE__*/ɵzoneWrap(orderBy$1, true);\nconst query = /*#__PURE__*/ɵzoneWrap(query$1, true);\nconst queryEqual = /*#__PURE__*/ɵzoneWrap(queryEqual$1, true);\nconst refEqual = /*#__PURE__*/ɵzoneWrap(refEqual$1, true);\nconst runTransaction = /*#__PURE__*/ɵzoneWrap(runTransaction$1, true);\nconst serverTimestamp = /*#__PURE__*/ɵzoneWrap(serverTimestamp$1, true);\nconst setDoc = /*#__PURE__*/ɵzoneWrap(setDoc$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\nconst snapshotEqual = /*#__PURE__*/ɵzoneWrap(snapshotEqual$1, true);\nconst startAfter = /*#__PURE__*/ɵzoneWrap(startAfter$1, true);\nconst startAt = /*#__PURE__*/ɵzoneWrap(startAt$1, true);\nconst terminate = /*#__PURE__*/ɵzoneWrap(terminate$1, true);\nconst updateDoc = /*#__PURE__*/ɵzoneWrap(updateDoc$1, true);\nconst waitForPendingWrites = /*#__PURE__*/ɵzoneWrap(waitForPendingWrites$1, true);\nconst where = /*#__PURE__*/ɵzoneWrap(where$1, true);\nconst writeBatch = /*#__PURE__*/ɵzoneWrap(writeBatch$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Firestore, FirestoreInstances, FirestoreModule, addDoc, arrayRemove, arrayUnion, auditTrail, clearIndexedDbPersistence, collection, collectionChanges, collectionData, collectionGroup, collectionSnapshots, connectFirestoreEmulator, deleteDoc, deleteField, disableNetwork, doc, docData, docSnapshots, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, endAt, endBefore, firestoreInstance$, fromRef, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, increment, initializeFirestore, limit, limitToLast, loadBundle, namedQuery, onSnapshot, onSnapshotsInSync, orderBy, provideFirestore, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapToData, snapshotEqual, sortedChanges, startAfter, startAt, terminate, updateDoc, waitForPendingWrites, where, writeBatch };\n//# sourceMappingURL=angular-fire-firestore.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/18d4b2b58f237f3024f300ea5110e321dfc858aab76f98d611002900b6f65349.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/18d4b2b58f237f3024f300ea5110e321dfc858aab76f98d611002900b6f65349.json
deleted file mode 100644
index 295b6eb2c7c8cbd54911dc33666bb6741d9a6417..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/18d4b2b58f237f3024f300ea5110e321dfc858aab76f98d611002900b6f65349.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n  timeoutProvider.setTimeout(() => {\n    const {\n      onUnhandledError\n    } = config;\n    if (onUnhandledError) {\n      onUnhandledError(err);\n    } else {\n      throw err;\n    }\n  });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/19907f7685be709389f711b095a809fe1afb8f7d8c3458aed617eb8a555e610d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/19907f7685be709389f711b095a809fe1afb8f7d8c3458aed617eb8a555e610d.json
deleted file mode 100644
index 40e71de10ef8ebb9eb18da94ca5e5bfa3b8492d4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/19907f7685be709389f711b095a809fe1afb8f7d8c3458aed617eb8a555e610d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n  if (subscriptionDelay) {\n    return source => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n  }\n  return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n//# sourceMappingURL=delayWhen.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1ad2c1fe32f72a7113de918f15ffd21e288498a2a1721ca3535facfaed250f18.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1ad2c1fe32f72a7113de918f15ffd21e288498a2a1721ca3535facfaed250f18.json
deleted file mode 100644
index 1034aa725f97cd9d4d14ef148913dba1929ff317..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1ad2c1fe32f72a7113de918f15ffd21e288498a2a1721ca3535facfaed250f18.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function timeInterval(scheduler = asyncScheduler) {\n  return operate((source, subscriber) => {\n    let last = scheduler.now();\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const now = scheduler.now();\n      const interval = now - last;\n      last = now;\n      subscriber.next(new TimeInterval(value, interval));\n    }));\n  });\n}\nexport class TimeInterval {\n  constructor(value, interval) {\n    this.value = value;\n    this.interval = interval;\n  }\n}\n//# sourceMappingURL=timeInterval.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1b8d2247b457a2b24cf70cd1ea0b73ab3a66457e4c86e9b16f49f8b0f34aa22e.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1b8d2247b457a2b24cf70cd1ea0b73ab3a66457e4c86e9b16f49f8b0f34aa22e.json
deleted file mode 100644
index 7e8ee67754f523500cdd2de82601ec75b8bb6bc6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1b8d2247b457a2b24cf70cd1ea0b73ab3a66457e4c86e9b16f49f8b0f34aa22e.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n  if (config.useDeprecatedSynchronousErrorHandling) {\n    const isRoot = !context;\n    if (isRoot) {\n      context = {\n        errorThrown: false,\n        error: null\n      };\n    }\n    cb();\n    if (isRoot) {\n      const {\n        errorThrown,\n        error\n      } = context;\n      context = null;\n      if (errorThrown) {\n        throw error;\n      }\n    }\n  } else {\n    cb();\n  }\n}\nexport function captureError(err) {\n  if (config.useDeprecatedSynchronousErrorHandling && context) {\n    context.errorThrown = true;\n    context.error = err;\n  }\n}\n//# sourceMappingURL=errorContext.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6d9e5f4575d4d60e0df6b42c85367aa847101684f8e3a2d343cce82cc2a1c4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6d9e5f4575d4d60e0df6b42c85367aa847101684f8e3a2d343cce82cc2a1c4.json
deleted file mode 100644
index 6cfe8372ebba6b6973ccd5c4d468e4b44fae7a70..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6d9e5f4575d4d60e0df6b42c85367aa847101684f8e3a2d343cce82cc2a1c4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n  let count = Infinity;\n  let delay;\n  if (countOrConfig != null) {\n    if (typeof countOrConfig === 'object') {\n      ({\n        count = Infinity,\n        delay\n      } = countOrConfig);\n    } else {\n      count = countOrConfig;\n    }\n  }\n  return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n    let soFar = 0;\n    let sourceSub;\n    const resubscribe = () => {\n      sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n      sourceSub = null;\n      if (delay != null) {\n        const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n        const notifierSubscriber = createOperatorSubscriber(subscriber, () => {\n          notifierSubscriber.unsubscribe();\n          subscribeToSource();\n        });\n        notifier.subscribe(notifierSubscriber);\n      } else {\n        subscribeToSource();\n      }\n    };\n    const subscribeToSource = () => {\n      let syncUnsub = false;\n      sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n        if (++soFar < count) {\n          if (sourceSub) {\n            resubscribe();\n          } else {\n            syncUnsub = true;\n          }\n        } else {\n          subscriber.complete();\n        }\n      }));\n      if (syncUnsub) {\n        resubscribe();\n      }\n    };\n    subscribeToSource();\n  });\n}\n//# sourceMappingURL=repeat.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6ee75e6fa65a89b659f5d7632ee6b49eda58dfc415115404feefe593a71ec8.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6ee75e6fa65a89b659f5d7632ee6b49eda58dfc415115404feefe593a71ec8.json
deleted file mode 100644
index 0496752b668a781ef03f94b628fd95f68d5f929f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1c6ee75e6fa65a89b659f5d7632ee6b49eda58dfc415115404feefe593a71ec8.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n  return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindCallback.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1e33c36fee7cc38daf306a64c5fb9521eaa2e1e6e1680de317b05962a609eded.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1e33c36fee7cc38daf306a64c5fb9521eaa2e1e6e1680de317b05962a609eded.json
deleted file mode 100644
index 5513c67d4709dab07a92f939c923a5aaa7c7cf45..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1e33c36fee7cc38daf306a64c5fb9521eaa2e1e6e1680de317b05962a609eded.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n  return operate((source, subscriber) => {\n    let innerSubscriber = null;\n    let index = 0;\n    let isComplete = false;\n    const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n      let innerIndex = 0;\n      const outerIndex = index++;\n      innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, innerValue => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n        innerSubscriber = null;\n        checkComplete();\n      }));\n    }, () => {\n      isComplete = true;\n      checkComplete();\n    }));\n  });\n}\n//# sourceMappingURL=switchMap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1eff7b5f2ab1c8379e7e56c1b3503ffbe8249748c0689c2e6198486d88610a8a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1eff7b5f2ab1c8379e7e56c1b3503ffbe8249748c0689c2e6198486d88610a8a.json
deleted file mode 100644
index 630a1432713c2e710b841e0eb5c7c04af2dbb5f2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1eff7b5f2ab1c8379e7e56c1b3503ffbe8249748c0689c2e6198486d88610a8a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function isValidDate(value) {\n  return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/1f02c2aa079c18ce455471ccd12c39dd592317fb0baebc6d22a58362ee64ef6b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/1f02c2aa079c18ce455471ccd12c39dd592317fb0baebc6d22a58362ee64ef6b.json
deleted file mode 100644
index 5ca476db21e5ea372d2bd03789b212e51baab7bb..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/1f02c2aa079c18ce455471ccd12c39dd592317fb0baebc6d22a58362ee64ef6b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n  const scheduler = popScheduler(args);\n  return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2295ef4e9049abc18dff7336aecc905156ee82612ae3f5e321791521fde079db.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2295ef4e9049abc18dff7336aecc905156ee82612ae3f5e321791521fde079db.json
deleted file mode 100644
index 2b41ca936d5374aab9bd708ea16b83c5a8e4b541..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2295ef4e9049abc18dff7336aecc905156ee82612ae3f5e321791521fde079db.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function not(pred, thisArg) {\n  return (value, index) => !pred.call(thisArg, value, index);\n}\n//# sourceMappingURL=not.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/231a4b1c6ca96b28c38b370a9adeb7e889037957c0c950fde1ea629cc7add7cc.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/231a4b1c6ca96b28c38b370a9adeb7e889037957c0c950fde1ea629cc7add7cc.json
deleted file mode 100644
index 1c530d2589db2266309b81f7747ce2908c0bdabd..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/231a4b1c6ca96b28c38b370a9adeb7e889037957c0c950fde1ea629cc7add7cc.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n  return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n  return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n  return {\n    kind,\n    value,\n    error\n  };\n}\n//# sourceMappingURL=NotificationFactories.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/25bc5712d2c44669461686bce7029388e77ebe7dfe615963d1d720b61e27314d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/25bc5712d2c44669461686bce7029388e77ebe7dfe615963d1d720b61e27314d.json
deleted file mode 100644
index 3ed8b7d6eaafbdf9266ecfc228092305dd3482ea..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/25bc5712d2c44669461686bce7029388e77ebe7dfe615963d1d720b61e27314d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n  return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2728279ea987d0fa2594b97838bd4c79027fface57e6439f6418c333eb64edc6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2728279ea987d0fa2594b97838bd4c79027fface57e6439f6418c333eb64edc6.json
deleted file mode 100644
index 4f46ee12f81e6a637992f4bd9efd669acfdce8e5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2728279ea987d0fa2594b97838bd4c79027fface57e6439f6418c333eb64edc6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n  if (input instanceof Observable) {\n    return input;\n  }\n  if (input != null) {\n    if (isInteropObservable(input)) {\n      return fromInteropObservable(input);\n    }\n    if (isArrayLike(input)) {\n      return fromArrayLike(input);\n    }\n    if (isPromise(input)) {\n      return fromPromise(input);\n    }\n    if (isAsyncIterable(input)) {\n      return fromAsyncIterable(input);\n    }\n    if (isIterable(input)) {\n      return fromIterable(input);\n    }\n    if (isReadableStreamLike(input)) {\n      return fromReadableStreamLike(input);\n    }\n  }\n  throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n  return new Observable(subscriber => {\n    const obs = obj[Symbol_observable]();\n    if (isFunction(obs.subscribe)) {\n      return obs.subscribe(subscriber);\n    }\n    throw new TypeError('Provided object does not correctly implement Symbol.observable');\n  });\n}\nexport function fromArrayLike(array) {\n  return new Observable(subscriber => {\n    for (let i = 0; i < array.length && !subscriber.closed; i++) {\n      subscriber.next(array[i]);\n    }\n    subscriber.complete();\n  });\n}\nexport function fromPromise(promise) {\n  return new Observable(subscriber => {\n    promise.then(value => {\n      if (!subscriber.closed) {\n        subscriber.next(value);\n        subscriber.complete();\n      }\n    }, err => subscriber.error(err)).then(null, reportUnhandledError);\n  });\n}\nexport function fromIterable(iterable) {\n  return new Observable(subscriber => {\n    for (const value of iterable) {\n      subscriber.next(value);\n      if (subscriber.closed) {\n        return;\n      }\n    }\n    subscriber.complete();\n  });\n}\nexport function fromAsyncIterable(asyncIterable) {\n  return new Observable(subscriber => {\n    process(asyncIterable, subscriber).catch(err => subscriber.error(err));\n  });\n}\nexport function fromReadableStreamLike(readableStream) {\n  return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n  var asyncIterable_1, asyncIterable_1_1;\n  var e_1, _a;\n  return __awaiter(this, void 0, void 0, function* () {\n    try {\n      for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n        const value = asyncIterable_1_1.value;\n        subscriber.next(value);\n        if (subscriber.closed) {\n          return;\n        }\n      }\n    } catch (e_1_1) {\n      e_1 = {\n        error: e_1_1\n      };\n    } finally {\n      try {\n        if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n      } finally {\n        if (e_1) throw e_1.error;\n      }\n    }\n    subscriber.complete();\n  });\n}\n//# sourceMappingURL=innerFrom.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/285c46b401cf0dfc28c3e1f488340e72ba130e0a9e97649f1ff7a370e0f3010f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/285c46b401cf0dfc28c3e1f488340e72ba130e0a9e97649f1ff7a370e0f3010f.json
deleted file mode 100644
index 00e64b6f0a941163d986dc7b8bb927d79340027c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/285c46b401cf0dfc28c3e1f488340e72ba130e0a9e97649f1ff7a370e0f3010f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nexport class AsapAction extends AsyncAction {\n  constructor(scheduler, work) {\n    super(scheduler, work);\n    this.scheduler = scheduler;\n    this.work = work;\n  }\n  requestAsyncId(scheduler, id, delay = 0) {\n    if (delay !== null && delay > 0) {\n      return super.requestAsyncId(scheduler, id, delay);\n    }\n    scheduler.actions.push(this);\n    return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n  }\n  recycleAsyncId(scheduler, id, delay = 0) {\n    var _a;\n    if (delay != null ? delay > 0 : this.delay > 0) {\n      return super.recycleAsyncId(scheduler, id, delay);\n    }\n    const {\n      actions\n    } = scheduler;\n    if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n      immediateProvider.clearImmediate(id);\n      scheduler._scheduled = undefined;\n    }\n    return undefined;\n  }\n}\n//# sourceMappingURL=AsapAction.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2b3f25993fcaf14e72ba975cd8924a30a8261861eb2a9642d921c31fa941d888.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2b3f25993fcaf14e72ba975cd8924a30a8261861eb2a9642d921c31fa941d888.json
deleted file mode 100644
index 462666543baab0f5cf7c0cd53c6b3a941dd61538..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2b3f25993fcaf14e72ba975cd8924a30a8261861eb2a9642d921c31fa941d888.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { sample } from './sample';\nimport { interval } from '../observable/interval';\nexport function sampleTime(period, scheduler = asyncScheduler) {\n  return sample(interval(period, scheduler));\n}\n//# sourceMappingURL=sampleTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2b57050f879c27f0b735649325efdb697c45eb3ff195112ebaa284bd2649998d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2b57050f879c27f0b735649325efdb697c45eb3ff195112ebaa284bd2649998d.json
deleted file mode 100644
index 0c6e39a5f469eb062988f29565a849f969410705..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2b57050f879c27f0b735649325efdb697c45eb3ff195112ebaa284bd2649998d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n  constructor(destination) {\n    super();\n    this.isStopped = false;\n    if (destination) {\n      this.destination = destination;\n      if (isSubscription(destination)) {\n        destination.add(this);\n      }\n    } else {\n      this.destination = EMPTY_OBSERVER;\n    }\n  }\n  static create(next, error, complete) {\n    return new SafeSubscriber(next, error, complete);\n  }\n  next(value) {\n    if (this.isStopped) {\n      handleStoppedNotification(nextNotification(value), this);\n    } else {\n      this._next(value);\n    }\n  }\n  error(err) {\n    if (this.isStopped) {\n      handleStoppedNotification(errorNotification(err), this);\n    } else {\n      this.isStopped = true;\n      this._error(err);\n    }\n  }\n  complete() {\n    if (this.isStopped) {\n      handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n    } else {\n      this.isStopped = true;\n      this._complete();\n    }\n  }\n  unsubscribe() {\n    if (!this.closed) {\n      this.isStopped = true;\n      super.unsubscribe();\n      this.destination = null;\n    }\n  }\n  _next(value) {\n    this.destination.next(value);\n  }\n  _error(err) {\n    try {\n      this.destination.error(err);\n    } finally {\n      this.unsubscribe();\n    }\n  }\n  _complete() {\n    try {\n      this.destination.complete();\n    } finally {\n      this.unsubscribe();\n    }\n  }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n  return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n  constructor(partialObserver) {\n    this.partialObserver = partialObserver;\n  }\n  next(value) {\n    const {\n      partialObserver\n    } = this;\n    if (partialObserver.next) {\n      try {\n        partialObserver.next(value);\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    }\n  }\n  error(err) {\n    const {\n      partialObserver\n    } = this;\n    if (partialObserver.error) {\n      try {\n        partialObserver.error(err);\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    } else {\n      handleUnhandledError(err);\n    }\n  }\n  complete() {\n    const {\n      partialObserver\n    } = this;\n    if (partialObserver.complete) {\n      try {\n        partialObserver.complete();\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    }\n  }\n}\nexport class SafeSubscriber extends Subscriber {\n  constructor(observerOrNext, error, complete) {\n    super();\n    let partialObserver;\n    if (isFunction(observerOrNext) || !observerOrNext) {\n      partialObserver = {\n        next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,\n        error: error !== null && error !== void 0 ? error : undefined,\n        complete: complete !== null && complete !== void 0 ? complete : undefined\n      };\n    } else {\n      let context;\n      if (this && config.useDeprecatedNextContext) {\n        context = Object.create(observerOrNext);\n        context.unsubscribe = () => this.unsubscribe();\n        partialObserver = {\n          next: observerOrNext.next && bind(observerOrNext.next, context),\n          error: observerOrNext.error && bind(observerOrNext.error, context),\n          complete: observerOrNext.complete && bind(observerOrNext.complete, context)\n        };\n      } else {\n        partialObserver = observerOrNext;\n      }\n    }\n    this.destination = new ConsumerObserver(partialObserver);\n  }\n}\nfunction handleUnhandledError(error) {\n  if (config.useDeprecatedSynchronousErrorHandling) {\n    captureError(error);\n  } else {\n    reportUnhandledError(error);\n  }\n}\nfunction defaultErrorHandler(err) {\n  throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n  const {\n    onStoppedNotification\n  } = config;\n  onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n  closed: true,\n  next: noop,\n  error: defaultErrorHandler,\n  complete: noop\n};\n//# sourceMappingURL=Subscriber.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2cd4c6640cac099a8218094430fc506e57fb209aa3bc94372fbda80b8fd8e028.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2cd4c6640cac099a8218094430fc506e57fb209aa3bc94372fbda80b8fd8e028.json
deleted file mode 100644
index 0790dbc9ef38af0e77268221bbb1e090b2c34e82..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2cd4c6640cac099a8218094430fc506e57fb209aa3bc94372fbda80b8fd8e028.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { not } from '../util/not';\nimport { filter } from '../operators/filter';\nimport { innerFrom } from './innerFrom';\nexport function partition(source, predicate, thisArg) {\n  return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];\n}\n//# sourceMappingURL=partition.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2d3a50c408b81ca120d664ec38d567f716c7c1fa80c870242ca6e61eeee4a601.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2d3a50c408b81ca120d664ec38d567f716c7c1fa80c870242ca6e61eeee4a601.json
deleted file mode 100644
index 419d28cce8c93c21cb28c5946a21febf8b1391e5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2d3a50c408b81ca120d664ec38d567f716c7c1fa80c870242ca6e61eeee4a601.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n  const {\n    connector = () => new Subject(),\n    resetOnError = true,\n    resetOnComplete = true,\n    resetOnRefCountZero = true\n  } = options;\n  return wrapperSource => {\n    let connection;\n    let resetConnection;\n    let subject;\n    let refCount = 0;\n    let hasCompleted = false;\n    let hasErrored = false;\n    const cancelReset = () => {\n      resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n      resetConnection = undefined;\n    };\n    const reset = () => {\n      cancelReset();\n      connection = subject = undefined;\n      hasCompleted = hasErrored = false;\n    };\n    const resetAndUnsubscribe = () => {\n      const conn = connection;\n      reset();\n      conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n    };\n    return operate((source, subscriber) => {\n      refCount++;\n      if (!hasErrored && !hasCompleted) {\n        cancelReset();\n      }\n      const dest = subject = subject !== null && subject !== void 0 ? subject : connector();\n      subscriber.add(() => {\n        refCount--;\n        if (refCount === 0 && !hasErrored && !hasCompleted) {\n          resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n        }\n      });\n      dest.subscribe(subscriber);\n      if (!connection && refCount > 0) {\n        connection = new SafeSubscriber({\n          next: value => dest.next(value),\n          error: err => {\n            hasErrored = true;\n            cancelReset();\n            resetConnection = handleReset(reset, resetOnError, err);\n            dest.error(err);\n          },\n          complete: () => {\n            hasCompleted = true;\n            cancelReset();\n            resetConnection = handleReset(reset, resetOnComplete);\n            dest.complete();\n          }\n        });\n        innerFrom(source).subscribe(connection);\n      }\n    })(wrapperSource);\n  };\n}\nfunction handleReset(reset, on, ...args) {\n  if (on === true) {\n    reset();\n    return;\n  }\n  if (on === false) {\n    return;\n  }\n  const onSubscriber = new SafeSubscriber({\n    next: () => {\n      onSubscriber.unsubscribe();\n      reset();\n    }\n  });\n  return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2ecc4f4a73b4442c9b302112c5a7bc9f576859747d9784c3d83c85a01250d337.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2ecc4f4a73b4442c9b302112c5a7bc9f576859747d9784c3d83c85a01250d337.json
deleted file mode 100644
index 1038c01f18fec5d4161db79fc103ed8056111f86..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2ecc4f4a73b4442c9b302112c5a7bc9f576859747d9784c3d83c85a01250d337.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { raceInit } from '../observable/race';\nimport { operate } from '../util/lift';\nimport { identity } from '../util/identity';\nexport function raceWith(...otherSources) {\n  return !otherSources.length ? identity : operate((source, subscriber) => {\n    raceInit([source, ...otherSources])(subscriber);\n  });\n}\n//# sourceMappingURL=raceWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/2ee56262d40e9a4264e107e2e04b850c499cc991b62aae491d5f327b64a2a715.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/2ee56262d40e9a4264e107e2e04b850c499cc991b62aae491d5f327b64a2a715.json
deleted file mode 100644
index 982c5b44d56e6696432a913b4e721a0f21f940cb..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/2ee56262d40e9a4264e107e2e04b850c499cc991b62aae491d5f327b64a2a715.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { connect } from './connect';\nexport function publish(selector) {\n  return selector ? source => connect(selector)(source) : source => multicast(new Subject())(source);\n}\n//# sourceMappingURL=publish.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/30903a10cba2eeaceeb89724c71261d4d57a3ffaa9a0aea0ec95d46a9fb88af7.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/30903a10cba2eeaceeb89724c71261d4d57a3ffaa9a0aea0ec95d46a9fb88af7.json
deleted file mode 100644
index 862e2d3df58452cd6d0d797431e4a0a13773436a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/30903a10cba2eeaceeb89724c71261d4d57a3ffaa9a0aea0ec95d46a9fb88af7.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from './Subject';\nexport class AsyncSubject extends Subject {\n  constructor() {\n    super(...arguments);\n    this._value = null;\n    this._hasValue = false;\n    this._isComplete = false;\n  }\n  _checkFinalizedStatuses(subscriber) {\n    const {\n      hasError,\n      _hasValue,\n      _value,\n      thrownError,\n      isStopped,\n      _isComplete\n    } = this;\n    if (hasError) {\n      subscriber.error(thrownError);\n    } else if (isStopped || _isComplete) {\n      _hasValue && subscriber.next(_value);\n      subscriber.complete();\n    }\n  }\n  next(value) {\n    if (!this.isStopped) {\n      this._value = value;\n      this._hasValue = true;\n    }\n  }\n  complete() {\n    const {\n      _hasValue,\n      _value,\n      _isComplete\n    } = this;\n    if (!_isComplete) {\n      this._isComplete = true;\n      _hasValue && super.next(_value);\n      super.complete();\n    }\n  }\n}\n//# sourceMappingURL=AsyncSubject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/317dd2eba26c745f949caedbef7b4eff9581e18b45bf6abfabfed8ebc3630c7c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/317dd2eba26c745f949caedbef7b4eff9581e18b45bf6abfabfed8ebc3630c7c.json
deleted file mode 100644
index b58b6b6a0cc8255168e65e714d5858c280dea986..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/317dd2eba26c745f949caedbef7b4eff9581e18b45bf6abfabfed8ebc3630c7c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function every(predicate, thisArg) {\n  return operate((source, subscriber) => {\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      if (!predicate.call(thisArg, value, index++, source)) {\n        subscriber.next(false);\n        subscriber.complete();\n      }\n    }, () => {\n      subscriber.next(true);\n      subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=every.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/32b33389c648cb8f592b3b544a18b18d9c0a84e92387fed6cdd278d128201199.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/32b33389c648cb8f592b3b544a18b18d9c0a84e92387fed6cdd278d128201199.json
deleted file mode 100644
index 3af1251a839120db5fe4ab1a973eb0e33dfd5b1c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/32b33389c648cb8f592b3b544a18b18d9c0a84e92387fed6cdd278d128201199.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n  let bufferSize;\n  let refCount = false;\n  if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n    ({\n      bufferSize = Infinity,\n      windowTime = Infinity,\n      refCount = false,\n      scheduler\n    } = configOrBufferSize);\n  } else {\n    bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity;\n  }\n  return share({\n    connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n    resetOnError: true,\n    resetOnComplete: false,\n    resetOnRefCountZero: refCount\n  });\n}\n//# sourceMappingURL=shareReplay.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3304e67a2d9b1220672aa698ec1a405e8b5f71f79c77629261ad1483b7428209.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3304e67a2d9b1220672aa698ec1a405e8b5f71f79c77629261ad1483b7428209.json
deleted file mode 100644
index 2eda7c5d0de85bd172972fb03fe41164c929c278..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3304e67a2d9b1220672aa698ec1a405e8b5f71f79c77629261ad1483b7428209.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createFind } from './find';\nexport function findIndex(predicate, thisArg) {\n  return operate(createFind(predicate, thisArg, 'index'));\n}\n//# sourceMappingURL=findIndex.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/33332ab8e22e25261a0b7f30f0552058fa6f6dc7b0c49fa6492c86df8d33d7a3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/33332ab8e22e25261a0b7f30f0552058fa6f6dc7b0c49fa6492c86df8d33d7a3.json
deleted file mode 100644
index 8195884314749783c8ab5dfc4bb3f4e4d592cef5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/33332ab8e22e25261a0b7f30f0552058fa6f6dc7b0c49fa6492c86df8d33d7a3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { map } from './map';\nexport function mapTo(value) {\n  return map(() => value);\n}\n//# sourceMappingURL=mapTo.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/33785b5a860f2f5a36c616d7060f008de9e3da5b09a5a1a2a10928597677b1e9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/33785b5a860f2f5a36c616d7060f008de9e3da5b09a5a1a2a10928597677b1e9.json
deleted file mode 100644
index 295043e201b9460242cfce8810181dcf39678811..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/33785b5a860f2f5a36c616d7060f008de9e3da5b09a5a1a2a10928597677b1e9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferToggle(openings, closingSelector) {\n  return operate((source, subscriber) => {\n    const buffers = [];\n    innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, openValue => {\n      const buffer = [];\n      buffers.push(buffer);\n      const closingSubscription = new Subscription();\n      const emitBuffer = () => {\n        arrRemove(buffers, buffer);\n        subscriber.next(buffer);\n        closingSubscription.unsubscribe();\n      };\n      closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));\n    }, noop));\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      for (const buffer of buffers) {\n        buffer.push(value);\n      }\n    }, () => {\n      while (buffers.length > 0) {\n        subscriber.next(buffers.shift());\n      }\n      subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=bufferToggle.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3502d37c663e5806eb0d895537ec74a352f3488a7710253a4f004d61a0379759.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3502d37c663e5806eb0d895537ec74a352f3488a7710253a4f004d61a0379759.json
deleted file mode 100644
index 817cd1736c08e2f6ab374e9cffd290af593a4bb8..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3502d37c663e5806eb0d895537ec74a352f3488a7710253a4f004d61a0379759.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';\nimport { FirebaseError, isNode, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @fileoverview Constants used in the Firebase Storage library.\r\n */\n/**\r\n * Domain name for firebase storage.\r\n */\nconst DEFAULT_HOST = 'firebasestorage.googleapis.com';\n/**\r\n * The key in Firebase config json for the storage bucket.\r\n */\nconst CONFIG_STORAGE_BUCKET_KEY = 'storageBucket';\n/**\r\n * 2 minutes\r\n *\r\n * The timeout for all operations except upload.\r\n */\nconst DEFAULT_MAX_OPERATION_RETRY_TIME = 2 * 60 * 1000;\n/**\r\n * 10 minutes\r\n *\r\n * The timeout for upload.\r\n */\nconst DEFAULT_MAX_UPLOAD_RETRY_TIME = 10 * 60 * 1000;\n/**\r\n * 1 second\r\n */\nconst DEFAULT_MIN_SLEEP_TIME_MILLIS = 1000;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An error returned by the Firebase Storage SDK.\r\n * @public\r\n */\nclass StorageError extends FirebaseError {\n  /**\r\n   * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and\r\n   *  added to the end of the message.\r\n   * @param message  - Error message.\r\n   * @param status_ - Corresponding HTTP Status Code\r\n   */\n  constructor(code, message, status_ = 0) {\n    super(prependCode(code), `Firebase Storage: ${message} (${prependCode(code)})`);\n    this.status_ = status_;\n    /**\r\n     * Stores custom error data unique to the `StorageError`.\r\n     */\n    this.customData = {\n      serverResponse: null\n    };\n    this._baseMessage = this.message;\n    // Without this, `instanceof StorageError`, in tests for example,\n    // returns false.\n    Object.setPrototypeOf(this, StorageError.prototype);\n  }\n  get status() {\n    return this.status_;\n  }\n  set status(status) {\n    this.status_ = status;\n  }\n  /**\r\n   * Compares a `StorageErrorCode` against this error's code, filtering out the prefix.\r\n   */\n  _codeEquals(code) {\n    return prependCode(code) === this.code;\n  }\n  /**\r\n   * Optional response message that was added by the server.\r\n   */\n  get serverResponse() {\n    return this.customData.serverResponse;\n  }\n  set serverResponse(serverResponse) {\n    this.customData.serverResponse = serverResponse;\n    if (this.customData.serverResponse) {\n      this.message = `${this._baseMessage}\\n${this.customData.serverResponse}`;\n    } else {\n      this.message = this._baseMessage;\n    }\n  }\n}\n/**\r\n * @public\r\n * Error codes that can be attached to `StorageError` objects.\r\n */\nvar StorageErrorCode = /*#__PURE__*/(() => {\n  (function (StorageErrorCode) {\n    // Shared between all platforms\n    StorageErrorCode[\"UNKNOWN\"] = \"unknown\";\n    StorageErrorCode[\"OBJECT_NOT_FOUND\"] = \"object-not-found\";\n    StorageErrorCode[\"BUCKET_NOT_FOUND\"] = \"bucket-not-found\";\n    StorageErrorCode[\"PROJECT_NOT_FOUND\"] = \"project-not-found\";\n    StorageErrorCode[\"QUOTA_EXCEEDED\"] = \"quota-exceeded\";\n    StorageErrorCode[\"UNAUTHENTICATED\"] = \"unauthenticated\";\n    StorageErrorCode[\"UNAUTHORIZED\"] = \"unauthorized\";\n    StorageErrorCode[\"UNAUTHORIZED_APP\"] = \"unauthorized-app\";\n    StorageErrorCode[\"RETRY_LIMIT_EXCEEDED\"] = \"retry-limit-exceeded\";\n    StorageErrorCode[\"INVALID_CHECKSUM\"] = \"invalid-checksum\";\n    StorageErrorCode[\"CANCELED\"] = \"canceled\";\n    // JS specific\n    StorageErrorCode[\"INVALID_EVENT_NAME\"] = \"invalid-event-name\";\n    StorageErrorCode[\"INVALID_URL\"] = \"invalid-url\";\n    StorageErrorCode[\"INVALID_DEFAULT_BUCKET\"] = \"invalid-default-bucket\";\n    StorageErrorCode[\"NO_DEFAULT_BUCKET\"] = \"no-default-bucket\";\n    StorageErrorCode[\"CANNOT_SLICE_BLOB\"] = \"cannot-slice-blob\";\n    StorageErrorCode[\"SERVER_FILE_WRONG_SIZE\"] = \"server-file-wrong-size\";\n    StorageErrorCode[\"NO_DOWNLOAD_URL\"] = \"no-download-url\";\n    StorageErrorCode[\"INVALID_ARGUMENT\"] = \"invalid-argument\";\n    StorageErrorCode[\"INVALID_ARGUMENT_COUNT\"] = \"invalid-argument-count\";\n    StorageErrorCode[\"APP_DELETED\"] = \"app-deleted\";\n    StorageErrorCode[\"INVALID_ROOT_OPERATION\"] = \"invalid-root-operation\";\n    StorageErrorCode[\"INVALID_FORMAT\"] = \"invalid-format\";\n    StorageErrorCode[\"INTERNAL_ERROR\"] = \"internal-error\";\n    StorageErrorCode[\"UNSUPPORTED_ENVIRONMENT\"] = \"unsupported-environment\";\n  })(StorageErrorCode || (StorageErrorCode = {}));\n  return StorageErrorCode;\n})();\nfunction prependCode(code) {\n  return 'storage/' + code;\n}\nfunction unknown() {\n  const message = 'An unknown error occurred, please check the error payload for ' + 'server response.';\n  return new StorageError(StorageErrorCode.UNKNOWN, message);\n}\nfunction objectNotFound(path) {\n  return new StorageError(StorageErrorCode.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nfunction quotaExceeded(bucket) {\n  return new StorageError(StorageErrorCode.QUOTA_EXCEEDED, \"Quota for bucket '\" + bucket + \"' exceeded, please view quota on \" + 'https://firebase.google.com/pricing/.');\n}\nfunction unauthenticated() {\n  const message = 'User is not authenticated, please authenticate using Firebase ' + 'Authentication and try again.';\n  return new StorageError(StorageErrorCode.UNAUTHENTICATED, message);\n}\nfunction unauthorizedApp() {\n  return new StorageError(StorageErrorCode.UNAUTHORIZED_APP, 'This app does not have permission to access Firebase Storage on this project.');\n}\nfunction unauthorized(path) {\n  return new StorageError(StorageErrorCode.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nfunction retryLimitExceeded() {\n  return new StorageError(StorageErrorCode.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nfunction canceled() {\n  return new StorageError(StorageErrorCode.CANCELED, 'User canceled the upload/download.');\n}\nfunction invalidUrl(url) {\n  return new StorageError(StorageErrorCode.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nfunction invalidDefaultBucket(bucket) {\n  return new StorageError(StorageErrorCode.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nfunction noDefaultBucket() {\n  return new StorageError(StorageErrorCode.NO_DEFAULT_BUCKET, 'No default bucket ' + \"found. Did you set the '\" + CONFIG_STORAGE_BUCKET_KEY + \"' property when initializing the app?\");\n}\nfunction cannotSliceBlob() {\n  return new StorageError(StorageErrorCode.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nfunction serverFileWrongSize() {\n  return new StorageError(StorageErrorCode.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nfunction noDownloadURL() {\n  return new StorageError(StorageErrorCode.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nfunction missingPolyFill(polyFill) {\n  return new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT, `${polyFill} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);\n}\n/**\r\n * @internal\r\n */\nfunction invalidArgument(message) {\n  return new StorageError(StorageErrorCode.INVALID_ARGUMENT, message);\n}\nfunction appDeleted() {\n  return new StorageError(StorageErrorCode.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\r\n * @param name - The name of the operation that was invalid.\r\n *\r\n * @internal\r\n */\nfunction invalidRootOperation(name) {\n  return new StorageError(StorageErrorCode.INVALID_ROOT_OPERATION, \"The operation '\" + name + \"' cannot be performed on a root reference, create a non-root \" + \"reference using child, such as .child('file.png').\");\n}\n/**\r\n * @param format - The format that was not valid.\r\n * @param message - A message describing the format violation.\r\n */\nfunction invalidFormat(format, message) {\n  return new StorageError(StorageErrorCode.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\r\n * @param message - A message describing the internal error.\r\n */\nfunction internalError(message) {\n  throw new StorageError(StorageErrorCode.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Firebase Storage location data.\r\n *\r\n * @internal\r\n */\nclass Location {\n  constructor(bucket, path) {\n    this.bucket = bucket;\n    this.path_ = path;\n  }\n  get path() {\n    return this.path_;\n  }\n  get isRoot() {\n    return this.path.length === 0;\n  }\n  fullServerUrl() {\n    const encode = encodeURIComponent;\n    return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n  }\n  bucketOnlyServerUrl() {\n    const encode = encodeURIComponent;\n    return '/b/' + encode(this.bucket) + '/o';\n  }\n  static makeFromBucketSpec(bucketString, host) {\n    let bucketLocation;\n    try {\n      bucketLocation = Location.makeFromUrl(bucketString, host);\n    } catch (e) {\n      // Not valid URL, use as-is. This lets you put bare bucket names in\n      // config.\n      return new Location(bucketString, '');\n    }\n    if (bucketLocation.path === '') {\n      return bucketLocation;\n    } else {\n      throw invalidDefaultBucket(bucketString);\n    }\n  }\n  static makeFromUrl(url, host) {\n    let location = null;\n    const bucketDomain = '([A-Za-z0-9.\\\\-_]+)';\n    function gsModify(loc) {\n      if (loc.path.charAt(loc.path.length - 1) === '/') {\n        loc.path_ = loc.path_.slice(0, -1);\n      }\n    }\n    const gsPath = '(/(.*))?$';\n    const gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n    const gsIndices = {\n      bucket: 1,\n      path: 3\n    };\n    function httpModify(loc) {\n      loc.path_ = decodeURIComponent(loc.path);\n    }\n    const version = 'v[A-Za-z0-9_]+';\n    const firebaseStorageHost = host.replace(/[.]/g, '\\\\.');\n    const firebaseStoragePath = '(/([^?#]*).*)?$';\n    const firebaseStorageRegExp = new RegExp(`^https?://${firebaseStorageHost}/${version}/b/${bucketDomain}/o${firebaseStoragePath}`, 'i');\n    const firebaseStorageIndices = {\n      bucket: 1,\n      path: 3\n    };\n    const cloudStorageHost = host === DEFAULT_HOST ? '(?:storage.googleapis.com|storage.cloud.google.com)' : host;\n    const cloudStoragePath = '([^?#]*)';\n    const cloudStorageRegExp = new RegExp(`^https?://${cloudStorageHost}/${bucketDomain}/${cloudStoragePath}`, 'i');\n    const cloudStorageIndices = {\n      bucket: 1,\n      path: 2\n    };\n    const groups = [{\n      regex: gsRegex,\n      indices: gsIndices,\n      postModify: gsModify\n    }, {\n      regex: firebaseStorageRegExp,\n      indices: firebaseStorageIndices,\n      postModify: httpModify\n    }, {\n      regex: cloudStorageRegExp,\n      indices: cloudStorageIndices,\n      postModify: httpModify\n    }];\n    for (let i = 0; i < groups.length; i++) {\n      const group = groups[i];\n      const captures = group.regex.exec(url);\n      if (captures) {\n        const bucketValue = captures[group.indices.bucket];\n        let pathValue = captures[group.indices.path];\n        if (!pathValue) {\n          pathValue = '';\n        }\n        location = new Location(bucketValue, pathValue);\n        group.postModify(location);\n        break;\n      }\n    }\n    if (location == null) {\n      throw invalidUrl(url);\n    }\n    return location;\n  }\n}\n\n/**\r\n * A request whose promise always fails.\r\n */\nclass FailRequest {\n  constructor(error) {\n    this.promise_ = Promise.reject(error);\n  }\n  /** @inheritDoc */\n  getPromise() {\n    return this.promise_;\n  }\n  /** @inheritDoc */\n  cancel(_appDelete = false) {}\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Accepts a callback for an action to perform (`doRequest`),\r\n * and then a callback for when the backoff has completed (`backoffCompleteCb`).\r\n * The callback sent to start requires an argument to call (`onRequestComplete`).\r\n * When `start` calls `doRequest`, it passes a callback for when the request has\r\n * completed, `onRequestComplete`. Based on this, the backoff continues, with\r\n * another call to `doRequest` and the above loop continues until the timeout\r\n * is hit, or a successful response occurs.\r\n * @description\r\n * @param doRequest Callback to perform request\r\n * @param backoffCompleteCb Callback to call when backoff has been completed\r\n */\nfunction start(doRequest,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nbackoffCompleteCb, timeout) {\n  // TODO(andysoto): make this code cleaner (probably refactor into an actual\n  // type instead of a bunch of functions with state shared in the closure)\n  let waitSeconds = 1;\n  // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n  // TODO: find a way to exclude Node type definition for storage because storage only works in browser\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  let retryTimeoutId = null;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  let globalTimeoutId = null;\n  let hitTimeout = false;\n  let cancelState = 0;\n  function canceled() {\n    return cancelState === 2;\n  }\n  let triggeredCallback = false;\n  function triggerCallback(...args) {\n    if (!triggeredCallback) {\n      triggeredCallback = true;\n      backoffCompleteCb.apply(null, args);\n    }\n  }\n  function callWithDelay(millis) {\n    retryTimeoutId = setTimeout(() => {\n      retryTimeoutId = null;\n      doRequest(responseHandler, canceled());\n    }, millis);\n  }\n  function clearGlobalTimeout() {\n    if (globalTimeoutId) {\n      clearTimeout(globalTimeoutId);\n    }\n  }\n  function responseHandler(success, ...args) {\n    if (triggeredCallback) {\n      clearGlobalTimeout();\n      return;\n    }\n    if (success) {\n      clearGlobalTimeout();\n      triggerCallback.call(null, success, ...args);\n      return;\n    }\n    const mustStop = canceled() || hitTimeout;\n    if (mustStop) {\n      clearGlobalTimeout();\n      triggerCallback.call(null, success, ...args);\n      return;\n    }\n    if (waitSeconds < 64) {\n      /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n      waitSeconds *= 2;\n    }\n    let waitMillis;\n    if (cancelState === 1) {\n      cancelState = 2;\n      waitMillis = 0;\n    } else {\n      waitMillis = (waitSeconds + Math.random()) * 1000;\n    }\n    callWithDelay(waitMillis);\n  }\n  let stopped = false;\n  function stop(wasTimeout) {\n    if (stopped) {\n      return;\n    }\n    stopped = true;\n    clearGlobalTimeout();\n    if (triggeredCallback) {\n      return;\n    }\n    if (retryTimeoutId !== null) {\n      if (!wasTimeout) {\n        cancelState = 2;\n      }\n      clearTimeout(retryTimeoutId);\n      callWithDelay(0);\n    } else {\n      if (!wasTimeout) {\n        cancelState = 1;\n      }\n    }\n  }\n  callWithDelay(0);\n  globalTimeoutId = setTimeout(() => {\n    hitTimeout = true;\n    stop(true);\n  }, timeout);\n  return stop;\n}\n/**\r\n * Stops the retry loop from repeating.\r\n * If the function is currently \"in between\" retries, it is invoked immediately\r\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\r\n * after the current invocation finishes iff the current invocation would have\r\n * triggered another retry.\r\n */\nfunction stop(id) {\n  id(false);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isJustDef(p) {\n  return p !== void 0;\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isFunction(p) {\n  return typeof p === 'function';\n}\nfunction isNonArrayObject(p) {\n  return typeof p === 'object' && !Array.isArray(p);\n}\nfunction isString(p) {\n  return typeof p === 'string' || p instanceof String;\n}\nfunction isNativeBlob(p) {\n  return isNativeBlobDefined() && p instanceof Blob;\n}\nfunction isNativeBlobDefined() {\n  // Note: The `isNode()` check can be removed when `node-fetch` adds native Blob support\n  // PR: https://github.com/node-fetch/node-fetch/pull/1664\n  return typeof Blob !== 'undefined' && !isNode();\n}\nfunction validateNumber(argument, minValue, maxValue, value) {\n  if (value < minValue) {\n    throw invalidArgument(`Invalid value for '${argument}'. Expected ${minValue} or greater.`);\n  }\n  if (value > maxValue) {\n    throw invalidArgument(`Invalid value for '${argument}'. Expected ${maxValue} or less.`);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction makeUrl(urlPart, host, protocol) {\n  let origin = host;\n  if (protocol == null) {\n    origin = `https://${host}`;\n  }\n  return `${protocol}://${origin}/v0${urlPart}`;\n}\nfunction makeQueryString(params) {\n  const encode = encodeURIComponent;\n  let queryPart = '?';\n  for (const key in params) {\n    if (params.hasOwnProperty(key)) {\n      const nextPart = encode(key) + '=' + encode(params[key]);\n      queryPart = queryPart + nextPart + '&';\n    }\n  }\n  // Chop off the extra '&' or '?' on the end\n  queryPart = queryPart.slice(0, -1);\n  return queryPart;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Error codes for requests made by the the XhrIo wrapper.\r\n */\nvar ErrorCode = /*#__PURE__*/(() => {\n  (function (ErrorCode) {\n    ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n    ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n    ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n  })(ErrorCode || (ErrorCode = {}));\n  return ErrorCode;\n})();\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Checks the status code to see if the action should be retried.\r\n *\r\n * @param status Current HTTP status code returned by server.\r\n * @param additionalRetryCodes additional retry codes to check against\r\n */\nfunction isRetryStatusCode(status, additionalRetryCodes) {\n  // The codes for which to retry came from this page:\n  // https://cloud.google.com/storage/docs/exponential-backoff\n  const isFiveHundredCode = status >= 500 && status < 600;\n  const extraRetryCodes = [\n  // Request Timeout: web server didn't receive full request in time.\n  408,\n  // Too Many Requests: you're getting rate-limited, basically.\n  429];\n  const isExtraRetryCode = extraRetryCodes.indexOf(status) !== -1;\n  const isAdditionalRetryCode = additionalRetryCodes.indexOf(status) !== -1;\n  return isFiveHundredCode || isExtraRetryCode || isAdditionalRetryCode;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Handles network logic for all Storage Requests, including error reporting and\r\n * retries with backoff.\r\n *\r\n * @param I - the type of the backend's network response.\r\n * @param - O the output type used by the rest of the SDK. The conversion\r\n * happens in the specified `callback_`.\r\n */\nclass NetworkRequest {\n  constructor(url_, method_, headers_, body_, successCodes_, additionalRetryCodes_, callback_, errorCallback_, timeout_, progressCallback_, connectionFactory_, retry = true) {\n    this.url_ = url_;\n    this.method_ = method_;\n    this.headers_ = headers_;\n    this.body_ = body_;\n    this.successCodes_ = successCodes_;\n    this.additionalRetryCodes_ = additionalRetryCodes_;\n    this.callback_ = callback_;\n    this.errorCallback_ = errorCallback_;\n    this.timeout_ = timeout_;\n    this.progressCallback_ = progressCallback_;\n    this.connectionFactory_ = connectionFactory_;\n    this.retry = retry;\n    this.pendingConnection_ = null;\n    this.backoffId_ = null;\n    this.canceled_ = false;\n    this.appDelete_ = false;\n    this.promise_ = new Promise((resolve, reject) => {\n      this.resolve_ = resolve;\n      this.reject_ = reject;\n      this.start_();\n    });\n  }\n  /**\r\n   * Actually starts the retry loop.\r\n   */\n  start_() {\n    const doTheRequest = (backoffCallback, canceled) => {\n      if (canceled) {\n        backoffCallback(false, new RequestEndStatus(false, null, true));\n        return;\n      }\n      const connection = this.connectionFactory_();\n      this.pendingConnection_ = connection;\n      const progressListener = progressEvent => {\n        const loaded = progressEvent.loaded;\n        const total = progressEvent.lengthComputable ? progressEvent.total : -1;\n        if (this.progressCallback_ !== null) {\n          this.progressCallback_(loaded, total);\n        }\n      };\n      if (this.progressCallback_ !== null) {\n        connection.addUploadProgressListener(progressListener);\n      }\n      // connection.send() never rejects, so we don't need to have a error handler or use catch on the returned promise.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      connection.send(this.url_, this.method_, this.body_, this.headers_).then(() => {\n        if (this.progressCallback_ !== null) {\n          connection.removeUploadProgressListener(progressListener);\n        }\n        this.pendingConnection_ = null;\n        const hitServer = connection.getErrorCode() === ErrorCode.NO_ERROR;\n        const status = connection.getStatus();\n        if (!hitServer || isRetryStatusCode(status, this.additionalRetryCodes_) && this.retry) {\n          const wasCanceled = connection.getErrorCode() === ErrorCode.ABORT;\n          backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n          return;\n        }\n        const successCode = this.successCodes_.indexOf(status) !== -1;\n        backoffCallback(true, new RequestEndStatus(successCode, connection));\n      });\n    };\n    /**\r\n     * @param requestWentThrough - True if the request eventually went\r\n     *     through, false if it hit the retry limit or was canceled.\r\n     */\n    const backoffDone = (requestWentThrough, status) => {\n      const resolve = this.resolve_;\n      const reject = this.reject_;\n      const connection = status.connection;\n      if (status.wasSuccessCode) {\n        try {\n          const result = this.callback_(connection, connection.getResponse());\n          if (isJustDef(result)) {\n            resolve(result);\n          } else {\n            resolve();\n          }\n        } catch (e) {\n          reject(e);\n        }\n      } else {\n        if (connection !== null) {\n          const err = unknown();\n          err.serverResponse = connection.getErrorText();\n          if (this.errorCallback_) {\n            reject(this.errorCallback_(connection, err));\n          } else {\n            reject(err);\n          }\n        } else {\n          if (status.canceled) {\n            const err = this.appDelete_ ? appDeleted() : canceled();\n            reject(err);\n          } else {\n            const err = retryLimitExceeded();\n            reject(err);\n          }\n        }\n      }\n    };\n    if (this.canceled_) {\n      backoffDone(false, new RequestEndStatus(false, null, true));\n    } else {\n      this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n    }\n  }\n  /** @inheritDoc */\n  getPromise() {\n    return this.promise_;\n  }\n  /** @inheritDoc */\n  cancel(appDelete) {\n    this.canceled_ = true;\n    this.appDelete_ = appDelete || false;\n    if (this.backoffId_ !== null) {\n      stop(this.backoffId_);\n    }\n    if (this.pendingConnection_ !== null) {\n      this.pendingConnection_.abort();\n    }\n  }\n}\n/**\r\n * A collection of information about the result of a network request.\r\n * @param opt_canceled - Defaults to false.\r\n */\nclass RequestEndStatus {\n  constructor(wasSuccessCode, connection, canceled) {\n    this.wasSuccessCode = wasSuccessCode;\n    this.connection = connection;\n    this.canceled = !!canceled;\n  }\n}\nfunction addAuthHeader_(headers, authToken) {\n  if (authToken !== null && authToken.length > 0) {\n    headers['Authorization'] = 'Firebase ' + authToken;\n  }\n}\nfunction addVersionHeader_(headers, firebaseVersion) {\n  headers['X-Firebase-Storage-Version'] = 'webjs/' + (firebaseVersion !== null && firebaseVersion !== void 0 ? firebaseVersion : 'AppManager');\n}\nfunction addGmpidHeader_(headers, appId) {\n  if (appId) {\n    headers['X-Firebase-GMPID'] = appId;\n  }\n}\nfunction addAppCheckHeader_(headers, appCheckToken) {\n  if (appCheckToken !== null) {\n    headers['X-Firebase-AppCheck'] = appCheckToken;\n  }\n}\nfunction makeRequest(requestInfo, appId, authToken, appCheckToken, requestFactory, firebaseVersion, retry = true) {\n  const queryPart = makeQueryString(requestInfo.urlParams);\n  const url = requestInfo.url + queryPart;\n  const headers = Object.assign({}, requestInfo.headers);\n  addGmpidHeader_(headers, appId);\n  addAuthHeader_(headers, authToken);\n  addVersionHeader_(headers, firebaseVersion);\n  addAppCheckHeader_(headers, appCheckToken);\n  return new NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, requestFactory, retry);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getBlobBuilder() {\n  if (typeof BlobBuilder !== 'undefined') {\n    return BlobBuilder;\n  } else if (typeof WebKitBlobBuilder !== 'undefined') {\n    return WebKitBlobBuilder;\n  } else {\n    return undefined;\n  }\n}\n/**\r\n * Concatenates one or more values together and converts them to a Blob.\r\n *\r\n * @param args The values that will make up the resulting blob.\r\n * @return The blob.\r\n */\nfunction getBlob$1(...args) {\n  const BlobBuilder = getBlobBuilder();\n  if (BlobBuilder !== undefined) {\n    const bb = new BlobBuilder();\n    for (let i = 0; i < args.length; i++) {\n      bb.append(args[i]);\n    }\n    return bb.getBlob();\n  } else {\n    if (isNativeBlobDefined()) {\n      return new Blob(args);\n    } else {\n      throw new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT, \"This browser doesn't seem to support creating Blobs\");\n    }\n  }\n}\n/**\r\n * Slices the blob. The returned blob contains data from the start byte\r\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\r\n *\r\n * @param blob The blob to be sliced.\r\n * @param start Index of the starting byte.\r\n * @param end Index of the ending byte.\r\n * @return The blob slice or null if not supported.\r\n */\nfunction sliceBlob(blob, start, end) {\n  if (blob.webkitSlice) {\n    return blob.webkitSlice(start, end);\n  } else if (blob.mozSlice) {\n    return blob.mozSlice(start, end);\n  } else if (blob.slice) {\n    return blob.slice(start, end);\n  }\n  return null;\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** Converts a Base64 encoded string to a binary string. */\nfunction decodeBase64(encoded) {\n  if (typeof atob === 'undefined') {\n    throw missingPolyFill('base-64');\n  }\n  return atob(encoded);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An enumeration of the possible string formats for upload.\r\n * @public\r\n */\nconst StringFormat = {\n  /**\r\n   * Indicates the string should be interpreted \"raw\", that is, as normal text.\r\n   * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte\r\n   * sequence.\r\n   * Example: The string 'Hello! \\\\ud83d\\\\ude0a' becomes the byte sequence\r\n   * 48 65 6c 6c 6f 21 20 f0 9f 98 8a\r\n   */\n  RAW: 'raw',\n  /**\r\n   * Indicates the string should be interpreted as base64-encoded data.\r\n   * Padding characters (trailing '='s) are optional.\r\n   * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence\r\n   * ad 69 8e fb e1 3a b7 bf eb 97\r\n   */\n  BASE64: 'base64',\n  /**\r\n   * Indicates the string should be interpreted as base64url-encoded data.\r\n   * Padding characters (trailing '='s) are optional.\r\n   * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence\r\n   * ad 69 8e fb e1 3a b7 bf eb 97\r\n   */\n  BASE64URL: 'base64url',\n  /**\r\n   * Indicates the string is a data URL, such as one obtained from\r\n   * canvas.toDataURL().\r\n   * Example: the string 'data:application/octet-stream;base64,aaaa'\r\n   * becomes the byte sequence\r\n   * 69 a6 9a\r\n   * (the content-type \"application/octet-stream\" is also applied, but can\r\n   * be overridden in the metadata object).\r\n   */\n  DATA_URL: 'data_url'\n};\nclass StringData {\n  constructor(data, contentType) {\n    this.data = data;\n    this.contentType = contentType || null;\n  }\n}\n/**\r\n * @internal\r\n */\nfunction dataFromString(format, stringData) {\n  switch (format) {\n    case StringFormat.RAW:\n      return new StringData(utf8Bytes_(stringData));\n    case StringFormat.BASE64:\n    case StringFormat.BASE64URL:\n      return new StringData(base64Bytes_(format, stringData));\n    case StringFormat.DATA_URL:\n      return new StringData(dataURLBytes_(stringData), dataURLContentType_(stringData));\n    // do nothing\n  }\n  // assert(false);\n  throw unknown();\n}\nfunction utf8Bytes_(value) {\n  const b = [];\n  for (let i = 0; i < value.length; i++) {\n    let c = value.charCodeAt(i);\n    if (c <= 127) {\n      b.push(c);\n    } else {\n      if (c <= 2047) {\n        b.push(192 | c >> 6, 128 | c & 63);\n      } else {\n        if ((c & 64512) === 55296) {\n          // The start of a surrogate pair.\n          const valid = i < value.length - 1 && (value.charCodeAt(i + 1) & 64512) === 56320;\n          if (!valid) {\n            // The second surrogate wasn't there.\n            b.push(239, 191, 189);\n          } else {\n            const hi = c;\n            const lo = value.charCodeAt(++i);\n            c = 65536 | (hi & 1023) << 10 | lo & 1023;\n            b.push(240 | c >> 18, 128 | c >> 12 & 63, 128 | c >> 6 & 63, 128 | c & 63);\n          }\n        } else {\n          if ((c & 64512) === 56320) {\n            // Invalid low surrogate.\n            b.push(239, 191, 189);\n          } else {\n            b.push(224 | c >> 12, 128 | c >> 6 & 63, 128 | c & 63);\n          }\n        }\n      }\n    }\n  }\n  return new Uint8Array(b);\n}\nfunction percentEncodedBytes_(value) {\n  let decoded;\n  try {\n    decoded = decodeURIComponent(value);\n  } catch (e) {\n    throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n  }\n  return utf8Bytes_(decoded);\n}\nfunction base64Bytes_(format, value) {\n  switch (format) {\n    case StringFormat.BASE64:\n      {\n        const hasMinus = value.indexOf('-') !== -1;\n        const hasUnder = value.indexOf('_') !== -1;\n        if (hasMinus || hasUnder) {\n          const invalidChar = hasMinus ? '-' : '_';\n          throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64url encoded?\");\n        }\n        break;\n      }\n    case StringFormat.BASE64URL:\n      {\n        const hasPlus = value.indexOf('+') !== -1;\n        const hasSlash = value.indexOf('/') !== -1;\n        if (hasPlus || hasSlash) {\n          const invalidChar = hasPlus ? '+' : '/';\n          throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n        }\n        value = value.replace(/-/g, '+').replace(/_/g, '/');\n        break;\n      }\n    // do nothing\n  }\n\n  let bytes;\n  try {\n    bytes = decodeBase64(value);\n  } catch (e) {\n    if (e.message.includes('polyfill')) {\n      throw e;\n    }\n    throw invalidFormat(format, 'Invalid character found');\n  }\n  const array = new Uint8Array(bytes.length);\n  for (let i = 0; i < bytes.length; i++) {\n    array[i] = bytes.charCodeAt(i);\n  }\n  return array;\n}\nclass DataURLParts {\n  constructor(dataURL) {\n    this.base64 = false;\n    this.contentType = null;\n    const matches = dataURL.match(/^data:([^,]+)?,/);\n    if (matches === null) {\n      throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[<mediatype>][;base64],<data>\");\n    }\n    const middle = matches[1] || null;\n    if (middle != null) {\n      this.base64 = endsWith(middle, ';base64');\n      this.contentType = this.base64 ? middle.substring(0, middle.length - ';base64'.length) : middle;\n    }\n    this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n  }\n}\nfunction dataURLBytes_(dataUrl) {\n  const parts = new DataURLParts(dataUrl);\n  if (parts.base64) {\n    return base64Bytes_(StringFormat.BASE64, parts.rest);\n  } else {\n    return percentEncodedBytes_(parts.rest);\n  }\n}\nfunction dataURLContentType_(dataUrl) {\n  const parts = new DataURLParts(dataUrl);\n  return parts.contentType;\n}\nfunction endsWith(s, end) {\n  const longEnough = s.length >= end.length;\n  if (!longEnough) {\n    return false;\n  }\n  return s.substring(s.length - end.length) === end;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @param opt_elideCopy - If true, doesn't copy mutable input data\r\n *     (e.g. Uint8Arrays). Pass true only if you know the objects will not be\r\n *     modified after this blob's construction.\r\n *\r\n * @internal\r\n */\nclass FbsBlob {\n  constructor(data, elideCopy) {\n    let size = 0;\n    let blobType = '';\n    if (isNativeBlob(data)) {\n      this.data_ = data;\n      size = data.size;\n      blobType = data.type;\n    } else if (data instanceof ArrayBuffer) {\n      if (elideCopy) {\n        this.data_ = new Uint8Array(data);\n      } else {\n        this.data_ = new Uint8Array(data.byteLength);\n        this.data_.set(new Uint8Array(data));\n      }\n      size = this.data_.length;\n    } else if (data instanceof Uint8Array) {\n      if (elideCopy) {\n        this.data_ = data;\n      } else {\n        this.data_ = new Uint8Array(data.length);\n        this.data_.set(data);\n      }\n      size = data.length;\n    }\n    this.size_ = size;\n    this.type_ = blobType;\n  }\n  size() {\n    return this.size_;\n  }\n  type() {\n    return this.type_;\n  }\n  slice(startByte, endByte) {\n    if (isNativeBlob(this.data_)) {\n      const realBlob = this.data_;\n      const sliced = sliceBlob(realBlob, startByte, endByte);\n      if (sliced === null) {\n        return null;\n      }\n      return new FbsBlob(sliced);\n    } else {\n      const slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n      return new FbsBlob(slice, true);\n    }\n  }\n  static getBlob(...args) {\n    if (isNativeBlobDefined()) {\n      const blobby = args.map(val => {\n        if (val instanceof FbsBlob) {\n          return val.data_;\n        } else {\n          return val;\n        }\n      });\n      return new FbsBlob(getBlob$1.apply(null, blobby));\n    } else {\n      const uint8Arrays = args.map(val => {\n        if (isString(val)) {\n          return dataFromString(StringFormat.RAW, val).data;\n        } else {\n          // Blobs don't exist, so this has to be a Uint8Array.\n          return val.data_;\n        }\n      });\n      let finalLength = 0;\n      uint8Arrays.forEach(array => {\n        finalLength += array.byteLength;\n      });\n      const merged = new Uint8Array(finalLength);\n      let index = 0;\n      uint8Arrays.forEach(array => {\n        for (let i = 0; i < array.length; i++) {\n          merged[index++] = array[i];\n        }\n      });\n      return new FbsBlob(merged, true);\n    }\n  }\n  uploadData() {\n    return this.data_;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns the Object resulting from parsing the given JSON, or null if the\r\n * given string does not represent a JSON object.\r\n */\nfunction jsonObjectOrNull(s) {\n  let obj;\n  try {\n    obj = JSON.parse(s);\n  } catch (e) {\n    return null;\n  }\n  if (isNonArrayObject(obj)) {\n    return obj;\n  } else {\n    return null;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @fileoverview Contains helper methods for manipulating paths.\r\n */\n/**\r\n * @return Null if the path is already at the root.\r\n */\nfunction parent(path) {\n  if (path.length === 0) {\n    return null;\n  }\n  const index = path.lastIndexOf('/');\n  if (index === -1) {\n    return '';\n  }\n  const newPath = path.slice(0, index);\n  return newPath;\n}\nfunction child(path, childPath) {\n  const canonicalChildPath = childPath.split('/').filter(component => component.length > 0).join('/');\n  if (path.length === 0) {\n    return canonicalChildPath;\n  } else {\n    return path + '/' + canonicalChildPath;\n  }\n}\n/**\r\n * Returns the last component of a path.\r\n * '/foo/bar' -> 'bar'\r\n * '/foo/bar/baz/' -> 'baz/'\r\n * '/a' -> 'a'\r\n */\nfunction lastComponent(path) {\n  const index = path.lastIndexOf('/', path.length - 2);\n  if (index === -1) {\n    return path;\n  } else {\n    return path.slice(index + 1);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction noXform_(metadata, value) {\n  return value;\n}\nclass Mapping {\n  constructor(server, local, writable, xform) {\n    this.server = server;\n    this.local = local || server;\n    this.writable = !!writable;\n    this.xform = xform || noXform_;\n  }\n}\nlet mappings_ = null;\nfunction xformPath(fullPath) {\n  if (!isString(fullPath) || fullPath.length < 2) {\n    return fullPath;\n  } else {\n    return lastComponent(fullPath);\n  }\n}\nfunction getMappings() {\n  if (mappings_) {\n    return mappings_;\n  }\n  const mappings = [];\n  mappings.push(new Mapping('bucket'));\n  mappings.push(new Mapping('generation'));\n  mappings.push(new Mapping('metageneration'));\n  mappings.push(new Mapping('name', 'fullPath', true));\n  function mappingsXformPath(_metadata, fullPath) {\n    return xformPath(fullPath);\n  }\n  const nameMapping = new Mapping('name');\n  nameMapping.xform = mappingsXformPath;\n  mappings.push(nameMapping);\n  /**\r\n   * Coerces the second param to a number, if it is defined.\r\n   */\n  function xformSize(_metadata, size) {\n    if (size !== undefined) {\n      return Number(size);\n    } else {\n      return size;\n    }\n  }\n  const sizeMapping = new Mapping('size');\n  sizeMapping.xform = xformSize;\n  mappings.push(sizeMapping);\n  mappings.push(new Mapping('timeCreated'));\n  mappings.push(new Mapping('updated'));\n  mappings.push(new Mapping('md5Hash', null, true));\n  mappings.push(new Mapping('cacheControl', null, true));\n  mappings.push(new Mapping('contentDisposition', null, true));\n  mappings.push(new Mapping('contentEncoding', null, true));\n  mappings.push(new Mapping('contentLanguage', null, true));\n  mappings.push(new Mapping('contentType', null, true));\n  mappings.push(new Mapping('metadata', 'customMetadata', true));\n  mappings_ = mappings;\n  return mappings_;\n}\nfunction addRef(metadata, service) {\n  function generateRef() {\n    const bucket = metadata['bucket'];\n    const path = metadata['fullPath'];\n    const loc = new Location(bucket, path);\n    return service._makeStorageReference(loc);\n  }\n  Object.defineProperty(metadata, 'ref', {\n    get: generateRef\n  });\n}\nfunction fromResource(service, resource, mappings) {\n  const metadata = {};\n  metadata['type'] = 'file';\n  const len = mappings.length;\n  for (let i = 0; i < len; i++) {\n    const mapping = mappings[i];\n    metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n  }\n  addRef(metadata, service);\n  return metadata;\n}\nfunction fromResourceString(service, resourceString, mappings) {\n  const obj = jsonObjectOrNull(resourceString);\n  if (obj === null) {\n    return null;\n  }\n  const resource = obj;\n  return fromResource(service, resource, mappings);\n}\nfunction downloadUrlFromResourceString(metadata, resourceString, host, protocol) {\n  const obj = jsonObjectOrNull(resourceString);\n  if (obj === null) {\n    return null;\n  }\n  if (!isString(obj['downloadTokens'])) {\n    // This can happen if objects are uploaded through GCS and retrieved\n    // through list, so we don't want to throw an Error.\n    return null;\n  }\n  const tokens = obj['downloadTokens'];\n  if (tokens.length === 0) {\n    return null;\n  }\n  const encode = encodeURIComponent;\n  const tokensList = tokens.split(',');\n  const urls = tokensList.map(token => {\n    const bucket = metadata['bucket'];\n    const path = metadata['fullPath'];\n    const urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n    const base = makeUrl(urlPart, host, protocol);\n    const queryString = makeQueryString({\n      alt: 'media',\n      token\n    });\n    return base + queryString;\n  });\n  return urls[0];\n}\nfunction toResourceString(metadata, mappings) {\n  const resource = {};\n  const len = mappings.length;\n  for (let i = 0; i < len; i++) {\n    const mapping = mappings[i];\n    if (mapping.writable) {\n      resource[mapping.server] = metadata[mapping.local];\n    }\n  }\n  return JSON.stringify(resource);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst PREFIXES_KEY = 'prefixes';\nconst ITEMS_KEY = 'items';\nfunction fromBackendResponse(service, bucket, resource) {\n  const listResult = {\n    prefixes: [],\n    items: [],\n    nextPageToken: resource['nextPageToken']\n  };\n  if (resource[PREFIXES_KEY]) {\n    for (const path of resource[PREFIXES_KEY]) {\n      const pathWithoutTrailingSlash = path.replace(/\\/$/, '');\n      const reference = service._makeStorageReference(new Location(bucket, pathWithoutTrailingSlash));\n      listResult.prefixes.push(reference);\n    }\n  }\n  if (resource[ITEMS_KEY]) {\n    for (const item of resource[ITEMS_KEY]) {\n      const reference = service._makeStorageReference(new Location(bucket, item['name']));\n      listResult.items.push(reference);\n    }\n  }\n  return listResult;\n}\nfunction fromResponseString(service, bucket, resourceString) {\n  const obj = jsonObjectOrNull(resourceString);\n  if (obj === null) {\n    return null;\n  }\n  const resource = obj;\n  return fromBackendResponse(service, bucket, resource);\n}\n\n/**\r\n * Contains a fully specified request.\r\n *\r\n * @param I - the type of the backend's network response.\r\n * @param O - the output response type used by the rest of the SDK.\r\n */\nclass RequestInfo {\n  constructor(url, method,\n  /**\r\n   * Returns the value with which to resolve the request's promise. Only called\r\n   * if the request is successful. Throw from this function to reject the\r\n   * returned Request's promise with the thrown error.\r\n   * Note: The XhrIo passed to this function may be reused after this callback\r\n   * returns. Do not keep a reference to it in any way.\r\n   */\n  handler, timeout) {\n    this.url = url;\n    this.method = method;\n    this.handler = handler;\n    this.timeout = timeout;\n    this.urlParams = {};\n    this.headers = {};\n    this.body = null;\n    this.errorHandler = null;\n    /**\r\n     * Called with the current number of bytes uploaded and total size (-1 if not\r\n     * computable) of the request body (i.e. used to report upload progress).\r\n     */\n    this.progressCallback = null;\n    this.successCodes = [200];\n    this.additionalRetryCodes = [];\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Throws the UNKNOWN StorageError if cndn is false.\r\n */\nfunction handlerCheck(cndn) {\n  if (!cndn) {\n    throw unknown();\n  }\n}\nfunction metadataHandler(service, mappings) {\n  function handler(xhr, text) {\n    const metadata = fromResourceString(service, text, mappings);\n    handlerCheck(metadata !== null);\n    return metadata;\n  }\n  return handler;\n}\nfunction listHandler(service, bucket) {\n  function handler(xhr, text) {\n    const listResult = fromResponseString(service, bucket, text);\n    handlerCheck(listResult !== null);\n    return listResult;\n  }\n  return handler;\n}\nfunction downloadUrlHandler(service, mappings) {\n  function handler(xhr, text) {\n    const metadata = fromResourceString(service, text, mappings);\n    handlerCheck(metadata !== null);\n    return downloadUrlFromResourceString(metadata, text, service.host, service._protocol);\n  }\n  return handler;\n}\nfunction sharedErrorHandler(location) {\n  function errorHandler(xhr, err) {\n    let newErr;\n    if (xhr.getStatus() === 401) {\n      if (\n      // This exact message string is the only consistent part of the\n      // server's error response that identifies it as an App Check error.\n      xhr.getErrorText().includes('Firebase App Check token is invalid')) {\n        newErr = unauthorizedApp();\n      } else {\n        newErr = unauthenticated();\n      }\n    } else {\n      if (xhr.getStatus() === 402) {\n        newErr = quotaExceeded(location.bucket);\n      } else {\n        if (xhr.getStatus() === 403) {\n          newErr = unauthorized(location.path);\n        } else {\n          newErr = err;\n        }\n      }\n    }\n    newErr.status = xhr.getStatus();\n    newErr.serverResponse = err.serverResponse;\n    return newErr;\n  }\n  return errorHandler;\n}\nfunction objectErrorHandler(location) {\n  const shared = sharedErrorHandler(location);\n  function errorHandler(xhr, err) {\n    let newErr = shared(xhr, err);\n    if (xhr.getStatus() === 404) {\n      newErr = objectNotFound(location.path);\n    }\n    newErr.serverResponse = err.serverResponse;\n    return newErr;\n  }\n  return errorHandler;\n}\nfunction getMetadata$2(service, location, mappings) {\n  const urlPart = location.fullServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'GET';\n  const timeout = service.maxOperationRetryTime;\n  const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n  requestInfo.errorHandler = objectErrorHandler(location);\n  return requestInfo;\n}\nfunction list$2(service, location, delimiter, pageToken, maxResults) {\n  const urlParams = {};\n  if (location.isRoot) {\n    urlParams['prefix'] = '';\n  } else {\n    urlParams['prefix'] = location.path + '/';\n  }\n  if (delimiter && delimiter.length > 0) {\n    urlParams['delimiter'] = delimiter;\n  }\n  if (pageToken) {\n    urlParams['pageToken'] = pageToken;\n  }\n  if (maxResults) {\n    urlParams['maxResults'] = maxResults;\n  }\n  const urlPart = location.bucketOnlyServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'GET';\n  const timeout = service.maxOperationRetryTime;\n  const requestInfo = new RequestInfo(url, method, listHandler(service, location.bucket), timeout);\n  requestInfo.urlParams = urlParams;\n  requestInfo.errorHandler = sharedErrorHandler(location);\n  return requestInfo;\n}\nfunction getBytes$1(service, location, maxDownloadSizeBytes) {\n  const urlPart = location.fullServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol) + '?alt=media';\n  const method = 'GET';\n  const timeout = service.maxOperationRetryTime;\n  const requestInfo = new RequestInfo(url, method, (_, data) => data, timeout);\n  requestInfo.errorHandler = objectErrorHandler(location);\n  if (maxDownloadSizeBytes !== undefined) {\n    requestInfo.headers['Range'] = `bytes=0-${maxDownloadSizeBytes}`;\n    requestInfo.successCodes = [200 /* OK */, 206 /* Partial Content */];\n  }\n\n  return requestInfo;\n}\nfunction getDownloadUrl(service, location, mappings) {\n  const urlPart = location.fullServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'GET';\n  const timeout = service.maxOperationRetryTime;\n  const requestInfo = new RequestInfo(url, method, downloadUrlHandler(service, mappings), timeout);\n  requestInfo.errorHandler = objectErrorHandler(location);\n  return requestInfo;\n}\nfunction updateMetadata$2(service, location, metadata, mappings) {\n  const urlPart = location.fullServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'PATCH';\n  const body = toResourceString(metadata, mappings);\n  const headers = {\n    'Content-Type': 'application/json; charset=utf-8'\n  };\n  const timeout = service.maxOperationRetryTime;\n  const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n  requestInfo.headers = headers;\n  requestInfo.body = body;\n  requestInfo.errorHandler = objectErrorHandler(location);\n  return requestInfo;\n}\nfunction deleteObject$2(service, location) {\n  const urlPart = location.fullServerUrl();\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'DELETE';\n  const timeout = service.maxOperationRetryTime;\n  function handler(_xhr, _text) {}\n  const requestInfo = new RequestInfo(url, method, handler, timeout);\n  requestInfo.successCodes = [200, 204];\n  requestInfo.errorHandler = objectErrorHandler(location);\n  return requestInfo;\n}\nfunction determineContentType_(metadata, blob) {\n  return metadata && metadata['contentType'] || blob && blob.type() || 'application/octet-stream';\n}\nfunction metadataForUpload_(location, blob, metadata) {\n  const metadataClone = Object.assign({}, metadata);\n  metadataClone['fullPath'] = location.path;\n  metadataClone['size'] = blob.size();\n  if (!metadataClone['contentType']) {\n    metadataClone['contentType'] = determineContentType_(null, blob);\n  }\n  return metadataClone;\n}\n/**\r\n * Prepare RequestInfo for uploads as Content-Type: multipart.\r\n */\nfunction multipartUpload(service, location, mappings, blob, metadata) {\n  const urlPart = location.bucketOnlyServerUrl();\n  const headers = {\n    'X-Goog-Upload-Protocol': 'multipart'\n  };\n  function genBoundary() {\n    let str = '';\n    for (let i = 0; i < 2; i++) {\n      str = str + Math.random().toString().slice(2);\n    }\n    return str;\n  }\n  const boundary = genBoundary();\n  headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n  const metadata_ = metadataForUpload_(location, blob, metadata);\n  const metadataString = toResourceString(metadata_, mappings);\n  const preBlobPart = '--' + boundary + '\\r\\n' + 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' + metadataString + '\\r\\n--' + boundary + '\\r\\n' + 'Content-Type: ' + metadata_['contentType'] + '\\r\\n\\r\\n';\n  const postBlobPart = '\\r\\n--' + boundary + '--';\n  const body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n  if (body === null) {\n    throw cannotSliceBlob();\n  }\n  const urlParams = {\n    name: metadata_['fullPath']\n  };\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'POST';\n  const timeout = service.maxUploadRetryTime;\n  const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n  requestInfo.urlParams = urlParams;\n  requestInfo.headers = headers;\n  requestInfo.body = body.uploadData();\n  requestInfo.errorHandler = sharedErrorHandler(location);\n  return requestInfo;\n}\n/**\r\n * @param current The number of bytes that have been uploaded so far.\r\n * @param total The total number of bytes in the upload.\r\n * @param opt_finalized True if the server has finished the upload.\r\n * @param opt_metadata The upload metadata, should\r\n *     only be passed if opt_finalized is true.\r\n */\nclass ResumableUploadStatus {\n  constructor(current, total, finalized, metadata) {\n    this.current = current;\n    this.total = total;\n    this.finalized = !!finalized;\n    this.metadata = metadata || null;\n  }\n}\nfunction checkResumeHeader_(xhr, allowed) {\n  let status = null;\n  try {\n    status = xhr.getResponseHeader('X-Goog-Upload-Status');\n  } catch (e) {\n    handlerCheck(false);\n  }\n  const allowedStatus = allowed || ['active'];\n  handlerCheck(!!status && allowedStatus.indexOf(status) !== -1);\n  return status;\n}\nfunction createResumableUpload(service, location, mappings, blob, metadata) {\n  const urlPart = location.bucketOnlyServerUrl();\n  const metadataForUpload = metadataForUpload_(location, blob, metadata);\n  const urlParams = {\n    name: metadataForUpload['fullPath']\n  };\n  const url = makeUrl(urlPart, service.host, service._protocol);\n  const method = 'POST';\n  const headers = {\n    'X-Goog-Upload-Protocol': 'resumable',\n    'X-Goog-Upload-Command': 'start',\n    'X-Goog-Upload-Header-Content-Length': `${blob.size()}`,\n    'X-Goog-Upload-Header-Content-Type': metadataForUpload['contentType'],\n    'Content-Type': 'application/json; charset=utf-8'\n  };\n  const body = toResourceString(metadataForUpload, mappings);\n  const timeout = service.maxUploadRetryTime;\n  function handler(xhr) {\n    checkResumeHeader_(xhr);\n    let url;\n    try {\n      url = xhr.getResponseHeader('X-Goog-Upload-URL');\n    } catch (e) {\n      handlerCheck(false);\n    }\n    handlerCheck(isString(url));\n    return url;\n  }\n  const requestInfo = new RequestInfo(url, method, handler, timeout);\n  requestInfo.urlParams = urlParams;\n  requestInfo.headers = headers;\n  requestInfo.body = body;\n  requestInfo.errorHandler = sharedErrorHandler(location);\n  return requestInfo;\n}\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n */\nfunction getResumableUploadStatus(service, location, url, blob) {\n  const headers = {\n    'X-Goog-Upload-Command': 'query'\n  };\n  function handler(xhr) {\n    const status = checkResumeHeader_(xhr, ['active', 'final']);\n    let sizeString = null;\n    try {\n      sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n    } catch (e) {\n      handlerCheck(false);\n    }\n    if (!sizeString) {\n      // null or empty string\n      handlerCheck(false);\n    }\n    const size = Number(sizeString);\n    handlerCheck(!isNaN(size));\n    return new ResumableUploadStatus(size, blob.size(), status === 'final');\n  }\n  const method = 'POST';\n  const timeout = service.maxUploadRetryTime;\n  const requestInfo = new RequestInfo(url, method, handler, timeout);\n  requestInfo.headers = headers;\n  requestInfo.errorHandler = sharedErrorHandler(location);\n  return requestInfo;\n}\n/**\r\n * Any uploads via the resumable upload API must transfer a number of bytes\r\n * that is a multiple of this number.\r\n */\nconst RESUMABLE_UPLOAD_CHUNK_SIZE = 256 * 1024;\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n * @param chunkSize Number of bytes to upload.\r\n * @param status The previous status.\r\n *     If not passed or null, we start from the beginning.\r\n * @throws fbs.Error If the upload is already complete, the passed in status\r\n *     has a final size inconsistent with the blob, or the blob cannot be sliced\r\n *     for upload.\r\n */\nfunction continueResumableUpload(location, service, url, blob, chunkSize, mappings, status, progressCallback) {\n  // TODO(andysoto): standardize on internal asserts\n  // assert(!(opt_status && opt_status.finalized));\n  const status_ = new ResumableUploadStatus(0, 0);\n  if (status) {\n    status_.current = status.current;\n    status_.total = status.total;\n  } else {\n    status_.current = 0;\n    status_.total = blob.size();\n  }\n  if (blob.size() !== status_.total) {\n    throw serverFileWrongSize();\n  }\n  const bytesLeft = status_.total - status_.current;\n  let bytesToUpload = bytesLeft;\n  if (chunkSize > 0) {\n    bytesToUpload = Math.min(bytesToUpload, chunkSize);\n  }\n  const startByte = status_.current;\n  const endByte = startByte + bytesToUpload;\n  let uploadCommand = '';\n  if (bytesToUpload === 0) {\n    uploadCommand = 'finalize';\n  } else if (bytesLeft === bytesToUpload) {\n    uploadCommand = 'upload, finalize';\n  } else {\n    uploadCommand = 'upload';\n  }\n  const headers = {\n    'X-Goog-Upload-Command': uploadCommand,\n    'X-Goog-Upload-Offset': `${status_.current}`\n  };\n  const body = blob.slice(startByte, endByte);\n  if (body === null) {\n    throw cannotSliceBlob();\n  }\n  function handler(xhr, text) {\n    // TODO(andysoto): Verify the MD5 of each uploaded range:\n    // the 'x-range-md5' header comes back with status code 308 responses.\n    // We'll only be able to bail out though, because you can't re-upload a\n    // range that you previously uploaded.\n    const uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n    const newCurrent = status_.current + bytesToUpload;\n    const size = blob.size();\n    let metadata;\n    if (uploadStatus === 'final') {\n      metadata = metadataHandler(service, mappings)(xhr, text);\n    } else {\n      metadata = null;\n    }\n    return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n  }\n  const method = 'POST';\n  const timeout = service.maxUploadRetryTime;\n  const requestInfo = new RequestInfo(url, method, handler, timeout);\n  requestInfo.headers = headers;\n  requestInfo.body = body.uploadData();\n  requestInfo.progressCallback = progressCallback || null;\n  requestInfo.errorHandler = sharedErrorHandler(location);\n  return requestInfo;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An event that is triggered on a task.\r\n * @internal\r\n */\nconst TaskEvent = {\n  /**\r\n   * For this event,\r\n   * <ul>\r\n   *   <li>The `next` function is triggered on progress updates and when the\r\n   *       task is paused/resumed with an `UploadTaskSnapshot` as the first\r\n   *       argument.</li>\r\n   *   <li>The `error` function is triggered if the upload is canceled or fails\r\n   *       for another reason.</li>\r\n   *   <li>The `complete` function is triggered if the upload completes\r\n   *       successfully.</li>\r\n   * </ul>\r\n   */\n  STATE_CHANGED: 'state_changed'\n};\n// type keys = keyof TaskState\n/**\r\n * Represents the current state of a running upload.\r\n * @internal\r\n */\nconst TaskState = {\n  /** The task is currently transferring data. */\n  RUNNING: 'running',\n  /** The task was paused by the user. */\n  PAUSED: 'paused',\n  /** The task completed successfully. */\n  SUCCESS: 'success',\n  /** The task was canceled. */\n  CANCELED: 'canceled',\n  /** The task failed with an error. */\n  ERROR: 'error'\n};\nfunction taskStateFromInternalTaskState(state) {\n  switch (state) {\n    case \"running\" /* InternalTaskState.RUNNING */:\n    case \"pausing\" /* InternalTaskState.PAUSING */:\n    case \"canceling\" /* InternalTaskState.CANCELING */:\n      return TaskState.RUNNING;\n    case \"paused\" /* InternalTaskState.PAUSED */:\n      return TaskState.PAUSED;\n    case \"success\" /* InternalTaskState.SUCCESS */:\n      return TaskState.SUCCESS;\n    case \"canceled\" /* InternalTaskState.CANCELED */:\n      return TaskState.CANCELED;\n    case \"error\" /* InternalTaskState.ERROR */:\n      return TaskState.ERROR;\n    default:\n      // TODO(andysoto): assert(false);\n      return TaskState.ERROR;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass Observer {\n  constructor(nextOrObserver, error, complete) {\n    const asFunctions = isFunction(nextOrObserver) || error != null || complete != null;\n    if (asFunctions) {\n      this.next = nextOrObserver;\n      this.error = error !== null && error !== void 0 ? error : undefined;\n      this.complete = complete !== null && complete !== void 0 ? complete : undefined;\n    } else {\n      const observer = nextOrObserver;\n      this.next = observer.next;\n      this.error = observer.error;\n      this.complete = observer.complete;\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a function that invokes f with its arguments asynchronously as a\r\n * microtask, i.e. as soon as possible after the current script returns back\r\n * into browser code.\r\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction async(f) {\n  return (...argsToForward) => {\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    Promise.resolve().then(() => f(...argsToForward));\n  };\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** An override for the text-based Connection. Used in tests. */\nlet textFactoryOverride = null;\n/**\r\n * Network layer for browsers. We use this instead of goog.net.XhrIo because\r\n * goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.\r\n */\nclass XhrConnection {\n  constructor() {\n    this.sent_ = false;\n    this.xhr_ = new XMLHttpRequest();\n    this.initXhr();\n    this.errorCode_ = ErrorCode.NO_ERROR;\n    this.sendPromise_ = new Promise(resolve => {\n      this.xhr_.addEventListener('abort', () => {\n        this.errorCode_ = ErrorCode.ABORT;\n        resolve();\n      });\n      this.xhr_.addEventListener('error', () => {\n        this.errorCode_ = ErrorCode.NETWORK_ERROR;\n        resolve();\n      });\n      this.xhr_.addEventListener('load', () => {\n        resolve();\n      });\n    });\n  }\n  send(url, method, body, headers) {\n    if (this.sent_) {\n      throw internalError('cannot .send() more than once');\n    }\n    this.sent_ = true;\n    this.xhr_.open(method, url, true);\n    if (headers !== undefined) {\n      for (const key in headers) {\n        if (headers.hasOwnProperty(key)) {\n          this.xhr_.setRequestHeader(key, headers[key].toString());\n        }\n      }\n    }\n    if (body !== undefined) {\n      this.xhr_.send(body);\n    } else {\n      this.xhr_.send();\n    }\n    return this.sendPromise_;\n  }\n  getErrorCode() {\n    if (!this.sent_) {\n      throw internalError('cannot .getErrorCode() before sending');\n    }\n    return this.errorCode_;\n  }\n  getStatus() {\n    if (!this.sent_) {\n      throw internalError('cannot .getStatus() before sending');\n    }\n    try {\n      return this.xhr_.status;\n    } catch (e) {\n      return -1;\n    }\n  }\n  getResponse() {\n    if (!this.sent_) {\n      throw internalError('cannot .getResponse() before sending');\n    }\n    return this.xhr_.response;\n  }\n  getErrorText() {\n    if (!this.sent_) {\n      throw internalError('cannot .getErrorText() before sending');\n    }\n    return this.xhr_.statusText;\n  }\n  /** Aborts the request. */\n  abort() {\n    this.xhr_.abort();\n  }\n  getResponseHeader(header) {\n    return this.xhr_.getResponseHeader(header);\n  }\n  addUploadProgressListener(listener) {\n    if (this.xhr_.upload != null) {\n      this.xhr_.upload.addEventListener('progress', listener);\n    }\n  }\n  removeUploadProgressListener(listener) {\n    if (this.xhr_.upload != null) {\n      this.xhr_.upload.removeEventListener('progress', listener);\n    }\n  }\n}\nclass XhrTextConnection extends XhrConnection {\n  initXhr() {\n    this.xhr_.responseType = 'text';\n  }\n}\nfunction newTextConnection() {\n  return textFactoryOverride ? textFactoryOverride() : new XhrTextConnection();\n}\nclass XhrBytesConnection extends XhrConnection {\n  initXhr() {\n    this.xhr_.responseType = 'arraybuffer';\n  }\n}\nfunction newBytesConnection() {\n  return new XhrBytesConnection();\n}\nclass XhrBlobConnection extends XhrConnection {\n  initXhr() {\n    this.xhr_.responseType = 'blob';\n  }\n}\nfunction newBlobConnection() {\n  return new XhrBlobConnection();\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\r\n * upload and manage callbacks for various events.\r\n * @internal\r\n */\nclass UploadTask {\n  /**\r\n   * @param ref - The firebaseStorage.Reference object this task came\r\n   *     from, untyped to avoid cyclic dependencies.\r\n   * @param blob - The blob to upload.\r\n   */\n  constructor(ref, blob, metadata = null) {\n    /**\r\n     * Number of bytes transferred so far.\r\n     */\n    this._transferred = 0;\n    this._needToFetchStatus = false;\n    this._needToFetchMetadata = false;\n    this._observers = [];\n    this._error = undefined;\n    this._uploadUrl = undefined;\n    this._request = undefined;\n    this._chunkMultiplier = 1;\n    this._resolve = undefined;\n    this._reject = undefined;\n    this._ref = ref;\n    this._blob = blob;\n    this._metadata = metadata;\n    this._mappings = getMappings();\n    this._resumable = this._shouldDoResumable(this._blob);\n    this._state = \"running\" /* InternalTaskState.RUNNING */;\n    this._errorHandler = error => {\n      this._request = undefined;\n      this._chunkMultiplier = 1;\n      if (error._codeEquals(StorageErrorCode.CANCELED)) {\n        this._needToFetchStatus = true;\n        this.completeTransitions_();\n      } else {\n        const backoffExpired = this.isExponentialBackoffExpired();\n        if (isRetryStatusCode(error.status, [])) {\n          if (backoffExpired) {\n            error = retryLimitExceeded();\n          } else {\n            this.sleepTime = Math.max(this.sleepTime * 2, DEFAULT_MIN_SLEEP_TIME_MILLIS);\n            this._needToFetchStatus = true;\n            this.completeTransitions_();\n            return;\n          }\n        }\n        this._error = error;\n        this._transition(\"error\" /* InternalTaskState.ERROR */);\n      }\n    };\n\n    this._metadataErrorHandler = error => {\n      this._request = undefined;\n      if (error._codeEquals(StorageErrorCode.CANCELED)) {\n        this.completeTransitions_();\n      } else {\n        this._error = error;\n        this._transition(\"error\" /* InternalTaskState.ERROR */);\n      }\n    };\n\n    this.sleepTime = 0;\n    this.maxSleepTime = this._ref.storage.maxUploadRetryTime;\n    this._promise = new Promise((resolve, reject) => {\n      this._resolve = resolve;\n      this._reject = reject;\n      this._start();\n    });\n    // Prevent uncaught rejections on the internal promise from bubbling out\n    // to the top level with a dummy handler.\n    this._promise.then(null, () => {});\n  }\n  isExponentialBackoffExpired() {\n    return this.sleepTime > this.maxSleepTime;\n  }\n  _makeProgressCallback() {\n    const sizeBefore = this._transferred;\n    return loaded => this._updateProgress(sizeBefore + loaded);\n  }\n  _shouldDoResumable(blob) {\n    return blob.size() > 256 * 1024;\n  }\n  _start() {\n    if (this._state !== \"running\" /* InternalTaskState.RUNNING */) {\n      // This can happen if someone pauses us in a resume callback, for example.\n      return;\n    }\n    if (this._request !== undefined) {\n      return;\n    }\n    if (this._resumable) {\n      if (this._uploadUrl === undefined) {\n        this._createResumable();\n      } else {\n        if (this._needToFetchStatus) {\n          this._fetchStatus();\n        } else {\n          if (this._needToFetchMetadata) {\n            // Happens if we miss the metadata on upload completion.\n            this._fetchMetadata();\n          } else {\n            this.pendingTimeout = setTimeout(() => {\n              this.pendingTimeout = undefined;\n              this._continueUpload();\n            }, this.sleepTime);\n          }\n        }\n      }\n    } else {\n      this._oneShotUpload();\n    }\n  }\n  _resolveToken(callback) {\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    Promise.all([this._ref.storage._getAuthToken(), this._ref.storage._getAppCheckToken()]).then(([authToken, appCheckToken]) => {\n      switch (this._state) {\n        case \"running\" /* InternalTaskState.RUNNING */:\n          callback(authToken, appCheckToken);\n          break;\n        case \"canceling\" /* InternalTaskState.CANCELING */:\n          this._transition(\"canceled\" /* InternalTaskState.CANCELED */);\n          break;\n        case \"pausing\" /* InternalTaskState.PAUSING */:\n          this._transition(\"paused\" /* InternalTaskState.PAUSED */);\n          break;\n      }\n    });\n  }\n  // TODO(andysoto): assert false\n  _createResumable() {\n    this._resolveToken((authToken, appCheckToken) => {\n      const requestInfo = createResumableUpload(this._ref.storage, this._ref._location, this._mappings, this._blob, this._metadata);\n      const createRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\n      this._request = createRequest;\n      createRequest.getPromise().then(url => {\n        this._request = undefined;\n        this._uploadUrl = url;\n        this._needToFetchStatus = false;\n        this.completeTransitions_();\n      }, this._errorHandler);\n    });\n  }\n  _fetchStatus() {\n    // TODO(andysoto): assert(this.uploadUrl_ !== null);\n    const url = this._uploadUrl;\n    this._resolveToken((authToken, appCheckToken) => {\n      const requestInfo = getResumableUploadStatus(this._ref.storage, this._ref._location, url, this._blob);\n      const statusRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\n      this._request = statusRequest;\n      statusRequest.getPromise().then(status => {\n        status = status;\n        this._request = undefined;\n        this._updateProgress(status.current);\n        this._needToFetchStatus = false;\n        if (status.finalized) {\n          this._needToFetchMetadata = true;\n        }\n        this.completeTransitions_();\n      }, this._errorHandler);\n    });\n  }\n  _continueUpload() {\n    const chunkSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier;\n    const status = new ResumableUploadStatus(this._transferred, this._blob.size());\n    // TODO(andysoto): assert(this.uploadUrl_ !== null);\n    const url = this._uploadUrl;\n    this._resolveToken((authToken, appCheckToken) => {\n      let requestInfo;\n      try {\n        requestInfo = continueResumableUpload(this._ref._location, this._ref.storage, url, this._blob, chunkSize, this._mappings, status, this._makeProgressCallback());\n      } catch (e) {\n        this._error = e;\n        this._transition(\"error\" /* InternalTaskState.ERROR */);\n        return;\n      }\n      const uploadRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken, /*retry=*/false // Upload requests should not be retried as each retry should be preceded by another query request. Which is handled in this file.\n      );\n\n      this._request = uploadRequest;\n      uploadRequest.getPromise().then(newStatus => {\n        this._increaseMultiplier();\n        this._request = undefined;\n        this._updateProgress(newStatus.current);\n        if (newStatus.finalized) {\n          this._metadata = newStatus.metadata;\n          this._transition(\"success\" /* InternalTaskState.SUCCESS */);\n        } else {\n          this.completeTransitions_();\n        }\n      }, this._errorHandler);\n    });\n  }\n  _increaseMultiplier() {\n    const currentSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier;\n    // Max chunk size is 32M.\n    if (currentSize * 2 < 32 * 1024 * 1024) {\n      this._chunkMultiplier *= 2;\n    }\n  }\n  _fetchMetadata() {\n    this._resolveToken((authToken, appCheckToken) => {\n      const requestInfo = getMetadata$2(this._ref.storage, this._ref._location, this._mappings);\n      const metadataRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\n      this._request = metadataRequest;\n      metadataRequest.getPromise().then(metadata => {\n        this._request = undefined;\n        this._metadata = metadata;\n        this._transition(\"success\" /* InternalTaskState.SUCCESS */);\n      }, this._metadataErrorHandler);\n    });\n  }\n  _oneShotUpload() {\n    this._resolveToken((authToken, appCheckToken) => {\n      const requestInfo = multipartUpload(this._ref.storage, this._ref._location, this._mappings, this._blob, this._metadata);\n      const multipartRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\n      this._request = multipartRequest;\n      multipartRequest.getPromise().then(metadata => {\n        this._request = undefined;\n        this._metadata = metadata;\n        this._updateProgress(this._blob.size());\n        this._transition(\"success\" /* InternalTaskState.SUCCESS */);\n      }, this._errorHandler);\n    });\n  }\n  _updateProgress(transferred) {\n    const old = this._transferred;\n    this._transferred = transferred;\n    // A progress update can make the \"transferred\" value smaller (e.g. a\n    // partial upload not completed by server, after which the \"transferred\"\n    // value may reset to the value at the beginning of the request).\n    if (this._transferred !== old) {\n      this._notifyObservers();\n    }\n  }\n  _transition(state) {\n    if (this._state === state) {\n      return;\n    }\n    switch (state) {\n      case \"canceling\" /* InternalTaskState.CANCELING */:\n      case \"pausing\" /* InternalTaskState.PAUSING */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.RUNNING ||\n        //        this.state_ === InternalTaskState.PAUSING);\n        this._state = state;\n        if (this._request !== undefined) {\n          this._request.cancel();\n        } else if (this.pendingTimeout) {\n          clearTimeout(this.pendingTimeout);\n          this.pendingTimeout = undefined;\n          this.completeTransitions_();\n        }\n        break;\n      case \"running\" /* InternalTaskState.RUNNING */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.PAUSED ||\n        //        this.state_ === InternalTaskState.PAUSING);\n        const wasPaused = this._state === \"paused\" /* InternalTaskState.PAUSED */;\n        this._state = state;\n        if (wasPaused) {\n          this._notifyObservers();\n          this._start();\n        }\n        break;\n      case \"paused\" /* InternalTaskState.PAUSED */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.PAUSING);\n        this._state = state;\n        this._notifyObservers();\n        break;\n      case \"canceled\" /* InternalTaskState.CANCELED */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.PAUSED ||\n        //        this.state_ === InternalTaskState.CANCELING);\n        this._error = canceled();\n        this._state = state;\n        this._notifyObservers();\n        break;\n      case \"error\" /* InternalTaskState.ERROR */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.RUNNING ||\n        //        this.state_ === InternalTaskState.PAUSING ||\n        //        this.state_ === InternalTaskState.CANCELING);\n        this._state = state;\n        this._notifyObservers();\n        break;\n      case \"success\" /* InternalTaskState.SUCCESS */:\n        // TODO(andysoto):\n        // assert(this.state_ === InternalTaskState.RUNNING ||\n        //        this.state_ === InternalTaskState.PAUSING ||\n        //        this.state_ === InternalTaskState.CANCELING);\n        this._state = state;\n        this._notifyObservers();\n        break;\n    }\n  }\n  completeTransitions_() {\n    switch (this._state) {\n      case \"pausing\" /* InternalTaskState.PAUSING */:\n        this._transition(\"paused\" /* InternalTaskState.PAUSED */);\n        break;\n      case \"canceling\" /* InternalTaskState.CANCELING */:\n        this._transition(\"canceled\" /* InternalTaskState.CANCELED */);\n        break;\n      case \"running\" /* InternalTaskState.RUNNING */:\n        this._start();\n        break;\n    }\n  }\n  /**\r\n   * A snapshot of the current task state.\r\n   */\n  get snapshot() {\n    const externalState = taskStateFromInternalTaskState(this._state);\n    return {\n      bytesTransferred: this._transferred,\n      totalBytes: this._blob.size(),\n      state: externalState,\n      metadata: this._metadata,\n      task: this,\n      ref: this._ref\n    };\n  }\n  /**\r\n   * Adds a callback for an event.\r\n   * @param type - The type of event to listen for.\r\n   * @param nextOrObserver -\r\n   *     The `next` function, which gets called for each item in\r\n   *     the event stream, or an observer object with some or all of these three\r\n   *     properties (`next`, `error`, `complete`).\r\n   * @param error - A function that gets called with a `StorageError`\r\n   *     if the event stream ends due to an error.\r\n   * @param completed - A function that gets called if the\r\n   *     event stream ends normally.\r\n   * @returns\r\n   *     If only the event argument is passed, returns a function you can use to\r\n   *     add callbacks (see the examples above). If more than just the event\r\n   *     argument is passed, returns a function you can call to unregister the\r\n   *     callbacks.\r\n   */\n  on(type, nextOrObserver, error, completed) {\n    // Note: `type` isn't being used. Its type is also incorrect. TaskEvent should not be a string.\n    const observer = new Observer(nextOrObserver || undefined, error || undefined, completed || undefined);\n    this._addObserver(observer);\n    return () => {\n      this._removeObserver(observer);\n    };\n  }\n  /**\r\n   * This object behaves like a Promise, and resolves with its snapshot data\r\n   * when the upload completes.\r\n   * @param onFulfilled - The fulfillment callback. Promise chaining works as normal.\r\n   * @param onRejected - The rejection callback.\r\n   */\n  then(onFulfilled, onRejected) {\n    // These casts are needed so that TypeScript can infer the types of the\n    // resulting Promise.\n    return this._promise.then(onFulfilled, onRejected);\n  }\n  /**\r\n   * Equivalent to calling `then(null, onRejected)`.\r\n   */\n  catch(onRejected) {\n    return this.then(null, onRejected);\n  }\n  /**\r\n   * Adds the given observer.\r\n   */\n  _addObserver(observer) {\n    this._observers.push(observer);\n    this._notifyObserver(observer);\n  }\n  /**\r\n   * Removes the given observer.\r\n   */\n  _removeObserver(observer) {\n    const i = this._observers.indexOf(observer);\n    if (i !== -1) {\n      this._observers.splice(i, 1);\n    }\n  }\n  _notifyObservers() {\n    this._finishPromise();\n    const observers = this._observers.slice();\n    observers.forEach(observer => {\n      this._notifyObserver(observer);\n    });\n  }\n  _finishPromise() {\n    if (this._resolve !== undefined) {\n      let triggered = true;\n      switch (taskStateFromInternalTaskState(this._state)) {\n        case TaskState.SUCCESS:\n          async(this._resolve.bind(null, this.snapshot))();\n          break;\n        case TaskState.CANCELED:\n        case TaskState.ERROR:\n          const toCall = this._reject;\n          async(toCall.bind(null, this._error))();\n          break;\n        default:\n          triggered = false;\n          break;\n      }\n      if (triggered) {\n        this._resolve = undefined;\n        this._reject = undefined;\n      }\n    }\n  }\n  _notifyObserver(observer) {\n    const externalState = taskStateFromInternalTaskState(this._state);\n    switch (externalState) {\n      case TaskState.RUNNING:\n      case TaskState.PAUSED:\n        if (observer.next) {\n          async(observer.next.bind(observer, this.snapshot))();\n        }\n        break;\n      case TaskState.SUCCESS:\n        if (observer.complete) {\n          async(observer.complete.bind(observer))();\n        }\n        break;\n      case TaskState.CANCELED:\n      case TaskState.ERROR:\n        if (observer.error) {\n          async(observer.error.bind(observer, this._error))();\n        }\n        break;\n      default:\n        // TODO(andysoto): assert(false);\n        if (observer.error) {\n          async(observer.error.bind(observer, this._error))();\n        }\n    }\n  }\n  /**\r\n   * Resumes a paused task. Has no effect on a currently running or failed task.\r\n   * @returns True if the operation took effect, false if ignored.\r\n   */\n  resume() {\n    const valid = this._state === \"paused\" /* InternalTaskState.PAUSED */ || this._state === \"pausing\" /* InternalTaskState.PAUSING */;\n    if (valid) {\n      this._transition(\"running\" /* InternalTaskState.RUNNING */);\n    }\n\n    return valid;\n  }\n  /**\r\n   * Pauses a currently running task. Has no effect on a paused or failed task.\r\n   * @returns True if the operation took effect, false if ignored.\r\n   */\n  pause() {\n    const valid = this._state === \"running\" /* InternalTaskState.RUNNING */;\n    if (valid) {\n      this._transition(\"pausing\" /* InternalTaskState.PAUSING */);\n    }\n\n    return valid;\n  }\n  /**\r\n   * Cancels a currently running or paused task. Has no effect on a complete or\r\n   * failed task.\r\n   * @returns True if the operation took effect, false if ignored.\r\n   */\n  cancel() {\n    const valid = this._state === \"running\" /* InternalTaskState.RUNNING */ || this._state === \"pausing\" /* InternalTaskState.PAUSING */;\n    if (valid) {\n      this._transition(\"canceling\" /* InternalTaskState.CANCELING */);\n    }\n\n    return valid;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provides methods to interact with a bucket in the Firebase Storage service.\r\n * @internal\r\n * @param _location - An fbs.location, or the URL at\r\n *     which to base this object, in one of the following forms:\r\n *         gs://<bucket>/<object-path>\r\n *         http[s]://firebasestorage.googleapis.com/\r\n *                     <api-version>/b/<bucket>/o/<object-path>\r\n *     Any query or fragment strings will be ignored in the http[s]\r\n *     format. If no value is passed, the storage object will use a URL based on\r\n *     the project ID of the base firebase.App instance.\r\n */\nclass Reference {\n  constructor(_service, location) {\n    this._service = _service;\n    if (location instanceof Location) {\n      this._location = location;\n    } else {\n      this._location = Location.makeFromUrl(location, _service.host);\n    }\n  }\n  /**\r\n   * Returns the URL for the bucket and path this object references,\r\n   *     in the form gs://<bucket>/<object-path>\r\n   * @override\r\n   */\n  toString() {\n    return 'gs://' + this._location.bucket + '/' + this._location.path;\n  }\n  _newRef(service, location) {\n    return new Reference(service, location);\n  }\n  /**\r\n   * A reference to the root of this object's bucket.\r\n   */\n  get root() {\n    const location = new Location(this._location.bucket, '');\n    return this._newRef(this._service, location);\n  }\n  /**\r\n   * The name of the bucket containing this reference's object.\r\n   */\n  get bucket() {\n    return this._location.bucket;\n  }\n  /**\r\n   * The full path of this object.\r\n   */\n  get fullPath() {\n    return this._location.path;\n  }\n  /**\r\n   * The short name of this object, which is the last component of the full path.\r\n   * For example, if fullPath is 'full/path/image.png', name is 'image.png'.\r\n   */\n  get name() {\n    return lastComponent(this._location.path);\n  }\n  /**\r\n   * The `StorageService` instance this `StorageReference` is associated with.\r\n   */\n  get storage() {\n    return this._service;\n  }\n  /**\r\n   * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if\r\n   * this reference is the root.\r\n   */\n  get parent() {\n    const newPath = parent(this._location.path);\n    if (newPath === null) {\n      return null;\n    }\n    const location = new Location(this._location.bucket, newPath);\n    return new Reference(this._service, location);\n  }\n  /**\r\n   * Utility function to throw an error in methods that do not accept a root reference.\r\n   */\n  _throwIfRoot(name) {\n    if (this._location.path === '') {\n      throw invalidRootOperation(name);\n    }\n  }\n}\n/**\r\n * Download the bytes at the object's location.\r\n * @returns A Promise containing the downloaded bytes.\r\n */\nfunction getBytesInternal(ref, maxDownloadSizeBytes) {\n  ref._throwIfRoot('getBytes');\n  const requestInfo = getBytes$1(ref.storage, ref._location, maxDownloadSizeBytes);\n  return ref.storage.makeRequestWithTokens(requestInfo, newBytesConnection).then(bytes => maxDownloadSizeBytes !== undefined ?\n  // GCS may not honor the Range header for small files\n  bytes.slice(0, maxDownloadSizeBytes) : bytes);\n}\n/**\r\n * Download the bytes at the object's location.\r\n * @returns A Promise containing the downloaded blob.\r\n */\nfunction getBlobInternal(ref, maxDownloadSizeBytes) {\n  ref._throwIfRoot('getBlob');\n  const requestInfo = getBytes$1(ref.storage, ref._location, maxDownloadSizeBytes);\n  return ref.storage.makeRequestWithTokens(requestInfo, newBlobConnection).then(blob => maxDownloadSizeBytes !== undefined ?\n  // GCS may not honor the Range header for small files\n  blob.slice(0, maxDownloadSizeBytes) : blob);\n}\n/**\r\n * Uploads data to this object's location.\r\n * The upload is not resumable.\r\n *\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the newly uploaded data.\r\n * @returns A Promise containing an UploadResult\r\n */\nfunction uploadBytes$1(ref, data, metadata) {\n  ref._throwIfRoot('uploadBytes');\n  const requestInfo = multipartUpload(ref.storage, ref._location, getMappings(), new FbsBlob(data, true), metadata);\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection).then(finalMetadata => {\n    return {\n      metadata: finalMetadata,\n      ref\n    };\n  });\n}\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the newly uploaded data.\r\n * @returns An UploadTask\r\n */\nfunction uploadBytesResumable$1(ref, data, metadata) {\n  ref._throwIfRoot('uploadBytesResumable');\n  return new UploadTask(ref, new FbsBlob(data), metadata);\n}\n/**\r\n * Uploads a string to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - StorageReference where string should be uploaded.\r\n * @param value - The string to upload.\r\n * @param format - The format of the string to upload.\r\n * @param metadata - Metadata for the newly uploaded string.\r\n * @returns A Promise containing an UploadResult\r\n */\nfunction uploadString$1(ref, value, format = StringFormat.RAW, metadata) {\n  ref._throwIfRoot('uploadString');\n  const data = dataFromString(format, value);\n  const metadataClone = Object.assign({}, metadata);\n  if (metadataClone['contentType'] == null && data.contentType != null) {\n    metadataClone['contentType'] = data.contentType;\n  }\n  return uploadBytes$1(ref, data.data, metadataClone);\n}\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: listAll may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - StorageReference to get list from.\r\n *\r\n * @returns A Promise that resolves with all the items and prefixes under\r\n *      the current storage reference. `prefixes` contains references to\r\n *      sub-directories and `items` contains references to objects in this\r\n *      folder. `nextPageToken` is never returned.\r\n */\nfunction listAll$1(ref) {\n  const accumulator = {\n    prefixes: [],\n    items: []\n  };\n  return listAllHelper(ref, accumulator).then(() => accumulator);\n}\n/**\r\n * Separated from listAll because async functions can't use \"arguments\".\r\n * @param ref\r\n * @param accumulator\r\n * @param pageToken\r\n */\nfunction listAllHelper(_x, _x2, _x3) {\n  return _listAllHelper.apply(this, arguments);\n}\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - StorageReference to get list from.\r\n * @param options - See ListOptions for details.\r\n * @returns A Promise that resolves with the items and prefixes.\r\n *      `prefixes` contains references to sub-folders and `items`\r\n *      contains references to objects in this folder. `nextPageToken`\r\n *      can be used to get the rest of the results.\r\n */\nfunction _listAllHelper() {\n  _listAllHelper = _asyncToGenerator(function* (ref, accumulator, pageToken) {\n    const opt = {\n      // maxResults is 1000 by default.\n      pageToken\n    };\n    const nextPage = yield list$1(ref, opt);\n    accumulator.prefixes.push(...nextPage.prefixes);\n    accumulator.items.push(...nextPage.items);\n    if (nextPage.nextPageToken != null) {\n      yield listAllHelper(ref, accumulator, nextPage.nextPageToken);\n    }\n  });\n  return _listAllHelper.apply(this, arguments);\n}\nfunction list$1(ref, options) {\n  if (options != null) {\n    if (typeof options.maxResults === 'number') {\n      validateNumber('options.maxResults', /* minValue= */1, /* maxValue= */1000, options.maxResults);\n    }\n  }\n  const op = options || {};\n  const requestInfo = list$2(ref.storage, ref._location, /*delimiter= */'/', op.pageToken, op.maxResults);\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\n}\n/**\r\n * A `Promise` that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - StorageReference to get metadata from.\r\n */\nfunction getMetadata$1(ref) {\n  ref._throwIfRoot('getMetadata');\n  const requestInfo = getMetadata$2(ref.storage, ref._location, getMappings());\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\n}\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - StorageReference to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n *     Only values that have been explicitly set will be changed. Explicitly\r\n *     setting a value to null will remove the metadata.\r\n * @returns A `Promise` that resolves\r\n *     with the new metadata for this object.\r\n *     See `firebaseStorage.Reference.prototype.getMetadata`\r\n */\nfunction updateMetadata$1(ref, metadata) {\n  ref._throwIfRoot('updateMetadata');\n  const requestInfo = updateMetadata$2(ref.storage, ref._location, metadata, getMappings());\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\n}\n/**\r\n * Returns the download URL for the given Reference.\r\n * @public\r\n * @returns A `Promise` that resolves with the download\r\n *     URL for this object.\r\n */\nfunction getDownloadURL$1(ref) {\n  ref._throwIfRoot('getDownloadURL');\n  const requestInfo = getDownloadUrl(ref.storage, ref._location, getMappings());\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection).then(url => {\n    if (url === null) {\n      throw noDownloadURL();\n    }\n    return url;\n  });\n}\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - StorageReference for object to delete.\r\n * @returns A `Promise` that resolves if the deletion succeeds.\r\n */\nfunction deleteObject$1(ref) {\n  ref._throwIfRoot('deleteObject');\n  const requestInfo = deleteObject$2(ref.storage, ref._location);\n  return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\n}\n/**\r\n * Returns reference for object obtained by appending `childPath` to `ref`.\r\n *\r\n * @param ref - StorageReference to get child of.\r\n * @param childPath - Child path from provided ref.\r\n * @returns A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n *\r\n */\nfunction _getChild$1(ref, childPath) {\n  const newPath = child(ref._location.path, childPath);\n  const location = new Location(ref._location.bucket, newPath);\n  return new Reference(ref.storage, location);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isUrl(path) {\n  return /^[A-Za-z]+:\\/\\//.test(path);\n}\n/**\r\n * Returns a firebaseStorage.Reference for the given url.\r\n */\nfunction refFromURL(service, url) {\n  return new Reference(service, url);\n}\n/**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\nfunction refFromPath(ref, path) {\n  if (ref instanceof FirebaseStorageImpl) {\n    const service = ref;\n    if (service._bucket == null) {\n      throw noDefaultBucket();\n    }\n    const reference = new Reference(service, service._bucket);\n    if (path != null) {\n      return refFromPath(reference, path);\n    } else {\n      return reference;\n    }\n  } else {\n    // ref is a Reference\n    if (path !== undefined) {\n      return _getChild$1(ref, path);\n    } else {\n      return ref;\n    }\n  }\n}\nfunction ref$1(serviceOrRef, pathOrUrl) {\n  if (pathOrUrl && isUrl(pathOrUrl)) {\n    if (serviceOrRef instanceof FirebaseStorageImpl) {\n      return refFromURL(serviceOrRef, pathOrUrl);\n    } else {\n      throw invalidArgument('To use ref(service, url), the first argument must be a Storage instance.');\n    }\n  } else {\n    return refFromPath(serviceOrRef, pathOrUrl);\n  }\n}\nfunction extractBucket(host, config) {\n  const bucketString = config === null || config === void 0 ? void 0 : config[CONFIG_STORAGE_BUCKET_KEY];\n  if (bucketString == null) {\n    return null;\n  }\n  return Location.makeFromBucketSpec(bucketString, host);\n}\nfunction connectStorageEmulator$1(storage, host, port, options = {}) {\n  storage.host = `${host}:${port}`;\n  storage._protocol = 'http';\n  const {\n    mockUserToken\n  } = options;\n  if (mockUserToken) {\n    storage._overrideAuthToken = typeof mockUserToken === 'string' ? mockUserToken : createMockUserToken(mockUserToken, storage.app.options.projectId);\n  }\n}\n/**\r\n * A service that provides Firebase Storage Reference instances.\r\n * @param opt_url - gs:// url to a custom Storage Bucket\r\n *\r\n * @internal\r\n */\nclass FirebaseStorageImpl {\n  constructor(\n  /**\r\n   * FirebaseApp associated with this StorageService instance.\r\n   */\n  app, _authProvider,\n  /**\r\n   * @internal\r\n   */\n  _appCheckProvider,\n  /**\r\n   * @internal\r\n   */\n  _url, _firebaseVersion) {\n    this.app = app;\n    this._authProvider = _authProvider;\n    this._appCheckProvider = _appCheckProvider;\n    this._url = _url;\n    this._firebaseVersion = _firebaseVersion;\n    this._bucket = null;\n    /**\r\n     * This string can be in the formats:\r\n     * - host\r\n     * - host:port\r\n     */\n    this._host = DEFAULT_HOST;\n    this._protocol = 'https';\n    this._appId = null;\n    this._deleted = false;\n    this._maxOperationRetryTime = DEFAULT_MAX_OPERATION_RETRY_TIME;\n    this._maxUploadRetryTime = DEFAULT_MAX_UPLOAD_RETRY_TIME;\n    this._requests = new Set();\n    if (_url != null) {\n      this._bucket = Location.makeFromBucketSpec(_url, this._host);\n    } else {\n      this._bucket = extractBucket(this._host, this.app.options);\n    }\n  }\n  /**\r\n   * The host string for this service, in the form of `host` or\r\n   * `host:port`.\r\n   */\n  get host() {\n    return this._host;\n  }\n  set host(host) {\n    this._host = host;\n    if (this._url != null) {\n      this._bucket = Location.makeFromBucketSpec(this._url, host);\n    } else {\n      this._bucket = extractBucket(host, this.app.options);\n    }\n  }\n  /**\r\n   * The maximum time to retry uploads in milliseconds.\r\n   */\n  get maxUploadRetryTime() {\n    return this._maxUploadRetryTime;\n  }\n  set maxUploadRetryTime(time) {\n    validateNumber('time', /* minValue=*/0, /* maxValue= */Number.POSITIVE_INFINITY, time);\n    this._maxUploadRetryTime = time;\n  }\n  /**\r\n   * The maximum time to retry operations other than uploads or downloads in\r\n   * milliseconds.\r\n   */\n  get maxOperationRetryTime() {\n    return this._maxOperationRetryTime;\n  }\n  set maxOperationRetryTime(time) {\n    validateNumber('time', /* minValue=*/0, /* maxValue= */Number.POSITIVE_INFINITY, time);\n    this._maxOperationRetryTime = time;\n  }\n  _getAuthToken() {\n    var _this = this;\n    return _asyncToGenerator(function* () {\n      if (_this._overrideAuthToken) {\n        return _this._overrideAuthToken;\n      }\n      const auth = _this._authProvider.getImmediate({\n        optional: true\n      });\n      if (auth) {\n        const tokenData = yield auth.getToken();\n        if (tokenData !== null) {\n          return tokenData.accessToken;\n        }\n      }\n      return null;\n    })();\n  }\n  _getAppCheckToken() {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      const appCheck = _this2._appCheckProvider.getImmediate({\n        optional: true\n      });\n      if (appCheck) {\n        const result = yield appCheck.getToken();\n        // TODO: What do we want to do if there is an error getting the token?\n        // Context: appCheck.getToken() will never throw even if an error happened. In the error case, a dummy token will be\n        // returned along with an error field describing the error. In general, we shouldn't care about the error condition and just use\n        // the token (actual or dummy) to send requests.\n        return result.token;\n      }\n      return null;\n    })();\n  }\n  /**\r\n   * Stop running requests and prevent more from being created.\r\n   */\n  _delete() {\n    if (!this._deleted) {\n      this._deleted = true;\n      this._requests.forEach(request => request.cancel());\n      this._requests.clear();\n    }\n    return Promise.resolve();\n  }\n  /**\r\n   * Returns a new firebaseStorage.Reference object referencing this StorageService\r\n   * at the given Location.\r\n   */\n  _makeStorageReference(loc) {\n    return new Reference(this, loc);\n  }\n  /**\r\n   * @param requestInfo - HTTP RequestInfo object\r\n   * @param authToken - Firebase auth token\r\n   */\n  _makeRequest(requestInfo, requestFactory, authToken, appCheckToken, retry = true) {\n    if (!this._deleted) {\n      const request = makeRequest(requestInfo, this._appId, authToken, appCheckToken, requestFactory, this._firebaseVersion, retry);\n      this._requests.add(request);\n      // Request removes itself from set when complete.\n      request.getPromise().then(() => this._requests.delete(request), () => this._requests.delete(request));\n      return request;\n    } else {\n      return new FailRequest(appDeleted());\n    }\n  }\n  makeRequestWithTokens(requestInfo, requestFactory) {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      const [authToken, appCheckToken] = yield Promise.all([_this3._getAuthToken(), _this3._getAppCheckToken()]);\n      return _this3._makeRequest(requestInfo, requestFactory, authToken, appCheckToken).getPromise();\n    })();\n  }\n}\nconst name = \"@firebase/storage\";\nconst version = \"0.11.2\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Type constant for Firebase Storage.\r\n */\nconst STORAGE_TYPE = 'storage';\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Downloads the data at the object's location. Returns an error if the object\r\n * is not found.\r\n *\r\n * To use this functionality, you have to whitelist your app's origin in your\r\n * Cloud Storage bucket. See also\r\n * https://cloud.google.com/storage/docs/configuring-cors\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A Promise containing the object's bytes\r\n */\nfunction getBytes(ref, maxDownloadSizeBytes) {\n  ref = getModularInstance(ref);\n  return getBytesInternal(ref, maxDownloadSizeBytes);\n}\n/**\r\n * Uploads data to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - {@link StorageReference} where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the data to upload.\r\n * @returns A Promise containing an UploadResult\r\n */\nfunction uploadBytes(ref, data, metadata) {\n  ref = getModularInstance(ref);\n  return uploadBytes$1(ref, data, metadata);\n}\n/**\r\n * Uploads a string to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - {@link StorageReference} where string should be uploaded.\r\n * @param value - The string to upload.\r\n * @param format - The format of the string to upload.\r\n * @param metadata - Metadata for the string to upload.\r\n * @returns A Promise containing an UploadResult\r\n */\nfunction uploadString(ref, value, format, metadata) {\n  ref = getModularInstance(ref);\n  return uploadString$1(ref, value, format, metadata);\n}\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - {@link StorageReference} where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the data to upload.\r\n * @returns An UploadTask\r\n */\nfunction uploadBytesResumable(ref, data, metadata) {\n  ref = getModularInstance(ref);\n  return uploadBytesResumable$1(ref, data, metadata);\n}\n/**\r\n * A `Promise` that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - {@link StorageReference} to get metadata from.\r\n */\nfunction getMetadata(ref) {\n  ref = getModularInstance(ref);\n  return getMetadata$1(ref);\n}\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - {@link StorageReference} to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n *     Only values that have been explicitly set will be changed. Explicitly\r\n *     setting a value to null will remove the metadata.\r\n * @returns A `Promise` that resolves with the new metadata for this object.\r\n */\nfunction updateMetadata(ref, metadata) {\n  ref = getModularInstance(ref);\n  return updateMetadata$1(ref, metadata);\n}\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - {@link StorageReference} to get list from.\r\n * @param options - See {@link ListOptions} for details.\r\n * @returns A `Promise` that resolves with the items and prefixes.\r\n *      `prefixes` contains references to sub-folders and `items`\r\n *      contains references to objects in this folder. `nextPageToken`\r\n *      can be used to get the rest of the results.\r\n */\nfunction list(ref, options) {\n  ref = getModularInstance(ref);\n  return list$1(ref, options);\n}\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: `listAll` may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - {@link StorageReference} to get list from.\r\n *\r\n * @returns A `Promise` that resolves with all the items and prefixes under\r\n *      the current storage reference. `prefixes` contains references to\r\n *      sub-directories and `items` contains references to objects in this\r\n *      folder. `nextPageToken` is never returned.\r\n */\nfunction listAll(ref) {\n  ref = getModularInstance(ref);\n  return listAll$1(ref);\n}\n/**\r\n * Returns the download URL for the given {@link StorageReference}.\r\n * @public\r\n * @param ref - {@link StorageReference} to get the download URL for.\r\n * @returns A `Promise` that resolves with the download\r\n *     URL for this object.\r\n */\nfunction getDownloadURL(ref) {\n  ref = getModularInstance(ref);\n  return getDownloadURL$1(ref);\n}\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - {@link StorageReference} for object to delete.\r\n * @returns A `Promise` that resolves if the deletion succeeds.\r\n */\nfunction deleteObject(ref) {\n  ref = getModularInstance(ref);\n  return deleteObject$1(ref);\n}\nfunction ref(serviceOrRef, pathOrUrl) {\n  serviceOrRef = getModularInstance(serviceOrRef);\n  return ref$1(serviceOrRef, pathOrUrl);\n}\n/**\r\n * @internal\r\n */\nfunction _getChild(ref, childPath) {\n  return _getChild$1(ref, childPath);\n}\n/**\r\n * Gets a {@link FirebaseStorage} instance for the given Firebase app.\r\n * @public\r\n * @param app - Firebase app to get {@link FirebaseStorage} instance for.\r\n * @param bucketUrl - The gs:// url to your Firebase Storage Bucket.\r\n * If not passed, uses the app's default Storage Bucket.\r\n * @returns A {@link FirebaseStorage} instance.\r\n */\nfunction getStorage(app = getApp(), bucketUrl) {\n  app = getModularInstance(app);\n  const storageProvider = _getProvider(app, STORAGE_TYPE);\n  const storageInstance = storageProvider.getImmediate({\n    identifier: bucketUrl\n  });\n  const emulator = getDefaultEmulatorHostnameAndPort('storage');\n  if (emulator) {\n    connectStorageEmulator(storageInstance, ...emulator);\n  }\n  return storageInstance;\n}\n/**\r\n * Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.\r\n *\r\n * @param storage - The {@link FirebaseStorage} instance\r\n * @param host - The emulator host (ex: localhost)\r\n * @param port - The emulator port (ex: 5001)\r\n * @param options - Emulator options. `options.mockUserToken` is the mock auth\r\n * token to use for unit testing Security Rules.\r\n * @public\r\n */\nfunction connectStorageEmulator(storage, host, port, options = {}) {\n  connectStorageEmulator$1(storage, host, port, options);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Downloads the data at the object's location. Returns an error if the object\r\n * is not found.\r\n *\r\n * To use this functionality, you have to whitelist your app's origin in your\r\n * Cloud Storage bucket. See also\r\n * https://cloud.google.com/storage/docs/configuring-cors\r\n *\r\n * This API is not available in Node.\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A Promise that resolves with a Blob containing the object's bytes\r\n */\nfunction getBlob(ref, maxDownloadSizeBytes) {\n  ref = getModularInstance(ref);\n  return getBlobInternal(ref, maxDownloadSizeBytes);\n}\n/**\r\n * Downloads the data at the object's location. Raises an error event if the\r\n * object is not found.\r\n *\r\n * This API is only available in Node.\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A stream with the object's data as bytes\r\n */\nfunction getStream(ref, maxDownloadSizeBytes) {\n  throw new Error('getStream() is only supported by NodeJS builds');\n}\n\n/**\r\n * Cloud Storage for Firebase\r\n *\r\n * @packageDocumentation\r\n */\nfunction factory(container, {\n  instanceIdentifier: url\n}) {\n  const app = container.getProvider('app').getImmediate();\n  const authProvider = container.getProvider('auth-internal');\n  const appCheckProvider = container.getProvider('app-check-internal');\n  return new FirebaseStorageImpl(app, authProvider, appCheckProvider, url, SDK_VERSION);\n}\nfunction registerStorage() {\n  _registerComponent(new Component(STORAGE_TYPE, factory, \"PUBLIC\" /* ComponentType.PUBLIC */).setMultipleInstances(true));\n  //RUNTIME_ENV will be replaced during the compilation to \"node\" for nodejs and an empty string for browser\n  registerVersion(name, version, '');\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name, version, 'esm2017');\n}\nregisterStorage();\nexport { StorageError, StorageErrorCode, StringFormat, FbsBlob as _FbsBlob, Location as _Location, TaskEvent as _TaskEvent, TaskState as _TaskState, UploadTask as _UploadTask, dataFromString as _dataFromString, _getChild, invalidArgument as _invalidArgument, invalidRootOperation as _invalidRootOperation, connectStorageEmulator, deleteObject, getBlob, getBytes, getDownloadURL, getMetadata, getStorage, getStream, list, listAll, ref, updateMetadata, uploadBytes, uploadBytesResumable, uploadString };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/359c52d99005554be4e0b2173bc3b2b15b2c2567fa6eede35bb8ad7abcd1b9ce.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/359c52d99005554be4e0b2173bc3b2b15b2c2567fa6eede35bb8ad7abcd1b9ce.json
deleted file mode 100644
index 17ae70380634e95986909043c67d971418c97690..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/359c52d99005554be4e0b2173bc3b2b15b2c2567fa6eede35bb8ad7abcd1b9ce.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { EMPTY } from './empty';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { popResultSelector } from '../util/args';\nexport function zip(...args) {\n  const resultSelector = popResultSelector(args);\n  const sources = argsOrArgArray(args);\n  return sources.length ? new Observable(subscriber => {\n    let buffers = sources.map(() => []);\n    let completed = sources.map(() => false);\n    subscriber.add(() => {\n      buffers = completed = null;\n    });\n    for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {\n      innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, value => {\n        buffers[sourceIndex].push(value);\n        if (buffers.every(buffer => buffer.length)) {\n          const result = buffers.map(buffer => buffer.shift());\n          subscriber.next(resultSelector ? resultSelector(...result) : result);\n          if (buffers.some((buffer, i) => !buffer.length && completed[i])) {\n            subscriber.complete();\n          }\n        }\n      }, () => {\n        completed[sourceIndex] = true;\n        !buffers[sourceIndex].length && subscriber.complete();\n      }));\n    }\n    return () => {\n      buffers = completed = null;\n    };\n  }) : EMPTY;\n}\n//# sourceMappingURL=zip.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/36011fae738c919ab110121d6c66c9cad217e5d73555efac5212f003c6268675.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/36011fae738c919ab110121d6c66c9cad217e5d73555efac5212f003c6268675.json
deleted file mode 100644
index 46aafbe2cdc9b81bfeb4457a4399e4e107271fd1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/36011fae738c919ab110121d6c66c9cad217e5d73555efac5212f003c6268675.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/387121795a116b8972710a1429f47962a6f20ec59136889bdcbfbe29cf3d000d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/387121795a116b8972710a1429f47962a6f20ec59136889bdcbfbe29cf3d000d.json
deleted file mode 100644
index 24d9f0599c4ef113268d92ede38b166fe561cf17..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/387121795a116b8972710a1429f47962a6f20ec59136889bdcbfbe29cf3d000d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n  const resultSelector = popResultSelector(args);\n  const {\n    args: sources,\n    keys\n  } = argsArgArrayOrObject(args);\n  const result = new Observable(subscriber => {\n    const {\n      length\n    } = sources;\n    if (!length) {\n      subscriber.complete();\n      return;\n    }\n    const values = new Array(length);\n    let remainingCompletions = length;\n    let remainingEmissions = length;\n    for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n      let hasValue = false;\n      innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, value => {\n        if (!hasValue) {\n          hasValue = true;\n          remainingEmissions--;\n        }\n        values[sourceIndex] = value;\n      }, () => remainingCompletions--, undefined, () => {\n        if (!remainingCompletions || !hasValue) {\n          if (!remainingEmissions) {\n            subscriber.next(keys ? createObject(keys, values) : values);\n          }\n          subscriber.complete();\n        }\n      }));\n    }\n  });\n  return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n//# sourceMappingURL=forkJoin.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3887e8401890f511a783c561d38e68edde9f9e9bd6e5ceb7e877952f3e627054.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3887e8401890f511a783c561d38e68edde9f9e9bd6e5ceb7e877952f3e627054.json
deleted file mode 100644
index e421922429f80b9a80c2316ad68f60b52ffe9651..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3887e8401890f511a783c561d38e68edde9f9e9bd6e5ceb7e877952f3e627054.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...values) {\n  return source => concat(source, of(...values));\n}\n//# sourceMappingURL=endWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/389a675607d27eef42ac5792f563d3e5daca2add7438506967309baf298d7054.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/389a675607d27eef42ac5792f563d3e5daca2add7438506967309baf298d7054.json
deleted file mode 100644
index 78a14460ccfad610ddd7010268aebf3ea96a82ae..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/389a675607d27eef42ac5792f563d3e5daca2add7438506967309baf298d7054.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n  return operate((source, subscriber) => {\n    let taking = false;\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)));\n  });\n}\n//# sourceMappingURL=skipWhile.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/38c6470b77180b24911d05f1934ecfd68f7fe9f42e9bfbacd23e624e57a8c5b6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/38c6470b77180b24911d05f1934ecfd68f7fe9f42e9bfbacd23e624e57a8c5b6.json
deleted file mode 100644
index 875000b31f28a5b0521ec0f057872f4b9bef96e2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/38c6470b77180b24911d05f1934ecfd68f7fe9f42e9bfbacd23e624e57a8c5b6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3a8b0a2a8f75fd701c1d61a72eb3df11deaba30895dc07541336a4c3fb08fb95.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3a8b0a2a8f75fd701c1d61a72eb3df11deaba30895dc07541336a4c3fb08fb95.json
deleted file mode 100644
index 0434c877506cd9621111ecbabf8419db8b812e6d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3a8b0a2a8f75fd701c1d61a72eb3df11deaba30895dc07541336a4c3fb08fb95.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n  return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3c170e57dc875a3274896b40ffe0acc2d0e42bd6db128750aab067ccc3560463.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3c170e57dc875a3274896b40ffe0acc2d0e42bd6db128750aab067ccc3560463.json
deleted file mode 100644
index 514905d139031b10ae4582c875b65674816d9ae4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3c170e57dc875a3274896b40ffe0acc2d0e42bd6db128750aab067ccc3560463.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function max(comparer) {\n  return reduce(isFunction(comparer) ? (x, y) => comparer(x, y) > 0 ? x : y : (x, y) => x > y ? x : y);\n}\n//# sourceMappingURL=max.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/3f33865e89ccf4a4d27fc46afa18872c49e3e8f07f332ed31aa158ee325fb69e.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/3f33865e89ccf4a4d27fc46afa18872c49e3e8f07f332ed31aa158ee325fb69e.json
deleted file mode 100644
index bf34f45b74eb742a7b2d96b3d05e5467cba08551..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/3f33865e89ccf4a4d27fc46afa18872c49e3e8f07f332ed31aa158ee325fb69e.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function skipUntil(notifier) {\n  return operate((source, subscriber) => {\n    let taking = false;\n    const skipSubscriber = createOperatorSubscriber(subscriber, () => {\n      skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();\n      taking = true;\n    }, noop);\n    innerFrom(notifier).subscribe(skipSubscriber);\n    source.subscribe(createOperatorSubscriber(subscriber, value => taking && subscriber.next(value)));\n  });\n}\n//# sourceMappingURL=skipUntil.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4041c68b797d16bc26c5daeb14acaa9834bbdecaa896aebc386e5e65f9e0ae11.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4041c68b797d16bc26c5daeb14acaa9834bbdecaa896aebc386e5e65f9e0ae11.json
deleted file mode 100644
index 8d225da30ddcc87bb8d8af2287a9d891b5da08d1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4041c68b797d16bc26c5daeb14acaa9834bbdecaa896aebc386e5e65f9e0ae11.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from '../util/EmptyError';\nimport { SequenceError } from '../util/SequenceError';\nimport { NotFoundError } from '../util/NotFoundError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function single(predicate) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    let singleValue;\n    let seenValue = false;\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      seenValue = true;\n      if (!predicate || predicate(value, index++, source)) {\n        hasValue && subscriber.error(new SequenceError('Too many matching values'));\n        hasValue = true;\n        singleValue = value;\n      }\n    }, () => {\n      if (hasValue) {\n        subscriber.next(singleValue);\n        subscriber.complete();\n      } else {\n        subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError());\n      }\n    }));\n  });\n}\n//# sourceMappingURL=single.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4095a3a6fba7a9a4de831d08043283ce729413297c867e4a9d9874bfb206fc00.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4095a3a6fba7a9a4de831d08043283ce729413297c867e4a9d9874bfb206fc00.json
deleted file mode 100644
index 82114001ecb605eb6f5fb13c9b478669a3650bc7..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4095a3a6fba7a9a4de831d08043283ce729413297c867e4a9d9874bfb206fc00.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n  const tapObserver = isFunction(observerOrNext) || error || complete ? {\n    next: observerOrNext,\n    error,\n    complete\n  } : observerOrNext;\n  return tapObserver ? operate((source, subscriber) => {\n    var _a;\n    (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n    let isUnsub = true;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      var _a;\n      (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n      subscriber.next(value);\n    }, () => {\n      var _a;\n      isUnsub = false;\n      (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n      subscriber.complete();\n    }, err => {\n      var _a;\n      isUnsub = false;\n      (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n      subscriber.error(err);\n    }, () => {\n      var _a, _b;\n      if (isUnsub) {\n        (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n      }\n      (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n    }));\n  }) : identity;\n}\n//# sourceMappingURL=tap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4150b0a950cb395301bf1729d45ad05bebdb5058273f26676eed60805a3ab7e4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4150b0a950cb395301bf1729d45ad05bebdb5058273f26676eed60805a3ab7e4.json
deleted file mode 100644
index 2f6c43b71d692b8855f44a3fd662f16c1e1f71fd..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4150b0a950cb395301bf1729d45ad05bebdb5058273f26676eed60805a3ab7e4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/auth';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/416ac0ab98044f8f035e271f75f140720dddbd7c4390e2a2b18e7c2965e917f3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/416ac0ab98044f8f035e271f75f140720dddbd7c4390e2a2b18e7c2965e917f3.json
deleted file mode 100644
index 1a4a54454a934e98e042c78f3678572c08d44a6c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/416ac0ab98044f8f035e271f75f140720dddbd7c4390e2a2b18e7c2965e917f3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { ErrorFactory, deepEqual, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, getUA, isIE, createSubscribe, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';\nimport { SDK_VERSION, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { __rest } from 'tslib';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An enum of factors that may be used for multifactor authentication.\r\n *\r\n * @public\r\n */\nconst FactorId = {\n  /** Phone as second factor */\n  PHONE: 'phone'\n};\n/**\r\n * Enumeration of supported providers.\r\n *\r\n * @public\r\n */\nconst ProviderId = {\n  /** Facebook provider ID */\n  FACEBOOK: 'facebook.com',\n  /** GitHub provider ID */\n  GITHUB: 'github.com',\n  /** Google provider ID */\n  GOOGLE: 'google.com',\n  /** Password provider */\n  PASSWORD: 'password',\n  /** Phone provider */\n  PHONE: 'phone',\n  /** Twitter provider ID */\n  TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported sign-in methods.\r\n *\r\n * @public\r\n */\nconst SignInMethod = {\n  /** Email link sign in method */\n  EMAIL_LINK: 'emailLink',\n  /** Email/password sign in method */\n  EMAIL_PASSWORD: 'password',\n  /** Facebook sign in method */\n  FACEBOOK: 'facebook.com',\n  /** GitHub sign in method */\n  GITHUB: 'github.com',\n  /** Google sign in method */\n  GOOGLE: 'google.com',\n  /** Phone sign in method */\n  PHONE: 'phone',\n  /** Twitter sign in method */\n  TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported operation types.\r\n *\r\n * @public\r\n */\nconst OperationType = {\n  /** Operation involving linking an additional provider to an already signed-in user. */\n  LINK: 'link',\n  /** Operation involving using a provider to reauthenticate an already signed-in user. */\n  REAUTHENTICATE: 'reauthenticate',\n  /** Operation involving signing in a user. */\n  SIGN_IN: 'signIn'\n};\n/**\r\n * An enumeration of the possible email action types.\r\n *\r\n * @public\r\n */\nconst ActionCodeOperation = {\n  /** The email link sign-in action. */\n  EMAIL_SIGNIN: 'EMAIL_SIGNIN',\n  /** The password reset action. */\n  PASSWORD_RESET: 'PASSWORD_RESET',\n  /** The email revocation action. */\n  RECOVER_EMAIL: 'RECOVER_EMAIL',\n  /** The revert second factor addition email action. */\n  REVERT_SECOND_FACTOR_ADDITION: 'REVERT_SECOND_FACTOR_ADDITION',\n  /** The revert second factor addition email action. */\n  VERIFY_AND_CHANGE_EMAIL: 'VERIFY_AND_CHANGE_EMAIL',\n  /** The email verification action. */\n  VERIFY_EMAIL: 'VERIFY_EMAIL'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _debugErrorMap() {\n  return {\n    [\"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */]: 'This operation is restricted to administrators only.',\n    [\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */]: '',\n    [\"app-not-authorized\" /* AuthErrorCode.APP_NOT_AUTHORIZED */]: \"This app, identified by the domain where it's hosted, is not \" + 'authorized to use Firebase Authentication with the provided API key. ' + 'Review your key configuration in the Google API console.',\n    [\"app-not-installed\" /* AuthErrorCode.APP_NOT_INSTALLED */]: 'The requested mobile application corresponding to the identifier (' + 'Android package name or iOS bundle ID) provided is not installed on ' + 'this device.',\n    [\"captcha-check-failed\" /* AuthErrorCode.CAPTCHA_CHECK_FAILED */]: 'The reCAPTCHA response token provided is either invalid, expired, ' + 'already used or the domain associated with it does not match the list ' + 'of whitelisted domains.',\n    [\"code-expired\" /* AuthErrorCode.CODE_EXPIRED */]: 'The SMS code has expired. Please re-send the verification code to try ' + 'again.',\n    [\"cordova-not-ready\" /* AuthErrorCode.CORDOVA_NOT_READY */]: 'Cordova framework is not ready.',\n    [\"cors-unsupported\" /* AuthErrorCode.CORS_UNSUPPORTED */]: 'This browser is not supported.',\n    [\"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */]: 'This credential is already associated with a different user account.',\n    [\"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */]: 'The custom token corresponds to a different audience.',\n    [\"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: 'This operation is sensitive and requires recent authentication. Log in ' + 'again before retrying this request.',\n    [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.',\n    [\"dynamic-link-not-activated\" /* AuthErrorCode.DYNAMIC_LINK_NOT_ACTIVATED */]: 'Please activate Dynamic Links in the Firebase Console and agree to the terms and ' + 'conditions.',\n    [\"email-change-needs-verification\" /* AuthErrorCode.EMAIL_CHANGE_NEEDS_VERIFICATION */]: 'Multi-factor users must always have a verified email.',\n    [\"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */]: 'The email address is already in use by another account.',\n    [\"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */]: 'Auth instance has already been used to make a network call. Auth can ' + 'no longer be configured to use the emulator. Try calling ' + '\"connectAuthEmulator()\" sooner.',\n    [\"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */]: 'The action code has expired.',\n    [\"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */]: 'This operation has been cancelled due to another conflicting popup being opened.',\n    [\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */]: 'An internal AuthError has occurred.',\n    [\"invalid-app-credential\" /* AuthErrorCode.INVALID_APP_CREDENTIAL */]: 'The phone verification request contains an invalid application verifier.' + ' The reCAPTCHA token response is either invalid or expired.',\n    [\"invalid-app-id\" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registed for the current project.',\n    [\"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */]: \"This user's credential isn't valid for this project. This can happen \" + \"if the user's token has been tampered with, or if the user isn't for \" + 'the project associated with this API key.',\n    [\"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n    [\"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */]: 'The SMS verification code used to create the phone auth credential is ' + 'invalid. Please resend the verification code sms and be sure to use the ' + 'verification code provided by the user.',\n    [\"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */]: 'The continue URL provided in the request is invalid.',\n    [\"invalid-cordova-configuration\" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */]: 'The following Cordova plugins must be installed to enable OAuth sign-in: ' + 'cordova-plugin-buildinfo, cordova-universal-links-plugin, ' + 'cordova-plugin-browsertab, cordova-plugin-inappbrowser and ' + 'cordova-plugin-customurlscheme.',\n    [\"invalid-custom-token\" /* AuthErrorCode.INVALID_CUSTOM_TOKEN */]: 'The custom token format is incorrect. Please check the documentation.',\n    [\"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */]: 'The provided dynamic link domain is not configured or authorized for the current project.',\n    [\"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */]: 'The email address is badly formatted.',\n    [\"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */]: 'Emulator URL must start with a valid scheme (http:// or https://).',\n    [\"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */]: 'Your API key is invalid, please check you have copied it correctly.',\n    [\"invalid-cert-hash\" /* AuthErrorCode.INVALID_CERT_HASH */]: 'The SHA-1 certificate hash provided is invalid.',\n    [\"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */]: 'The supplied auth credential is malformed or has expired.',\n    [\"invalid-message-payload\" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */]: 'The email template corresponding to this action contains invalid characters in its message. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n    [\"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */]: 'The request does not contain a valid proof of first factor successful sign-in.',\n    [\"invalid-oauth-provider\" /* AuthErrorCode.INVALID_OAUTH_PROVIDER */]: 'EmailAuthProvider is not supported for this operation. This operation ' + 'only supports OAuth providers.',\n    [\"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */]: 'The OAuth client ID provided is either invalid or does not match the ' + 'specified API key.',\n    [\"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */]: 'This domain is not authorized for OAuth operations for your Firebase ' + 'project. Edit the list of authorized domains from the Firebase console.',\n    [\"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */]: 'The action code is invalid. This can happen if the code is malformed, ' + 'expired, or has already been used.',\n    [\"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */]: 'The password is invalid or the user does not have a password.',\n    [\"invalid-persistence-type\" /* AuthErrorCode.INVALID_PERSISTENCE */]: 'The specified persistence type is invalid. It can only be local, session or none.',\n    [\"invalid-phone-number\" /* AuthErrorCode.INVALID_PHONE_NUMBER */]: 'The format of the phone number provided is incorrect. Please enter the ' + 'phone number in a format that can be parsed into E.164 format. E.164 ' + 'phone numbers are written in the format [+][country code][subscriber ' + 'number including area code].',\n    [\"invalid-provider-id\" /* AuthErrorCode.INVALID_PROVIDER_ID */]: 'The specified provider ID is invalid.',\n    [\"invalid-recipient-email\" /* AuthErrorCode.INVALID_RECIPIENT_EMAIL */]: 'The email corresponding to this action failed to send as the provided ' + 'recipient email address is invalid.',\n    [\"invalid-sender\" /* AuthErrorCode.INVALID_SENDER */]: 'The email template corresponding to this action contains an invalid sender email or name. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n    [\"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',\n    [\"invalid-tenant-id\" /* AuthErrorCode.INVALID_TENANT_ID */]: \"The Auth instance's tenant ID is invalid.\",\n    [\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',\n    [\"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',\n    [\"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' + 'by following the instructions in the Firebase console.',\n    [\"missing-app-credential\" /* AuthErrorCode.MISSING_APP_CREDENTIAL */]: 'The phone verification request is missing an application verifier ' + 'assertion. A reCAPTCHA response token needs to be provided.',\n    [\"missing-verification-code\" /* AuthErrorCode.MISSING_CODE */]: 'The phone auth credential was created with an empty SMS verification code.',\n    [\"missing-continue-uri\" /* AuthErrorCode.MISSING_CONTINUE_URI */]: 'A continue URL must be provided in the request.',\n    [\"missing-iframe-start\" /* AuthErrorCode.MISSING_IFRAME_START */]: 'An internal AuthError has occurred.',\n    [\"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */]: 'An iOS Bundle ID must be provided if an App Store ID is provided.',\n    [\"missing-or-invalid-nonce\" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' + 'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' + 'in the ID token payload.',\n    [\"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',\n    [\"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',\n    [\"missing-phone-number\" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',\n    [\"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */]: 'The phone auth credential was created with an empty verification ID.',\n    [\"app-deleted\" /* AuthErrorCode.MODULE_DESTROYED */]: 'This instance of FirebaseApp has been deleted.',\n    [\"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */]: 'The user does not have a second factor matching the identifier provided.',\n    [\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */]: 'Proof of ownership of a second factor is required to complete sign-in.',\n    [\"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */]: 'An account already exists with the same email address but different ' + 'sign-in credentials. Sign in using a provider associated with this ' + 'email address.',\n    [\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */]: 'A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.',\n    [\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n    [\"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */]: 'User was not linked to an account with the given provider.',\n    [\"null-user\" /* AuthErrorCode.NULL_USER */]: 'A null user object was provided as the argument for an operation which ' + 'requires a non-null user object.',\n    [\"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */]: 'The given sign-in provider is disabled for this Firebase project. ' + 'Enable it in the Firebase console, under the sign-in method tab of the ' + 'Auth section.',\n    [\"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */]: 'This operation is not supported in the environment this application is ' + 'running on. \"location.protocol\" must be http, https or chrome-extension' + ' and web storage must be enabled.',\n    [\"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */]: 'Unable to establish a connection with the popup. It may have been blocked by the browser.',\n    [\"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */]: 'The popup has been closed by the user before finalizing the operation.',\n    [\"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */]: 'User can only be linked to one identity for the given provider.',\n    [\"quota-exceeded\" /* AuthErrorCode.QUOTA_EXCEEDED */]: \"The project's quota for this operation has been exceeded.\",\n    [\"redirect-cancelled-by-user\" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */]: 'The redirect operation has been cancelled by the user before finalizing.',\n    [\"redirect-operation-pending\" /* AuthErrorCode.REDIRECT_OPERATION_PENDING */]: 'A redirect sign-in operation is already pending.',\n    [\"rejected-credential\" /* AuthErrorCode.REJECTED_CREDENTIAL */]: 'The request contains malformed or mismatching credentials.',\n    [\"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */]: 'The second factor is already enrolled on this account.',\n    [\"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */]: 'The maximum allowed number of second factors on a user has been exceeded.',\n    [\"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */]: \"The provided tenant ID does not match the Auth instance's tenant ID\",\n    [\"timeout\" /* AuthErrorCode.TIMEOUT */]: 'The operation has timed out.',\n    [\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */]: \"The user's credential is no longer valid. The user must sign in again.\",\n    [\"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */]: 'We have blocked all requests from this device due to unusual activity. ' + 'Try again later.',\n    [\"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */]: 'The domain of the continue URL is not whitelisted.  Please whitelist ' + 'the domain in the Firebase console.',\n    [\"unsupported-first-factor\" /* AuthErrorCode.UNSUPPORTED_FIRST_FACTOR */]: 'Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.',\n    [\"unsupported-persistence-type\" /* AuthErrorCode.UNSUPPORTED_PERSISTENCE */]: 'The current environment does not support the specified persistence type.',\n    [\"unsupported-tenant-operation\" /* AuthErrorCode.UNSUPPORTED_TENANT_OPERATION */]: 'This operation is not supported in a multi-tenant context.',\n    [\"unverified-email\" /* AuthErrorCode.UNVERIFIED_EMAIL */]: 'The operation requires a verified email.',\n    [\"user-cancelled\" /* AuthErrorCode.USER_CANCELLED */]: 'The user did not grant your application the permissions it requested.',\n    [\"user-not-found\" /* AuthErrorCode.USER_DELETED */]: 'There is no user record corresponding to this identifier. The user may ' + 'have been deleted.',\n    [\"user-disabled\" /* AuthErrorCode.USER_DISABLED */]: 'The user account has been disabled by an administrator.',\n    [\"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */]: 'The supplied credentials do not correspond to the previously signed in user.',\n    [\"user-signed-out\" /* AuthErrorCode.USER_SIGNED_OUT */]: '',\n    [\"weak-password\" /* AuthErrorCode.WEAK_PASSWORD */]: 'The password must be 6 characters long or more.',\n    [\"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */]: 'This browser is not supported or 3rd party cookies and data may be disabled.',\n    [\"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */]: 'initializeAuth() has already been called with ' + 'different options. To avoid this error, call initializeAuth() with the ' + 'same options as when it was originally called, or call getAuth() to return the' + ' already initialized instance.'\n  };\n}\nfunction _prodErrorMap() {\n  // We will include this one message in the prod error map since by the very\n  // nature of this error, developers will never be able to see the message\n  // using the debugErrorMap (which is installed during auth initialization).\n  return {\n    [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.'\n  };\n}\n/**\r\n * A verbose error map with detailed descriptions for most error codes.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst debugErrorMap = _debugErrorMap;\n/**\r\n * A minimal error map with all verbose error messages stripped.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst prodErrorMap = _prodErrorMap;\nconst _DEFAULT_AUTH_ERROR_FACTORY = new ErrorFactory('auth', 'Firebase', _prodErrorMap());\n/**\r\n * A map of potential `Auth` error codes, for easier comparison with errors\r\n * thrown by the SDK.\r\n *\r\n * @remarks\r\n * Note that you can't tree-shake individual keys\r\n * in the map, so by using the map you might substantially increase your\r\n * bundle size.\r\n *\r\n * @public\r\n */\nconst AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {\n  ADMIN_ONLY_OPERATION: 'auth/admin-restricted-operation',\n  ARGUMENT_ERROR: 'auth/argument-error',\n  APP_NOT_AUTHORIZED: 'auth/app-not-authorized',\n  APP_NOT_INSTALLED: 'auth/app-not-installed',\n  CAPTCHA_CHECK_FAILED: 'auth/captcha-check-failed',\n  CODE_EXPIRED: 'auth/code-expired',\n  CORDOVA_NOT_READY: 'auth/cordova-not-ready',\n  CORS_UNSUPPORTED: 'auth/cors-unsupported',\n  CREDENTIAL_ALREADY_IN_USE: 'auth/credential-already-in-use',\n  CREDENTIAL_MISMATCH: 'auth/custom-token-mismatch',\n  CREDENTIAL_TOO_OLD_LOGIN_AGAIN: 'auth/requires-recent-login',\n  DEPENDENT_SDK_INIT_BEFORE_AUTH: 'auth/dependent-sdk-initialized-before-auth',\n  DYNAMIC_LINK_NOT_ACTIVATED: 'auth/dynamic-link-not-activated',\n  EMAIL_CHANGE_NEEDS_VERIFICATION: 'auth/email-change-needs-verification',\n  EMAIL_EXISTS: 'auth/email-already-in-use',\n  EMULATOR_CONFIG_FAILED: 'auth/emulator-config-failed',\n  EXPIRED_OOB_CODE: 'auth/expired-action-code',\n  EXPIRED_POPUP_REQUEST: 'auth/cancelled-popup-request',\n  INTERNAL_ERROR: 'auth/internal-error',\n  INVALID_API_KEY: 'auth/invalid-api-key',\n  INVALID_APP_CREDENTIAL: 'auth/invalid-app-credential',\n  INVALID_APP_ID: 'auth/invalid-app-id',\n  INVALID_AUTH: 'auth/invalid-user-token',\n  INVALID_AUTH_EVENT: 'auth/invalid-auth-event',\n  INVALID_CERT_HASH: 'auth/invalid-cert-hash',\n  INVALID_CODE: 'auth/invalid-verification-code',\n  INVALID_CONTINUE_URI: 'auth/invalid-continue-uri',\n  INVALID_CORDOVA_CONFIGURATION: 'auth/invalid-cordova-configuration',\n  INVALID_CUSTOM_TOKEN: 'auth/invalid-custom-token',\n  INVALID_DYNAMIC_LINK_DOMAIN: 'auth/invalid-dynamic-link-domain',\n  INVALID_EMAIL: 'auth/invalid-email',\n  INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',\n  INVALID_IDP_RESPONSE: 'auth/invalid-credential',\n  INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',\n  INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',\n  INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',\n  INVALID_OAUTH_PROVIDER: 'auth/invalid-oauth-provider',\n  INVALID_OOB_CODE: 'auth/invalid-action-code',\n  INVALID_ORIGIN: 'auth/unauthorized-domain',\n  INVALID_PASSWORD: 'auth/wrong-password',\n  INVALID_PERSISTENCE: 'auth/invalid-persistence-type',\n  INVALID_PHONE_NUMBER: 'auth/invalid-phone-number',\n  INVALID_PROVIDER_ID: 'auth/invalid-provider-id',\n  INVALID_RECIPIENT_EMAIL: 'auth/invalid-recipient-email',\n  INVALID_SENDER: 'auth/invalid-sender',\n  INVALID_SESSION_INFO: 'auth/invalid-verification-id',\n  INVALID_TENANT_ID: 'auth/invalid-tenant-id',\n  MFA_INFO_NOT_FOUND: 'auth/multi-factor-info-not-found',\n  MFA_REQUIRED: 'auth/multi-factor-auth-required',\n  MISSING_ANDROID_PACKAGE_NAME: 'auth/missing-android-pkg-name',\n  MISSING_APP_CREDENTIAL: 'auth/missing-app-credential',\n  MISSING_AUTH_DOMAIN: 'auth/auth-domain-config-required',\n  MISSING_CODE: 'auth/missing-verification-code',\n  MISSING_CONTINUE_URI: 'auth/missing-continue-uri',\n  MISSING_IFRAME_START: 'auth/missing-iframe-start',\n  MISSING_IOS_BUNDLE_ID: 'auth/missing-ios-bundle-id',\n  MISSING_OR_INVALID_NONCE: 'auth/missing-or-invalid-nonce',\n  MISSING_MFA_INFO: 'auth/missing-multi-factor-info',\n  MISSING_MFA_SESSION: 'auth/missing-multi-factor-session',\n  MISSING_PHONE_NUMBER: 'auth/missing-phone-number',\n  MISSING_SESSION_INFO: 'auth/missing-verification-id',\n  MODULE_DESTROYED: 'auth/app-deleted',\n  NEED_CONFIRMATION: 'auth/account-exists-with-different-credential',\n  NETWORK_REQUEST_FAILED: 'auth/network-request-failed',\n  NULL_USER: 'auth/null-user',\n  NO_AUTH_EVENT: 'auth/no-auth-event',\n  NO_SUCH_PROVIDER: 'auth/no-such-provider',\n  OPERATION_NOT_ALLOWED: 'auth/operation-not-allowed',\n  OPERATION_NOT_SUPPORTED: 'auth/operation-not-supported-in-this-environment',\n  POPUP_BLOCKED: 'auth/popup-blocked',\n  POPUP_CLOSED_BY_USER: 'auth/popup-closed-by-user',\n  PROVIDER_ALREADY_LINKED: 'auth/provider-already-linked',\n  QUOTA_EXCEEDED: 'auth/quota-exceeded',\n  REDIRECT_CANCELLED_BY_USER: 'auth/redirect-cancelled-by-user',\n  REDIRECT_OPERATION_PENDING: 'auth/redirect-operation-pending',\n  REJECTED_CREDENTIAL: 'auth/rejected-credential',\n  SECOND_FACTOR_ALREADY_ENROLLED: 'auth/second-factor-already-in-use',\n  SECOND_FACTOR_LIMIT_EXCEEDED: 'auth/maximum-second-factor-count-exceeded',\n  TENANT_ID_MISMATCH: 'auth/tenant-id-mismatch',\n  TIMEOUT: 'auth/timeout',\n  TOKEN_EXPIRED: 'auth/user-token-expired',\n  TOO_MANY_ATTEMPTS_TRY_LATER: 'auth/too-many-requests',\n  UNAUTHORIZED_DOMAIN: 'auth/unauthorized-continue-uri',\n  UNSUPPORTED_FIRST_FACTOR: 'auth/unsupported-first-factor',\n  UNSUPPORTED_PERSISTENCE: 'auth/unsupported-persistence-type',\n  UNSUPPORTED_TENANT_OPERATION: 'auth/unsupported-tenant-operation',\n  UNVERIFIED_EMAIL: 'auth/unverified-email',\n  USER_CANCELLED: 'auth/user-cancelled',\n  USER_DELETED: 'auth/user-not-found',\n  USER_DISABLED: 'auth/user-disabled',\n  USER_MISMATCH: 'auth/user-mismatch',\n  USER_SIGNED_OUT: 'auth/user-signed-out',\n  WEAK_PASSWORD: 'auth/weak-password',\n  WEB_STORAGE_UNSUPPORTED: 'auth/web-storage-unsupported',\n  ALREADY_INITIALIZED: 'auth/already-initialized'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logClient = new Logger('@firebase/auth');\nfunction _logError(msg, ...args) {\n  if (logClient.logLevel <= LogLevel.ERROR) {\n    logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _fail(authOrCode, ...rest) {\n  throw createErrorInternal(authOrCode, ...rest);\n}\nfunction _createError(authOrCode, ...rest) {\n  return createErrorInternal(authOrCode, ...rest);\n}\nfunction _errorWithCustomMessage(auth, code, message) {\n  const errorMap = Object.assign(Object.assign({}, prodErrorMap()), {\n    [code]: message\n  });\n  const factory = new ErrorFactory('auth', 'Firebase', errorMap);\n  return factory.create(code, {\n    appName: auth.name\n  });\n}\nfunction _assertInstanceOf(auth, object, instance) {\n  const constructorInstance = instance;\n  if (!(object instanceof constructorInstance)) {\n    if (constructorInstance.name !== object.constructor.name) {\n      _fail(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    }\n\n    throw _errorWithCustomMessage(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, `Type of ${object.constructor.name} does not match expected instance.` + `Did you pass a reference from a different Auth SDK?`);\n  }\n}\nfunction createErrorInternal(authOrCode, ...rest) {\n  if (typeof authOrCode !== 'string') {\n    const code = rest[0];\n    const fullParams = [...rest.slice(1)];\n    if (fullParams[0]) {\n      fullParams[0].appName = authOrCode.name;\n    }\n    return authOrCode._errorFactory.create(code, ...fullParams);\n  }\n  return _DEFAULT_AUTH_ERROR_FACTORY.create(authOrCode, ...rest);\n}\nfunction _assert(assertion, authOrCode, ...rest) {\n  if (!assertion) {\n    throw createErrorInternal(authOrCode, ...rest);\n  }\n}\n/**\r\n * Unconditionally fails, throwing an internal error with the given message.\r\n *\r\n * @param failure type of failure encountered\r\n * @throws Error\r\n */\nfunction debugFail(failure) {\n  // Log the failure in addition to throw an exception, just in case the\n  // exception is swallowed.\n  const message = `INTERNAL ASSERTION FAILED: ` + failure;\n  _logError(message);\n  // NOTE: We don't use FirebaseError here because these are internal failures\n  // that cannot be handled by the user. (Also it would create a circular\n  // dependency between the error and assert modules which doesn't work.)\n  throw new Error(message);\n}\n/**\r\n * Fails if the given assertion condition is false, throwing an Error with the\r\n * given message if it did.\r\n *\r\n * @param assertion\r\n * @param message\r\n */\nfunction debugAssert(assertion, message) {\n  if (!assertion) {\n    debugFail(message);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst instanceCache = new Map();\nfunction _getInstance(cls) {\n  debugAssert(cls instanceof Function, 'Expected a class definition');\n  let instance = instanceCache.get(cls);\n  if (instance) {\n    debugAssert(instance instanceof cls, 'Instance stored in cache mismatched with class');\n    return instance;\n  }\n  instance = new cls();\n  instanceCache.set(cls, instance);\n  return instance;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Initializes an {@link Auth} instance with fine-grained control over\r\n * {@link Dependencies}.\r\n *\r\n * @remarks\r\n *\r\n * This function allows more control over the {@link Auth} instance than\r\n * {@link getAuth}. `getAuth` uses platform-specific defaults to supply\r\n * the {@link Dependencies}. In general, `getAuth` is the easiest way to\r\n * initialize Auth and works for most use cases. Use `initializeAuth` if you\r\n * need control over which persistence layer is used, or to minimize bundle\r\n * size if you're not using either `signInWithPopup` or `signInWithRedirect`.\r\n *\r\n * For example, if your app only uses anonymous accounts and you only want\r\n * accounts saved for the current session, initialize `Auth` with:\r\n *\r\n * ```js\r\n * const auth = initializeAuth(app, {\r\n *   persistence: browserSessionPersistence,\r\n *   popupRedirectResolver: undefined,\r\n * });\r\n * ```\r\n *\r\n * @public\r\n */\nfunction initializeAuth(app, deps) {\n  const provider = _getProvider(app, 'auth');\n  if (provider.isInitialized()) {\n    const auth = provider.getImmediate();\n    const initialOptions = provider.getOptions();\n    if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {\n      return auth;\n    } else {\n      _fail(auth, \"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */);\n    }\n  }\n\n  const auth = provider.initialize({\n    options: deps\n  });\n  return auth;\n}\nfunction _initializeAuthInstance(auth, deps) {\n  const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];\n  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);\n  if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {\n    auth._updateErrorMap(deps.errorMap);\n  }\n  // This promise is intended to float; auth initialization happens in the\n  // background, meanwhile the auth object may be used by the app.\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getCurrentUrl() {\n  var _a;\n  return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href) || '';\n}\nfunction _isHttpOrHttps() {\n  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';\n}\nfunction _getCurrentScheme() {\n  var _a;\n  return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol) || null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine whether the browser is working online\r\n */\nfunction _isOnline() {\n  if (typeof navigator !== 'undefined' && navigator && 'onLine' in navigator && typeof navigator.onLine === 'boolean' && (\n  // Apply only for traditional web apps and Chrome extensions.\n  // This is especially true for Cordova apps which have unreliable\n  // navigator.onLine behavior unless cordova-plugin-network-information is\n  // installed which overwrites the native navigator.onLine value and\n  // defines navigator.connection.\n  _isHttpOrHttps() || isBrowserExtension() || 'connection' in navigator)) {\n    return navigator.onLine;\n  }\n  // If we can't determine the state, assume it is online.\n  return true;\n}\nfunction _getUserLanguage() {\n  if (typeof navigator === 'undefined') {\n    return null;\n  }\n  const navigatorLanguage = navigator;\n  return (\n    // Most reliable, but only supported in Chrome/Firefox.\n    navigatorLanguage.languages && navigatorLanguage.languages[0] ||\n    // Supported in most browsers, but returns the language of the browser\n    // UI, not the language set in browser settings.\n    navigatorLanguage.language ||\n    // Couldn't determine language.\n    null\n  );\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * A structure to help pick between a range of long and short delay durations\r\n * depending on the current environment. In general, the long delay is used for\r\n * mobile environments whereas short delays are used for desktop environments.\r\n */\nclass Delay {\n  constructor(shortDelay, longDelay) {\n    this.shortDelay = shortDelay;\n    this.longDelay = longDelay;\n    // Internal error when improperly initialized.\n    debugAssert(longDelay > shortDelay, 'Short delay should be less than long delay!');\n    this.isMobile = isMobileCordova() || isReactNative();\n  }\n  get() {\n    if (!_isOnline()) {\n      // Pick the shorter timeout.\n      return Math.min(5000 /* DelayMin.OFFLINE */, this.shortDelay);\n    }\n    // If running in a mobile environment, return the long delay, otherwise\n    // return the short delay.\n    // This could be improved in the future to dynamically change based on other\n    // variables instead of just reading the current environment.\n    return this.isMobile ? this.longDelay : this.shortDelay;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _emulatorUrl(config, path) {\n  debugAssert(config.emulator, 'Emulator should always be set here');\n  const {\n    url\n  } = config.emulator;\n  if (!path) {\n    return url;\n  }\n  return `${url}${path.startsWith('/') ? path.slice(1) : path}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FetchProvider {\n  static initialize(fetchImpl, headersImpl, responseImpl) {\n    this.fetchImpl = fetchImpl;\n    if (headersImpl) {\n      this.headersImpl = headersImpl;\n    }\n    if (responseImpl) {\n      this.responseImpl = responseImpl;\n    }\n  }\n  static fetch() {\n    if (this.fetchImpl) {\n      return this.fetchImpl;\n    }\n    if (typeof self !== 'undefined' && 'fetch' in self) {\n      return self.fetch;\n    }\n    debugFail('Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n  }\n  static headers() {\n    if (this.headersImpl) {\n      return this.headersImpl;\n    }\n    if (typeof self !== 'undefined' && 'Headers' in self) {\n      return self.Headers;\n    }\n    debugFail('Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n  }\n  static response() {\n    if (this.responseImpl) {\n      return this.responseImpl;\n    }\n    if (typeof self !== 'undefined' && 'Response' in self) {\n      return self.Response;\n    }\n    debugFail('Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Map from errors returned by the server to errors to developer visible errors\r\n */\nconst SERVER_ERROR_MAP = {\n  // Custom token errors.\n  [\"CREDENTIAL_MISMATCH\" /* ServerError.CREDENTIAL_MISMATCH */]: \"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */,\n\n  // This can only happen if the SDK sends a bad request.\n  [\"MISSING_CUSTOM_TOKEN\" /* ServerError.MISSING_CUSTOM_TOKEN */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n  // Create Auth URI errors.\n  [\"INVALID_IDENTIFIER\" /* ServerError.INVALID_IDENTIFIER */]: \"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */,\n\n  // This can only happen if the SDK sends a bad request.\n  [\"MISSING_CONTINUE_URI\" /* ServerError.MISSING_CONTINUE_URI */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n  // Sign in with email and password errors (some apply to sign up too).\n  [\"INVALID_PASSWORD\" /* ServerError.INVALID_PASSWORD */]: \"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */,\n\n  // This can only happen if the SDK sends a bad request.\n  [\"MISSING_PASSWORD\" /* ServerError.MISSING_PASSWORD */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n  // Sign up with email and password errors.\n  [\"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */]: \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */,\n  [\"PASSWORD_LOGIN_DISABLED\" /* ServerError.PASSWORD_LOGIN_DISABLED */]: \"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,\n\n  // Verify assertion for sign in with credential errors:\n  [\"INVALID_IDP_RESPONSE\" /* ServerError.INVALID_IDP_RESPONSE */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\n  [\"INVALID_PENDING_TOKEN\" /* ServerError.INVALID_PENDING_TOKEN */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\n  [\"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */]: \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,\n\n  // This can only happen if the SDK sends a bad request.\n  [\"MISSING_REQ_TYPE\" /* ServerError.MISSING_REQ_TYPE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n  // Send Password reset email errors:\n  [\"EMAIL_NOT_FOUND\" /* ServerError.EMAIL_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */,\n  [\"RESET_PASSWORD_EXCEED_LIMIT\" /* ServerError.RESET_PASSWORD_EXCEED_LIMIT */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n  [\"EXPIRED_OOB_CODE\" /* ServerError.EXPIRED_OOB_CODE */]: \"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */,\n  [\"INVALID_OOB_CODE\" /* ServerError.INVALID_OOB_CODE */]: \"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */,\n\n  // This can only happen if the SDK sends a bad request.\n  [\"MISSING_OOB_CODE\" /* ServerError.MISSING_OOB_CODE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n  // Operations that require ID token in request:\n  [\"CREDENTIAL_TOO_OLD_LOGIN_AGAIN\" /* ServerError.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: \"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */,\n  [\"INVALID_ID_TOKEN\" /* ServerError.INVALID_ID_TOKEN */]: \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */,\n  [\"TOKEN_EXPIRED\" /* ServerError.TOKEN_EXPIRED */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n  [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n\n  // Other errors.\n  [\"TOO_MANY_ATTEMPTS_TRY_LATER\" /* ServerError.TOO_MANY_ATTEMPTS_TRY_LATER */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n\n  // Phone Auth related errors.\n  [\"INVALID_CODE\" /* ServerError.INVALID_CODE */]: \"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */,\n  [\"INVALID_SESSION_INFO\" /* ServerError.INVALID_SESSION_INFO */]: \"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */,\n  [\"INVALID_TEMPORARY_PROOF\" /* ServerError.INVALID_TEMPORARY_PROOF */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\n  [\"MISSING_SESSION_INFO\" /* ServerError.MISSING_SESSION_INFO */]: \"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */,\n  [\"SESSION_EXPIRED\" /* ServerError.SESSION_EXPIRED */]: \"code-expired\" /* AuthErrorCode.CODE_EXPIRED */,\n\n  // Other action code errors when additional settings passed.\n  // MISSING_CONTINUE_URI is getting mapped to INTERNAL_ERROR above.\n  // This is OK as this error will be caught by client side validation.\n  [\"MISSING_ANDROID_PACKAGE_NAME\" /* ServerError.MISSING_ANDROID_PACKAGE_NAME */]: \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */,\n  [\"UNAUTHORIZED_DOMAIN\" /* ServerError.UNAUTHORIZED_DOMAIN */]: \"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */,\n\n  // getProjectConfig errors when clientId is passed.\n  [\"INVALID_OAUTH_CLIENT_ID\" /* ServerError.INVALID_OAUTH_CLIENT_ID */]: \"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */,\n\n  // User actions (sign-up or deletion) disabled errors.\n  [\"ADMIN_ONLY_OPERATION\" /* ServerError.ADMIN_ONLY_OPERATION */]: \"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */,\n\n  // Multi factor related errors.\n  [\"INVALID_MFA_PENDING_CREDENTIAL\" /* ServerError.INVALID_MFA_PENDING_CREDENTIAL */]: \"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */,\n  [\"MFA_ENROLLMENT_NOT_FOUND\" /* ServerError.MFA_ENROLLMENT_NOT_FOUND */]: \"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */,\n  [\"MISSING_MFA_ENROLLMENT_ID\" /* ServerError.MISSING_MFA_ENROLLMENT_ID */]: \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */,\n  [\"MISSING_MFA_PENDING_CREDENTIAL\" /* ServerError.MISSING_MFA_PENDING_CREDENTIAL */]: \"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */,\n  [\"SECOND_FACTOR_EXISTS\" /* ServerError.SECOND_FACTOR_EXISTS */]: \"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */,\n  [\"SECOND_FACTOR_LIMIT_EXCEEDED\" /* ServerError.SECOND_FACTOR_LIMIT_EXCEEDED */]: \"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */,\n\n  // Blocking functions related errors.\n  [\"BLOCKING_FUNCTION_ERROR_RESPONSE\" /* ServerError.BLOCKING_FUNCTION_ERROR_RESPONSE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);\nfunction _addTidIfNecessary(auth, request) {\n  if (auth.tenantId && !request.tenantId) {\n    return Object.assign(Object.assign({}, request), {\n      tenantId: auth.tenantId\n    });\n  }\n  return request;\n}\nfunction _performApiRequest(_x, _x2, _x3, _x4) {\n  return _performApiRequest2.apply(this, arguments);\n}\nfunction _performApiRequest2() {\n  _performApiRequest2 = _asyncToGenerator(function* (auth, method, path, request, customErrorMap = {}) {\n    return _performFetchWithErrorHandling(auth, customErrorMap, /*#__PURE__*/_asyncToGenerator(function* () {\n      let body = {};\n      let params = {};\n      if (request) {\n        if (method === \"GET\" /* HttpMethod.GET */) {\n          params = request;\n        } else {\n          body = {\n            body: JSON.stringify(request)\n          };\n        }\n      }\n      const query = querystring(Object.assign({\n        key: auth.config.apiKey\n      }, params)).slice(1);\n      const headers = yield auth._getAdditionalHeaders();\n      headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/json';\n      if (auth.languageCode) {\n        headers[\"X-Firebase-Locale\" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;\n      }\n      return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({\n        method,\n        headers,\n        referrerPolicy: 'no-referrer'\n      }, body));\n    }));\n  });\n  return _performApiRequest2.apply(this, arguments);\n}\nfunction _performFetchWithErrorHandling(_x5, _x6, _x7) {\n  return _performFetchWithErrorHandling2.apply(this, arguments);\n}\nfunction _performFetchWithErrorHandling2() {\n  _performFetchWithErrorHandling2 = _asyncToGenerator(function* (auth, customErrorMap, fetchFn) {\n    auth._canInitEmulator = false;\n    const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);\n    try {\n      const networkTimeout = new NetworkTimeout(auth);\n      const response = yield Promise.race([fetchFn(), networkTimeout.promise]);\n      // If we've reached this point, the fetch succeeded and the networkTimeout\n      // didn't throw; clear the network timeout delay so that Node won't hang\n      networkTimeout.clearNetworkTimeout();\n      const json = yield response.json();\n      if ('needConfirmation' in json) {\n        throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, json);\n      }\n      if (response.ok && !('errorMessage' in json)) {\n        return json;\n      } else {\n        const errorMessage = response.ok ? json.errorMessage : json.error.message;\n        const [serverErrorCode, serverErrorMessage] = errorMessage.split(' : ');\n        if (serverErrorCode === \"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */) {\n          throw _makeTaggedError(auth, \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */, json);\n        } else if (serverErrorCode === \"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */) {\n          throw _makeTaggedError(auth, \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */, json);\n        } else if (serverErrorCode === \"USER_DISABLED\" /* ServerError.USER_DISABLED */) {\n          throw _makeTaggedError(auth, \"user-disabled\" /* AuthErrorCode.USER_DISABLED */, json);\n        }\n        const authError = errorMap[serverErrorCode] || serverErrorCode.toLowerCase().replace(/[_\\s]+/g, '-');\n        if (serverErrorMessage) {\n          throw _errorWithCustomMessage(auth, authError, serverErrorMessage);\n        } else {\n          _fail(auth, authError);\n        }\n      }\n    } catch (e) {\n      if (e instanceof FirebaseError) {\n        throw e;\n      }\n      _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n        'message': String(e)\n      });\n    }\n  });\n  return _performFetchWithErrorHandling2.apply(this, arguments);\n}\nfunction _performSignInRequest(_x8, _x9, _x10, _x11) {\n  return _performSignInRequest2.apply(this, arguments);\n}\nfunction _performSignInRequest2() {\n  _performSignInRequest2 = _asyncToGenerator(function* (auth, method, path, request, customErrorMap = {}) {\n    const serverResponse = yield _performApiRequest(auth, method, path, request, customErrorMap);\n    if ('mfaPendingCredential' in serverResponse) {\n      _fail(auth, \"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */, {\n        _serverResponse: serverResponse\n      });\n    }\n    return serverResponse;\n  });\n  return _performSignInRequest2.apply(this, arguments);\n}\nfunction _getFinalTarget(auth, host, path, query) {\n  const base = `${host}${path}?${query}`;\n  if (!auth.config.emulator) {\n    return `${auth.config.apiScheme}://${base}`;\n  }\n  return _emulatorUrl(auth.config, base);\n}\nclass NetworkTimeout {\n  constructor(auth) {\n    this.auth = auth;\n    // Node timers and browser timers are fundamentally incompatible, but we\n    // don't care about the value here\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    this.timer = null;\n    this.promise = new Promise((_, reject) => {\n      this.timer = setTimeout(() => {\n        return reject(_createError(this.auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n      }, DEFAULT_API_TIMEOUT_MS.get());\n    });\n  }\n  clearNetworkTimeout() {\n    clearTimeout(this.timer);\n  }\n}\nfunction _makeTaggedError(auth, code, response) {\n  const errorParams = {\n    appName: auth.name\n  };\n  if (response.email) {\n    errorParams.email = response.email;\n  }\n  if (response.phoneNumber) {\n    errorParams.phoneNumber = response.phoneNumber;\n  }\n  const error = _createError(auth, code, errorParams);\n  // We know customData is defined on error because errorParams is defined\n  error.customData._tokenResponse = response;\n  return error;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction deleteAccount(_x12, _x13) {\n  return _deleteAccount.apply(this, arguments);\n}\nfunction _deleteAccount() {\n  _deleteAccount = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:delete\" /* Endpoint.DELETE_ACCOUNT */, request);\n  });\n  return _deleteAccount.apply(this, arguments);\n}\nfunction deleteLinkedAccounts(_x14, _x15) {\n  return _deleteLinkedAccounts.apply(this, arguments);\n}\nfunction _deleteLinkedAccounts() {\n  _deleteLinkedAccounts = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n  });\n  return _deleteLinkedAccounts.apply(this, arguments);\n}\nfunction getAccountInfo(_x16, _x17) {\n  return _getAccountInfo.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getAccountInfo() {\n  _getAccountInfo = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:lookup\" /* Endpoint.GET_ACCOUNT_INFO */, request);\n  });\n  return _getAccountInfo.apply(this, arguments);\n}\nfunction utcTimestampToDateString(utcTimestamp) {\n  if (!utcTimestamp) {\n    return undefined;\n  }\n  try {\n    // Convert to date object.\n    const date = new Date(Number(utcTimestamp));\n    // Test date is valid.\n    if (!isNaN(date.getTime())) {\n      // Convert to UTC date string.\n      return date.toUTCString();\n    }\n  } catch (e) {\n    // Do nothing. undefined will be returned.\n  }\n  return undefined;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nfunction getIdToken(user, forceRefresh = false) {\n  return getModularInstance(user).getIdToken(forceRefresh);\n}\n/**\r\n * Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nfunction getIdTokenResult(_x18) {\n  return _getIdTokenResult.apply(this, arguments);\n}\nfunction _getIdTokenResult() {\n  _getIdTokenResult = _asyncToGenerator(function* (user, forceRefresh = false) {\n    const userInternal = getModularInstance(user);\n    const token = yield userInternal.getIdToken(forceRefresh);\n    const claims = _parseToken(token);\n    _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;\n    const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];\n    return {\n      claims,\n      token,\n      authTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.auth_time)),\n      issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),\n      expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),\n      signInProvider: signInProvider || null,\n      signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null\n    };\n  });\n  return _getIdTokenResult.apply(this, arguments);\n}\nfunction secondsStringToMilliseconds(seconds) {\n  return Number(seconds) * 1000;\n}\nfunction _parseToken(token) {\n  const [algorithm, payload, signature] = token.split('.');\n  if (algorithm === undefined || payload === undefined || signature === undefined) {\n    _logError('JWT malformed, contained fewer than 3 sections');\n    return null;\n  }\n  try {\n    const decoded = base64Decode(payload);\n    if (!decoded) {\n      _logError('Failed to decode base64 JWT payload');\n      return null;\n    }\n    return JSON.parse(decoded);\n  } catch (e) {\n    _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());\n    return null;\n  }\n}\n/**\r\n * Extract expiresIn TTL from a token by subtracting the expiration from the issuance.\r\n */\nfunction _tokenExpiresIn(token) {\n  const parsedToken = _parseToken(token);\n  _assert(parsedToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  _assert(typeof parsedToken.exp !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  _assert(typeof parsedToken.iat !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  return Number(parsedToken.exp) - Number(parsedToken.iat);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _logoutIfInvalidated(_x19, _x20) {\n  return _logoutIfInvalidated2.apply(this, arguments);\n}\nfunction _logoutIfInvalidated2() {\n  _logoutIfInvalidated2 = _asyncToGenerator(function* (user, promise, bypassAuthState = false) {\n    if (bypassAuthState) {\n      return promise;\n    }\n    try {\n      return yield promise;\n    } catch (e) {\n      if (e instanceof FirebaseError && isUserInvalidated(e)) {\n        if (user.auth.currentUser === user) {\n          yield user.auth.signOut();\n        }\n      }\n      throw e;\n    }\n  });\n  return _logoutIfInvalidated2.apply(this, arguments);\n}\nfunction isUserInvalidated({\n  code\n}) {\n  return code === `auth/${\"user-disabled\" /* AuthErrorCode.USER_DISABLED */}` || code === `auth/${\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ProactiveRefresh {\n  constructor(user) {\n    this.user = user;\n    this.isRunning = false;\n    // Node timers and browser timers return fundamentally different types.\n    // We don't actually care what the value is but TS won't accept unknown and\n    // we can't cast properly in both environments.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    this.timerId = null;\n    this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n  }\n\n  _start() {\n    if (this.isRunning) {\n      return;\n    }\n    this.isRunning = true;\n    this.schedule();\n  }\n  _stop() {\n    if (!this.isRunning) {\n      return;\n    }\n    this.isRunning = false;\n    if (this.timerId !== null) {\n      clearTimeout(this.timerId);\n    }\n  }\n  getInterval(wasError) {\n    var _a;\n    if (wasError) {\n      const interval = this.errorBackoff;\n      this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);\n      return interval;\n    } else {\n      // Reset the error backoff\n      this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n      const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;\n      const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;\n      return Math.max(0, interval);\n    }\n  }\n  schedule(wasError = false) {\n    var _this = this;\n    if (!this.isRunning) {\n      // Just in case...\n      return;\n    }\n    const interval = this.getInterval(wasError);\n    this.timerId = setTimeout( /*#__PURE__*/_asyncToGenerator(function* () {\n      yield _this.iteration();\n    }), interval);\n  }\n  iteration() {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      try {\n        yield _this2.user.getIdToken(true);\n      } catch (e) {\n        // Only retry on network errors\n        if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n          _this2.schedule( /* wasError */true);\n        }\n        return;\n      }\n      _this2.schedule();\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass UserMetadata {\n  constructor(createdAt, lastLoginAt) {\n    this.createdAt = createdAt;\n    this.lastLoginAt = lastLoginAt;\n    this._initializeTime();\n  }\n  _initializeTime() {\n    this.lastSignInTime = utcTimestampToDateString(this.lastLoginAt);\n    this.creationTime = utcTimestampToDateString(this.createdAt);\n  }\n  _copy(metadata) {\n    this.createdAt = metadata.createdAt;\n    this.lastLoginAt = metadata.lastLoginAt;\n    this._initializeTime();\n  }\n  toJSON() {\n    return {\n      createdAt: this.createdAt,\n      lastLoginAt: this.lastLoginAt\n    };\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _reloadWithoutSaving(_x21) {\n  return _reloadWithoutSaving2.apply(this, arguments);\n}\n/**\r\n * Reloads user account data, if signed in.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nfunction _reloadWithoutSaving2() {\n  _reloadWithoutSaving2 = _asyncToGenerator(function* (user) {\n    var _a;\n    const auth = user.auth;\n    const idToken = yield user.getIdToken();\n    const response = yield _logoutIfInvalidated(user, getAccountInfo(auth, {\n      idToken\n    }));\n    _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    const coreAccount = response.users[0];\n    user._notifyReloadListener(coreAccount);\n    const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length) ? extractProviderData(coreAccount.providerUserInfo) : [];\n    const providerData = mergeProviderData(user.providerData, newProviderData);\n    // Preserves the non-nonymous status of the stored user, even if no more\n    // credentials (federated or email/password) are linked to the user. If\n    // the user was previously anonymous, then use provider data to update.\n    // On the other hand, if it was not anonymous before, it should never be\n    // considered anonymous now.\n    const oldIsAnonymous = user.isAnonymous;\n    const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);\n    const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;\n    const updates = {\n      uid: coreAccount.localId,\n      displayName: coreAccount.displayName || null,\n      photoURL: coreAccount.photoUrl || null,\n      email: coreAccount.email || null,\n      emailVerified: coreAccount.emailVerified || false,\n      phoneNumber: coreAccount.phoneNumber || null,\n      tenantId: coreAccount.tenantId || null,\n      providerData,\n      metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),\n      isAnonymous\n    };\n    Object.assign(user, updates);\n  });\n  return _reloadWithoutSaving2.apply(this, arguments);\n}\nfunction reload(_x22) {\n  return _reload.apply(this, arguments);\n}\nfunction _reload() {\n  _reload = _asyncToGenerator(function* (user) {\n    const userInternal = getModularInstance(user);\n    yield _reloadWithoutSaving(userInternal);\n    // Even though the current user hasn't changed, update\n    // current user will trigger a persistence update w/ the\n    // new info.\n    yield userInternal.auth._persistUserIfCurrent(userInternal);\n    userInternal.auth._notifyListenersIfCurrent(userInternal);\n  });\n  return _reload.apply(this, arguments);\n}\nfunction mergeProviderData(original, newData) {\n  const deduped = original.filter(o => !newData.some(n => n.providerId === o.providerId));\n  return [...deduped, ...newData];\n}\nfunction extractProviderData(providers) {\n  return providers.map(_a => {\n    var {\n        providerId\n      } = _a,\n      provider = __rest(_a, [\"providerId\"]);\n    return {\n      providerId,\n      uid: provider.rawId || '',\n      displayName: provider.displayName || null,\n      email: provider.email || null,\n      phoneNumber: provider.phoneNumber || null,\n      photoURL: provider.photoUrl || null\n    };\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction requestStsToken(_x23, _x24) {\n  return _requestStsToken.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * We need to mark this class as internal explicitly to exclude it in the public typings, because\r\n * it references AuthInternal which has a circular dependency with UserInternal.\r\n *\r\n * @internal\r\n */\nfunction _requestStsToken() {\n  _requestStsToken = _asyncToGenerator(function* (auth, refreshToken) {\n    const response = yield _performFetchWithErrorHandling(auth, {}, /*#__PURE__*/_asyncToGenerator(function* () {\n      const body = querystring({\n        'grant_type': 'refresh_token',\n        'refresh_token': refreshToken\n      }).slice(1);\n      const {\n        tokenApiHost,\n        apiKey\n      } = auth.config;\n      const url = _getFinalTarget(auth, tokenApiHost, \"/v1/token\" /* Endpoint.TOKEN */, `key=${apiKey}`);\n      const headers = yield auth._getAdditionalHeaders();\n      headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/x-www-form-urlencoded';\n      return FetchProvider.fetch()(url, {\n        method: \"POST\" /* HttpMethod.POST */,\n        headers,\n        body\n      });\n    }));\n    // The response comes back in snake_case. Convert to camel:\n    return {\n      accessToken: response.access_token,\n      expiresIn: response.expires_in,\n      refreshToken: response.refresh_token\n    };\n  });\n  return _requestStsToken.apply(this, arguments);\n}\nclass StsTokenManager {\n  constructor() {\n    this.refreshToken = null;\n    this.accessToken = null;\n    this.expirationTime = null;\n  }\n  get isExpired() {\n    return !this.expirationTime || Date.now() > this.expirationTime - 30000 /* Buffer.TOKEN_REFRESH */;\n  }\n\n  updateFromServerResponse(response) {\n    _assert(response.idToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    _assert(typeof response.idToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    _assert(typeof response.refreshToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    const expiresIn = 'expiresIn' in response && typeof response.expiresIn !== 'undefined' ? Number(response.expiresIn) : _tokenExpiresIn(response.idToken);\n    this.updateTokensAndExpiration(response.idToken, response.refreshToken, expiresIn);\n  }\n  getToken(auth, forceRefresh = false) {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      _assert(!_this3.accessToken || _this3.refreshToken, auth, \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */);\n      if (!forceRefresh && _this3.accessToken && !_this3.isExpired) {\n        return _this3.accessToken;\n      }\n      if (_this3.refreshToken) {\n        yield _this3.refresh(auth, _this3.refreshToken);\n        return _this3.accessToken;\n      }\n      return null;\n    })();\n  }\n  clearRefreshToken() {\n    this.refreshToken = null;\n  }\n  refresh(auth, oldToken) {\n    var _this4 = this;\n    return _asyncToGenerator(function* () {\n      const {\n        accessToken,\n        refreshToken,\n        expiresIn\n      } = yield requestStsToken(auth, oldToken);\n      _this4.updateTokensAndExpiration(accessToken, refreshToken, Number(expiresIn));\n    })();\n  }\n  updateTokensAndExpiration(accessToken, refreshToken, expiresInSec) {\n    this.refreshToken = refreshToken || null;\n    this.accessToken = accessToken || null;\n    this.expirationTime = Date.now() + expiresInSec * 1000;\n  }\n  static fromJSON(appName, object) {\n    const {\n      refreshToken,\n      accessToken,\n      expirationTime\n    } = object;\n    const manager = new StsTokenManager();\n    if (refreshToken) {\n      _assert(typeof refreshToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n        appName\n      });\n      manager.refreshToken = refreshToken;\n    }\n    if (accessToken) {\n      _assert(typeof accessToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n        appName\n      });\n      manager.accessToken = accessToken;\n    }\n    if (expirationTime) {\n      _assert(typeof expirationTime === 'number', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n        appName\n      });\n      manager.expirationTime = expirationTime;\n    }\n    return manager;\n  }\n  toJSON() {\n    return {\n      refreshToken: this.refreshToken,\n      accessToken: this.accessToken,\n      expirationTime: this.expirationTime\n    };\n  }\n  _assign(stsTokenManager) {\n    this.accessToken = stsTokenManager.accessToken;\n    this.refreshToken = stsTokenManager.refreshToken;\n    this.expirationTime = stsTokenManager.expirationTime;\n  }\n  _clone() {\n    return Object.assign(new StsTokenManager(), this.toJSON());\n  }\n  _performRefresh() {\n    return debugFail('not implemented');\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction assertStringOrUndefined(assertion, appName) {\n  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n    appName\n  });\n}\nclass UserImpl {\n  constructor(_a) {\n    var {\n        uid,\n        auth,\n        stsTokenManager\n      } = _a,\n      opt = __rest(_a, [\"uid\", \"auth\", \"stsTokenManager\"]);\n    // For the user object, provider is always Firebase.\n    this.providerId = \"firebase\" /* ProviderId.FIREBASE */;\n    this.proactiveRefresh = new ProactiveRefresh(this);\n    this.reloadUserInfo = null;\n    this.reloadListener = null;\n    this.uid = uid;\n    this.auth = auth;\n    this.stsTokenManager = stsTokenManager;\n    this.accessToken = stsTokenManager.accessToken;\n    this.displayName = opt.displayName || null;\n    this.email = opt.email || null;\n    this.emailVerified = opt.emailVerified || false;\n    this.phoneNumber = opt.phoneNumber || null;\n    this.photoURL = opt.photoURL || null;\n    this.isAnonymous = opt.isAnonymous || false;\n    this.tenantId = opt.tenantId || null;\n    this.providerData = opt.providerData ? [...opt.providerData] : [];\n    this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);\n  }\n  getIdToken(forceRefresh) {\n    var _this5 = this;\n    return _asyncToGenerator(function* () {\n      const accessToken = yield _logoutIfInvalidated(_this5, _this5.stsTokenManager.getToken(_this5.auth, forceRefresh));\n      _assert(accessToken, _this5.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      if (_this5.accessToken !== accessToken) {\n        _this5.accessToken = accessToken;\n        yield _this5.auth._persistUserIfCurrent(_this5);\n        _this5.auth._notifyListenersIfCurrent(_this5);\n      }\n      return accessToken;\n    })();\n  }\n  getIdTokenResult(forceRefresh) {\n    return getIdTokenResult(this, forceRefresh);\n  }\n  reload() {\n    return reload(this);\n  }\n  _assign(user) {\n    if (this === user) {\n      return;\n    }\n    _assert(this.uid === user.uid, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    this.displayName = user.displayName;\n    this.photoURL = user.photoURL;\n    this.email = user.email;\n    this.emailVerified = user.emailVerified;\n    this.phoneNumber = user.phoneNumber;\n    this.isAnonymous = user.isAnonymous;\n    this.tenantId = user.tenantId;\n    this.providerData = user.providerData.map(userInfo => Object.assign({}, userInfo));\n    this.metadata._copy(user.metadata);\n    this.stsTokenManager._assign(user.stsTokenManager);\n  }\n  _clone(auth) {\n    const newUser = new UserImpl(Object.assign(Object.assign({}, this), {\n      auth,\n      stsTokenManager: this.stsTokenManager._clone()\n    }));\n    newUser.metadata._copy(this.metadata);\n    return newUser;\n  }\n  _onReload(callback) {\n    // There should only ever be one listener, and that is a single instance of MultiFactorUser\n    _assert(!this.reloadListener, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    this.reloadListener = callback;\n    if (this.reloadUserInfo) {\n      this._notifyReloadListener(this.reloadUserInfo);\n      this.reloadUserInfo = null;\n    }\n  }\n  _notifyReloadListener(userInfo) {\n    if (this.reloadListener) {\n      this.reloadListener(userInfo);\n    } else {\n      // If no listener is subscribed yet, save the result so it's available when they do subscribe\n      this.reloadUserInfo = userInfo;\n    }\n  }\n  _startProactiveRefresh() {\n    this.proactiveRefresh._start();\n  }\n  _stopProactiveRefresh() {\n    this.proactiveRefresh._stop();\n  }\n  _updateTokensIfNecessary(response, reload = false) {\n    var _this6 = this;\n    return _asyncToGenerator(function* () {\n      let tokensRefreshed = false;\n      if (response.idToken && response.idToken !== _this6.stsTokenManager.accessToken) {\n        _this6.stsTokenManager.updateFromServerResponse(response);\n        tokensRefreshed = true;\n      }\n      if (reload) {\n        yield _reloadWithoutSaving(_this6);\n      }\n      yield _this6.auth._persistUserIfCurrent(_this6);\n      if (tokensRefreshed) {\n        _this6.auth._notifyListenersIfCurrent(_this6);\n      }\n    })();\n  }\n  delete() {\n    var _this7 = this;\n    return _asyncToGenerator(function* () {\n      const idToken = yield _this7.getIdToken();\n      yield _logoutIfInvalidated(_this7, deleteAccount(_this7.auth, {\n        idToken\n      }));\n      _this7.stsTokenManager.clearRefreshToken();\n      // TODO: Determine if cancellable-promises are necessary to use in this class so that delete()\n      //       cancels pending actions...\n      return _this7.auth.signOut();\n    })();\n  }\n  toJSON() {\n    return Object.assign(Object.assign({\n      uid: this.uid,\n      email: this.email || undefined,\n      emailVerified: this.emailVerified,\n      displayName: this.displayName || undefined,\n      isAnonymous: this.isAnonymous,\n      photoURL: this.photoURL || undefined,\n      phoneNumber: this.phoneNumber || undefined,\n      tenantId: this.tenantId || undefined,\n      providerData: this.providerData.map(userInfo => Object.assign({}, userInfo)),\n      stsTokenManager: this.stsTokenManager.toJSON(),\n      // Redirect event ID must be maintained in case there is a pending\n      // redirect event.\n      _redirectEventId: this._redirectEventId\n    }, this.metadata.toJSON()), {\n      // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):\n      apiKey: this.auth.config.apiKey,\n      appName: this.auth.name\n    });\n  }\n  get refreshToken() {\n    return this.stsTokenManager.refreshToken || '';\n  }\n  static _fromJSON(auth, object) {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;\n    const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;\n    const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;\n    const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;\n    const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;\n    const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;\n    const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;\n    const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;\n    const {\n      uid,\n      emailVerified,\n      isAnonymous,\n      providerData,\n      stsTokenManager: plainObjectTokenManager\n    } = object;\n    _assert(uid && plainObjectTokenManager, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);\n    _assert(typeof uid === 'string', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    assertStringOrUndefined(displayName, auth.name);\n    assertStringOrUndefined(email, auth.name);\n    _assert(typeof emailVerified === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    _assert(typeof isAnonymous === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    assertStringOrUndefined(phoneNumber, auth.name);\n    assertStringOrUndefined(photoURL, auth.name);\n    assertStringOrUndefined(tenantId, auth.name);\n    assertStringOrUndefined(_redirectEventId, auth.name);\n    assertStringOrUndefined(createdAt, auth.name);\n    assertStringOrUndefined(lastLoginAt, auth.name);\n    const user = new UserImpl({\n      uid,\n      auth,\n      email,\n      emailVerified,\n      displayName,\n      isAnonymous,\n      photoURL,\n      phoneNumber,\n      tenantId,\n      stsTokenManager,\n      createdAt,\n      lastLoginAt\n    });\n    if (providerData && Array.isArray(providerData)) {\n      user.providerData = providerData.map(userInfo => Object.assign({}, userInfo));\n    }\n    if (_redirectEventId) {\n      user._redirectEventId = _redirectEventId;\n    }\n    return user;\n  }\n  /**\r\n   * Initialize a User from an idToken server response\r\n   * @param auth\r\n   * @param idTokenResponse\r\n   */\n  static _fromIdTokenResponse(auth, idTokenResponse, isAnonymous = false) {\n    return _asyncToGenerator(function* () {\n      const stsTokenManager = new StsTokenManager();\n      stsTokenManager.updateFromServerResponse(idTokenResponse);\n      // Initialize the Firebase Auth user.\n      const user = new UserImpl({\n        uid: idTokenResponse.localId,\n        auth,\n        stsTokenManager,\n        isAnonymous\n      });\n      // Updates the user info and data and resolves with a user instance.\n      yield _reloadWithoutSaving(user);\n      return user;\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet InMemoryPersistence = /*#__PURE__*/(() => {\n  class InMemoryPersistence {\n    constructor() {\n      this.type = \"NONE\" /* PersistenceType.NONE */;\n      this.storage = {};\n    }\n    _isAvailable() {\n      return _asyncToGenerator(function* () {\n        return true;\n      })();\n    }\n    _set(key, value) {\n      var _this8 = this;\n      return _asyncToGenerator(function* () {\n        _this8.storage[key] = value;\n      })();\n    }\n    _get(key) {\n      var _this9 = this;\n      return _asyncToGenerator(function* () {\n        const value = _this9.storage[key];\n        return value === undefined ? null : value;\n      })();\n    }\n    _remove(key) {\n      var _this10 = this;\n      return _asyncToGenerator(function* () {\n        delete _this10.storage[key];\n      })();\n    }\n    _addListener(_key, _listener) {\n      // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n      return;\n    }\n    _removeListener(_key, _listener) {\n      // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n      return;\n    }\n  }\n  InMemoryPersistence.type = 'NONE';\n  /**\r\n   * An implementation of {@link Persistence} of type 'NONE'.\r\n   *\r\n   * @public\r\n   */\n  return InMemoryPersistence;\n})();\nconst inMemoryPersistence = InMemoryPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _persistenceKeyName(key, apiKey, appName) {\n  return `${\"firebase\" /* Namespace.PERSISTENCE */}:${key}:${apiKey}:${appName}`;\n}\nclass PersistenceUserManager {\n  constructor(persistence, auth, userKey) {\n    this.persistence = persistence;\n    this.auth = auth;\n    this.userKey = userKey;\n    const {\n      config,\n      name\n    } = this.auth;\n    this.fullUserKey = _persistenceKeyName(this.userKey, config.apiKey, name);\n    this.fullPersistenceKey = _persistenceKeyName(\"persistence\" /* KeyName.PERSISTENCE_USER */, config.apiKey, name);\n    this.boundEventHandler = auth._onStorageEvent.bind(auth);\n    this.persistence._addListener(this.fullUserKey, this.boundEventHandler);\n  }\n  setCurrentUser(user) {\n    return this.persistence._set(this.fullUserKey, user.toJSON());\n  }\n  getCurrentUser() {\n    var _this11 = this;\n    return _asyncToGenerator(function* () {\n      const blob = yield _this11.persistence._get(_this11.fullUserKey);\n      return blob ? UserImpl._fromJSON(_this11.auth, blob) : null;\n    })();\n  }\n  removeCurrentUser() {\n    return this.persistence._remove(this.fullUserKey);\n  }\n  savePersistenceForRedirect() {\n    return this.persistence._set(this.fullPersistenceKey, this.persistence.type);\n  }\n  setPersistence(newPersistence) {\n    var _this12 = this;\n    return _asyncToGenerator(function* () {\n      if (_this12.persistence === newPersistence) {\n        return;\n      }\n      const currentUser = yield _this12.getCurrentUser();\n      yield _this12.removeCurrentUser();\n      _this12.persistence = newPersistence;\n      if (currentUser) {\n        return _this12.setCurrentUser(currentUser);\n      }\n    })();\n  }\n  delete() {\n    this.persistence._removeListener(this.fullUserKey, this.boundEventHandler);\n  }\n  static create(auth, persistenceHierarchy, userKey = \"authUser\" /* KeyName.AUTH_USER */) {\n    return _asyncToGenerator(function* () {\n      if (!persistenceHierarchy.length) {\n        return new PersistenceUserManager(_getInstance(inMemoryPersistence), auth, userKey);\n      }\n      // Eliminate any persistences that are not available\n      const availablePersistences = (yield Promise.all(persistenceHierarchy.map( /*#__PURE__*/function () {\n        var _ref2 = _asyncToGenerator(function* (persistence) {\n          if (yield persistence._isAvailable()) {\n            return persistence;\n          }\n          return undefined;\n        });\n        return function (_x25) {\n          return _ref2.apply(this, arguments);\n        };\n      }()))).filter(persistence => persistence);\n      // Fall back to the first persistence listed, or in memory if none available\n      let selectedPersistence = availablePersistences[0] || _getInstance(inMemoryPersistence);\n      const key = _persistenceKeyName(userKey, auth.config.apiKey, auth.name);\n      // Pull out the existing user, setting the chosen persistence to that\n      // persistence if the user exists.\n      let userToMigrate = null;\n      // Note, here we check for a user in _all_ persistences, not just the\n      // ones deemed available. If we can migrate a user out of a broken\n      // persistence, we will (but only if that persistence supports migration).\n      for (const persistence of persistenceHierarchy) {\n        try {\n          const blob = yield persistence._get(key);\n          if (blob) {\n            const user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)\n            if (persistence !== selectedPersistence) {\n              userToMigrate = user;\n            }\n            selectedPersistence = persistence;\n            break;\n          }\n        } catch (_a) {}\n      }\n      // If we find the user in a persistence that does support migration, use\n      // that migration path (of only persistences that support migration)\n      const migrationHierarchy = availablePersistences.filter(p => p._shouldAllowMigration);\n      // If the persistence does _not_ allow migration, just finish off here\n      if (!selectedPersistence._shouldAllowMigration || !migrationHierarchy.length) {\n        return new PersistenceUserManager(selectedPersistence, auth, userKey);\n      }\n      selectedPersistence = migrationHierarchy[0];\n      if (userToMigrate) {\n        // This normally shouldn't throw since chosenPersistence.isAvailable() is true, but if it does\n        // we'll just let it bubble to surface the error.\n        yield selectedPersistence._set(key, userToMigrate.toJSON());\n      }\n      // Attempt to clear the key in other persistences but ignore errors. This helps prevent issues\n      // such as users getting stuck with a previous account after signing out and refreshing the tab.\n      yield Promise.all(persistenceHierarchy.map( /*#__PURE__*/function () {\n        var _ref3 = _asyncToGenerator(function* (persistence) {\n          if (persistence !== selectedPersistence) {\n            try {\n              yield persistence._remove(key);\n            } catch (_a) {}\n          }\n        });\n        return function (_x26) {\n          return _ref3.apply(this, arguments);\n        };\n      }()));\n      return new PersistenceUserManager(selectedPersistence, auth, userKey);\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine the browser for the purposes of reporting usage to the API\r\n */\nfunction _getBrowserName(userAgent) {\n  const ua = userAgent.toLowerCase();\n  if (ua.includes('opera/') || ua.includes('opr/') || ua.includes('opios/')) {\n    return \"Opera\" /* BrowserName.OPERA */;\n  } else if (_isIEMobile(ua)) {\n    // Windows phone IEMobile browser.\n    return \"IEMobile\" /* BrowserName.IEMOBILE */;\n  } else if (ua.includes('msie') || ua.includes('trident/')) {\n    return \"IE\" /* BrowserName.IE */;\n  } else if (ua.includes('edge/')) {\n    return \"Edge\" /* BrowserName.EDGE */;\n  } else if (_isFirefox(ua)) {\n    return \"Firefox\" /* BrowserName.FIREFOX */;\n  } else if (ua.includes('silk/')) {\n    return \"Silk\" /* BrowserName.SILK */;\n  } else if (_isBlackBerry(ua)) {\n    // Blackberry browser.\n    return \"Blackberry\" /* BrowserName.BLACKBERRY */;\n  } else if (_isWebOS(ua)) {\n    // WebOS default browser.\n    return \"Webos\" /* BrowserName.WEBOS */;\n  } else if (_isSafari(ua)) {\n    return \"Safari\" /* BrowserName.SAFARI */;\n  } else if ((ua.includes('chrome/') || _isChromeIOS(ua)) && !ua.includes('edge/')) {\n    return \"Chrome\" /* BrowserName.CHROME */;\n  } else if (_isAndroid(ua)) {\n    // Android stock browser.\n    return \"Android\" /* BrowserName.ANDROID */;\n  } else {\n    // Most modern browsers have name/version at end of user agent string.\n    const re = /([a-zA-Z\\d\\.]+)\\/[a-zA-Z\\d\\.]*$/;\n    const matches = userAgent.match(re);\n    if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {\n      return matches[1];\n    }\n  }\n  return \"Other\" /* BrowserName.OTHER */;\n}\n\nfunction _isFirefox(ua = getUA()) {\n  return /firefox\\//i.test(ua);\n}\nfunction _isSafari(userAgent = getUA()) {\n  const ua = userAgent.toLowerCase();\n  return ua.includes('safari/') && !ua.includes('chrome/') && !ua.includes('crios/') && !ua.includes('android');\n}\nfunction _isChromeIOS(ua = getUA()) {\n  return /crios\\//i.test(ua);\n}\nfunction _isIEMobile(ua = getUA()) {\n  return /iemobile/i.test(ua);\n}\nfunction _isAndroid(ua = getUA()) {\n  return /android/i.test(ua);\n}\nfunction _isBlackBerry(ua = getUA()) {\n  return /blackberry/i.test(ua);\n}\nfunction _isWebOS(ua = getUA()) {\n  return /webos/i.test(ua);\n}\nfunction _isIOS(ua = getUA()) {\n  return /iphone|ipad|ipod/i.test(ua) || /macintosh/i.test(ua) && /mobile/i.test(ua);\n}\nfunction _isIOS7Or8(ua = getUA()) {\n  return /(iPad|iPhone|iPod).*OS 7_\\d/i.test(ua) || /(iPad|iPhone|iPod).*OS 8_\\d/i.test(ua);\n}\nfunction _isIOSStandalone(ua = getUA()) {\n  var _a;\n  return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);\n}\nfunction _isIE10() {\n  return isIE() && document.documentMode === 10;\n}\nfunction _isMobileBrowser(ua = getUA()) {\n  // TODO: implement getBrowserName equivalent for OS.\n  return _isIOS(ua) || _isAndroid(ua) || _isWebOS(ua) || _isBlackBerry(ua) || /windows phone/i.test(ua) || _isIEMobile(ua);\n}\nfunction _isIframe() {\n  try {\n    // Check that the current window is not the top window.\n    // If so, return true.\n    return !!(window && window !== window.top);\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/*\r\n * Determine the SDK version string\r\n */\nfunction _getClientVersion(clientPlatform, frameworks = []) {\n  let reportedPlatform;\n  switch (clientPlatform) {\n    case \"Browser\" /* ClientPlatform.BROWSER */:\n      // In a browser environment, report the browser name.\n      reportedPlatform = _getBrowserName(getUA());\n      break;\n    case \"Worker\" /* ClientPlatform.WORKER */:\n      // Technically a worker runs from a browser but we need to differentiate a\n      // worker from a browser.\n      // For example: Chrome-Worker/JsCore/4.9.1/FirebaseCore-web.\n      reportedPlatform = `${_getBrowserName(getUA())}-${clientPlatform}`;\n      break;\n    default:\n      reportedPlatform = clientPlatform;\n  }\n  const reportedFrameworks = frameworks.length ? frameworks.join(',') : 'FirebaseCore-web'; /* default value if no other framework is used */\n  return `${reportedPlatform}/${\"JsCore\" /* ClientImplementation.CORE */}/${SDK_VERSION}/${reportedFrameworks}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthMiddlewareQueue {\n  constructor(auth) {\n    this.auth = auth;\n    this.queue = [];\n  }\n  pushCallback(callback, onAbort) {\n    // The callback could be sync or async. Wrap it into a\n    // function that is always async.\n    const wrappedCallback = user => new Promise((resolve, reject) => {\n      try {\n        const result = callback(user);\n        // Either resolve with existing promise or wrap a non-promise\n        // return value into a promise.\n        resolve(result);\n      } catch (e) {\n        // Sync callback throws.\n        reject(e);\n      }\n    });\n    // Attach the onAbort if present\n    wrappedCallback.onAbort = onAbort;\n    this.queue.push(wrappedCallback);\n    const index = this.queue.length - 1;\n    return () => {\n      // Unsubscribe. Replace with no-op. Do not remove from array, or it will disturb\n      // indexing of other elements.\n      this.queue[index] = () => Promise.resolve();\n    };\n  }\n  runMiddleware(nextUser) {\n    var _this13 = this;\n    return _asyncToGenerator(function* () {\n      if (_this13.auth.currentUser === nextUser) {\n        return;\n      }\n      // While running the middleware, build a temporary stack of onAbort\n      // callbacks to call if one middleware callback rejects.\n      const onAbortStack = [];\n      try {\n        for (const beforeStateCallback of _this13.queue) {\n          yield beforeStateCallback(nextUser);\n          // Only push the onAbort if the callback succeeds\n          if (beforeStateCallback.onAbort) {\n            onAbortStack.push(beforeStateCallback.onAbort);\n          }\n        }\n      } catch (e) {\n        // Run all onAbort, with separate try/catch to ignore any errors and\n        // continue\n        onAbortStack.reverse();\n        for (const onAbort of onAbortStack) {\n          try {\n            onAbort();\n          } catch (_) {\n            /* swallow error */\n          }\n        }\n        throw _this13.auth._errorFactory.create(\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */, {\n          originalMessage: e === null || e === void 0 ? void 0 : e.message\n        });\n      }\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthImpl {\n  constructor(app, heartbeatServiceProvider, config) {\n    this.app = app;\n    this.heartbeatServiceProvider = heartbeatServiceProvider;\n    this.config = config;\n    this.currentUser = null;\n    this.emulatorConfig = null;\n    this.operations = Promise.resolve();\n    this.authStateSubscription = new Subscription(this);\n    this.idTokenSubscription = new Subscription(this);\n    this.beforeStateQueue = new AuthMiddlewareQueue(this);\n    this.redirectUser = null;\n    this.isProactiveRefreshEnabled = false;\n    // Any network calls will set this to true and prevent subsequent emulator\n    // initialization\n    this._canInitEmulator = true;\n    this._isInitialized = false;\n    this._deleted = false;\n    this._initializationPromise = null;\n    this._popupRedirectResolver = null;\n    this._errorFactory = _DEFAULT_AUTH_ERROR_FACTORY;\n    // Tracks the last notified UID for state change listeners to prevent\n    // repeated calls to the callbacks. Undefined means it's never been\n    // called, whereas null means it's been called with a signed out user\n    this.lastNotifiedUid = undefined;\n    this.languageCode = null;\n    this.tenantId = null;\n    this.settings = {\n      appVerificationDisabledForTesting: false\n    };\n    this.frameworks = [];\n    this.name = app.name;\n    this.clientVersion = config.sdkClientVersion;\n  }\n  _initializeWithPersistence(persistenceHierarchy, popupRedirectResolver) {\n    var _this14 = this;\n    if (popupRedirectResolver) {\n      this._popupRedirectResolver = _getInstance(popupRedirectResolver);\n    }\n    // Have to check for app deletion throughout initialization (after each\n    // promise resolution)\n    this._initializationPromise = this.queue( /*#__PURE__*/_asyncToGenerator(function* () {\n      var _a, _b;\n      if (_this14._deleted) {\n        return;\n      }\n      _this14.persistenceManager = yield PersistenceUserManager.create(_this14, persistenceHierarchy);\n      if (_this14._deleted) {\n        return;\n      }\n      // Initialize the resolver early if necessary (only applicable to web:\n      // this will cause the iframe to load immediately in certain cases)\n      if ((_a = _this14._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {\n        // If this fails, don't halt auth loading\n        try {\n          yield _this14._popupRedirectResolver._initialize(_this14);\n        } catch (e) {\n          /* Ignore the error */\n        }\n      }\n      yield _this14.initializeCurrentUser(popupRedirectResolver);\n      _this14.lastNotifiedUid = ((_b = _this14.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;\n      if (_this14._deleted) {\n        return;\n      }\n      _this14._isInitialized = true;\n    }));\n    return this._initializationPromise;\n  }\n  /**\r\n   * If the persistence is changed in another window, the user manager will let us know\r\n   */\n  _onStorageEvent() {\n    var _this15 = this;\n    return _asyncToGenerator(function* () {\n      if (_this15._deleted) {\n        return;\n      }\n      const user = yield _this15.assertedPersistence.getCurrentUser();\n      if (!_this15.currentUser && !user) {\n        // No change, do nothing (was signed out and remained signed out).\n        return;\n      }\n      // If the same user is to be synchronized.\n      if (_this15.currentUser && user && _this15.currentUser.uid === user.uid) {\n        // Data update, simply copy data changes.\n        _this15._currentUser._assign(user);\n        // If tokens changed from previous user tokens, this will trigger\n        // notifyAuthListeners_.\n        yield _this15.currentUser.getIdToken();\n        return;\n      }\n      // Update current Auth state. Either a new login or logout.\n      // Skip blocking callbacks, they should not apply to a change in another tab.\n      yield _this15._updateCurrentUser(user, /* skipBeforeStateCallbacks */true);\n    })();\n  }\n  initializeCurrentUser(popupRedirectResolver) {\n    var _this16 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      // First check to see if we have a pending redirect event.\n      const previouslyStoredUser = yield _this16.assertedPersistence.getCurrentUser();\n      let futureCurrentUser = previouslyStoredUser;\n      let needsTocheckMiddleware = false;\n      if (popupRedirectResolver && _this16.config.authDomain) {\n        yield _this16.getOrInitRedirectPersistenceManager();\n        const redirectUserEventId = (_a = _this16.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;\n        const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;\n        const result = yield _this16.tryRedirectSignIn(popupRedirectResolver);\n        // If the stored user (i.e. the old \"currentUser\") has a redirectId that\n        // matches the redirect user, then we want to initially sign in with the\n        // new user object from result.\n        // TODO(samgho): More thoroughly test all of this\n        if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) && (result === null || result === void 0 ? void 0 : result.user)) {\n          futureCurrentUser = result.user;\n          needsTocheckMiddleware = true;\n        }\n      }\n      // If no user in persistence, there is no current user. Set to null.\n      if (!futureCurrentUser) {\n        return _this16.directlySetCurrentUser(null);\n      }\n      if (!futureCurrentUser._redirectEventId) {\n        // This isn't a redirect link operation, we can reload and bail.\n        // First though, ensure that we check the middleware is happy.\n        if (needsTocheckMiddleware) {\n          try {\n            yield _this16.beforeStateQueue.runMiddleware(futureCurrentUser);\n          } catch (e) {\n            futureCurrentUser = previouslyStoredUser;\n            // We know this is available since the bit is only set when the\n            // resolver is available\n            _this16._popupRedirectResolver._overrideRedirectResult(_this16, () => Promise.reject(e));\n          }\n        }\n        if (futureCurrentUser) {\n          return _this16.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n        } else {\n          return _this16.directlySetCurrentUser(null);\n        }\n      }\n      _assert(_this16._popupRedirectResolver, _this16, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n      yield _this16.getOrInitRedirectPersistenceManager();\n      // If the redirect user's event ID matches the current user's event ID,\n      // DO NOT reload the current user, otherwise they'll be cleared from storage.\n      // This is important for the reauthenticateWithRedirect() flow.\n      if (_this16.redirectUser && _this16.redirectUser._redirectEventId === futureCurrentUser._redirectEventId) {\n        return _this16.directlySetCurrentUser(futureCurrentUser);\n      }\n      return _this16.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n    })();\n  }\n  tryRedirectSignIn(redirectResolver) {\n    var _this17 = this;\n    return _asyncToGenerator(function* () {\n      // The redirect user needs to be checked (and signed in if available)\n      // during auth initialization. All of the normal sign in and link/reauth\n      // flows call back into auth and push things onto the promise queue. We\n      // need to await the result of the redirect sign in *inside the promise\n      // queue*. This presents a problem: we run into deadlock. See:\n      //    ┌> [Initialization] ─────┐\n      //    ┌> [<other queue tasks>] │\n      //    └─ [getRedirectResult] <─┘\n      //    where [] are tasks on the queue and arrows denote awaits\n      // Initialization will never complete because it's waiting on something\n      // that's waiting for initialization to complete!\n      //\n      // Instead, this method calls getRedirectResult() (stored in\n      // _completeRedirectFn) with an optional parameter that instructs all of\n      // the underlying auth operations to skip anything that mutates auth state.\n      let result = null;\n      try {\n        // We know this._popupRedirectResolver is set since redirectResolver\n        // is passed in. The _completeRedirectFn expects the unwrapped extern.\n        result = yield _this17._popupRedirectResolver._completeRedirectFn(_this17, redirectResolver, true);\n      } catch (e) {\n        // Swallow any errors here; the code can retrieve them in\n        // getRedirectResult().\n        yield _this17._setRedirectUser(null);\n      }\n      return result;\n    })();\n  }\n  reloadAndSetCurrentUserOrClear(user) {\n    var _this18 = this;\n    return _asyncToGenerator(function* () {\n      try {\n        yield _reloadWithoutSaving(user);\n      } catch (e) {\n        if ((e === null || e === void 0 ? void 0 : e.code) !== `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n          // Something's wrong with the user's token. Log them out and remove\n          // them from storage\n          return _this18.directlySetCurrentUser(null);\n        }\n      }\n      return _this18.directlySetCurrentUser(user);\n    })();\n  }\n  useDeviceLanguage() {\n    this.languageCode = _getUserLanguage();\n  }\n  _delete() {\n    var _this19 = this;\n    return _asyncToGenerator(function* () {\n      _this19._deleted = true;\n    })();\n  }\n  updateCurrentUser(userExtern) {\n    var _this20 = this;\n    return _asyncToGenerator(function* () {\n      // The public updateCurrentUser method needs to make a copy of the user,\n      // and also check that the project matches\n      const user = userExtern ? getModularInstance(userExtern) : null;\n      if (user) {\n        _assert(user.auth.config.apiKey === _this20.config.apiKey, _this20, \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */);\n      }\n\n      return _this20._updateCurrentUser(user && user._clone(_this20));\n    })();\n  }\n  _updateCurrentUser(user, skipBeforeStateCallbacks = false) {\n    var _this21 = this;\n    return _asyncToGenerator(function* () {\n      if (_this21._deleted) {\n        return;\n      }\n      if (user) {\n        _assert(_this21.tenantId === user.tenantId, _this21, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n      }\n\n      if (!skipBeforeStateCallbacks) {\n        yield _this21.beforeStateQueue.runMiddleware(user);\n      }\n      return _this21.queue( /*#__PURE__*/_asyncToGenerator(function* () {\n        yield _this21.directlySetCurrentUser(user);\n        _this21.notifyAuthListeners();\n      }));\n    })();\n  }\n  signOut() {\n    var _this22 = this;\n    return _asyncToGenerator(function* () {\n      // Run first, to block _setRedirectUser() if any callbacks fail.\n      yield _this22.beforeStateQueue.runMiddleware(null);\n      // Clear the redirect user when signOut is called\n      if (_this22.redirectPersistenceManager || _this22._popupRedirectResolver) {\n        yield _this22._setRedirectUser(null);\n      }\n      // Prevent callbacks from being called again in _updateCurrentUser, as\n      // they were already called in the first line.\n      return _this22._updateCurrentUser(null, /* skipBeforeStateCallbacks */true);\n    })();\n  }\n  setPersistence(persistence) {\n    var _this23 = this;\n    return this.queue( /*#__PURE__*/_asyncToGenerator(function* () {\n      yield _this23.assertedPersistence.setPersistence(_getInstance(persistence));\n    }));\n  }\n  _getPersistence() {\n    return this.assertedPersistence.persistence.type;\n  }\n  _updateErrorMap(errorMap) {\n    this._errorFactory = new ErrorFactory('auth', 'Firebase', errorMap());\n  }\n  onAuthStateChanged(nextOrObserver, error, completed) {\n    return this.registerStateListener(this.authStateSubscription, nextOrObserver, error, completed);\n  }\n  beforeAuthStateChanged(callback, onAbort) {\n    return this.beforeStateQueue.pushCallback(callback, onAbort);\n  }\n  onIdTokenChanged(nextOrObserver, error, completed) {\n    return this.registerStateListener(this.idTokenSubscription, nextOrObserver, error, completed);\n  }\n  toJSON() {\n    var _a;\n    return {\n      apiKey: this.config.apiKey,\n      authDomain: this.config.authDomain,\n      appName: this.name,\n      currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()\n    };\n  }\n  _setRedirectUser(user, popupRedirectResolver) {\n    var _this24 = this;\n    return _asyncToGenerator(function* () {\n      const redirectManager = yield _this24.getOrInitRedirectPersistenceManager(popupRedirectResolver);\n      return user === null ? redirectManager.removeCurrentUser() : redirectManager.setCurrentUser(user);\n    })();\n  }\n  getOrInitRedirectPersistenceManager(popupRedirectResolver) {\n    var _this25 = this;\n    return _asyncToGenerator(function* () {\n      if (!_this25.redirectPersistenceManager) {\n        const resolver = popupRedirectResolver && _getInstance(popupRedirectResolver) || _this25._popupRedirectResolver;\n        _assert(resolver, _this25, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n        _this25.redirectPersistenceManager = yield PersistenceUserManager.create(_this25, [_getInstance(resolver._redirectPersistence)], \"redirectUser\" /* KeyName.REDIRECT_USER */);\n        _this25.redirectUser = yield _this25.redirectPersistenceManager.getCurrentUser();\n      }\n      return _this25.redirectPersistenceManager;\n    })();\n  }\n  _redirectUserForId(id) {\n    var _this26 = this;\n    return _asyncToGenerator(function* () {\n      var _a, _b;\n      // Make sure we've cleared any pending persistence actions if we're not in\n      // the initializer\n      if (_this26._isInitialized) {\n        yield _this26.queue( /*#__PURE__*/_asyncToGenerator(function* () {}));\n      }\n      if (((_a = _this26._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {\n        return _this26._currentUser;\n      }\n      if (((_b = _this26.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {\n        return _this26.redirectUser;\n      }\n      return null;\n    })();\n  }\n  _persistUserIfCurrent(user) {\n    var _this27 = this;\n    return _asyncToGenerator(function* () {\n      if (user === _this27.currentUser) {\n        return _this27.queue( /*#__PURE__*/_asyncToGenerator(function* () {\n          return _this27.directlySetCurrentUser(user);\n        }));\n      }\n    })();\n  }\n  /** Notifies listeners only if the user is current */\n  _notifyListenersIfCurrent(user) {\n    if (user === this.currentUser) {\n      this.notifyAuthListeners();\n    }\n  }\n  _key() {\n    return `${this.config.authDomain}:${this.config.apiKey}:${this.name}`;\n  }\n  _startProactiveRefresh() {\n    this.isProactiveRefreshEnabled = true;\n    if (this.currentUser) {\n      this._currentUser._startProactiveRefresh();\n    }\n  }\n  _stopProactiveRefresh() {\n    this.isProactiveRefreshEnabled = false;\n    if (this.currentUser) {\n      this._currentUser._stopProactiveRefresh();\n    }\n  }\n  /** Returns the current user cast as the internal type */\n  get _currentUser() {\n    return this.currentUser;\n  }\n  notifyAuthListeners() {\n    var _a, _b;\n    if (!this._isInitialized) {\n      return;\n    }\n    this.idTokenSubscription.next(this.currentUser);\n    const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;\n    if (this.lastNotifiedUid !== currentUid) {\n      this.lastNotifiedUid = currentUid;\n      this.authStateSubscription.next(this.currentUser);\n    }\n  }\n  registerStateListener(subscription, nextOrObserver, error, completed) {\n    if (this._deleted) {\n      return () => {};\n    }\n    const cb = typeof nextOrObserver === 'function' ? nextOrObserver : nextOrObserver.next.bind(nextOrObserver);\n    const promise = this._isInitialized ? Promise.resolve() : this._initializationPromise;\n    _assert(promise, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    // The callback needs to be called asynchronously per the spec.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    promise.then(() => cb(this.currentUser));\n    if (typeof nextOrObserver === 'function') {\n      return subscription.addObserver(nextOrObserver, error, completed);\n    } else {\n      return subscription.addObserver(nextOrObserver);\n    }\n  }\n  /**\r\n   * Unprotected (from race conditions) method to set the current user. This\r\n   * should only be called from within a queued callback. This is necessary\r\n   * because the queue shouldn't rely on another queued callback.\r\n   */\n  directlySetCurrentUser(user) {\n    var _this28 = this;\n    return _asyncToGenerator(function* () {\n      if (_this28.currentUser && _this28.currentUser !== user) {\n        _this28._currentUser._stopProactiveRefresh();\n      }\n      if (user && _this28.isProactiveRefreshEnabled) {\n        user._startProactiveRefresh();\n      }\n      _this28.currentUser = user;\n      if (user) {\n        yield _this28.assertedPersistence.setCurrentUser(user);\n      } else {\n        yield _this28.assertedPersistence.removeCurrentUser();\n      }\n    })();\n  }\n  queue(action) {\n    // In case something errors, the callback still should be called in order\n    // to keep the promise chain alive\n    this.operations = this.operations.then(action, action);\n    return this.operations;\n  }\n  get assertedPersistence() {\n    _assert(this.persistenceManager, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    return this.persistenceManager;\n  }\n  _logFramework(framework) {\n    if (!framework || this.frameworks.includes(framework)) {\n      return;\n    }\n    this.frameworks.push(framework);\n    // Sort alphabetically so that \"FirebaseCore-web,FirebaseUI-web\" and\n    // \"FirebaseUI-web,FirebaseCore-web\" aren't viewed as different.\n    this.frameworks.sort();\n    this.clientVersion = _getClientVersion(this.config.clientPlatform, this._getFrameworks());\n  }\n  _getFrameworks() {\n    return this.frameworks;\n  }\n  _getAdditionalHeaders() {\n    var _this29 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      // Additional headers on every request\n      const headers = {\n        [\"X-Client-Version\" /* HttpHeader.X_CLIENT_VERSION */]: _this29.clientVersion\n      };\n      if (_this29.app.options.appId) {\n        headers[\"X-Firebase-gmpid\" /* HttpHeader.X_FIREBASE_GMPID */] = _this29.app.options.appId;\n      }\n      // If the heartbeat service exists, add the heartbeat string\n      const heartbeatsHeader = yield (_a = _this29.heartbeatServiceProvider.getImmediate({\n        optional: true\n      })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader();\n      if (heartbeatsHeader) {\n        headers[\"X-Firebase-Client\" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;\n      }\n      return headers;\n    })();\n  }\n}\n/**\r\n * Method to be used to cast down to our private implmentation of Auth.\r\n * It will also handle unwrapping from the compat type if necessary\r\n *\r\n * @param auth Auth object passed in from developer\r\n */\nfunction _castAuth(auth) {\n  return getModularInstance(auth);\n}\n/** Helper class to wrap subscriber logic */\nclass Subscription {\n  constructor(auth) {\n    this.auth = auth;\n    this.observer = null;\n    this.addObserver = createSubscribe(observer => this.observer = observer);\n  }\n  get next() {\n    _assert(this.observer, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    return this.observer.next.bind(this.observer);\n  }\n}\n\n/**\r\n * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production\r\n * Firebase Auth services.\r\n *\r\n * @remarks\r\n * This must be called synchronously immediately following the first call to\r\n * {@link initializeAuth}.  Do not use with production credentials as emulator\r\n * traffic is not encrypted.\r\n *\r\n *\r\n * @example\r\n * ```javascript\r\n * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').\r\n * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to\r\n * `true` to disable the warning banner attached to the DOM.\r\n *\r\n * @public\r\n */\nfunction connectAuthEmulator(auth, url, options) {\n  const authInternal = _castAuth(auth);\n  _assert(authInternal._canInitEmulator, authInternal, \"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);\n  _assert(/^https?:\\/\\//.test(url), authInternal, \"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);\n  const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);\n  const protocol = extractProtocol(url);\n  const {\n    host,\n    port\n  } = extractHostAndPort(url);\n  const portStr = port === null ? '' : `:${port}`;\n  // Always replace path with \"/\" (even if input url had no path at all, or had a different one).\n  authInternal.config.emulator = {\n    url: `${protocol}//${host}${portStr}/`\n  };\n  authInternal.settings.appVerificationDisabledForTesting = true;\n  authInternal.emulatorConfig = Object.freeze({\n    host,\n    port,\n    protocol: protocol.replace(':', ''),\n    options: Object.freeze({\n      disableWarnings\n    })\n  });\n  if (!disableWarnings) {\n    emitEmulatorWarning();\n  }\n}\nfunction extractProtocol(url) {\n  const protocolEnd = url.indexOf(':');\n  return protocolEnd < 0 ? '' : url.substr(0, protocolEnd + 1);\n}\nfunction extractHostAndPort(url) {\n  const protocol = extractProtocol(url);\n  const authority = /(\\/\\/)?([^?#/]+)/.exec(url.substr(protocol.length)); // Between // and /, ? or #.\n  if (!authority) {\n    return {\n      host: '',\n      port: null\n    };\n  }\n  const hostAndPort = authority[2].split('@').pop() || ''; // Strip out \"username:password@\".\n  const bracketedIPv6 = /^(\\[[^\\]]+\\])(:|$)/.exec(hostAndPort);\n  if (bracketedIPv6) {\n    const host = bracketedIPv6[1];\n    return {\n      host,\n      port: parsePort(hostAndPort.substr(host.length + 1))\n    };\n  } else {\n    const [host, port] = hostAndPort.split(':');\n    return {\n      host,\n      port: parsePort(port)\n    };\n  }\n}\nfunction parsePort(portStr) {\n  if (!portStr) {\n    return null;\n  }\n  const port = Number(portStr);\n  if (isNaN(port)) {\n    return null;\n  }\n  return port;\n}\nfunction emitEmulatorWarning() {\n  function attachBanner() {\n    const el = document.createElement('p');\n    const sty = el.style;\n    el.innerText = 'Running in emulator mode. Do not use with production credentials.';\n    sty.position = 'fixed';\n    sty.width = '100%';\n    sty.backgroundColor = '#ffffff';\n    sty.border = '.1em solid #000000';\n    sty.color = '#b50000';\n    sty.bottom = '0px';\n    sty.left = '0px';\n    sty.margin = '0px';\n    sty.zIndex = '10000';\n    sty.textAlign = 'center';\n    el.classList.add('firebase-emulator-warning');\n    document.body.appendChild(el);\n  }\n  if (typeof console !== 'undefined' && typeof console.info === 'function') {\n    console.info('WARNING: You are using the Auth Emulator,' + ' which is intended for local testing only.  Do not use with' + ' production credentials.');\n  }\n  if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n    if (document.readyState === 'loading') {\n      window.addEventListener('DOMContentLoaded', attachBanner);\n    } else {\n      attachBanner();\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by an {@link AuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass AuthCredential {\n  /** @internal */\n  constructor(\n  /**\r\n   * The authentication provider ID for the credential.\r\n   *\r\n   * @remarks\r\n   * For example, 'facebook.com', or 'google.com'.\r\n   */\n  providerId,\n  /**\r\n   * The authentication sign in method for the credential.\r\n   *\r\n   * @remarks\r\n   * For example, {@link SignInMethod}.EMAIL_PASSWORD, or\r\n   * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method\r\n   * identifier as returned in {@link fetchSignInMethodsForEmail}.\r\n   */\n  signInMethod) {\n    this.providerId = providerId;\n    this.signInMethod = signInMethod;\n  }\n  /**\r\n   * Returns a JSON-serializable representation of this object.\r\n   *\r\n   * @returns a JSON-serializable representation of this object.\r\n   */\n  toJSON() {\n    return debugFail('not implemented');\n  }\n  /** @internal */\n  _getIdTokenResponse(_auth) {\n    return debugFail('not implemented');\n  }\n  /** @internal */\n  _linkToIdToken(_auth, _idToken) {\n    return debugFail('not implemented');\n  }\n  /** @internal */\n  _getReauthenticationResolver(_auth) {\n    return debugFail('not implemented');\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction resetPassword(_x27, _x28) {\n  return _resetPassword.apply(this, arguments);\n}\nfunction _resetPassword() {\n  _resetPassword = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:resetPassword\" /* Endpoint.RESET_PASSWORD */, _addTidIfNecessary(auth, request));\n  });\n  return _resetPassword.apply(this, arguments);\n}\nfunction updateEmailPassword(_x29, _x30) {\n  return _updateEmailPassword.apply(this, arguments);\n}\nfunction _updateEmailPassword() {\n  _updateEmailPassword = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n  });\n  return _updateEmailPassword.apply(this, arguments);\n}\nfunction applyActionCode$1(_x31, _x32) {\n  return _applyActionCode$.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _applyActionCode$() {\n  _applyActionCode$ = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, _addTidIfNecessary(auth, request));\n  });\n  return _applyActionCode$.apply(this, arguments);\n}\nfunction signInWithPassword(_x33, _x34) {\n  return _signInWithPassword.apply(this, arguments);\n}\nfunction _signInWithPassword() {\n  _signInWithPassword = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPassword\" /* Endpoint.SIGN_IN_WITH_PASSWORD */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithPassword.apply(this, arguments);\n}\nfunction sendOobCode(_x35, _x36) {\n  return _sendOobCode.apply(this, arguments);\n}\nfunction _sendOobCode() {\n  _sendOobCode = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendOobCode\" /* Endpoint.SEND_OOB_CODE */, _addTidIfNecessary(auth, request));\n  });\n  return _sendOobCode.apply(this, arguments);\n}\nfunction sendEmailVerification$1(_x37, _x38) {\n  return _sendEmailVerification$.apply(this, arguments);\n}\nfunction _sendEmailVerification$() {\n  _sendEmailVerification$ = _asyncToGenerator(function* (auth, request) {\n    return sendOobCode(auth, request);\n  });\n  return _sendEmailVerification$.apply(this, arguments);\n}\nfunction sendPasswordResetEmail$1(_x39, _x40) {\n  return _sendPasswordResetEmail$.apply(this, arguments);\n}\nfunction _sendPasswordResetEmail$() {\n  _sendPasswordResetEmail$ = _asyncToGenerator(function* (auth, request) {\n    return sendOobCode(auth, request);\n  });\n  return _sendPasswordResetEmail$.apply(this, arguments);\n}\nfunction sendSignInLinkToEmail$1(_x41, _x42) {\n  return _sendSignInLinkToEmail$.apply(this, arguments);\n}\nfunction _sendSignInLinkToEmail$() {\n  _sendSignInLinkToEmail$ = _asyncToGenerator(function* (auth, request) {\n    return sendOobCode(auth, request);\n  });\n  return _sendSignInLinkToEmail$.apply(this, arguments);\n}\nfunction verifyAndChangeEmail(_x43, _x44) {\n  return _verifyAndChangeEmail.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _verifyAndChangeEmail() {\n  _verifyAndChangeEmail = _asyncToGenerator(function* (auth, request) {\n    return sendOobCode(auth, request);\n  });\n  return _verifyAndChangeEmail.apply(this, arguments);\n}\nfunction signInWithEmailLink$1(_x45, _x46) {\n  return _signInWithEmailLink$.apply(this, arguments);\n}\nfunction _signInWithEmailLink$() {\n  _signInWithEmailLink$ = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithEmailLink$.apply(this, arguments);\n}\nfunction signInWithEmailLinkForLinking(_x47, _x48) {\n  return _signInWithEmailLinkForLinking.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by {@link EmailAuthProvider} for\r\n * {@link ProviderId}.PASSWORD\r\n *\r\n * @remarks\r\n * Covers both {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @public\r\n */\nfunction _signInWithEmailLinkForLinking() {\n  _signInWithEmailLinkForLinking = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithEmailLinkForLinking.apply(this, arguments);\n}\nclass EmailAuthCredential extends AuthCredential {\n  /** @internal */\n  constructor( /** @internal */\n  _email, /** @internal */\n  _password, signInMethod, /** @internal */\n  _tenantId = null) {\n    super(\"password\" /* ProviderId.PASSWORD */, signInMethod);\n    this._email = _email;\n    this._password = _password;\n    this._tenantId = _tenantId;\n  }\n  /** @internal */\n  static _fromEmailAndPassword(email, password) {\n    return new EmailAuthCredential(email, password, \"password\" /* SignInMethod.EMAIL_PASSWORD */);\n  }\n  /** @internal */\n  static _fromEmailAndCode(email, oobCode, tenantId = null) {\n    return new EmailAuthCredential(email, oobCode, \"emailLink\" /* SignInMethod.EMAIL_LINK */, tenantId);\n  }\n  /** {@inheritdoc AuthCredential.toJSON} */\n  toJSON() {\n    return {\n      email: this._email,\n      password: this._password,\n      signInMethod: this.signInMethod,\n      tenantId: this._tenantId\n    };\n  }\n  /**\r\n   * Static method to deserialize a JSON representation of an object into an {@link  AuthCredential}.\r\n   *\r\n   * @param json - Either `object` or the stringified representation of the object. When string is\r\n   * provided, `JSON.parse` would be called first.\r\n   *\r\n   * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n   */\n  static fromJSON(json) {\n    const obj = typeof json === 'string' ? JSON.parse(json) : json;\n    if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {\n      if (obj.signInMethod === \"password\" /* SignInMethod.EMAIL_PASSWORD */) {\n        return this._fromEmailAndPassword(obj.email, obj.password);\n      } else if (obj.signInMethod === \"emailLink\" /* SignInMethod.EMAIL_LINK */) {\n        return this._fromEmailAndCode(obj.email, obj.password, obj.tenantId);\n      }\n    }\n    return null;\n  }\n  /** @internal */\n  _getIdTokenResponse(auth) {\n    var _this30 = this;\n    return _asyncToGenerator(function* () {\n      switch (_this30.signInMethod) {\n        case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n          return signInWithPassword(auth, {\n            returnSecureToken: true,\n            email: _this30._email,\n            password: _this30._password\n          });\n        case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n          return signInWithEmailLink$1(auth, {\n            email: _this30._email,\n            oobCode: _this30._password\n          });\n        default:\n          _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      }\n    })();\n  }\n  /** @internal */\n  _linkToIdToken(auth, idToken) {\n    var _this31 = this;\n    return _asyncToGenerator(function* () {\n      switch (_this31.signInMethod) {\n        case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n          return updateEmailPassword(auth, {\n            idToken,\n            returnSecureToken: true,\n            email: _this31._email,\n            password: _this31._password\n          });\n        case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n          return signInWithEmailLinkForLinking(auth, {\n            idToken,\n            email: _this31._email,\n            oobCode: _this31._password\n          });\n        default:\n          _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      }\n    })();\n  }\n  /** @internal */\n  _getReauthenticationResolver(auth) {\n    return this._getIdTokenResponse(auth);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction signInWithIdp(_x49, _x50) {\n  return _signInWithIdp.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _signInWithIdp() {\n  _signInWithIdp = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithIdp\" /* Endpoint.SIGN_IN_WITH_IDP */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithIdp.apply(this, arguments);\n}\nconst IDP_REQUEST_URI$1 = 'http://localhost';\n/**\r\n * Represents the OAuth credentials returned by an {@link OAuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass OAuthCredential extends AuthCredential {\n  constructor() {\n    super(...arguments);\n    this.pendingToken = null;\n  }\n  /** @internal */\n  static _fromParams(params) {\n    const cred = new OAuthCredential(params.providerId, params.signInMethod);\n    if (params.idToken || params.accessToken) {\n      // OAuth 2 and either ID token or access token.\n      if (params.idToken) {\n        cred.idToken = params.idToken;\n      }\n      if (params.accessToken) {\n        cred.accessToken = params.accessToken;\n      }\n      // Add nonce if available and no pendingToken is present.\n      if (params.nonce && !params.pendingToken) {\n        cred.nonce = params.nonce;\n      }\n      if (params.pendingToken) {\n        cred.pendingToken = params.pendingToken;\n      }\n    } else if (params.oauthToken && params.oauthTokenSecret) {\n      // OAuth 1 and OAuth token with token secret\n      cred.accessToken = params.oauthToken;\n      cred.secret = params.oauthTokenSecret;\n    } else {\n      _fail(\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    }\n\n    return cred;\n  }\n  /** {@inheritdoc AuthCredential.toJSON}  */\n  toJSON() {\n    return {\n      idToken: this.idToken,\n      accessToken: this.accessToken,\n      secret: this.secret,\n      nonce: this.nonce,\n      pendingToken: this.pendingToken,\n      providerId: this.providerId,\n      signInMethod: this.signInMethod\n    };\n  }\n  /**\r\n   * Static method to deserialize a JSON representation of an object into an\r\n   * {@link  AuthCredential}.\r\n   *\r\n   * @param json - Input can be either Object or the stringified representation of the object.\r\n   * When string is provided, JSON.parse would be called first.\r\n   *\r\n   * @returns If the JSON input does not represent an {@link  AuthCredential}, null is returned.\r\n   */\n  static fromJSON(json) {\n    const obj = typeof json === 'string' ? JSON.parse(json) : json;\n    const {\n        providerId,\n        signInMethod\n      } = obj,\n      rest = __rest(obj, [\"providerId\", \"signInMethod\"]);\n    if (!providerId || !signInMethod) {\n      return null;\n    }\n    const cred = new OAuthCredential(providerId, signInMethod);\n    cred.idToken = rest.idToken || undefined;\n    cred.accessToken = rest.accessToken || undefined;\n    cred.secret = rest.secret;\n    cred.nonce = rest.nonce;\n    cred.pendingToken = rest.pendingToken || null;\n    return cred;\n  }\n  /** @internal */\n  _getIdTokenResponse(auth) {\n    const request = this.buildRequest();\n    return signInWithIdp(auth, request);\n  }\n  /** @internal */\n  _linkToIdToken(auth, idToken) {\n    const request = this.buildRequest();\n    request.idToken = idToken;\n    return signInWithIdp(auth, request);\n  }\n  /** @internal */\n  _getReauthenticationResolver(auth) {\n    const request = this.buildRequest();\n    request.autoCreate = false;\n    return signInWithIdp(auth, request);\n  }\n  buildRequest() {\n    const request = {\n      requestUri: IDP_REQUEST_URI$1,\n      returnSecureToken: true\n    };\n    if (this.pendingToken) {\n      request.pendingToken = this.pendingToken;\n    } else {\n      const postBody = {};\n      if (this.idToken) {\n        postBody['id_token'] = this.idToken;\n      }\n      if (this.accessToken) {\n        postBody['access_token'] = this.accessToken;\n      }\n      if (this.secret) {\n        postBody['oauth_token_secret'] = this.secret;\n      }\n      postBody['providerId'] = this.providerId;\n      if (this.nonce && !this.pendingToken) {\n        postBody['nonce'] = this.nonce;\n      }\n      request.postBody = querystring(postBody);\n    }\n    return request;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction sendPhoneVerificationCode(_x51, _x52) {\n  return _sendPhoneVerificationCode.apply(this, arguments);\n}\nfunction _sendPhoneVerificationCode() {\n  _sendPhoneVerificationCode = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendVerificationCode\" /* Endpoint.SEND_VERIFICATION_CODE */, _addTidIfNecessary(auth, request));\n  });\n  return _sendPhoneVerificationCode.apply(this, arguments);\n}\nfunction signInWithPhoneNumber$1(_x53, _x54) {\n  return _signInWithPhoneNumber$.apply(this, arguments);\n}\nfunction _signInWithPhoneNumber$() {\n  _signInWithPhoneNumber$ = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithPhoneNumber$.apply(this, arguments);\n}\nfunction linkWithPhoneNumber$1(_x55, _x56) {\n  return _linkWithPhoneNumber$.apply(this, arguments);\n}\nfunction _linkWithPhoneNumber$() {\n  _linkWithPhoneNumber$ = _asyncToGenerator(function* (auth, request) {\n    const response = yield _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n    if (response.temporaryProof) {\n      throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, response);\n    }\n    return response;\n  });\n  return _linkWithPhoneNumber$.apply(this, arguments);\n}\nconst VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {\n  [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */\n};\nfunction verifyPhoneNumberForExisting(_x57, _x58) {\n  return _verifyPhoneNumberForExisting.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Represents the credentials returned by {@link PhoneAuthProvider}.\r\n *\r\n * @public\r\n */\nfunction _verifyPhoneNumberForExisting() {\n  _verifyPhoneNumberForExisting = _asyncToGenerator(function* (auth, request) {\n    const apiRequest = Object.assign(Object.assign({}, request), {\n      operation: 'REAUTH'\n    });\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);\n  });\n  return _verifyPhoneNumberForExisting.apply(this, arguments);\n}\nclass PhoneAuthCredential extends AuthCredential {\n  constructor(params) {\n    super(\"phone\" /* ProviderId.PHONE */, \"phone\" /* SignInMethod.PHONE */);\n    this.params = params;\n  }\n  /** @internal */\n  static _fromVerification(verificationId, verificationCode) {\n    return new PhoneAuthCredential({\n      verificationId,\n      verificationCode\n    });\n  }\n  /** @internal */\n  static _fromTokenResponse(phoneNumber, temporaryProof) {\n    return new PhoneAuthCredential({\n      phoneNumber,\n      temporaryProof\n    });\n  }\n  /** @internal */\n  _getIdTokenResponse(auth) {\n    return signInWithPhoneNumber$1(auth, this._makeVerificationRequest());\n  }\n  /** @internal */\n  _linkToIdToken(auth, idToken) {\n    return linkWithPhoneNumber$1(auth, Object.assign({\n      idToken\n    }, this._makeVerificationRequest()));\n  }\n  /** @internal */\n  _getReauthenticationResolver(auth) {\n    return verifyPhoneNumberForExisting(auth, this._makeVerificationRequest());\n  }\n  /** @internal */\n  _makeVerificationRequest() {\n    const {\n      temporaryProof,\n      phoneNumber,\n      verificationId,\n      verificationCode\n    } = this.params;\n    if (temporaryProof && phoneNumber) {\n      return {\n        temporaryProof,\n        phoneNumber\n      };\n    }\n    return {\n      sessionInfo: verificationId,\n      code: verificationCode\n    };\n  }\n  /** {@inheritdoc AuthCredential.toJSON} */\n  toJSON() {\n    const obj = {\n      providerId: this.providerId\n    };\n    if (this.params.phoneNumber) {\n      obj.phoneNumber = this.params.phoneNumber;\n    }\n    if (this.params.temporaryProof) {\n      obj.temporaryProof = this.params.temporaryProof;\n    }\n    if (this.params.verificationCode) {\n      obj.verificationCode = this.params.verificationCode;\n    }\n    if (this.params.verificationId) {\n      obj.verificationId = this.params.verificationId;\n    }\n    return obj;\n  }\n  /** Generates a phone credential based on a plain object or a JSON string. */\n  static fromJSON(json) {\n    if (typeof json === 'string') {\n      json = JSON.parse(json);\n    }\n    const {\n      verificationId,\n      verificationCode,\n      phoneNumber,\n      temporaryProof\n    } = json;\n    if (!verificationCode && !verificationId && !phoneNumber && !temporaryProof) {\n      return null;\n    }\n    return new PhoneAuthCredential({\n      verificationId,\n      verificationCode,\n      phoneNumber,\n      temporaryProof\n    });\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Maps the mode string in action code URL to Action Code Info operation.\r\n *\r\n * @param mode\r\n */\nfunction parseMode(mode) {\n  switch (mode) {\n    case 'recoverEmail':\n      return \"RECOVER_EMAIL\" /* ActionCodeOperation.RECOVER_EMAIL */;\n    case 'resetPassword':\n      return \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */;\n    case 'signIn':\n      return \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n    case 'verifyEmail':\n      return \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */;\n    case 'verifyAndChangeEmail':\n      return \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */;\n    case 'revertSecondFactorAddition':\n      return \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */;\n    default:\n      return null;\n  }\n}\n/**\r\n * Helper to parse FDL links\r\n *\r\n * @param url\r\n */\nfunction parseDeepLink(url) {\n  const link = querystringDecode(extractQuerystring(url))['link'];\n  // Double link case (automatic redirect).\n  const doubleDeepLink = link ? querystringDecode(extractQuerystring(link))['deep_link_id'] : null;\n  // iOS custom scheme links.\n  const iOSDeepLink = querystringDecode(extractQuerystring(url))['deep_link_id'];\n  const iOSDoubleDeepLink = iOSDeepLink ? querystringDecode(extractQuerystring(iOSDeepLink))['link'] : null;\n  return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\n}\n/**\r\n * A utility class to parse email action URLs such as password reset, email verification,\r\n * email link sign in, etc.\r\n *\r\n * @public\r\n */\nclass ActionCodeURL {\n  /**\r\n   * @param actionLink - The link from which to extract the URL.\r\n   * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n   *\r\n   * @internal\r\n   */\n  constructor(actionLink) {\n    var _a, _b, _c, _d, _e, _f;\n    const searchParams = querystringDecode(extractQuerystring(actionLink));\n    const apiKey = (_a = searchParams[\"apiKey\" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;\n    const code = (_b = searchParams[\"oobCode\" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;\n    const operation = parseMode((_c = searchParams[\"mode\" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);\n    // Validate API key, code and mode.\n    _assert(apiKey && code && operation, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    this.apiKey = apiKey;\n    this.operation = operation;\n    this.code = code;\n    this.continueUrl = (_d = searchParams[\"continueUrl\" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;\n    this.languageCode = (_e = searchParams[\"languageCode\" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;\n    this.tenantId = (_f = searchParams[\"tenantId\" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;\n  }\n  /**\r\n   * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,\r\n   * otherwise returns null.\r\n   *\r\n   * @param link  - The email action link string.\r\n   * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n   *\r\n   * @public\r\n   */\n  static parseLink(link) {\n    const actionLink = parseDeepLink(link);\n    try {\n      return new ActionCodeURL(actionLink);\n    } catch (_a) {\n      return null;\n    }\n  }\n}\n/**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if\r\n * the link is valid, otherwise returns null.\r\n *\r\n * @public\r\n */\nfunction parseActionCodeURL(link) {\n  return ActionCodeURL.parseLink(link);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating {@link EmailAuthCredential}.\r\n *\r\n * @public\r\n */\nlet EmailAuthProvider = /*#__PURE__*/(() => {\n  class EmailAuthProvider {\n    constructor() {\n      /**\r\n       * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n       */\n      this.providerId = EmailAuthProvider.PROVIDER_ID;\n    }\n    /**\r\n     * Initialize an {@link AuthCredential} using an email and password.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * const authCredential = EmailAuthProvider.credential(email, password);\r\n     * const userCredential = await signInWithCredential(auth, authCredential);\r\n     * ```\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * const userCredential = await signInWithEmailAndPassword(auth, email, password);\r\n     * ```\r\n     *\r\n     * @param email - Email address.\r\n     * @param password - User account password.\r\n     * @returns The auth provider credential.\r\n     */\n    static credential(email, password) {\n      return EmailAuthCredential._fromEmailAndPassword(email, password);\n    }\n    /**\r\n     * Initialize an {@link AuthCredential} using an email and an email link after a sign in with\r\n     * email link operation.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);\r\n     * const userCredential = await signInWithCredential(auth, authCredential);\r\n     * ```\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * await sendSignInLinkToEmail(auth, email);\r\n     * // Obtain emailLink from user.\r\n     * const userCredential = await signInWithEmailLink(auth, email, emailLink);\r\n     * ```\r\n     *\r\n     * @param auth - The {@link Auth} instance used to verify the link.\r\n     * @param email - Email address.\r\n     * @param emailLink - Sign-in email link.\r\n     * @returns - The auth provider credential.\r\n     */\n    static credentialWithLink(email, emailLink) {\n      const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n      _assert(actionCodeUrl, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n      return EmailAuthCredential._fromEmailAndCode(email, actionCodeUrl.code, actionCodeUrl.tenantId);\n    }\n  }\n  /**\r\n   * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n   */\n  EmailAuthProvider.PROVIDER_ID = \"password\" /* ProviderId.PASSWORD */;\n  /**\r\n   * Always set to {@link SignInMethod}.EMAIL_PASSWORD.\r\n   */\n  EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD = \"password\" /* SignInMethod.EMAIL_PASSWORD */;\n  /**\r\n   * Always set to {@link SignInMethod}.EMAIL_LINK.\r\n   */\n  EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD = \"emailLink\" /* SignInMethod.EMAIL_LINK */;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  /**\r\n   * The base class for all Federated providers (OAuth (including OIDC), SAML).\r\n   *\r\n   * This class is not meant to be instantiated directly.\r\n   *\r\n   * @public\r\n   */\n  return EmailAuthProvider;\n})();\nclass FederatedAuthProvider {\n  /**\r\n   * Constructor for generic OAuth providers.\r\n   *\r\n   * @param providerId - Provider for which credentials should be generated.\r\n   */\n  constructor(providerId) {\n    this.providerId = providerId;\n    /** @internal */\n    this.defaultLanguageCode = null;\n    /** @internal */\n    this.customParameters = {};\n  }\n  /**\r\n   * Set the language gode.\r\n   *\r\n   * @param languageCode - language code\r\n   */\n  setDefaultLanguage(languageCode) {\n    this.defaultLanguageCode = languageCode;\n  }\n  /**\r\n   * Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect sign-in\r\n   * operations.\r\n   *\r\n   * @remarks\r\n   * For a detailed list, check the reserved required OAuth 2.0 parameters such as `client_id`,\r\n   * `redirect_uri`, `scope`, `response_type`, and `state` are not allowed and will be ignored.\r\n   *\r\n   * @param customOAuthParameters - The custom OAuth parameters to pass in the OAuth request.\r\n   */\n  setCustomParameters(customOAuthParameters) {\n    this.customParameters = customOAuthParameters;\n    return this;\n  }\n  /**\r\n   * Retrieve the current list of {@link CustomParameters}.\r\n   */\n  getCustomParameters() {\n    return this.customParameters;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Common code to all OAuth providers. This is separate from the\r\n * {@link OAuthProvider} so that child providers (like\r\n * {@link GoogleAuthProvider}) don't inherit the `credential` instance method.\r\n * Instead, they rely on a static `credential` method.\r\n */\nclass BaseOAuthProvider extends FederatedAuthProvider {\n  constructor() {\n    super(...arguments);\n    /** @internal */\n    this.scopes = [];\n  }\n  /**\r\n   * Add an OAuth scope to the credential.\r\n   *\r\n   * @param scope - Provider OAuth scope to add.\r\n   */\n  addScope(scope) {\n    // If not already added, add scope to list.\n    if (!this.scopes.includes(scope)) {\n      this.scopes.push(scope);\n    }\n    return this;\n  }\n  /**\r\n   * Retrieve the current list of OAuth scopes.\r\n   */\n  getScopes() {\n    return [...this.scopes];\n  }\n}\n/**\r\n * Provider for generating generic {@link OAuthCredential}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new OAuthProvider('google.com');\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n *   // This is the signed-in user\r\n *   const user = result.user;\r\n *   // This gives you a OAuth Access Token for the provider.\r\n *   const credential = provider.credentialFromResult(auth, result);\r\n *   const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new OAuthProvider('google.com');\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\nclass OAuthProvider extends BaseOAuthProvider {\n  /**\r\n   * Creates an {@link OAuthCredential} from a JSON string or a plain object.\r\n   * @param json - A plain object or a JSON string\r\n   */\n  static credentialFromJSON(json) {\n    const obj = typeof json === 'string' ? JSON.parse(json) : json;\n    _assert('providerId' in obj && 'signInMethod' in obj, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    return OAuthCredential._fromParams(obj);\n  }\n  /**\r\n   * Creates a {@link OAuthCredential} from a generic OAuth provider's access token or ID token.\r\n   *\r\n   * @remarks\r\n   * The raw nonce is required when an ID token with a nonce field is provided. The SHA-256 hash of\r\n   * the raw nonce must match the nonce field in the ID token.\r\n   *\r\n   * @example\r\n   * ```javascript\r\n   * // `googleUser` from the onsuccess Google Sign In callback.\r\n   * // Initialize a generate OAuth provider with a `google.com` providerId.\r\n   * const provider = new OAuthProvider('google.com');\r\n   * const credential = provider.credential({\r\n   *   idToken: googleUser.getAuthResponse().id_token,\r\n   * });\r\n   * const result = await signInWithCredential(credential);\r\n   * ```\r\n   *\r\n   * @param params - Either the options object containing the ID token, access token and raw nonce\r\n   * or the ID token string.\r\n   */\n  credential(params) {\n    return this._credential(Object.assign(Object.assign({}, params), {\n      nonce: params.rawNonce\n    }));\n  }\n  /** An internal credential method that accepts more permissive options */\n  _credential(params) {\n    _assert(params.idToken || params.accessToken, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    // For OAuthCredential, sign in method is same as providerId.\n    return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), {\n      providerId: this.providerId,\n      signInMethod: this.providerId\n    }));\n  }\n  /**\r\n   * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n   *\r\n   * @param userCredential - The user credential.\r\n   */\n  static credentialFromResult(userCredential) {\n    return OAuthProvider.oauthCredentialFromTaggedObject(userCredential);\n  }\n  /**\r\n   * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n   * thrown during a sign-in, link, or reauthenticate operation.\r\n   *\r\n   * @param userCredential - The user credential.\r\n   */\n  static credentialFromError(error) {\n    return OAuthProvider.oauthCredentialFromTaggedObject(error.customData || {});\n  }\n  static oauthCredentialFromTaggedObject({\n    _tokenResponse: tokenResponse\n  }) {\n    if (!tokenResponse) {\n      return null;\n    }\n    const {\n      oauthIdToken,\n      oauthAccessToken,\n      oauthTokenSecret,\n      pendingToken,\n      nonce,\n      providerId\n    } = tokenResponse;\n    if (!oauthAccessToken && !oauthTokenSecret && !oauthIdToken && !pendingToken) {\n      return null;\n    }\n    if (!providerId) {\n      return null;\n    }\n    try {\n      return new OAuthProvider(providerId)._credential({\n        idToken: oauthIdToken,\n        accessToken: oauthAccessToken,\n        nonce,\n        pendingToken\n      });\n    } catch (e) {\n      return null;\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.FACEBOOK.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('user_birthday');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n *   // This is the signed-in user\r\n *   const user = result.user;\r\n *   // This gives you a Facebook Access Token.\r\n *   const credential = FacebookAuthProvider.credentialFromResult(result);\r\n *   const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * provider.addScope('user_birthday');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\nlet FacebookAuthProvider = /*#__PURE__*/(() => {\n  class FacebookAuthProvider extends BaseOAuthProvider {\n    constructor() {\n      super(\"facebook.com\" /* ProviderId.FACEBOOK */);\n    }\n    /**\r\n     * Creates a credential for Facebook.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * // `event` from the Facebook auth.authResponseChange callback.\r\n     * const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);\r\n     * const result = await signInWithCredential(credential);\r\n     * ```\r\n     *\r\n     * @param accessToken - Facebook access token.\r\n     */\n    static credential(accessToken) {\n      return OAuthCredential._fromParams({\n        providerId: FacebookAuthProvider.PROVIDER_ID,\n        signInMethod: FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,\n        accessToken\n      });\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromResult(userCredential) {\n      return FacebookAuthProvider.credentialFromTaggedObject(userCredential);\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n     * thrown during a sign-in, link, or reauthenticate operation.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromError(error) {\n      return FacebookAuthProvider.credentialFromTaggedObject(error.customData || {});\n    }\n    static credentialFromTaggedObject({\n      _tokenResponse: tokenResponse\n    }) {\n      if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n        return null;\n      }\n      if (!tokenResponse.oauthAccessToken) {\n        return null;\n      }\n      try {\n        return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);\n      } catch (_a) {\n        return null;\n      }\n    }\n  }\n  /** Always set to {@link SignInMethod}.FACEBOOK. */\n  FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD = \"facebook.com\" /* SignInMethod.FACEBOOK */;\n  /** Always set to {@link ProviderId}.FACEBOOK. */\n  FacebookAuthProvider.PROVIDER_ID = \"facebook.com\" /* ProviderId.FACEBOOK */;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  /**\r\n   * Provider for generating an an {@link OAuthCredential} for {@link ProviderId}.GOOGLE.\r\n   *\r\n   * @example\r\n   * ```javascript\r\n   * // Sign in using a redirect.\r\n   * const provider = new GoogleAuthProvider();\r\n   * // Start a sign in process for an unauthenticated user.\r\n   * provider.addScope('profile');\r\n   * provider.addScope('email');\r\n   * await signInWithRedirect(auth, provider);\r\n   * // This will trigger a full page redirect away from your app\r\n   *\r\n   * // After returning from the redirect when your app initializes you can obtain the result\r\n   * const result = await getRedirectResult(auth);\r\n   * if (result) {\r\n   *   // This is the signed-in user\r\n   *   const user = result.user;\r\n   *   // This gives you a Google Access Token.\r\n   *   const credential = GoogleAuthProvider.credentialFromResult(result);\r\n   *   const token = credential.accessToken;\r\n   * }\r\n   * ```\r\n   *\r\n   * @example\r\n   * ```javascript\r\n   * // Sign in using a popup.\r\n   * const provider = new GoogleAuthProvider();\r\n   * provider.addScope('profile');\r\n   * provider.addScope('email');\r\n   * const result = await signInWithPopup(auth, provider);\r\n   *\r\n   * // The signed-in user info.\r\n   * const user = result.user;\r\n   * // This gives you a Google Access Token.\r\n   * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n   * const token = credential.accessToken;\r\n   * ```\r\n   *\r\n   * @public\r\n   */\n  return FacebookAuthProvider;\n})();\nlet GoogleAuthProvider = /*#__PURE__*/(() => {\n  class GoogleAuthProvider extends BaseOAuthProvider {\n    constructor() {\n      super(\"google.com\" /* ProviderId.GOOGLE */);\n      this.addScope('profile');\n    }\n    /**\r\n     * Creates a credential for Google. At least one of ID token and access token is required.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * // \\`googleUser\\` from the onsuccess Google Sign In callback.\r\n     * const credential = GoogleAuthProvider.credential(googleUser.getAuthResponse().id_token);\r\n     * const result = await signInWithCredential(credential);\r\n     * ```\r\n     *\r\n     * @param idToken - Google ID token.\r\n     * @param accessToken - Google access token.\r\n     */\n    static credential(idToken, accessToken) {\n      return OAuthCredential._fromParams({\n        providerId: GoogleAuthProvider.PROVIDER_ID,\n        signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\n        idToken,\n        accessToken\n      });\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromResult(userCredential) {\n      return GoogleAuthProvider.credentialFromTaggedObject(userCredential);\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n     * thrown during a sign-in, link, or reauthenticate operation.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromError(error) {\n      return GoogleAuthProvider.credentialFromTaggedObject(error.customData || {});\n    }\n    static credentialFromTaggedObject({\n      _tokenResponse: tokenResponse\n    }) {\n      if (!tokenResponse) {\n        return null;\n      }\n      const {\n        oauthIdToken,\n        oauthAccessToken\n      } = tokenResponse;\n      if (!oauthIdToken && !oauthAccessToken) {\n        // This could be an oauth 1 credential or a phone credential\n        return null;\n      }\n      try {\n        return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);\n      } catch (_a) {\n        return null;\n      }\n    }\n  }\n  /** Always set to {@link SignInMethod}.GOOGLE. */\n  GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD = \"google.com\" /* SignInMethod.GOOGLE */;\n  /** Always set to {@link ProviderId}.GOOGLE. */\n  GoogleAuthProvider.PROVIDER_ID = \"google.com\" /* ProviderId.GOOGLE */;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  /**\r\n   * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GITHUB.\r\n   *\r\n   * @remarks\r\n   * GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use\r\n   * the {@link signInWithPopup} handler:\r\n   *\r\n   * @example\r\n   * ```javascript\r\n   * // Sign in using a redirect.\r\n   * const provider = new GithubAuthProvider();\r\n   * // Start a sign in process for an unauthenticated user.\r\n   * provider.addScope('repo');\r\n   * await signInWithRedirect(auth, provider);\r\n   * // This will trigger a full page redirect away from your app\r\n   *\r\n   * // After returning from the redirect when your app initializes you can obtain the result\r\n   * const result = await getRedirectResult(auth);\r\n   * if (result) {\r\n   *   // This is the signed-in user\r\n   *   const user = result.user;\r\n   *   // This gives you a Github Access Token.\r\n   *   const credential = GithubAuthProvider.credentialFromResult(result);\r\n   *   const token = credential.accessToken;\r\n   * }\r\n   * ```\r\n   *\r\n   * @example\r\n   * ```javascript\r\n   * // Sign in using a popup.\r\n   * const provider = new GithubAuthProvider();\r\n   * provider.addScope('repo');\r\n   * const result = await signInWithPopup(auth, provider);\r\n   *\r\n   * // The signed-in user info.\r\n   * const user = result.user;\r\n   * // This gives you a Github Access Token.\r\n   * const credential = GithubAuthProvider.credentialFromResult(result);\r\n   * const token = credential.accessToken;\r\n   * ```\r\n   * @public\r\n   */\n  return GoogleAuthProvider;\n})();\nlet GithubAuthProvider = /*#__PURE__*/(() => {\n  class GithubAuthProvider extends BaseOAuthProvider {\n    constructor() {\n      super(\"github.com\" /* ProviderId.GITHUB */);\n    }\n    /**\r\n     * Creates a credential for Github.\r\n     *\r\n     * @param accessToken - Github access token.\r\n     */\n    static credential(accessToken) {\n      return OAuthCredential._fromParams({\n        providerId: GithubAuthProvider.PROVIDER_ID,\n        signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\n        accessToken\n      });\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromResult(userCredential) {\n      return GithubAuthProvider.credentialFromTaggedObject(userCredential);\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n     * thrown during a sign-in, link, or reauthenticate operation.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromError(error) {\n      return GithubAuthProvider.credentialFromTaggedObject(error.customData || {});\n    }\n    static credentialFromTaggedObject({\n      _tokenResponse: tokenResponse\n    }) {\n      if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n        return null;\n      }\n      if (!tokenResponse.oauthAccessToken) {\n        return null;\n      }\n      try {\n        return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);\n      } catch (_a) {\n        return null;\n      }\n    }\n  }\n  /** Always set to {@link SignInMethod}.GITHUB. */\n  GithubAuthProvider.GITHUB_SIGN_IN_METHOD = \"github.com\" /* SignInMethod.GITHUB */;\n  /** Always set to {@link ProviderId}.GITHUB. */\n  GithubAuthProvider.PROVIDER_ID = \"github.com\" /* ProviderId.GITHUB */;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  return GithubAuthProvider;\n})();\nconst IDP_REQUEST_URI = 'http://localhost';\n/**\r\n * @public\r\n */\nclass SAMLAuthCredential extends AuthCredential {\n  /** @internal */\n  constructor(providerId, pendingToken) {\n    super(providerId, providerId);\n    this.pendingToken = pendingToken;\n  }\n  /** @internal */\n  _getIdTokenResponse(auth) {\n    const request = this.buildRequest();\n    return signInWithIdp(auth, request);\n  }\n  /** @internal */\n  _linkToIdToken(auth, idToken) {\n    const request = this.buildRequest();\n    request.idToken = idToken;\n    return signInWithIdp(auth, request);\n  }\n  /** @internal */\n  _getReauthenticationResolver(auth) {\n    const request = this.buildRequest();\n    request.autoCreate = false;\n    return signInWithIdp(auth, request);\n  }\n  /** {@inheritdoc AuthCredential.toJSON}  */\n  toJSON() {\n    return {\n      signInMethod: this.signInMethod,\n      providerId: this.providerId,\n      pendingToken: this.pendingToken\n    };\n  }\n  /**\r\n   * Static method to deserialize a JSON representation of an object into an\r\n   * {@link  AuthCredential}.\r\n   *\r\n   * @param json - Input can be either Object or the stringified representation of the object.\r\n   * When string is provided, JSON.parse would be called first.\r\n   *\r\n   * @returns If the JSON input does not represent an {@link  AuthCredential}, null is returned.\r\n   */\n  static fromJSON(json) {\n    const obj = typeof json === 'string' ? JSON.parse(json) : json;\n    const {\n      providerId,\n      signInMethod,\n      pendingToken\n    } = obj;\n    if (!providerId || !signInMethod || !pendingToken || providerId !== signInMethod) {\n      return null;\n    }\n    return new SAMLAuthCredential(providerId, pendingToken);\n  }\n  /**\r\n   * Helper static method to avoid exposing the constructor to end users.\r\n   *\r\n   * @internal\r\n   */\n  static _create(providerId, pendingToken) {\n    return new SAMLAuthCredential(providerId, pendingToken);\n  }\n  buildRequest() {\n    return {\n      requestUri: IDP_REQUEST_URI,\n      returnSecureToken: true,\n      pendingToken: this.pendingToken\n    };\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst SAML_PROVIDER_PREFIX = 'saml.';\n/**\r\n * An {@link AuthProvider} for SAML.\r\n *\r\n * @public\r\n */\nclass SAMLAuthProvider extends FederatedAuthProvider {\n  /**\r\n   * Constructor. The providerId must start with \"saml.\"\r\n   * @param providerId - SAML provider ID.\r\n   */\n  constructor(providerId) {\n    _assert(providerId.startsWith(SAML_PROVIDER_PREFIX), \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    super(providerId);\n  }\n  /**\r\n   * Generates an {@link AuthCredential} from a {@link UserCredential} after a\r\n   * successful SAML flow completes.\r\n   *\r\n   * @remarks\r\n   *\r\n   * For example, to get an {@link AuthCredential}, you could write the\r\n   * following code:\r\n   *\r\n   * ```js\r\n   * const userCredential = await signInWithPopup(auth, samlProvider);\r\n   * const credential = SAMLAuthProvider.credentialFromResult(userCredential);\r\n   * ```\r\n   *\r\n   * @param userCredential - The user credential.\r\n   */\n  static credentialFromResult(userCredential) {\n    return SAMLAuthProvider.samlCredentialFromTaggedObject(userCredential);\n  }\n  /**\r\n   * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n   * thrown during a sign-in, link, or reauthenticate operation.\r\n   *\r\n   * @param userCredential - The user credential.\r\n   */\n  static credentialFromError(error) {\n    return SAMLAuthProvider.samlCredentialFromTaggedObject(error.customData || {});\n  }\n  /**\r\n   * Creates an {@link AuthCredential} from a JSON string or a plain object.\r\n   * @param json - A plain object or a JSON string\r\n   */\n  static credentialFromJSON(json) {\n    const credential = SAMLAuthCredential.fromJSON(json);\n    _assert(credential, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    return credential;\n  }\n  static samlCredentialFromTaggedObject({\n    _tokenResponse: tokenResponse\n  }) {\n    if (!tokenResponse) {\n      return null;\n    }\n    const {\n      pendingToken,\n      providerId\n    } = tokenResponse;\n    if (!pendingToken || !providerId) {\n      return null;\n    }\n    try {\n      return SAMLAuthCredential._create(providerId, pendingToken);\n    } catch (e) {\n      return null;\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.TWITTER.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new TwitterAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n *   // This is the signed-in user\r\n *   const user = result.user;\r\n *   // This gives you a Twitter Access Token and Secret.\r\n *   const credential = TwitterAuthProvider.credentialFromResult(result);\r\n *   const token = credential.accessToken;\r\n *   const secret = credential.secret;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new TwitterAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * ```\r\n *\r\n * @public\r\n */\nlet TwitterAuthProvider = /*#__PURE__*/(() => {\n  class TwitterAuthProvider extends BaseOAuthProvider {\n    constructor() {\n      super(\"twitter.com\" /* ProviderId.TWITTER */);\n    }\n    /**\r\n     * Creates a credential for Twitter.\r\n     *\r\n     * @param token - Twitter access token.\r\n     * @param secret - Twitter secret.\r\n     */\n    static credential(token, secret) {\n      return OAuthCredential._fromParams({\n        providerId: TwitterAuthProvider.PROVIDER_ID,\n        signInMethod: TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,\n        oauthToken: token,\n        oauthTokenSecret: secret\n      });\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromResult(userCredential) {\n      return TwitterAuthProvider.credentialFromTaggedObject(userCredential);\n    }\n    /**\r\n     * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n     * thrown during a sign-in, link, or reauthenticate operation.\r\n     *\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromError(error) {\n      return TwitterAuthProvider.credentialFromTaggedObject(error.customData || {});\n    }\n    static credentialFromTaggedObject({\n      _tokenResponse: tokenResponse\n    }) {\n      if (!tokenResponse) {\n        return null;\n      }\n      const {\n        oauthAccessToken,\n        oauthTokenSecret\n      } = tokenResponse;\n      if (!oauthAccessToken || !oauthTokenSecret) {\n        return null;\n      }\n      try {\n        return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);\n      } catch (_a) {\n        return null;\n      }\n    }\n  }\n  /** Always set to {@link SignInMethod}.TWITTER. */\n  TwitterAuthProvider.TWITTER_SIGN_IN_METHOD = \"twitter.com\" /* SignInMethod.TWITTER */;\n  /** Always set to {@link ProviderId}.TWITTER. */\n  TwitterAuthProvider.PROVIDER_ID = \"twitter.com\" /* ProviderId.TWITTER */;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  return TwitterAuthProvider;\n})();\nfunction signUp(_x59, _x60) {\n  return _signUp.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _signUp() {\n  _signUp = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, _addTidIfNecessary(auth, request));\n  });\n  return _signUp.apply(this, arguments);\n}\nclass UserCredentialImpl {\n  constructor(params) {\n    this.user = params.user;\n    this.providerId = params.providerId;\n    this._tokenResponse = params._tokenResponse;\n    this.operationType = params.operationType;\n  }\n  static _fromIdTokenResponse(auth, operationType, idTokenResponse, isAnonymous = false) {\n    return _asyncToGenerator(function* () {\n      const user = yield UserImpl._fromIdTokenResponse(auth, idTokenResponse, isAnonymous);\n      const providerId = providerIdForResponse(idTokenResponse);\n      const userCred = new UserCredentialImpl({\n        user,\n        providerId,\n        _tokenResponse: idTokenResponse,\n        operationType\n      });\n      return userCred;\n    })();\n  }\n  static _forOperation(user, operationType, response) {\n    return _asyncToGenerator(function* () {\n      yield user._updateTokensIfNecessary(response, /* reload */true);\n      const providerId = providerIdForResponse(response);\n      return new UserCredentialImpl({\n        user,\n        providerId,\n        _tokenResponse: response,\n        operationType\n      });\n    })();\n  }\n}\nfunction providerIdForResponse(response) {\n  if (response.providerId) {\n    return response.providerId;\n  }\n  if ('phoneNumber' in response) {\n    return \"phone\" /* ProviderId.PHONE */;\n  }\n\n  return null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in as an anonymous user.\r\n *\r\n * @remarks\r\n * If there is already an anonymous user signed in, that user will be returned; otherwise, a\r\n * new anonymous user identity will be created and returned.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction signInAnonymously(_x61) {\n  return _signInAnonymously.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _signInAnonymously() {\n  _signInAnonymously = _asyncToGenerator(function* (auth) {\n    var _a;\n    const authInternal = _castAuth(auth);\n    yield authInternal._initializationPromise;\n    if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {\n      // If an anonymous user is already signed in, no need to sign them in again.\n      return new UserCredentialImpl({\n        user: authInternal.currentUser,\n        providerId: null,\n        operationType: \"signIn\" /* OperationType.SIGN_IN */\n      });\n    }\n\n    const response = yield signUp(authInternal, {\n      returnSecureToken: true\n    });\n    const userCredential = yield UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response, true);\n    yield authInternal._updateCurrentUser(userCredential.user);\n    return userCredential;\n  });\n  return _signInAnonymously.apply(this, arguments);\n}\nclass MultiFactorError extends FirebaseError {\n  constructor(auth, error, operationType, user) {\n    var _a;\n    super(error.code, error.message);\n    this.operationType = operationType;\n    this.user = user;\n    // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n    Object.setPrototypeOf(this, MultiFactorError.prototype);\n    this.customData = {\n      appName: auth.name,\n      tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,\n      _serverResponse: error.customData._serverResponse,\n      operationType\n    };\n  }\n  static _fromErrorAndOperation(auth, error, operationType, user) {\n    return new MultiFactorError(auth, error, operationType, user);\n  }\n}\nfunction _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user) {\n  const idTokenProvider = operationType === \"reauthenticate\" /* OperationType.REAUTHENTICATE */ ? credential._getReauthenticationResolver(auth) : credential._getIdTokenResponse(auth);\n  return idTokenProvider.catch(error => {\n    if (error.code === `auth/${\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */}`) {\n      throw MultiFactorError._fromErrorAndOperation(auth, error, operationType, user);\n    }\n    throw error;\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Takes a set of UserInfo provider data and converts it to a set of names\r\n */\nfunction providerDataAsNames(providerData) {\n  return new Set(providerData.map(({\n    providerId\n  }) => providerId).filter(pid => !!pid));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Unlinks a provider from a user account.\r\n *\r\n * @param user - The user.\r\n * @param providerId - The provider to unlink.\r\n *\r\n * @public\r\n */\nfunction unlink(_x62, _x63) {\n  return _unlink.apply(this, arguments);\n}\nfunction _unlink() {\n  _unlink = _asyncToGenerator(function* (user, providerId) {\n    const userInternal = getModularInstance(user);\n    yield _assertLinkedStatus(true, userInternal, providerId);\n    const {\n      providerUserInfo\n    } = yield deleteLinkedAccounts(userInternal.auth, {\n      idToken: yield userInternal.getIdToken(),\n      deleteProvider: [providerId]\n    });\n    const providersLeft = providerDataAsNames(providerUserInfo || []);\n    userInternal.providerData = userInternal.providerData.filter(pd => providersLeft.has(pd.providerId));\n    if (!providersLeft.has(\"phone\" /* ProviderId.PHONE */)) {\n      userInternal.phoneNumber = null;\n    }\n    yield userInternal.auth._persistUserIfCurrent(userInternal);\n    return userInternal;\n  });\n  return _unlink.apply(this, arguments);\n}\nfunction _link$1(_x64, _x65) {\n  return _link$.apply(this, arguments);\n}\nfunction _link$() {\n  _link$ = _asyncToGenerator(function* (user, credential, bypassAuthState = false) {\n    const response = yield _logoutIfInvalidated(user, credential._linkToIdToken(user.auth, yield user.getIdToken()), bypassAuthState);\n    return UserCredentialImpl._forOperation(user, \"link\" /* OperationType.LINK */, response);\n  });\n  return _link$.apply(this, arguments);\n}\nfunction _assertLinkedStatus(_x66, _x67, _x68) {\n  return _assertLinkedStatus2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _assertLinkedStatus2() {\n  _assertLinkedStatus2 = _asyncToGenerator(function* (expected, user, provider) {\n    yield _reloadWithoutSaving(user);\n    const providerIds = providerDataAsNames(user.providerData);\n    const code = expected === false ? \"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */ : \"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */;\n    _assert(providerIds.has(provider) === expected, user.auth, code);\n  });\n  return _assertLinkedStatus2.apply(this, arguments);\n}\nfunction _reauthenticate(_x69, _x70) {\n  return _reauthenticate2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _reauthenticate2() {\n  _reauthenticate2 = _asyncToGenerator(function* (user, credential, bypassAuthState = false) {\n    const {\n      auth\n    } = user;\n    const operationType = \"reauthenticate\" /* OperationType.REAUTHENTICATE */;\n    try {\n      const response = yield _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState);\n      _assert(response.idToken, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      const parsed = _parseToken(response.idToken);\n      _assert(parsed, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      const {\n        sub: localId\n      } = parsed;\n      _assert(user.uid === localId, auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n      return UserCredentialImpl._forOperation(user, operationType, response);\n    } catch (e) {\n      // Convert user deleted error into user mismatch\n      if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"user-not-found\" /* AuthErrorCode.USER_DELETED */}`) {\n        _fail(auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n      }\n\n      throw e;\n    }\n  });\n  return _reauthenticate2.apply(this, arguments);\n}\nfunction _signInWithCredential(_x71, _x72) {\n  return _signInWithCredential2.apply(this, arguments);\n}\n/**\r\n * Asynchronously signs in with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nfunction _signInWithCredential2() {\n  _signInWithCredential2 = _asyncToGenerator(function* (auth, credential, bypassAuthState = false) {\n    const operationType = \"signIn\" /* OperationType.SIGN_IN */;\n    const response = yield _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential);\n    const userCredential = yield UserCredentialImpl._fromIdTokenResponse(auth, operationType, response);\n    if (!bypassAuthState) {\n      yield auth._updateCurrentUser(userCredential.user);\n    }\n    return userCredential;\n  });\n  return _signInWithCredential2.apply(this, arguments);\n}\nfunction signInWithCredential(_x73, _x74) {\n  return _signInWithCredential3.apply(this, arguments);\n}\n/**\r\n * Links the user account with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nfunction _signInWithCredential3() {\n  _signInWithCredential3 = _asyncToGenerator(function* (auth, credential) {\n    return _signInWithCredential(_castAuth(auth), credential);\n  });\n  return _signInWithCredential3.apply(this, arguments);\n}\nfunction linkWithCredential(_x75, _x76) {\n  return _linkWithCredential.apply(this, arguments);\n}\n/**\r\n * Re-authenticates a user using a fresh credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in\r\n * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error\r\n * or a `TOKEN_EXPIRED` error.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nfunction _linkWithCredential() {\n  _linkWithCredential = _asyncToGenerator(function* (user, credential) {\n    const userInternal = getModularInstance(user);\n    yield _assertLinkedStatus(false, userInternal, credential.providerId);\n    return _link$1(userInternal, credential);\n  });\n  return _linkWithCredential.apply(this, arguments);\n}\nfunction reauthenticateWithCredential(_x77, _x78) {\n  return _reauthenticateWithCredential.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _reauthenticateWithCredential() {\n  _reauthenticateWithCredential = _asyncToGenerator(function* (user, credential) {\n    return _reauthenticate(getModularInstance(user), credential);\n  });\n  return _reauthenticateWithCredential.apply(this, arguments);\n}\nfunction signInWithCustomToken$1(_x79, _x80) {\n  return _signInWithCustomToken$.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in using a custom token.\r\n *\r\n * @remarks\r\n * Custom tokens are used to integrate Firebase Auth with existing auth systems, and must\r\n * be generated by an auth backend using the\r\n * {@link https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken | createCustomToken}\r\n * method in the {@link https://firebase.google.com/docs/auth/admin | Admin SDK} .\r\n *\r\n * Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param customToken - The custom token to sign in with.\r\n *\r\n * @public\r\n */\nfunction _signInWithCustomToken$() {\n  _signInWithCustomToken$ = _asyncToGenerator(function* (auth, request) {\n    return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithCustomToken\" /* Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN */, _addTidIfNecessary(auth, request));\n  });\n  return _signInWithCustomToken$.apply(this, arguments);\n}\nfunction signInWithCustomToken(_x81, _x82) {\n  return _signInWithCustomToken.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _signInWithCustomToken() {\n  _signInWithCustomToken = _asyncToGenerator(function* (auth, customToken) {\n    const authInternal = _castAuth(auth);\n    const response = yield signInWithCustomToken$1(authInternal, {\n      token: customToken,\n      returnSecureToken: true\n    });\n    const cred = yield UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n    yield authInternal._updateCurrentUser(cred.user);\n    return cred;\n  });\n  return _signInWithCustomToken.apply(this, arguments);\n}\nclass MultiFactorInfoImpl {\n  constructor(factorId, response) {\n    this.factorId = factorId;\n    this.uid = response.mfaEnrollmentId;\n    this.enrollmentTime = new Date(response.enrolledAt).toUTCString();\n    this.displayName = response.displayName;\n  }\n  static _fromServerResponse(auth, enrollment) {\n    if ('phoneInfo' in enrollment) {\n      return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\n    }\n    return _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  }\n}\n\nclass PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {\n  constructor(response) {\n    super(\"phone\" /* FactorId.PHONE */, response);\n    this.phoneNumber = response.phoneInfo;\n  }\n  static _fromServerResponse(_auth, enrollment) {\n    return new PhoneMultiFactorInfoImpl(enrollment);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {\n  var _a;\n  _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, \"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */);\n  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' || actionCodeSettings.dynamicLinkDomain.length > 0, auth, \"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);\n  request.continueUrl = actionCodeSettings.url;\n  request.dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;\n  request.canHandleCodeInApp = actionCodeSettings.handleCodeInApp;\n  if (actionCodeSettings.iOS) {\n    _assert(actionCodeSettings.iOS.bundleId.length > 0, auth, \"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */);\n    request.iOSBundleId = actionCodeSettings.iOS.bundleId;\n  }\n  if (actionCodeSettings.android) {\n    _assert(actionCodeSettings.android.packageName.length > 0, auth, \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */);\n    request.androidInstallApp = actionCodeSettings.android.installApp;\n    request.androidMinimumVersionCode = actionCodeSettings.android.minimumVersion;\n    request.androidPackageName = actionCodeSettings.android.packageName;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Sends a password reset email to the given email address.\r\n *\r\n * @remarks\r\n * To complete the password reset, call {@link confirmPasswordReset} with the code supplied in\r\n * the email sent to the user, along with the new password specified by the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n *   url: 'https://www.example.com/?email=user@example.com',\r\n *   iOS: {\r\n *      bundleId: 'com.example.ios'\r\n *   },\r\n *   android: {\r\n *     packageName: 'com.example.android',\r\n *     installApp: true,\r\n *     minimumVersion: '12'\r\n *   },\r\n *   handleCodeInApp: true\r\n * };\r\n * await sendPasswordResetEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain code from user.\r\n * await confirmPasswordReset('user@example.com', code);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nfunction sendPasswordResetEmail(_x83, _x84, _x85) {\n  return _sendPasswordResetEmail.apply(this, arguments);\n}\n/**\r\n * Completes the password reset process, given a confirmation code and new password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A confirmation code sent to the user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nfunction _sendPasswordResetEmail() {\n  _sendPasswordResetEmail = _asyncToGenerator(function* (auth, email, actionCodeSettings) {\n    const authModular = getModularInstance(auth);\n    const request = {\n      requestType: \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */,\n      email\n    };\n    if (actionCodeSettings) {\n      _setActionCodeSettingsOnRequest(authModular, request, actionCodeSettings);\n    }\n    yield sendPasswordResetEmail$1(authModular, request);\n  });\n  return _sendPasswordResetEmail.apply(this, arguments);\n}\nfunction confirmPasswordReset(_x86, _x87, _x88) {\n  return _confirmPasswordReset.apply(this, arguments);\n}\n/**\r\n * Applies a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nfunction _confirmPasswordReset() {\n  _confirmPasswordReset = _asyncToGenerator(function* (auth, oobCode, newPassword) {\n    yield resetPassword(getModularInstance(auth), {\n      oobCode,\n      newPassword\n    });\n    // Do not return the email.\n  });\n  return _confirmPasswordReset.apply(this, arguments);\n}\nfunction applyActionCode(_x89, _x90) {\n  return _applyActionCode.apply(this, arguments);\n}\n/**\r\n * Checks a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns metadata about the code.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nfunction _applyActionCode() {\n  _applyActionCode = _asyncToGenerator(function* (auth, oobCode) {\n    yield applyActionCode$1(getModularInstance(auth), {\n      oobCode\n    });\n  });\n  return _applyActionCode.apply(this, arguments);\n}\nfunction checkActionCode(_x91, _x92) {\n  return _checkActionCode.apply(this, arguments);\n}\n/**\r\n * Checks a password reset code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns the user's email address if valid.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param code - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nfunction _checkActionCode() {\n  _checkActionCode = _asyncToGenerator(function* (auth, oobCode) {\n    const authModular = getModularInstance(auth);\n    const response = yield resetPassword(authModular, {\n      oobCode\n    });\n    // Email could be empty only if the request type is EMAIL_SIGNIN or\n    // VERIFY_AND_CHANGE_EMAIL.\n    // New email should not be empty if the request type is\n    // VERIFY_AND_CHANGE_EMAIL.\n    // Multi-factor info could not be empty if the request type is\n    // REVERT_SECOND_FACTOR_ADDITION.\n    const operation = response.requestType;\n    _assert(operation, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    switch (operation) {\n      case \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */:\n        break;\n      case \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */:\n        _assert(response.newEmail, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n        break;\n      case \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */:\n        _assert(response.mfaInfo, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      // fall through\n      default:\n        _assert(response.email, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    }\n    // The multi-factor info for revert second factor addition\n    let multiFactorInfo = null;\n    if (response.mfaInfo) {\n      multiFactorInfo = MultiFactorInfoImpl._fromServerResponse(_castAuth(authModular), response.mfaInfo);\n    }\n    return {\n      data: {\n        email: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.newEmail : response.email) || null,\n        previousEmail: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.email : response.newEmail) || null,\n        multiFactorInfo\n      },\n      operation\n    };\n  });\n  return _checkActionCode.apply(this, arguments);\n}\nfunction verifyPasswordResetCode(_x93, _x94) {\n  return _verifyPasswordResetCode.apply(this, arguments);\n}\n/**\r\n * Creates a new user account associated with the specified email address and password.\r\n *\r\n * @remarks\r\n * On successful creation of the user account, this user will also be signed in to your application.\r\n *\r\n * User account creation can fail if the account already exists or the password is invalid.\r\n *\r\n * Note: The email address acts as a unique identifier for the user and enables an email-based\r\n * password reset. This function will create a new user account and set the initial user password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param password - The user's chosen password.\r\n *\r\n * @public\r\n */\nfunction _verifyPasswordResetCode() {\n  _verifyPasswordResetCode = _asyncToGenerator(function* (auth, code) {\n    const {\n      data\n    } = yield checkActionCode(getModularInstance(auth), code);\n    // Email should always be present since a code was sent to it\n    return data.email;\n  });\n  return _verifyPasswordResetCode.apply(this, arguments);\n}\nfunction createUserWithEmailAndPassword(_x95, _x96, _x97) {\n  return _createUserWithEmailAndPassword.apply(this, arguments);\n}\n/**\r\n * Asynchronously signs in using an email and password.\r\n *\r\n * @remarks\r\n * Fails with an error if the email address and password do not match.\r\n *\r\n * Note: The user's password is NOT the password used to access the user's email account. The\r\n * email address serves as a unique identifier for the user, and the password is used to access\r\n * the user's account in your Firebase project. See also: {@link createUserWithEmailAndPassword}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The users email address.\r\n * @param password - The users password.\r\n *\r\n * @public\r\n */\nfunction _createUserWithEmailAndPassword() {\n  _createUserWithEmailAndPassword = _asyncToGenerator(function* (auth, email, password) {\n    const authInternal = _castAuth(auth);\n    const response = yield signUp(authInternal, {\n      returnSecureToken: true,\n      email,\n      password\n    });\n    const userCredential = yield UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n    yield authInternal._updateCurrentUser(userCredential.user);\n    return userCredential;\n  });\n  return _createUserWithEmailAndPassword.apply(this, arguments);\n}\nfunction signInWithEmailAndPassword(auth, email, password) {\n  return signInWithCredential(getModularInstance(auth), EmailAuthProvider.credential(email, password));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Sends a sign-in email link to the user with the specified email.\r\n *\r\n * @remarks\r\n * The sign-in operation has to always be completed in the app unlike other out of band email\r\n * actions (password reset and email verifications). This is because, at the end of the flow,\r\n * the user is expected to be signed in and their Auth state persisted within the app.\r\n *\r\n * To complete sign in with the email link, call {@link signInWithEmailLink} with the email\r\n * address and the email link supplied in the email sent to the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n *   url: 'https://www.example.com/?email=user@example.com',\r\n *   iOS: {\r\n *      bundleId: 'com.example.ios'\r\n *   },\r\n *   android: {\r\n *     packageName: 'com.example.android',\r\n *     installApp: true,\r\n *     minimumVersion: '12'\r\n *   },\r\n *   handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n *   await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param authInternal - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nfunction sendSignInLinkToEmail(_x98, _x99, _x100) {\n  return _sendSignInLinkToEmail.apply(this, arguments);\n}\n/**\r\n * Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nfunction _sendSignInLinkToEmail() {\n  _sendSignInLinkToEmail = _asyncToGenerator(function* (auth, email, actionCodeSettings) {\n    const authModular = getModularInstance(auth);\n    const request = {\n      requestType: \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */,\n      email\n    };\n    _assert(actionCodeSettings.handleCodeInApp, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    if (actionCodeSettings) {\n      _setActionCodeSettingsOnRequest(authModular, request, actionCodeSettings);\n    }\n    yield sendSignInLinkToEmail$1(authModular, request);\n  });\n  return _sendSignInLinkToEmail.apply(this, arguments);\n}\nfunction isSignInWithEmailLink(auth, emailLink) {\n  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n  return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n}\n/**\r\n * Asynchronously signs in using an email and sign-in email link.\r\n *\r\n * @remarks\r\n * If no link is passed, the link is inferred from the current URL.\r\n *\r\n * Fails with an error if the email address is invalid or OTP in email link expires.\r\n *\r\n * Note: Confirm the link is a sign-in email link before calling this method firebase.auth.Auth.isSignInWithEmailLink.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n *   url: 'https://www.example.com/?email=user@example.com',\r\n *   iOS: {\r\n *      bundleId: 'com.example.ios'\r\n *   },\r\n *   android: {\r\n *     packageName: 'com.example.android',\r\n *     installApp: true,\r\n *     minimumVersion: '12'\r\n *   },\r\n *   handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n *   await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nfunction signInWithEmailLink(_x101, _x102, _x103) {\n  return _signInWithEmailLink.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _signInWithEmailLink() {\n  _signInWithEmailLink = _asyncToGenerator(function* (auth, email, emailLink) {\n    const authModular = getModularInstance(auth);\n    const credential = EmailAuthProvider.credentialWithLink(email, emailLink || _getCurrentUrl());\n    // Check if the tenant ID in the email link matches the tenant ID on Auth\n    // instance.\n    _assert(credential._tenantId === (authModular.tenantId || null), authModular, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n    return signInWithCredential(authModular, credential);\n  });\n  return _signInWithEmailLink.apply(this, arguments);\n}\nfunction createAuthUri(_x104, _x105) {\n  return _createAuthUri.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Gets the list of possible sign in methods for the given email address.\r\n *\r\n * @remarks\r\n * This is useful to differentiate methods of sign-in for the same provider, eg.\r\n * {@link EmailAuthProvider} which has 2 methods of sign-in,\r\n * {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n *\r\n * @public\r\n */\nfunction _createAuthUri() {\n  _createAuthUri = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:createAuthUri\" /* Endpoint.CREATE_AUTH_URI */, _addTidIfNecessary(auth, request));\n  });\n  return _createAuthUri.apply(this, arguments);\n}\nfunction fetchSignInMethodsForEmail(_x106, _x107) {\n  return _fetchSignInMethodsForEmail.apply(this, arguments);\n}\n/**\r\n * Sends a verification email to a user.\r\n *\r\n * @remarks\r\n * The verification process is completed by calling {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n *   url: 'https://www.example.com/?email=user@example.com',\r\n *   iOS: {\r\n *      bundleId: 'com.example.ios'\r\n *   },\r\n *   android: {\r\n *     packageName: 'com.example.android',\r\n *     installApp: true,\r\n *     minimumVersion: '12'\r\n *   },\r\n *   handleCodeInApp: true\r\n * };\r\n * await sendEmailVerification(user, actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nfunction _fetchSignInMethodsForEmail() {\n  _fetchSignInMethodsForEmail = _asyncToGenerator(function* (auth, email) {\n    // createAuthUri returns an error if continue URI is not http or https.\n    // For environments like Cordova, Chrome extensions, native frameworks, file\n    // systems, etc, use http://localhost as continue URL.\n    const continueUri = _isHttpOrHttps() ? _getCurrentUrl() : 'http://localhost';\n    const request = {\n      identifier: email,\n      continueUri\n    };\n    const {\n      signinMethods\n    } = yield createAuthUri(getModularInstance(auth), request);\n    return signinMethods || [];\n  });\n  return _fetchSignInMethodsForEmail.apply(this, arguments);\n}\nfunction sendEmailVerification(_x108, _x109) {\n  return _sendEmailVerification.apply(this, arguments);\n}\n/**\r\n * Sends a verification email to a new email address.\r\n *\r\n * @remarks\r\n * The user's email will be updated to the new one after being verified.\r\n *\r\n * If you have a custom email action handler, you can complete the verification process by calling\r\n * {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n *   url: 'https://www.example.com/?email=user@example.com',\r\n *   iOS: {\r\n *      bundleId: 'com.example.ios'\r\n *   },\r\n *   android: {\r\n *     packageName: 'com.example.android',\r\n *     installApp: true,\r\n *     minimumVersion: '12'\r\n *   },\r\n *   handleCodeInApp: true\r\n * };\r\n * await verifyBeforeUpdateEmail(user, 'newemail@example.com', actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address to be verified before update.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nfunction _sendEmailVerification() {\n  _sendEmailVerification = _asyncToGenerator(function* (user, actionCodeSettings) {\n    const userInternal = getModularInstance(user);\n    const idToken = yield user.getIdToken();\n    const request = {\n      requestType: \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */,\n      idToken\n    };\n    if (actionCodeSettings) {\n      _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n    }\n    const {\n      email\n    } = yield sendEmailVerification$1(userInternal.auth, request);\n    if (email !== user.email) {\n      yield user.reload();\n    }\n  });\n  return _sendEmailVerification.apply(this, arguments);\n}\nfunction verifyBeforeUpdateEmail(_x110, _x111, _x112) {\n  return _verifyBeforeUpdateEmail.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _verifyBeforeUpdateEmail() {\n  _verifyBeforeUpdateEmail = _asyncToGenerator(function* (user, newEmail, actionCodeSettings) {\n    const userInternal = getModularInstance(user);\n    const idToken = yield user.getIdToken();\n    const request = {\n      requestType: \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */,\n      idToken,\n      newEmail\n    };\n    if (actionCodeSettings) {\n      _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n    }\n    const {\n      email\n    } = yield verifyAndChangeEmail(userInternal.auth, request);\n    if (email !== user.email) {\n      // If the local copy of the email on user is outdated, reload the\n      // user.\n      yield user.reload();\n    }\n  });\n  return _verifyBeforeUpdateEmail.apply(this, arguments);\n}\nfunction updateProfile$1(_x113, _x114) {\n  return _updateProfile$.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates a user's profile data.\r\n *\r\n * @param user - The user.\r\n * @param profile - The profile's `displayName` and `photoURL` to update.\r\n *\r\n * @public\r\n */\nfunction _updateProfile$() {\n  _updateProfile$ = _asyncToGenerator(function* (auth, request) {\n    return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n  });\n  return _updateProfile$.apply(this, arguments);\n}\nfunction updateProfile(_x115, _x116) {\n  return _updateProfile.apply(this, arguments);\n}\n/**\r\n * Updates the user's email address.\r\n *\r\n * @remarks\r\n * An email will be sent to the original email address (if it was set) that allows to revoke the\r\n * email address change, in order to protect them from account hijacking.\r\n *\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address.\r\n *\r\n * @public\r\n */\nfunction _updateProfile() {\n  _updateProfile = _asyncToGenerator(function* (user, {\n    displayName,\n    photoURL: photoUrl\n  }) {\n    if (displayName === undefined && photoUrl === undefined) {\n      return;\n    }\n    const userInternal = getModularInstance(user);\n    const idToken = yield userInternal.getIdToken();\n    const profileRequest = {\n      idToken,\n      displayName,\n      photoUrl,\n      returnSecureToken: true\n    };\n    const response = yield _logoutIfInvalidated(userInternal, updateProfile$1(userInternal.auth, profileRequest));\n    userInternal.displayName = response.displayName || null;\n    userInternal.photoURL = response.photoUrl || null;\n    // Update the password provider as well\n    const passwordProvider = userInternal.providerData.find(({\n      providerId\n    }) => providerId === \"password\" /* ProviderId.PASSWORD */);\n    if (passwordProvider) {\n      passwordProvider.displayName = userInternal.displayName;\n      passwordProvider.photoURL = userInternal.photoURL;\n    }\n    yield userInternal._updateTokensIfNecessary(response);\n  });\n  return _updateProfile.apply(this, arguments);\n}\nfunction updateEmail(user, newEmail) {\n  return updateEmailOrPassword(getModularInstance(user), newEmail, null);\n}\n/**\r\n * Updates the user's password.\r\n *\r\n * @remarks\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nfunction updatePassword(user, newPassword) {\n  return updateEmailOrPassword(getModularInstance(user), null, newPassword);\n}\nfunction updateEmailOrPassword(_x117, _x118, _x119) {\n  return _updateEmailOrPassword.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Parse the `AdditionalUserInfo` from the ID token response.\r\n *\r\n */\nfunction _updateEmailOrPassword() {\n  _updateEmailOrPassword = _asyncToGenerator(function* (user, email, password) {\n    const {\n      auth\n    } = user;\n    const idToken = yield user.getIdToken();\n    const request = {\n      idToken,\n      returnSecureToken: true\n    };\n    if (email) {\n      request.email = email;\n    }\n    if (password) {\n      request.password = password;\n    }\n    const response = yield _logoutIfInvalidated(user, updateEmailPassword(auth, request));\n    yield user._updateTokensIfNecessary(response, /* reload */true);\n  });\n  return _updateEmailOrPassword.apply(this, arguments);\n}\nfunction _fromIdTokenResponse(idTokenResponse) {\n  var _a, _b;\n  if (!idTokenResponse) {\n    return null;\n  }\n  const {\n    providerId\n  } = idTokenResponse;\n  const profile = idTokenResponse.rawUserInfo ? JSON.parse(idTokenResponse.rawUserInfo) : {};\n  const isNewUser = idTokenResponse.isNewUser || idTokenResponse.kind === \"identitytoolkit#SignupNewUserResponse\" /* IdTokenResponseKind.SignupNewUser */;\n  if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {\n    const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];\n    if (signInProvider) {\n      const filteredProviderId = signInProvider !== \"anonymous\" /* ProviderId.ANONYMOUS */ && signInProvider !== \"custom\" /* ProviderId.CUSTOM */ ? signInProvider : null;\n      // Uses generic class in accordance with the legacy SDK.\n      return new GenericAdditionalUserInfo(isNewUser, filteredProviderId);\n    }\n  }\n  if (!providerId) {\n    return null;\n  }\n  switch (providerId) {\n    case \"facebook.com\" /* ProviderId.FACEBOOK */:\n      return new FacebookAdditionalUserInfo(isNewUser, profile);\n    case \"github.com\" /* ProviderId.GITHUB */:\n      return new GithubAdditionalUserInfo(isNewUser, profile);\n    case \"google.com\" /* ProviderId.GOOGLE */:\n      return new GoogleAdditionalUserInfo(isNewUser, profile);\n    case \"twitter.com\" /* ProviderId.TWITTER */:\n      return new TwitterAdditionalUserInfo(isNewUser, profile, idTokenResponse.screenName || null);\n    case \"custom\" /* ProviderId.CUSTOM */:\n    case \"anonymous\" /* ProviderId.ANONYMOUS */:\n      return new GenericAdditionalUserInfo(isNewUser, null);\n    default:\n      return new GenericAdditionalUserInfo(isNewUser, providerId, profile);\n  }\n}\nclass GenericAdditionalUserInfo {\n  constructor(isNewUser, providerId, profile = {}) {\n    this.isNewUser = isNewUser;\n    this.providerId = providerId;\n    this.profile = profile;\n  }\n}\nclass FederatedAdditionalUserInfoWithUsername extends GenericAdditionalUserInfo {\n  constructor(isNewUser, providerId, profile, username) {\n    super(isNewUser, providerId, profile);\n    this.username = username;\n  }\n}\nclass FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {\n  constructor(isNewUser, profile) {\n    super(isNewUser, \"facebook.com\" /* ProviderId.FACEBOOK */, profile);\n  }\n}\nclass GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n  constructor(isNewUser, profile) {\n    super(isNewUser, \"github.com\" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);\n  }\n}\nclass GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {\n  constructor(isNewUser, profile) {\n    super(isNewUser, \"google.com\" /* ProviderId.GOOGLE */, profile);\n  }\n}\nclass TwitterAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n  constructor(isNewUser, profile, screenName) {\n    super(isNewUser, \"twitter.com\" /* ProviderId.TWITTER */, profile, screenName);\n  }\n}\n/**\r\n * Extracts provider specific {@link AdditionalUserInfo} for the given credential.\r\n *\r\n * @param userCredential - The user credential.\r\n *\r\n * @public\r\n */\nfunction getAdditionalUserInfo(userCredential) {\n  const {\n    user,\n    _tokenResponse\n  } = userCredential;\n  if (user.isAnonymous && !_tokenResponse) {\n    // Handle the special case where signInAnonymously() gets called twice.\n    // No network call is made so there's nothing to actually fill this in\n    return {\n      providerId: null,\n      isNewUser: false,\n      profile: null\n    };\n  }\n  return _fromIdTokenResponse(_tokenResponse);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Non-optional auth methods.\n/**\r\n * Changes the type of persistence on the {@link Auth} instance for the currently saved\r\n * `Auth` session and applies this type of persistence for future sign-in requests, including\r\n * sign-in with redirect requests.\r\n *\r\n * @remarks\r\n * This makes it easy for a user signing in to specify whether their session should be\r\n * remembered or not. It also makes it easier to never persist the `Auth` state for applications\r\n * that are shared by other users or have sensitive data.\r\n *\r\n * @example\r\n * ```javascript\r\n * setPersistence(auth, browserSessionPersistence);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param persistence - The {@link Persistence} to use.\r\n * @returns A `Promise` that resolves once the persistence change has completed\r\n *\r\n * @public\r\n */\nfunction setPersistence(auth, persistence) {\n  return getModularInstance(auth).setPersistence(persistence);\n}\n/**\r\n * Adds an observer for changes to the signed-in user's ID token.\r\n *\r\n * @remarks\r\n * This includes sign-in, sign-out, and token refresh events.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onIdTokenChanged(auth, nextOrObserver, error, completed) {\n  return getModularInstance(auth).onIdTokenChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Adds a blocking callback that runs before an auth state change\r\n * sets a new user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param callback - callback triggered before new user value is set.\r\n *   If this throws, it blocks the user from being set.\r\n * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`\r\n *   callback throws, allowing you to undo any side effects.\r\n */\nfunction beforeAuthStateChanged(auth, callback, onAbort) {\n  return getModularInstance(auth).beforeAuthStateChanged(callback, onAbort);\n}\n/**\r\n * Adds an observer for changes to the user's sign-in state.\r\n *\r\n * @remarks\r\n * To keep the old behavior, see {@link onIdTokenChanged}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onAuthStateChanged(auth, nextOrObserver, error, completed) {\n  return getModularInstance(auth).onAuthStateChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Sets the current language to the default device/browser preference.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction useDeviceLanguage(auth) {\n  getModularInstance(auth).useDeviceLanguage();\n}\n/**\r\n * Asynchronously sets the provided user as {@link Auth.currentUser} on the\r\n * {@link Auth} instance.\r\n *\r\n * @remarks\r\n * A new instance copy of the user provided will be made and set as currentUser.\r\n *\r\n * This will trigger {@link onAuthStateChanged} and {@link onIdTokenChanged} listeners\r\n * like other sign in methods.\r\n *\r\n * The operation fails with an error if the user to be updated belongs to a different Firebase\r\n * project.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param user - The new {@link User}.\r\n *\r\n * @public\r\n */\nfunction updateCurrentUser(auth, user) {\n  return getModularInstance(auth).updateCurrentUser(user);\n}\n/**\r\n * Signs out the current user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction signOut(auth) {\n  return getModularInstance(auth).signOut();\n}\n/**\r\n * Deletes and signs out the user.\r\n *\r\n * @remarks\r\n * Important: this is a security-sensitive operation that requires the user to have recently\r\n * signed in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nfunction deleteUser(_x120) {\n  return _deleteUser.apply(this, arguments);\n}\nfunction _deleteUser() {\n  _deleteUser = _asyncToGenerator(function* (user) {\n    return getModularInstance(user).delete();\n  });\n  return _deleteUser.apply(this, arguments);\n}\nclass MultiFactorSessionImpl {\n  constructor(type, credential, auth) {\n    this.type = type;\n    this.credential = credential;\n    this.auth = auth;\n  }\n  static _fromIdtoken(idToken, auth) {\n    return new MultiFactorSessionImpl(\"enroll\" /* MultiFactorSessionType.ENROLL */, idToken, auth);\n  }\n  static _fromMfaPendingCredential(mfaPendingCredential) {\n    return new MultiFactorSessionImpl(\"signin\" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);\n  }\n  toJSON() {\n    const key = this.type === \"enroll\" /* MultiFactorSessionType.ENROLL */ ? 'idToken' : 'pendingCredential';\n    return {\n      multiFactorSession: {\n        [key]: this.credential\n      }\n    };\n  }\n  static fromJSON(obj) {\n    var _a, _b;\n    if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {\n      if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {\n        return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);\n      } else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {\n        return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);\n      }\n    }\n    return null;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorResolverImpl {\n  constructor(session, hints, signInResolver) {\n    this.session = session;\n    this.hints = hints;\n    this.signInResolver = signInResolver;\n  }\n  /** @internal */\n  static _fromError(authExtern, error) {\n    const auth = _castAuth(authExtern);\n    const serverResponse = error.customData._serverResponse;\n    const hints = (serverResponse.mfaInfo || []).map(enrollment => MultiFactorInfoImpl._fromServerResponse(auth, enrollment));\n    _assert(serverResponse.mfaPendingCredential, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    const session = MultiFactorSessionImpl._fromMfaPendingCredential(serverResponse.mfaPendingCredential);\n    return new MultiFactorResolverImpl(session, hints, /*#__PURE__*/function () {\n      var _ref9 = _asyncToGenerator(function* (assertion) {\n        const mfaResponse = yield assertion._process(auth, session);\n        // Clear out the unneeded fields from the old login response\n        delete serverResponse.mfaInfo;\n        delete serverResponse.mfaPendingCredential;\n        // Use in the new token & refresh token in the old response\n        const idTokenResponse = Object.assign(Object.assign({}, serverResponse), {\n          idToken: mfaResponse.idToken,\n          refreshToken: mfaResponse.refreshToken\n        });\n        // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case\n        switch (error.operationType) {\n          case \"signIn\" /* OperationType.SIGN_IN */:\n            const userCredential = yield UserCredentialImpl._fromIdTokenResponse(auth, error.operationType, idTokenResponse);\n            yield auth._updateCurrentUser(userCredential.user);\n            return userCredential;\n          case \"reauthenticate\" /* OperationType.REAUTHENTICATE */:\n            _assert(error.user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n            return UserCredentialImpl._forOperation(error.user, error.operationType, idTokenResponse);\n          default:\n            _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n        }\n      });\n      return function (_x121) {\n        return _ref9.apply(this, arguments);\n      };\n    }());\n  }\n  resolveSignIn(assertionExtern) {\n    var _this32 = this;\n    return _asyncToGenerator(function* () {\n      const assertion = assertionExtern;\n      return _this32.signInResolver(assertion);\n    })();\n  }\n}\n/**\r\n * Provides a {@link MultiFactorResolver} suitable for completion of a\r\n * multi-factor flow.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param error - The {@link MultiFactorError} raised during a sign-in, or\r\n * reauthentication operation.\r\n *\r\n * @public\r\n */\nfunction getMultiFactorResolver(auth, error) {\n  var _a;\n  const authModular = getModularInstance(auth);\n  const errorInternal = error;\n  _assert(error.customData.operationType, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n  _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n  return MultiFactorResolverImpl._fromError(authModular, errorInternal);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startEnrollPhoneMfa(auth, request) {\n  return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeEnrollPhoneMfa(auth, request) {\n  return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction withdrawMfa(auth, request) {\n  return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:withdraw\" /* Endpoint.WITHDRAW_MFA */, _addTidIfNecessary(auth, request));\n}\nclass MultiFactorUserImpl {\n  constructor(user) {\n    this.user = user;\n    this.enrolledFactors = [];\n    user._onReload(userInfo => {\n      if (userInfo.mfaInfo) {\n        this.enrolledFactors = userInfo.mfaInfo.map(enrollment => MultiFactorInfoImpl._fromServerResponse(user.auth, enrollment));\n      }\n    });\n  }\n  static _fromUser(user) {\n    return new MultiFactorUserImpl(user);\n  }\n  getSession() {\n    var _this33 = this;\n    return _asyncToGenerator(function* () {\n      return MultiFactorSessionImpl._fromIdtoken(yield _this33.user.getIdToken(), _this33.user.auth);\n    })();\n  }\n  enroll(assertionExtern, displayName) {\n    var _this34 = this;\n    return _asyncToGenerator(function* () {\n      const assertion = assertionExtern;\n      const session = yield _this34.getSession();\n      const finalizeMfaResponse = yield _logoutIfInvalidated(_this34.user, assertion._process(_this34.user.auth, session, displayName));\n      // New tokens will be issued after enrollment of the new second factors.\n      // They need to be updated on the user.\n      yield _this34.user._updateTokensIfNecessary(finalizeMfaResponse);\n      // The user needs to be reloaded to get the new multi-factor information\n      // from server. USER_RELOADED event will be triggered and `enrolledFactors`\n      // will be updated.\n      return _this34.user.reload();\n    })();\n  }\n  unenroll(infoOrUid) {\n    var _this35 = this;\n    return _asyncToGenerator(function* () {\n      const mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;\n      const idToken = yield _this35.user.getIdToken();\n      try {\n        const idTokenResponse = yield _logoutIfInvalidated(_this35.user, withdrawMfa(_this35.user.auth, {\n          idToken,\n          mfaEnrollmentId\n        }));\n        // Remove the second factor from the user's list.\n        _this35.enrolledFactors = _this35.enrolledFactors.filter(({\n          uid\n        }) => uid !== mfaEnrollmentId);\n        // Depending on whether the backend decided to revoke the user's session,\n        // the tokenResponse may be empty. If the tokens were not updated (and they\n        // are now invalid), reloading the user will discover this and invalidate\n        // the user's state accordingly.\n        yield _this35.user._updateTokensIfNecessary(idTokenResponse);\n        yield _this35.user.reload();\n      } catch (e) {\n        throw e;\n      }\n    })();\n  }\n}\nconst multiFactorUserCache = new WeakMap();\n/**\r\n * The {@link MultiFactorUser} corresponding to the user.\r\n *\r\n * @remarks\r\n * This is used to access all multi-factor properties and operations related to the user.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nfunction multiFactor(user) {\n  const userModular = getModularInstance(user);\n  if (!multiFactorUserCache.has(userModular)) {\n    multiFactorUserCache.set(userModular, MultiFactorUserImpl._fromUser(userModular));\n  }\n  return multiFactorUserCache.get(userModular);\n}\nconst STORAGE_AVAILABLE_KEY = '__sak';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// There are two different browser persistence types: local and session.\n// Both have the same implementation but use a different underlying storage\n// object.\nclass BrowserPersistenceClass {\n  constructor(storageRetriever, type) {\n    this.storageRetriever = storageRetriever;\n    this.type = type;\n  }\n  _isAvailable() {\n    try {\n      if (!this.storage) {\n        return Promise.resolve(false);\n      }\n      this.storage.setItem(STORAGE_AVAILABLE_KEY, '1');\n      this.storage.removeItem(STORAGE_AVAILABLE_KEY);\n      return Promise.resolve(true);\n    } catch (_a) {\n      return Promise.resolve(false);\n    }\n  }\n  _set(key, value) {\n    this.storage.setItem(key, JSON.stringify(value));\n    return Promise.resolve();\n  }\n  _get(key) {\n    const json = this.storage.getItem(key);\n    return Promise.resolve(json ? JSON.parse(json) : null);\n  }\n  _remove(key) {\n    this.storage.removeItem(key);\n    return Promise.resolve();\n  }\n  get storage() {\n    return this.storageRetriever();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _iframeCannotSyncWebStorage() {\n  const ua = getUA();\n  return _isSafari(ua) || _isIOS(ua);\n}\n// The polling period in case events are not supported\nconst _POLLING_INTERVAL_MS$1 = 1000;\n// The IE 10 localStorage cross tab synchronization delay in milliseconds\nconst IE10_LOCAL_STORAGE_SYNC_DELAY = 10;\nlet BrowserLocalPersistence = /*#__PURE__*/(() => {\n  class BrowserLocalPersistence extends BrowserPersistenceClass {\n    constructor() {\n      super(() => window.localStorage, \"LOCAL\" /* PersistenceType.LOCAL */);\n      this.boundEventHandler = (event, poll) => this.onStorageEvent(event, poll);\n      this.listeners = {};\n      this.localCache = {};\n      // setTimeout return value is platform specific\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      this.pollTimer = null;\n      // Safari or iOS browser and embedded in an iframe.\n      this.safariLocalStorageNotSynced = _iframeCannotSyncWebStorage() && _isIframe();\n      // Whether to use polling instead of depending on window events\n      this.fallbackToPolling = _isMobileBrowser();\n      this._shouldAllowMigration = true;\n    }\n    forAllChangedKeys(cb) {\n      // Check all keys with listeners on them.\n      for (const key of Object.keys(this.listeners)) {\n        // Get value from localStorage.\n        const newValue = this.storage.getItem(key);\n        const oldValue = this.localCache[key];\n        // If local map value does not match, trigger listener with storage event.\n        // Differentiate this simulated event from the real storage event.\n        if (newValue !== oldValue) {\n          cb(key, oldValue, newValue);\n        }\n      }\n    }\n    onStorageEvent(event, poll = false) {\n      // Key would be null in some situations, like when localStorage is cleared\n      if (!event.key) {\n        this.forAllChangedKeys((key, _oldValue, newValue) => {\n          this.notifyListeners(key, newValue);\n        });\n        return;\n      }\n      const key = event.key;\n      // Check the mechanism how this event was detected.\n      // The first event will dictate the mechanism to be used.\n      if (poll) {\n        // Environment detects storage changes via polling.\n        // Remove storage event listener to prevent possible event duplication.\n        this.detachListener();\n      } else {\n        // Environment detects storage changes via storage event listener.\n        // Remove polling listener to prevent possible event duplication.\n        this.stopPolling();\n      }\n      // Safari embedded iframe. Storage event will trigger with the delta\n      // changes but no changes will be applied to the iframe localStorage.\n      if (this.safariLocalStorageNotSynced) {\n        // Get current iframe page value.\n        const storedValue = this.storage.getItem(key);\n        // Value not synchronized, synchronize manually.\n        if (event.newValue !== storedValue) {\n          if (event.newValue !== null) {\n            // Value changed from current value.\n            this.storage.setItem(key, event.newValue);\n          } else {\n            // Current value deleted.\n            this.storage.removeItem(key);\n          }\n        } else if (this.localCache[key] === event.newValue && !poll) {\n          // Already detected and processed, do not trigger listeners again.\n          return;\n        }\n      }\n      const triggerListeners = () => {\n        // Keep local map up to date in case storage event is triggered before\n        // poll.\n        const storedValue = this.storage.getItem(key);\n        if (!poll && this.localCache[key] === storedValue) {\n          // Real storage event which has already been detected, do nothing.\n          // This seems to trigger in some IE browsers for some reason.\n          return;\n        }\n        this.notifyListeners(key, storedValue);\n      };\n      const storedValue = this.storage.getItem(key);\n      if (_isIE10() && storedValue !== event.newValue && event.newValue !== event.oldValue) {\n        // IE 10 has this weird bug where a storage event would trigger with the\n        // correct key, oldValue and newValue but localStorage.getItem(key) does\n        // not yield the updated value until a few milliseconds. This ensures\n        // this recovers from that situation.\n        setTimeout(triggerListeners, IE10_LOCAL_STORAGE_SYNC_DELAY);\n      } else {\n        triggerListeners();\n      }\n    }\n    notifyListeners(key, value) {\n      this.localCache[key] = value;\n      const listeners = this.listeners[key];\n      if (listeners) {\n        for (const listener of Array.from(listeners)) {\n          listener(value ? JSON.parse(value) : value);\n        }\n      }\n    }\n    startPolling() {\n      this.stopPolling();\n      this.pollTimer = setInterval(() => {\n        this.forAllChangedKeys((key, oldValue, newValue) => {\n          this.onStorageEvent(new StorageEvent('storage', {\n            key,\n            oldValue,\n            newValue\n          }), /* poll */true);\n        });\n      }, _POLLING_INTERVAL_MS$1);\n    }\n    stopPolling() {\n      if (this.pollTimer) {\n        clearInterval(this.pollTimer);\n        this.pollTimer = null;\n      }\n    }\n    attachListener() {\n      window.addEventListener('storage', this.boundEventHandler);\n    }\n    detachListener() {\n      window.removeEventListener('storage', this.boundEventHandler);\n    }\n    _addListener(key, listener) {\n      if (Object.keys(this.listeners).length === 0) {\n        // Whether browser can detect storage event when it had already been pushed to the background.\n        // This may happen in some mobile browsers. A localStorage change in the foreground window\n        // will not be detected in the background window via the storage event.\n        // This was detected in iOS 7.x mobile browsers\n        if (this.fallbackToPolling) {\n          this.startPolling();\n        } else {\n          this.attachListener();\n        }\n      }\n      if (!this.listeners[key]) {\n        this.listeners[key] = new Set();\n        // Populate the cache to avoid spuriously triggering on first poll.\n        this.localCache[key] = this.storage.getItem(key);\n      }\n      this.listeners[key].add(listener);\n    }\n    _removeListener(key, listener) {\n      if (this.listeners[key]) {\n        this.listeners[key].delete(listener);\n        if (this.listeners[key].size === 0) {\n          delete this.listeners[key];\n        }\n      }\n      if (Object.keys(this.listeners).length === 0) {\n        this.detachListener();\n        this.stopPolling();\n      }\n    }\n    // Update local cache on base operations:\n    _set(key, value) {\n      var _superprop_get_set = () => super._set,\n        _this36 = this;\n      return _asyncToGenerator(function* () {\n        yield _superprop_get_set().call(_this36, key, value);\n        _this36.localCache[key] = JSON.stringify(value);\n      })();\n    }\n    _get(key) {\n      var _superprop_get_get = () => super._get,\n        _this37 = this;\n      return _asyncToGenerator(function* () {\n        const value = yield _superprop_get_get().call(_this37, key);\n        _this37.localCache[key] = JSON.stringify(value);\n        return value;\n      })();\n    }\n    _remove(key) {\n      var _superprop_get_remove = () => super._remove,\n        _this38 = this;\n      return _asyncToGenerator(function* () {\n        yield _superprop_get_remove().call(_this38, key);\n        delete _this38.localCache[key];\n      })();\n    }\n  }\n  BrowserLocalPersistence.type = 'LOCAL';\n  /**\r\n   * An implementation of {@link Persistence} of type `LOCAL` using `localStorage`\r\n   * for the underlying storage.\r\n   *\r\n   * @public\r\n   */\n  return BrowserLocalPersistence;\n})();\nconst browserLocalPersistence = BrowserLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet BrowserSessionPersistence = /*#__PURE__*/(() => {\n  class BrowserSessionPersistence extends BrowserPersistenceClass {\n    constructor() {\n      super(() => window.sessionStorage, \"SESSION\" /* PersistenceType.SESSION */);\n    }\n\n    _addListener(_key, _listener) {\n      // Listeners are not supported for session storage since it cannot be shared across windows\n      return;\n    }\n    _removeListener(_key, _listener) {\n      // Listeners are not supported for session storage since it cannot be shared across windows\n      return;\n    }\n  }\n  BrowserSessionPersistence.type = 'SESSION';\n  /**\r\n   * An implementation of {@link Persistence} of `SESSION` using `sessionStorage`\r\n   * for the underlying storage.\r\n   *\r\n   * @public\r\n   */\n  return BrowserSessionPersistence;\n})();\nconst browserSessionPersistence = BrowserSessionPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Shim for Promise.allSettled, note the slightly different format of `fulfilled` vs `status`.\r\n *\r\n * @param promises - Array of promises to wait on.\r\n */\nfunction _allSettled(promises) {\n  return Promise.all(promises.map( /*#__PURE__*/function () {\n    var _ref10 = _asyncToGenerator(function* (promise) {\n      try {\n        const value = yield promise;\n        return {\n          fulfilled: true,\n          value\n        };\n      } catch (reason) {\n        return {\n          fulfilled: false,\n          reason\n        };\n      }\n    });\n    return function (_x122) {\n      return _ref10.apply(this, arguments);\n    };\n  }()));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface class for receiving messages.\r\n *\r\n */\nlet Receiver = /*#__PURE__*/(() => {\n  class Receiver {\n    constructor(eventTarget) {\n      this.eventTarget = eventTarget;\n      this.handlersMap = {};\n      this.boundEventHandler = this.handleEvent.bind(this);\n    }\n    /**\r\n     * Obtain an instance of a Receiver for a given event target, if none exists it will be created.\r\n     *\r\n     * @param eventTarget - An event target (such as window or self) through which the underlying\r\n     * messages will be received.\r\n     */\n    static _getInstance(eventTarget) {\n      // The results are stored in an array since objects can't be keys for other\n      // objects. In addition, setting a unique property on an event target as a\n      // hash map key may not be allowed due to CORS restrictions.\n      const existingInstance = this.receivers.find(receiver => receiver.isListeningto(eventTarget));\n      if (existingInstance) {\n        return existingInstance;\n      }\n      const newInstance = new Receiver(eventTarget);\n      this.receivers.push(newInstance);\n      return newInstance;\n    }\n    isListeningto(eventTarget) {\n      return this.eventTarget === eventTarget;\n    }\n    /**\r\n     * Fans out a MessageEvent to the appropriate listeners.\r\n     *\r\n     * @remarks\r\n     * Sends an {@link Status.ACK} upon receipt and a {@link Status.DONE} once all handlers have\r\n     * finished processing.\r\n     *\r\n     * @param event - The MessageEvent.\r\n     *\r\n     */\n    handleEvent(event) {\n      var _this39 = this;\n      return _asyncToGenerator(function* () {\n        const messageEvent = event;\n        const {\n          eventId,\n          eventType,\n          data\n        } = messageEvent.data;\n        const handlers = _this39.handlersMap[eventType];\n        if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {\n          return;\n        }\n        messageEvent.ports[0].postMessage({\n          status: \"ack\" /* _Status.ACK */,\n          eventId,\n          eventType\n        });\n        const promises = Array.from(handlers).map( /*#__PURE__*/function () {\n          var _ref11 = _asyncToGenerator(function* (handler) {\n            return handler(messageEvent.origin, data);\n          });\n          return function (_x123) {\n            return _ref11.apply(this, arguments);\n          };\n        }());\n        const response = yield _allSettled(promises);\n        messageEvent.ports[0].postMessage({\n          status: \"done\" /* _Status.DONE */,\n          eventId,\n          eventType,\n          response\n        });\n      })();\n    }\n    /**\r\n     * Subscribe an event handler for a particular event.\r\n     *\r\n     * @param eventType - Event name to subscribe to.\r\n     * @param eventHandler - The event handler which should receive the events.\r\n     *\r\n     */\n    _subscribe(eventType, eventHandler) {\n      if (Object.keys(this.handlersMap).length === 0) {\n        this.eventTarget.addEventListener('message', this.boundEventHandler);\n      }\n      if (!this.handlersMap[eventType]) {\n        this.handlersMap[eventType] = new Set();\n      }\n      this.handlersMap[eventType].add(eventHandler);\n    }\n    /**\r\n     * Unsubscribe an event handler from a particular event.\r\n     *\r\n     * @param eventType - Event name to unsubscribe from.\r\n     * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.\r\n     *\r\n     */\n    _unsubscribe(eventType, eventHandler) {\n      if (this.handlersMap[eventType] && eventHandler) {\n        this.handlersMap[eventType].delete(eventHandler);\n      }\n      if (!eventHandler || this.handlersMap[eventType].size === 0) {\n        delete this.handlersMap[eventType];\n      }\n      if (Object.keys(this.handlersMap).length === 0) {\n        this.eventTarget.removeEventListener('message', this.boundEventHandler);\n      }\n    }\n  }\n  Receiver.receivers = [];\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  return Receiver;\n})();\nfunction _generateEventId(prefix = '', digits = 10) {\n  let random = '';\n  for (let i = 0; i < digits; i++) {\n    random += Math.floor(Math.random() * 10);\n  }\n  return prefix + random;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface for sending messages and waiting for a completion response.\r\n *\r\n */\nclass Sender {\n  constructor(target) {\n    this.target = target;\n    this.handlers = new Set();\n  }\n  /**\r\n   * Unsubscribe the handler and remove it from our tracking Set.\r\n   *\r\n   * @param handler - The handler to unsubscribe.\r\n   */\n  removeMessageHandler(handler) {\n    if (handler.messageChannel) {\n      handler.messageChannel.port1.removeEventListener('message', handler.onMessage);\n      handler.messageChannel.port1.close();\n    }\n    this.handlers.delete(handler);\n  }\n  /**\r\n   * Send a message to the Receiver located at {@link target}.\r\n   *\r\n   * @remarks\r\n   * We'll first wait a bit for an ACK , if we get one we will wait significantly longer until the\r\n   * receiver has had a chance to fully process the event.\r\n   *\r\n   * @param eventType - Type of event to send.\r\n   * @param data - The payload of the event.\r\n   * @param timeout - Timeout for waiting on an ACK from the receiver.\r\n   *\r\n   * @returns An array of settled promises from all the handlers that were listening on the receiver.\r\n   */\n  _send(eventType, data, timeout = 50 /* _TimeoutDuration.ACK */) {\n    var _this40 = this;\n    return _asyncToGenerator(function* () {\n      const messageChannel = typeof MessageChannel !== 'undefined' ? new MessageChannel() : null;\n      if (!messageChannel) {\n        throw new Error(\"connection_unavailable\" /* _MessageError.CONNECTION_UNAVAILABLE */);\n      }\n      // Node timers and browser timers return fundamentally different types.\n      // We don't actually care what the value is but TS won't accept unknown and\n      // we can't cast properly in both environments.\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      let completionTimer;\n      let handler;\n      return new Promise((resolve, reject) => {\n        const eventId = _generateEventId('', 20);\n        messageChannel.port1.start();\n        const ackTimer = setTimeout(() => {\n          reject(new Error(\"unsupported_event\" /* _MessageError.UNSUPPORTED_EVENT */));\n        }, timeout);\n        handler = {\n          messageChannel,\n          onMessage(event) {\n            const messageEvent = event;\n            if (messageEvent.data.eventId !== eventId) {\n              return;\n            }\n            switch (messageEvent.data.status) {\n              case \"ack\" /* _Status.ACK */:\n                // The receiver should ACK first.\n                clearTimeout(ackTimer);\n                completionTimer = setTimeout(() => {\n                  reject(new Error(\"timeout\" /* _MessageError.TIMEOUT */));\n                }, 3000 /* _TimeoutDuration.COMPLETION */);\n                break;\n              case \"done\" /* _Status.DONE */:\n                // Once the receiver's handlers are finished we will get the results.\n                clearTimeout(completionTimer);\n                resolve(messageEvent.data.response);\n                break;\n              default:\n                clearTimeout(ackTimer);\n                clearTimeout(completionTimer);\n                reject(new Error(\"invalid_response\" /* _MessageError.INVALID_RESPONSE */));\n                break;\n            }\n          }\n        };\n        _this40.handlers.add(handler);\n        messageChannel.port1.addEventListener('message', handler.onMessage);\n        _this40.target.postMessage({\n          eventType,\n          eventId,\n          data\n        }, [messageChannel.port2]);\n      }).finally(() => {\n        if (handler) {\n          _this40.removeMessageHandler(handler);\n        }\n      });\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Lazy accessor for window, since the compat layer won't tree shake this out,\r\n * we need to make sure not to mess with window unless we have to\r\n */\nfunction _window() {\n  return window;\n}\nfunction _setWindowLocation(url) {\n  _window().location.href = url;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _isWorker() {\n  return typeof _window()['WorkerGlobalScope'] !== 'undefined' && typeof _window()['importScripts'] === 'function';\n}\nfunction _getActiveServiceWorker() {\n  return _getActiveServiceWorker2.apply(this, arguments);\n}\nfunction _getActiveServiceWorker2() {\n  _getActiveServiceWorker2 = _asyncToGenerator(function* () {\n    if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {\n      return null;\n    }\n    try {\n      const registration = yield navigator.serviceWorker.ready;\n      return registration.active;\n    } catch (_a) {\n      return null;\n    }\n  });\n  return _getActiveServiceWorker2.apply(this, arguments);\n}\nfunction _getServiceWorkerController() {\n  var _a;\n  return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;\n}\nfunction _getWorkerGlobalScope() {\n  return _isWorker() ? self : null;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebaseLocalStorageDb';\nconst DB_VERSION = 1;\nconst DB_OBJECTSTORE_NAME = 'firebaseLocalStorage';\nconst DB_DATA_KEYPATH = 'fbase_key';\n/**\r\n * Promise wrapper for IDBRequest\r\n *\r\n * Unfortunately we can't cleanly extend Promise<T> since promises are not callable in ES6\r\n *\r\n */\nclass DBPromise {\n  constructor(request) {\n    this.request = request;\n  }\n  toPromise() {\n    return new Promise((resolve, reject) => {\n      this.request.addEventListener('success', () => {\n        resolve(this.request.result);\n      });\n      this.request.addEventListener('error', () => {\n        reject(this.request.error);\n      });\n    });\n  }\n}\nfunction getObjectStore(db, isReadWrite) {\n  return db.transaction([DB_OBJECTSTORE_NAME], isReadWrite ? 'readwrite' : 'readonly').objectStore(DB_OBJECTSTORE_NAME);\n}\nfunction _deleteDatabase() {\n  const request = indexedDB.deleteDatabase(DB_NAME);\n  return new DBPromise(request).toPromise();\n}\nfunction _openDatabase() {\n  const request = indexedDB.open(DB_NAME, DB_VERSION);\n  return new Promise((resolve, reject) => {\n    request.addEventListener('error', () => {\n      reject(request.error);\n    });\n    request.addEventListener('upgradeneeded', () => {\n      const db = request.result;\n      try {\n        db.createObjectStore(DB_OBJECTSTORE_NAME, {\n          keyPath: DB_DATA_KEYPATH\n        });\n      } catch (e) {\n        reject(e);\n      }\n    });\n    request.addEventListener('success', /*#__PURE__*/_asyncToGenerator(function* () {\n      const db = request.result;\n      // Strange bug that occurs in Firefox when multiple tabs are opened at the\n      // same time. The only way to recover seems to be deleting the database\n      // and re-initializing it.\n      // https://github.com/firebase/firebase-js-sdk/issues/634\n      if (!db.objectStoreNames.contains(DB_OBJECTSTORE_NAME)) {\n        // Need to close the database or else you get a `blocked` event\n        db.close();\n        yield _deleteDatabase();\n        resolve(yield _openDatabase());\n      } else {\n        resolve(db);\n      }\n    }));\n  });\n}\nfunction _putObject(_x124, _x125, _x126) {\n  return _putObject2.apply(this, arguments);\n}\nfunction _putObject2() {\n  _putObject2 = _asyncToGenerator(function* (db, key, value) {\n    const request = getObjectStore(db, true).put({\n      [DB_DATA_KEYPATH]: key,\n      value\n    });\n    return new DBPromise(request).toPromise();\n  });\n  return _putObject2.apply(this, arguments);\n}\nfunction getObject(_x127, _x128) {\n  return _getObject.apply(this, arguments);\n}\nfunction _getObject() {\n  _getObject = _asyncToGenerator(function* (db, key) {\n    const request = getObjectStore(db, false).get(key);\n    const data = yield new DBPromise(request).toPromise();\n    return data === undefined ? null : data.value;\n  });\n  return _getObject.apply(this, arguments);\n}\nfunction _deleteObject(db, key) {\n  const request = getObjectStore(db, true).delete(key);\n  return new DBPromise(request).toPromise();\n}\nconst _POLLING_INTERVAL_MS = 800;\nconst _TRANSACTION_RETRY_COUNT = 3;\nlet IndexedDBLocalPersistence = /*#__PURE__*/(() => {\n  class IndexedDBLocalPersistence {\n    constructor() {\n      this.type = \"LOCAL\" /* PersistenceType.LOCAL */;\n      this._shouldAllowMigration = true;\n      this.listeners = {};\n      this.localCache = {};\n      // setTimeout return value is platform specific\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      this.pollTimer = null;\n      this.pendingWrites = 0;\n      this.receiver = null;\n      this.sender = null;\n      this.serviceWorkerReceiverAvailable = false;\n      this.activeServiceWorker = null;\n      // Fire & forget the service worker registration as it may never resolve\n      this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {}, () => {});\n    }\n    _openDb() {\n      var _this41 = this;\n      return _asyncToGenerator(function* () {\n        if (_this41.db) {\n          return _this41.db;\n        }\n        _this41.db = yield _openDatabase();\n        return _this41.db;\n      })();\n    }\n    _withRetries(op) {\n      var _this42 = this;\n      return _asyncToGenerator(function* () {\n        let numAttempts = 0;\n        while (true) {\n          try {\n            const db = yield _this42._openDb();\n            return yield op(db);\n          } catch (e) {\n            if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {\n              throw e;\n            }\n            if (_this42.db) {\n              _this42.db.close();\n              _this42.db = undefined;\n            }\n            // TODO: consider adding exponential backoff\n          }\n        }\n      })();\n    }\n    /**\r\n     * IndexedDB events do not propagate from the main window to the worker context.  We rely on a\r\n     * postMessage interface to send these events to the worker ourselves.\r\n     */\n    initializeServiceWorkerMessaging() {\n      var _this43 = this;\n      return _asyncToGenerator(function* () {\n        return _isWorker() ? _this43.initializeReceiver() : _this43.initializeSender();\n      })();\n    }\n    /**\r\n     * As the worker we should listen to events from the main window.\r\n     */\n    initializeReceiver() {\n      var _this44 = this;\n      return _asyncToGenerator(function* () {\n        _this44.receiver = Receiver._getInstance(_getWorkerGlobalScope());\n        // Refresh from persistence if we receive a KeyChanged message.\n        _this44.receiver._subscribe(\"keyChanged\" /* _EventType.KEY_CHANGED */, /*#__PURE__*/function () {\n          var _ref13 = _asyncToGenerator(function* (_origin, data) {\n            const keys = yield _this44._poll();\n            return {\n              keyProcessed: keys.includes(data.key)\n            };\n          });\n          return function (_x129, _x130) {\n            return _ref13.apply(this, arguments);\n          };\n        }());\n        // Let the sender know that we are listening so they give us more timeout.\n        _this44.receiver._subscribe(\"ping\" /* _EventType.PING */, /*#__PURE__*/function () {\n          var _ref14 = _asyncToGenerator(function* (_origin, _data) {\n            return [\"keyChanged\" /* _EventType.KEY_CHANGED */];\n          });\n          return function (_x131, _x132) {\n            return _ref14.apply(this, arguments);\n          };\n        }());\n      })();\n    }\n    /**\r\n     * As the main window, we should let the worker know when keys change (set and remove).\r\n     *\r\n     * @remarks\r\n     * {@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready | ServiceWorkerContainer.ready}\r\n     * may not resolve.\r\n     */\n    initializeSender() {\n      var _this45 = this;\n      return _asyncToGenerator(function* () {\n        var _a, _b;\n        // Check to see if there's an active service worker.\n        _this45.activeServiceWorker = yield _getActiveServiceWorker();\n        if (!_this45.activeServiceWorker) {\n          return;\n        }\n        _this45.sender = new Sender(_this45.activeServiceWorker);\n        // Ping the service worker to check what events they can handle.\n        const results = yield _this45.sender._send(\"ping\" /* _EventType.PING */, {}, 800 /* _TimeoutDuration.LONG_ACK */);\n        if (!results) {\n          return;\n        }\n        if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) && ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes(\"keyChanged\" /* _EventType.KEY_CHANGED */))) {\n          _this45.serviceWorkerReceiverAvailable = true;\n        }\n      })();\n    }\n    /**\r\n     * Let the worker know about a changed key, the exact key doesn't technically matter since the\r\n     * worker will just trigger a full sync anyway.\r\n     *\r\n     * @remarks\r\n     * For now, we only support one service worker per page.\r\n     *\r\n     * @param key - Storage key which changed.\r\n     */\n    notifyServiceWorker(key) {\n      var _this46 = this;\n      return _asyncToGenerator(function* () {\n        if (!_this46.sender || !_this46.activeServiceWorker || _getServiceWorkerController() !== _this46.activeServiceWorker) {\n          return;\n        }\n        try {\n          yield _this46.sender._send(\"keyChanged\" /* _EventType.KEY_CHANGED */, {\n            key\n          },\n          // Use long timeout if receiver has previously responded to a ping from us.\n          _this46.serviceWorkerReceiverAvailable ? 800 /* _TimeoutDuration.LONG_ACK */ : 50 /* _TimeoutDuration.ACK */);\n        } catch (_a) {\n          // This is a best effort approach. Ignore errors.\n        }\n      })();\n    }\n    _isAvailable() {\n      return _asyncToGenerator(function* () {\n        try {\n          if (!indexedDB) {\n            return false;\n          }\n          const db = yield _openDatabase();\n          yield _putObject(db, STORAGE_AVAILABLE_KEY, '1');\n          yield _deleteObject(db, STORAGE_AVAILABLE_KEY);\n          return true;\n        } catch (_a) {}\n        return false;\n      })();\n    }\n    _withPendingWrite(write) {\n      var _this47 = this;\n      return _asyncToGenerator(function* () {\n        _this47.pendingWrites++;\n        try {\n          yield write();\n        } finally {\n          _this47.pendingWrites--;\n        }\n      })();\n    }\n    _set(key, value) {\n      var _this48 = this;\n      return _asyncToGenerator(function* () {\n        return _this48._withPendingWrite( /*#__PURE__*/_asyncToGenerator(function* () {\n          yield _this48._withRetries(db => _putObject(db, key, value));\n          _this48.localCache[key] = value;\n          return _this48.notifyServiceWorker(key);\n        }));\n      })();\n    }\n    _get(key) {\n      var _this49 = this;\n      return _asyncToGenerator(function* () {\n        const obj = yield _this49._withRetries(db => getObject(db, key));\n        _this49.localCache[key] = obj;\n        return obj;\n      })();\n    }\n    _remove(key) {\n      var _this50 = this;\n      return _asyncToGenerator(function* () {\n        return _this50._withPendingWrite( /*#__PURE__*/_asyncToGenerator(function* () {\n          yield _this50._withRetries(db => _deleteObject(db, key));\n          delete _this50.localCache[key];\n          return _this50.notifyServiceWorker(key);\n        }));\n      })();\n    }\n    _poll() {\n      var _this51 = this;\n      return _asyncToGenerator(function* () {\n        // TODO: check if we need to fallback if getAll is not supported\n        const result = yield _this51._withRetries(db => {\n          const getAllRequest = getObjectStore(db, false).getAll();\n          return new DBPromise(getAllRequest).toPromise();\n        });\n        if (!result) {\n          return [];\n        }\n        // If we have pending writes in progress abort, we'll get picked up on the next poll\n        if (_this51.pendingWrites !== 0) {\n          return [];\n        }\n        const keys = [];\n        const keysInResult = new Set();\n        for (const {\n          fbase_key: key,\n          value\n        } of result) {\n          keysInResult.add(key);\n          if (JSON.stringify(_this51.localCache[key]) !== JSON.stringify(value)) {\n            _this51.notifyListeners(key, value);\n            keys.push(key);\n          }\n        }\n        for (const localKey of Object.keys(_this51.localCache)) {\n          if (_this51.localCache[localKey] && !keysInResult.has(localKey)) {\n            // Deleted\n            _this51.notifyListeners(localKey, null);\n            keys.push(localKey);\n          }\n        }\n        return keys;\n      })();\n    }\n    notifyListeners(key, newValue) {\n      this.localCache[key] = newValue;\n      const listeners = this.listeners[key];\n      if (listeners) {\n        for (const listener of Array.from(listeners)) {\n          listener(newValue);\n        }\n      }\n    }\n    startPolling() {\n      var _this52 = this;\n      this.stopPolling();\n      this.pollTimer = setInterval( /*#__PURE__*/_asyncToGenerator(function* () {\n        return _this52._poll();\n      }), _POLLING_INTERVAL_MS);\n    }\n    stopPolling() {\n      if (this.pollTimer) {\n        clearInterval(this.pollTimer);\n        this.pollTimer = null;\n      }\n    }\n    _addListener(key, listener) {\n      if (Object.keys(this.listeners).length === 0) {\n        this.startPolling();\n      }\n      if (!this.listeners[key]) {\n        this.listeners[key] = new Set();\n        // Populate the cache to avoid spuriously triggering on first poll.\n        void this._get(key); // This can happen in the background async and we can return immediately.\n      }\n\n      this.listeners[key].add(listener);\n    }\n    _removeListener(key, listener) {\n      if (this.listeners[key]) {\n        this.listeners[key].delete(listener);\n        if (this.listeners[key].size === 0) {\n          delete this.listeners[key];\n        }\n      }\n      if (Object.keys(this.listeners).length === 0) {\n        this.stopPolling();\n      }\n    }\n  }\n  IndexedDBLocalPersistence.type = 'LOCAL';\n  /**\r\n   * An implementation of {@link Persistence} of type `LOCAL` using `indexedDB`\r\n   * for the underlying storage.\r\n   *\r\n   * @public\r\n   */\n  return IndexedDBLocalPersistence;\n})();\nconst indexedDBLocalPersistence = IndexedDBLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startSignInPhoneMfa(auth, request) {\n  return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:start\" /* Endpoint.START_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeSignInPhoneMfa(auth, request) {\n  return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getRecaptchaParams(_x133) {\n  return _getRecaptchaParams.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getRecaptchaParams() {\n  _getRecaptchaParams = _asyncToGenerator(function* (auth) {\n    return (yield _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/recaptchaParams\" /* Endpoint.GET_RECAPTCHA_PARAM */)).recaptchaSiteKey || '';\n  });\n  return _getRecaptchaParams.apply(this, arguments);\n}\nfunction getScriptParentElement() {\n  var _a, _b;\n  return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;\n}\nfunction _loadJS(url) {\n  // TODO: consider adding timeout support & cancellation\n  return new Promise((resolve, reject) => {\n    const el = document.createElement('script');\n    el.setAttribute('src', url);\n    el.onload = resolve;\n    el.onerror = e => {\n      const error = _createError(\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      error.customData = e;\n      reject(error);\n    };\n    el.type = 'text/javascript';\n    el.charset = 'UTF-8';\n    getScriptParentElement().appendChild(el);\n  });\n}\nfunction _generateCallbackName(prefix) {\n  return `__${prefix}${Math.floor(Math.random() * 1000000)}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _SOLVE_TIME_MS = 500;\nconst _EXPIRATION_TIME_MS = 60000;\nconst _WIDGET_ID_START = 1000000000000;\nclass MockReCaptcha {\n  constructor(auth) {\n    this.auth = auth;\n    this.counter = _WIDGET_ID_START;\n    this._widgets = new Map();\n  }\n  render(container, parameters) {\n    const id = this.counter;\n    this._widgets.set(id, new MockWidget(container, this.auth.name, parameters || {}));\n    this.counter++;\n    return id;\n  }\n  reset(optWidgetId) {\n    var _a;\n    const id = optWidgetId || _WIDGET_ID_START;\n    void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());\n    this._widgets.delete(id);\n  }\n  getResponse(optWidgetId) {\n    var _a;\n    const id = optWidgetId || _WIDGET_ID_START;\n    return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';\n  }\n  execute(optWidgetId) {\n    var _this53 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      const id = optWidgetId || _WIDGET_ID_START;\n      void ((_a = _this53._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());\n      return '';\n    })();\n  }\n}\nclass MockWidget {\n  constructor(containerOrId, appName, params) {\n    this.params = params;\n    this.timerId = null;\n    this.deleted = false;\n    this.responseToken = null;\n    this.clickHandler = () => {\n      this.execute();\n    };\n    const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n    _assert(container, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, {\n      appName\n    });\n    this.container = container;\n    this.isVisible = this.params.size !== 'invisible';\n    if (this.isVisible) {\n      this.execute();\n    } else {\n      this.container.addEventListener('click', this.clickHandler);\n    }\n  }\n  getResponse() {\n    this.checkIfDeleted();\n    return this.responseToken;\n  }\n  delete() {\n    this.checkIfDeleted();\n    this.deleted = true;\n    if (this.timerId) {\n      clearTimeout(this.timerId);\n      this.timerId = null;\n    }\n    this.container.removeEventListener('click', this.clickHandler);\n  }\n  execute() {\n    this.checkIfDeleted();\n    if (this.timerId) {\n      return;\n    }\n    this.timerId = window.setTimeout(() => {\n      this.responseToken = generateRandomAlphaNumericString(50);\n      const {\n        callback,\n        'expired-callback': expiredCallback\n      } = this.params;\n      if (callback) {\n        try {\n          callback(this.responseToken);\n        } catch (e) {}\n      }\n      this.timerId = window.setTimeout(() => {\n        this.timerId = null;\n        this.responseToken = null;\n        if (expiredCallback) {\n          try {\n            expiredCallback();\n          } catch (e) {}\n        }\n        if (this.isVisible) {\n          this.execute();\n        }\n      }, _EXPIRATION_TIME_MS);\n    }, _SOLVE_TIME_MS);\n  }\n  checkIfDeleted() {\n    if (this.deleted) {\n      throw new Error('reCAPTCHA mock was already deleted!');\n    }\n  }\n}\nfunction generateRandomAlphaNumericString(len) {\n  const chars = [];\n  const allowedChars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n  for (let i = 0; i < len; i++) {\n    chars.push(allowedChars.charAt(Math.floor(Math.random() * allowedChars.length)));\n  }\n  return chars.join('');\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// ReCaptcha will load using the same callback, so the callback function needs\n// to be kept around\nconst _JSLOAD_CALLBACK = _generateCallbackName('rcb');\nconst NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);\nconst RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';\n/**\r\n * Loader for the GReCaptcha library. There should only ever be one of this.\r\n */\nclass ReCaptchaLoaderImpl {\n  constructor() {\n    var _a;\n    this.hostLanguage = '';\n    this.counter = 0;\n    /**\r\n     * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise\r\n     * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but\r\n     * `window.grecaptcha.render()` will not. Another load will add it.\r\n     */\n    this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);\n  }\n  load(auth, hl = '') {\n    _assert(isHostLanguageValid(hl), auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    if (this.shouldResolveImmediately(hl)) {\n      return Promise.resolve(_window().grecaptcha);\n    }\n    return new Promise((resolve, reject) => {\n      const networkTimeout = _window().setTimeout(() => {\n        reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n      }, NETWORK_TIMEOUT_DELAY.get());\n      _window()[_JSLOAD_CALLBACK] = () => {\n        _window().clearTimeout(networkTimeout);\n        delete _window()[_JSLOAD_CALLBACK];\n        const recaptcha = _window().grecaptcha;\n        if (!recaptcha) {\n          reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n          return;\n        }\n        // Wrap the greptcha render function so that we know if the developer has\n        // called it separately\n        const render = recaptcha.render;\n        recaptcha.render = (container, params) => {\n          const widgetId = render(container, params);\n          this.counter++;\n          return widgetId;\n        };\n        this.hostLanguage = hl;\n        resolve(recaptcha);\n      };\n      const url = `${RECAPTCHA_BASE}?${querystring({\n        onload: _JSLOAD_CALLBACK,\n        render: 'explicit',\n        hl\n      })}`;\n      _loadJS(url).catch(() => {\n        clearTimeout(networkTimeout);\n        reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n      });\n    });\n  }\n\n  clearedOneInstance() {\n    this.counter--;\n  }\n  shouldResolveImmediately(hl) {\n    var _a;\n    // We can resolve immediately if:\n    //   • grecaptcha is already defined AND (\n    //     1. the requested language codes are the same OR\n    //     2. there exists already a ReCaptcha on the page\n    //     3. the library was already loaded by the app\n    // In cases (2) and (3), we _can't_ reload as it would break the recaptchas\n    // that are already in the page\n    return !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) && (hl === this.hostLanguage || this.counter > 0 || this.librarySeparatelyLoaded);\n  }\n}\nfunction isHostLanguageValid(hl) {\n  return hl.length <= 6 && /^\\s*[a-zA-Z0-9\\-]*\\s*$/.test(hl);\n}\nclass MockReCaptchaLoaderImpl {\n  load(auth) {\n    return _asyncToGenerator(function* () {\n      return new MockReCaptcha(auth);\n    })();\n  }\n  clearedOneInstance() {}\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_VERIFIER_TYPE = 'recaptcha';\nconst DEFAULT_PARAMS = {\n  theme: 'light',\n  type: 'image'\n};\n/**\r\n * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.\r\n *\r\n * @public\r\n */\nclass RecaptchaVerifier {\n  /**\r\n   *\r\n   * @param containerOrId - The reCAPTCHA container parameter.\r\n   *\r\n   * @remarks\r\n   * This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a\r\n   * visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to\r\n   * an element ID. The corresponding element must also must be in the DOM at the time of\r\n   * initialization.\r\n   *\r\n   * @param parameters - The optional reCAPTCHA parameters.\r\n   *\r\n   * @remarks\r\n   * Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for\r\n   * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will\r\n   * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value\r\n   * 'invisible'.\r\n   *\r\n   * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n   */\n  constructor(containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS), authExtern) {\n    this.parameters = parameters;\n    /**\r\n     * The application verifier type.\r\n     *\r\n     * @remarks\r\n     * For a reCAPTCHA verifier, this is 'recaptcha'.\r\n     */\n    this.type = RECAPTCHA_VERIFIER_TYPE;\n    this.destroyed = false;\n    this.widgetId = null;\n    this.tokenChangeListeners = new Set();\n    this.renderPromise = null;\n    this.recaptcha = null;\n    this.auth = _castAuth(authExtern);\n    this.isInvisible = this.parameters.size === 'invisible';\n    _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n    const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n    _assert(container, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    this.container = container;\n    this.parameters.callback = this.makeTokenCallback(this.parameters.callback);\n    this._recaptchaLoader = this.auth.settings.appVerificationDisabledForTesting ? new MockReCaptchaLoaderImpl() : new ReCaptchaLoaderImpl();\n    this.validateStartingState();\n    // TODO: Figure out if sdk version is needed\n  }\n  /**\r\n   * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.\r\n   *\r\n   * @returns A Promise for the reCAPTCHA token.\r\n   */\n  verify() {\n    var _this54 = this;\n    return _asyncToGenerator(function* () {\n      _this54.assertNotDestroyed();\n      const id = yield _this54.render();\n      const recaptcha = _this54.getAssertedRecaptcha();\n      const response = recaptcha.getResponse(id);\n      if (response) {\n        return response;\n      }\n      return new Promise(resolve => {\n        const tokenChange = token => {\n          if (!token) {\n            return; // Ignore token expirations.\n          }\n\n          _this54.tokenChangeListeners.delete(tokenChange);\n          resolve(token);\n        };\n        _this54.tokenChangeListeners.add(tokenChange);\n        if (_this54.isInvisible) {\n          recaptcha.execute(id);\n        }\n      });\n    })();\n  }\n  /**\r\n   * Renders the reCAPTCHA widget on the page.\r\n   *\r\n   * @returns A Promise that resolves with the reCAPTCHA widget ID.\r\n   */\n  render() {\n    try {\n      this.assertNotDestroyed();\n    } catch (e) {\n      // This method returns a promise. Since it's not async (we want to return the\n      // _same_ promise if rendering is still occurring), the API surface should\n      // reject with the error rather than just throw\n      return Promise.reject(e);\n    }\n    if (this.renderPromise) {\n      return this.renderPromise;\n    }\n    this.renderPromise = this.makeRenderPromise().catch(e => {\n      this.renderPromise = null;\n      throw e;\n    });\n    return this.renderPromise;\n  }\n  /** @internal */\n  _reset() {\n    this.assertNotDestroyed();\n    if (this.widgetId !== null) {\n      this.getAssertedRecaptcha().reset(this.widgetId);\n    }\n  }\n  /**\r\n   * Clears the reCAPTCHA widget from the page and destroys the instance.\r\n   */\n  clear() {\n    this.assertNotDestroyed();\n    this.destroyed = true;\n    this._recaptchaLoader.clearedOneInstance();\n    if (!this.isInvisible) {\n      this.container.childNodes.forEach(node => {\n        this.container.removeChild(node);\n      });\n    }\n  }\n  validateStartingState() {\n    _assert(!this.parameters.sitekey, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    _assert(this.isInvisible || !this.container.hasChildNodes(), this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n    _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n  }\n\n  makeTokenCallback(existing) {\n    return token => {\n      this.tokenChangeListeners.forEach(listener => listener(token));\n      if (typeof existing === 'function') {\n        existing(token);\n      } else if (typeof existing === 'string') {\n        const globalFunc = _window()[existing];\n        if (typeof globalFunc === 'function') {\n          globalFunc(token);\n        }\n      }\n    };\n  }\n  assertNotDestroyed() {\n    _assert(!this.destroyed, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  }\n\n  makeRenderPromise() {\n    var _this55 = this;\n    return _asyncToGenerator(function* () {\n      yield _this55.init();\n      if (!_this55.widgetId) {\n        let container = _this55.container;\n        if (!_this55.isInvisible) {\n          const guaranteedEmpty = document.createElement('div');\n          container.appendChild(guaranteedEmpty);\n          container = guaranteedEmpty;\n        }\n        _this55.widgetId = _this55.getAssertedRecaptcha().render(container, _this55.parameters);\n      }\n      return _this55.widgetId;\n    })();\n  }\n  init() {\n    var _this56 = this;\n    return _asyncToGenerator(function* () {\n      _assert(_isHttpOrHttps() && !_isWorker(), _this56.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      yield domReady();\n      _this56.recaptcha = yield _this56._recaptchaLoader.load(_this56.auth, _this56.auth.languageCode || undefined);\n      const siteKey = yield getRecaptchaParams(_this56.auth);\n      _assert(siteKey, _this56.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n      _this56.parameters.sitekey = siteKey;\n    })();\n  }\n  getAssertedRecaptcha() {\n    _assert(this.recaptcha, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    return this.recaptcha;\n  }\n}\nfunction domReady() {\n  let resolver = null;\n  return new Promise(resolve => {\n    if (document.readyState === 'complete') {\n      resolve();\n      return;\n    }\n    // Document not ready, wait for load before resolving.\n    // Save resolver, so we can remove listener in case it was externally\n    // cancelled.\n    resolver = () => resolve();\n    window.addEventListener('load', resolver);\n  }).catch(e => {\n    if (resolver) {\n      window.removeEventListener('load', resolver);\n    }\n    throw e;\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ConfirmationResultImpl {\n  constructor(verificationId, onConfirmation) {\n    this.verificationId = verificationId;\n    this.onConfirmation = onConfirmation;\n  }\n  confirm(verificationCode) {\n    const authCredential = PhoneAuthCredential._fromVerification(this.verificationId, verificationCode);\n    return this.onConfirmation(authCredential);\n  }\n}\n/**\r\n * Asynchronously signs in using a phone number.\r\n *\r\n * @remarks\r\n * This method sends a code via SMS to the given\r\n * phone number, and returns a {@link ConfirmationResult}. After the user\r\n * provides the code sent to their phone, call {@link ConfirmationResult.confirm}\r\n * with the code to sign the user in.\r\n *\r\n * For abuse prevention, this method also requires a {@link ApplicationVerifier}.\r\n * This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.\r\n * This function can work on other platforms that do not support the\r\n * {@link RecaptchaVerifier} (like React Native), but you need to use a\r\n * third-party {@link ApplicationVerifier} implementation.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain a verificationCode from the user.\r\n * const credential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nfunction signInWithPhoneNumber(_x134, _x135, _x136) {\n  return _signInWithPhoneNumber.apply(this, arguments);\n}\n/**\r\n * Links the user account with the given phone number.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nfunction _signInWithPhoneNumber() {\n  _signInWithPhoneNumber = _asyncToGenerator(function* (auth, phoneNumber, appVerifier) {\n    const authInternal = _castAuth(auth);\n    const verificationId = yield _verifyPhoneNumber(authInternal, phoneNumber, getModularInstance(appVerifier));\n    return new ConfirmationResultImpl(verificationId, cred => signInWithCredential(authInternal, cred));\n  });\n  return _signInWithPhoneNumber.apply(this, arguments);\n}\nfunction linkWithPhoneNumber(_x137, _x138, _x139) {\n  return _linkWithPhoneNumber.apply(this, arguments);\n}\n/**\r\n * Re-authenticates a user using a fresh phone credential.\r\n *\r\n * @remarks Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nfunction _linkWithPhoneNumber() {\n  _linkWithPhoneNumber = _asyncToGenerator(function* (user, phoneNumber, appVerifier) {\n    const userInternal = getModularInstance(user);\n    yield _assertLinkedStatus(false, userInternal, \"phone\" /* ProviderId.PHONE */);\n    const verificationId = yield _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n    return new ConfirmationResultImpl(verificationId, cred => linkWithCredential(userInternal, cred));\n  });\n  return _linkWithPhoneNumber.apply(this, arguments);\n}\nfunction reauthenticateWithPhoneNumber(_x140, _x141, _x142) {\n  return _reauthenticateWithPhoneNumber.apply(this, arguments);\n}\n/**\r\n * Returns a verification ID to be used in conjunction with the SMS code that is sent.\r\n *\r\n */\nfunction _reauthenticateWithPhoneNumber() {\n  _reauthenticateWithPhoneNumber = _asyncToGenerator(function* (user, phoneNumber, appVerifier) {\n    const userInternal = getModularInstance(user);\n    const verificationId = yield _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n    return new ConfirmationResultImpl(verificationId, cred => reauthenticateWithCredential(userInternal, cred));\n  });\n  return _reauthenticateWithPhoneNumber.apply(this, arguments);\n}\nfunction _verifyPhoneNumber(_x143, _x144, _x145) {\n  return _verifyPhoneNumber2.apply(this, arguments);\n}\n/**\r\n * Updates the user's phone number.\r\n *\r\n * @example\r\n * ```\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * await updatePhoneNumber(user, phoneCredential);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param credential - A credential authenticating the new phone number.\r\n *\r\n * @public\r\n */\nfunction _verifyPhoneNumber2() {\n  _verifyPhoneNumber2 = _asyncToGenerator(function* (auth, options, verifier) {\n    var _a;\n    const recaptchaToken = yield verifier.verify();\n    try {\n      _assert(typeof recaptchaToken === 'string', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n      _assert(verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n      let phoneInfoOptions;\n      if (typeof options === 'string') {\n        phoneInfoOptions = {\n          phoneNumber: options\n        };\n      } else {\n        phoneInfoOptions = options;\n      }\n      if ('session' in phoneInfoOptions) {\n        const session = phoneInfoOptions.session;\n        if ('phoneNumber' in phoneInfoOptions) {\n          _assert(session.type === \"enroll\" /* MultiFactorSessionType.ENROLL */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n          const response = yield startEnrollPhoneMfa(auth, {\n            idToken: session.credential,\n            phoneEnrollmentInfo: {\n              phoneNumber: phoneInfoOptions.phoneNumber,\n              recaptchaToken\n            }\n          });\n          return response.phoneSessionInfo.sessionInfo;\n        } else {\n          _assert(session.type === \"signin\" /* MultiFactorSessionType.SIGN_IN */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n          const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) || phoneInfoOptions.multiFactorUid;\n          _assert(mfaEnrollmentId, auth, \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */);\n          const response = yield startSignInPhoneMfa(auth, {\n            mfaPendingCredential: session.credential,\n            mfaEnrollmentId,\n            phoneSignInInfo: {\n              recaptchaToken\n            }\n          });\n          return response.phoneResponseInfo.sessionInfo;\n        }\n      } else {\n        const {\n          sessionInfo\n        } = yield sendPhoneVerificationCode(auth, {\n          phoneNumber: phoneInfoOptions.phoneNumber,\n          recaptchaToken\n        });\n        return sessionInfo;\n      }\n    } finally {\n      verifier._reset();\n    }\n  });\n  return _verifyPhoneNumber2.apply(this, arguments);\n}\nfunction updatePhoneNumber(_x146, _x147) {\n  return _updatePhoneNumber.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link PhoneAuthCredential}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, phoneCredential);\r\n * ```\r\n *\r\n * @public\r\n */\nfunction _updatePhoneNumber() {\n  _updatePhoneNumber = _asyncToGenerator(function* (user, credential) {\n    yield _link$1(getModularInstance(user), credential);\n  });\n  return _updatePhoneNumber.apply(this, arguments);\n}\nlet PhoneAuthProvider = /*#__PURE__*/(() => {\n  class PhoneAuthProvider {\n    /**\r\n     * @param auth - The Firebase {@link Auth} instance in which sign-ins should occur.\r\n     *\r\n     */\n    constructor(auth) {\n      /** Always set to {@link ProviderId}.PHONE. */\n      this.providerId = PhoneAuthProvider.PROVIDER_ID;\n      this.auth = _castAuth(auth);\n    }\n    /**\r\n     *\r\n     * Starts a phone number authentication flow by sending a verification code to the given phone\r\n     * number.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * const provider = new PhoneAuthProvider(auth);\r\n     * const verificationId = await provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n     * // Obtain verificationCode from the user.\r\n     * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n     * const userCredential = await signInWithCredential(auth, authCredential);\r\n     * ```\r\n     *\r\n     * @example\r\n     * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n     * ```javascript\r\n     * const confirmationResult = signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n     * // Obtain verificationCode from the user.\r\n     * const userCredential = confirmationResult.confirm(verificationCode);\r\n     * ```\r\n     *\r\n     * @param phoneInfoOptions - The user's {@link PhoneInfoOptions}. The phone number should be in\r\n     * E.164 format (e.g. +16505550101).\r\n     * @param applicationVerifier - For abuse prevention, this method also requires a\r\n     * {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-based implementation,\r\n     * {@link RecaptchaVerifier}.\r\n     *\r\n     * @returns A Promise for a verification ID that can be passed to\r\n     * {@link PhoneAuthProvider.credential} to identify this flow..\r\n     */\n    verifyPhoneNumber(phoneOptions, applicationVerifier) {\n      return _verifyPhoneNumber(this.auth, phoneOptions, getModularInstance(applicationVerifier));\n    }\n    /**\r\n     * Creates a phone auth credential, given the verification ID from\r\n     * {@link PhoneAuthProvider.verifyPhoneNumber} and the code that was sent to the user's\r\n     * mobile device.\r\n     *\r\n     * @example\r\n     * ```javascript\r\n     * const provider = new PhoneAuthProvider(auth);\r\n     * const verificationId = provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n     * // Obtain verificationCode from the user.\r\n     * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n     * const userCredential = signInWithCredential(auth, authCredential);\r\n     * ```\r\n     *\r\n     * @example\r\n     * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n     * ```javascript\r\n     * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n     * // Obtain verificationCode from the user.\r\n     * const userCredential = await confirmationResult.confirm(verificationCode);\r\n     * ```\r\n     *\r\n     * @param verificationId - The verification ID returned from {@link PhoneAuthProvider.verifyPhoneNumber}.\r\n     * @param verificationCode - The verification code sent to the user's mobile device.\r\n     *\r\n     * @returns The auth provider credential.\r\n     */\n    static credential(verificationId, verificationCode) {\n      return PhoneAuthCredential._fromVerification(verificationId, verificationCode);\n    }\n    /**\r\n     * Generates an {@link AuthCredential} from a {@link UserCredential}.\r\n     * @param userCredential - The user credential.\r\n     */\n    static credentialFromResult(userCredential) {\n      const credential = userCredential;\n      return PhoneAuthProvider.credentialFromTaggedObject(credential);\n    }\n    /**\r\n     * Returns an {@link AuthCredential} when passed an error.\r\n     *\r\n     * @remarks\r\n     *\r\n     * This method works for errors like\r\n     * `auth/account-exists-with-different-credentials`. This is useful for\r\n     * recovering when attempting to set a user's phone number but the number\r\n     * in question is already tied to another account. For example, the following\r\n     * code tries to update the current user's phone number, and if that\r\n     * fails, links the user with the account associated with that number:\r\n     *\r\n     * ```js\r\n     * const provider = new PhoneAuthProvider(auth);\r\n     * const verificationId = await provider.verifyPhoneNumber(number, verifier);\r\n     * try {\r\n     *   const code = ''; // Prompt the user for the verification code\r\n     *   await updatePhoneNumber(\r\n     *       auth.currentUser,\r\n     *       PhoneAuthProvider.credential(verificationId, code));\r\n     * } catch (e) {\r\n     *   if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {\r\n     *     const cred = PhoneAuthProvider.credentialFromError(e);\r\n     *     await linkWithCredential(auth.currentUser, cred);\r\n     *   }\r\n     * }\r\n     *\r\n     * // At this point, auth.currentUser.phoneNumber === number.\r\n     * ```\r\n     *\r\n     * @param error - The error to generate a credential from.\r\n     */\n    static credentialFromError(error) {\n      return PhoneAuthProvider.credentialFromTaggedObject(error.customData || {});\n    }\n    static credentialFromTaggedObject({\n      _tokenResponse: tokenResponse\n    }) {\n      if (!tokenResponse) {\n        return null;\n      }\n      const {\n        phoneNumber,\n        temporaryProof\n      } = tokenResponse;\n      if (phoneNumber && temporaryProof) {\n        return PhoneAuthCredential._fromTokenResponse(phoneNumber, temporaryProof);\n      }\n      return null;\n    }\n  }\n  /** Always set to {@link ProviderId}.PHONE. */\n  PhoneAuthProvider.PROVIDER_ID = \"phone\" /* ProviderId.PHONE */;\n  /** Always set to {@link SignInMethod}.PHONE. */\n  PhoneAuthProvider.PHONE_SIGN_IN_METHOD = \"phone\" /* SignInMethod.PHONE */;\n\n  /**\r\n   * @license\r\n   * Copyright 2021 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  /**\r\n   * Chooses a popup/redirect resolver to use. This prefers the override (which\r\n   * is directly passed in), and falls back to the property set on the auth\r\n   * object. If neither are available, this function errors w/ an argument error.\r\n   */\n  return PhoneAuthProvider;\n})();\nfunction _withDefaultResolver(auth, resolverOverride) {\n  if (resolverOverride) {\n    return _getInstance(resolverOverride);\n  }\n  _assert(auth._popupRedirectResolver, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n  return auth._popupRedirectResolver;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass IdpCredential extends AuthCredential {\n  constructor(params) {\n    super(\"custom\" /* ProviderId.CUSTOM */, \"custom\" /* ProviderId.CUSTOM */);\n    this.params = params;\n  }\n  _getIdTokenResponse(auth) {\n    return signInWithIdp(auth, this._buildIdpRequest());\n  }\n  _linkToIdToken(auth, idToken) {\n    return signInWithIdp(auth, this._buildIdpRequest(idToken));\n  }\n  _getReauthenticationResolver(auth) {\n    return signInWithIdp(auth, this._buildIdpRequest());\n  }\n  _buildIdpRequest(idToken) {\n    const request = {\n      requestUri: this.params.requestUri,\n      sessionId: this.params.sessionId,\n      postBody: this.params.postBody,\n      tenantId: this.params.tenantId,\n      pendingToken: this.params.pendingToken,\n      returnSecureToken: true,\n      returnIdpCredential: true\n    };\n    if (idToken) {\n      request.idToken = idToken;\n    }\n    return request;\n  }\n}\nfunction _signIn(params) {\n  return _signInWithCredential(params.auth, new IdpCredential(params), params.bypassAuthState);\n}\nfunction _reauth(params) {\n  const {\n    auth,\n    user\n  } = params;\n  _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n  return _reauthenticate(user, new IdpCredential(params), params.bypassAuthState);\n}\nfunction _link(_x148) {\n  return _link2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n */\nfunction _link2() {\n  _link2 = _asyncToGenerator(function* (params) {\n    const {\n      auth,\n      user\n    } = params;\n    _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    return _link$1(user, new IdpCredential(params), params.bypassAuthState);\n  });\n  return _link2.apply(this, arguments);\n}\nclass AbstractPopupRedirectOperation {\n  constructor(auth, filter, resolver, user, bypassAuthState = false) {\n    this.auth = auth;\n    this.resolver = resolver;\n    this.user = user;\n    this.bypassAuthState = bypassAuthState;\n    this.pendingPromise = null;\n    this.eventManager = null;\n    this.filter = Array.isArray(filter) ? filter : [filter];\n  }\n  execute() {\n    var _this57 = this;\n    return new Promise( /*#__PURE__*/function () {\n      var _ref18 = _asyncToGenerator(function* (resolve, reject) {\n        _this57.pendingPromise = {\n          resolve,\n          reject\n        };\n        try {\n          _this57.eventManager = yield _this57.resolver._initialize(_this57.auth);\n          yield _this57.onExecution();\n          _this57.eventManager.registerConsumer(_this57);\n        } catch (e) {\n          _this57.reject(e);\n        }\n      });\n      return function (_x149, _x150) {\n        return _ref18.apply(this, arguments);\n      };\n    }());\n  }\n  onAuthEvent(event) {\n    var _this58 = this;\n    return _asyncToGenerator(function* () {\n      const {\n        urlResponse,\n        sessionId,\n        postBody,\n        tenantId,\n        error,\n        type\n      } = event;\n      if (error) {\n        _this58.reject(error);\n        return;\n      }\n      const params = {\n        auth: _this58.auth,\n        requestUri: urlResponse,\n        sessionId: sessionId,\n        tenantId: tenantId || undefined,\n        postBody: postBody || undefined,\n        user: _this58.user,\n        bypassAuthState: _this58.bypassAuthState\n      };\n      try {\n        _this58.resolve(yield _this58.getIdpTask(type)(params));\n      } catch (e) {\n        _this58.reject(e);\n      }\n    })();\n  }\n  onError(error) {\n    this.reject(error);\n  }\n  getIdpTask(type) {\n    switch (type) {\n      case \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */:\n      case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n        return _signIn;\n      case \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */:\n      case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n        return _link;\n      case \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */:\n      case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n        return _reauth;\n      default:\n        _fail(this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    }\n  }\n\n  resolve(cred) {\n    debugAssert(this.pendingPromise, 'Pending promise was never set');\n    this.pendingPromise.resolve(cred);\n    this.unregisterAndCleanUp();\n  }\n  reject(error) {\n    debugAssert(this.pendingPromise, 'Pending promise was never set');\n    this.pendingPromise.reject(error);\n    this.unregisterAndCleanUp();\n  }\n  unregisterAndCleanUp() {\n    if (this.eventManager) {\n      this.eventManager.unregisterConsumer(this);\n    }\n    this.pendingPromise = null;\n    this.cleanUp();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);\n/**\r\n * Authenticates a Firebase client using a popup-based OAuth authentication flow.\r\n *\r\n * @remarks\r\n * If succeeds, returns the signed in user along with the provider's credential. If sign in was\r\n * unsuccessful, returns an error object containing additional information about the error.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n *\r\n * @public\r\n */\nfunction signInWithPopup(_x151, _x152, _x153) {\n  return _signInWithPopup.apply(this, arguments);\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based\r\n * OAuth flow.\r\n *\r\n * @remarks\r\n * If the reauthentication is successful, the returned result will contain the user and the\r\n * provider's credential.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n * // Reauthenticate using a popup.\r\n * await reauthenticateWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction _signInWithPopup() {\n  _signInWithPopup = _asyncToGenerator(function* (auth, provider, resolver) {\n    const authInternal = _castAuth(auth);\n    _assertInstanceOf(auth, provider, FederatedAuthProvider);\n    const resolverInternal = _withDefaultResolver(authInternal, resolver);\n    const action = new PopupOperation(authInternal, \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */, provider, resolverInternal);\n    return action.executeNotNull();\n  });\n  return _signInWithPopup.apply(this, arguments);\n}\nfunction reauthenticateWithPopup(_x154, _x155, _x156) {\n  return _reauthenticateWithPopup.apply(this, arguments);\n}\n/**\r\n * Links the authenticated provider to the user account using a pop-up based OAuth flow.\r\n *\r\n * @remarks\r\n * If the linking is successful, the returned result will contain the user and the provider's credential.\r\n *\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction _reauthenticateWithPopup() {\n  _reauthenticateWithPopup = _asyncToGenerator(function* (user, provider, resolver) {\n    const userInternal = getModularInstance(user);\n    _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n    const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n    const action = new PopupOperation(userInternal.auth, \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */, provider, resolverInternal, userInternal);\n    return action.executeNotNull();\n  });\n  return _reauthenticateWithPopup.apply(this, arguments);\n}\nfunction linkWithPopup(_x157, _x158, _x159) {\n  return _linkWithPopup.apply(this, arguments);\n}\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n *\r\n */\nfunction _linkWithPopup() {\n  _linkWithPopup = _asyncToGenerator(function* (user, provider, resolver) {\n    const userInternal = getModularInstance(user);\n    _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n    const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n    const action = new PopupOperation(userInternal.auth, \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */, provider, resolverInternal, userInternal);\n    return action.executeNotNull();\n  });\n  return _linkWithPopup.apply(this, arguments);\n}\nlet PopupOperation = /*#__PURE__*/(() => {\n  class PopupOperation extends AbstractPopupRedirectOperation {\n    constructor(auth, filter, provider, resolver, user) {\n      super(auth, filter, resolver, user);\n      this.provider = provider;\n      this.authWindow = null;\n      this.pollId = null;\n      if (PopupOperation.currentPopupAction) {\n        PopupOperation.currentPopupAction.cancel();\n      }\n      PopupOperation.currentPopupAction = this;\n    }\n    executeNotNull() {\n      var _this59 = this;\n      return _asyncToGenerator(function* () {\n        const result = yield _this59.execute();\n        _assert(result, _this59.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n        return result;\n      })();\n    }\n    onExecution() {\n      var _this60 = this;\n      return _asyncToGenerator(function* () {\n        debugAssert(_this60.filter.length === 1, 'Popup operations only handle one event');\n        const eventId = _generateEventId();\n        _this60.authWindow = yield _this60.resolver._openPopup(_this60.auth, _this60.provider, _this60.filter[0],\n        // There's always one, see constructor\n        eventId);\n        _this60.authWindow.associatedEvent = eventId;\n        // Check for web storage support and origin validation _after_ the popup is\n        // loaded. These operations are slow (~1 second or so) Rather than\n        // waiting on them before opening the window, optimistically open the popup\n        // and check for storage support at the same time. If storage support is\n        // not available, this will cause the whole thing to reject properly. It\n        // will also close the popup, but since the promise has already rejected,\n        // the popup closed by user poll will reject into the void.\n        _this60.resolver._originValidation(_this60.auth).catch(e => {\n          _this60.reject(e);\n        });\n        _this60.resolver._isIframeWebStorageSupported(_this60.auth, isSupported => {\n          if (!isSupported) {\n            _this60.reject(_createError(_this60.auth, \"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */));\n          }\n        });\n        // Handle user closure. Notice this does *not* use await\n        _this60.pollUserCancellation();\n      })();\n    }\n    get eventId() {\n      var _a;\n      return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;\n    }\n    cancel() {\n      this.reject(_createError(this.auth, \"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));\n    }\n\n    cleanUp() {\n      if (this.authWindow) {\n        this.authWindow.close();\n      }\n      if (this.pollId) {\n        window.clearTimeout(this.pollId);\n      }\n      this.authWindow = null;\n      this.pollId = null;\n      PopupOperation.currentPopupAction = null;\n    }\n    pollUserCancellation() {\n      const poll = () => {\n        var _a, _b;\n        if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {\n          // Make sure that there is sufficient time for whatever action to\n          // complete. The window could have closed but the sign in network\n          // call could still be in flight.\n          this.pollId = window.setTimeout(() => {\n            this.pollId = null;\n            this.reject(_createError(this.auth, \"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */));\n          }, 2000 /* _Timeout.AUTH_EVENT */);\n          return;\n        }\n        this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());\n      };\n      poll();\n    }\n  }\n  // Only one popup is ever shown at once. The lifecycle of the current popup\n  // can be managed / cancelled by the constructor.\n  PopupOperation.currentPopupAction = null;\n\n  /**\r\n   * @license\r\n   * Copyright 2020 Google LLC\r\n   *\r\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   * you may not use this file except in compliance with the License.\r\n   * You may obtain a copy of the License at\r\n   *\r\n   *   http://www.apache.org/licenses/LICENSE-2.0\r\n   *\r\n   * Unless required by applicable law or agreed to in writing, software\r\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   * See the License for the specific language governing permissions and\r\n   * limitations under the License.\r\n   */\n  return PopupOperation;\n})();\nconst PENDING_REDIRECT_KEY = 'pendingRedirect';\n// We only get one redirect outcome for any one auth, so just store it\n// in here.\nconst redirectOutcomeMap = new Map();\nclass RedirectAction extends AbstractPopupRedirectOperation {\n  constructor(auth, resolver, bypassAuthState = false) {\n    super(auth, [\"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, \"unknown\" /* AuthEventType.UNKNOWN */], resolver, undefined, bypassAuthState);\n    this.eventId = null;\n  }\n  /**\r\n   * Override the execute function; if we already have a redirect result, then\r\n   * just return it.\r\n   */\n  execute() {\n    var _superprop_getExecute = () => super.execute,\n      _this61 = this;\n    return _asyncToGenerator(function* () {\n      let readyOutcome = redirectOutcomeMap.get(_this61.auth._key());\n      if (!readyOutcome) {\n        try {\n          const hasPendingRedirect = yield _getAndClearPendingRedirectStatus(_this61.resolver, _this61.auth);\n          const result = hasPendingRedirect ? yield _superprop_getExecute().call(_this61) : null;\n          readyOutcome = () => Promise.resolve(result);\n        } catch (e) {\n          readyOutcome = () => Promise.reject(e);\n        }\n        redirectOutcomeMap.set(_this61.auth._key(), readyOutcome);\n      }\n      // If we're not bypassing auth state, the ready outcome should be set to\n      // null.\n      if (!_this61.bypassAuthState) {\n        redirectOutcomeMap.set(_this61.auth._key(), () => Promise.resolve(null));\n      }\n      return readyOutcome();\n    })();\n  }\n  onAuthEvent(event) {\n    var _superprop_getOnAuthEvent = () => super.onAuthEvent,\n      _this62 = this;\n    return _asyncToGenerator(function* () {\n      if (event.type === \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */) {\n        return _superprop_getOnAuthEvent().call(_this62, event);\n      } else if (event.type === \"unknown\" /* AuthEventType.UNKNOWN */) {\n        // This is a sentinel value indicating there's no pending redirect\n        _this62.resolve(null);\n        return;\n      }\n      if (event.eventId) {\n        const user = yield _this62.auth._redirectUserForId(event.eventId);\n        if (user) {\n          _this62.user = user;\n          return _superprop_getOnAuthEvent().call(_this62, event);\n        } else {\n          _this62.resolve(null);\n        }\n      }\n    })();\n  }\n  onExecution() {\n    return _asyncToGenerator(function* () {})();\n  }\n  cleanUp() {}\n}\nfunction _getAndClearPendingRedirectStatus(_x160, _x161) {\n  return _getAndClearPendingRedirectStatus2.apply(this, arguments);\n}\nfunction _getAndClearPendingRedirectStatus2() {\n  _getAndClearPendingRedirectStatus2 = _asyncToGenerator(function* (resolver, auth) {\n    const key = pendingRedirectKey(auth);\n    const persistence = resolverPersistence(resolver);\n    if (!(yield persistence._isAvailable())) {\n      return false;\n    }\n    const hasPendingRedirect = (yield persistence._get(key)) === 'true';\n    yield persistence._remove(key);\n    return hasPendingRedirect;\n  });\n  return _getAndClearPendingRedirectStatus2.apply(this, arguments);\n}\nfunction _setPendingRedirectStatus(_x162, _x163) {\n  return _setPendingRedirectStatus2.apply(this, arguments);\n}\nfunction _setPendingRedirectStatus2() {\n  _setPendingRedirectStatus2 = _asyncToGenerator(function* (resolver, auth) {\n    return resolverPersistence(resolver)._set(pendingRedirectKey(auth), 'true');\n  });\n  return _setPendingRedirectStatus2.apply(this, arguments);\n}\nfunction _clearRedirectOutcomes() {\n  redirectOutcomeMap.clear();\n}\nfunction _overrideRedirectResult(auth, result) {\n  redirectOutcomeMap.set(auth._key(), result);\n}\nfunction resolverPersistence(resolver) {\n  return _getInstance(resolver._redirectPersistence);\n}\nfunction pendingRedirectKey(auth) {\n  return _persistenceKeyName(PENDING_REDIRECT_KEY, auth.config.apiKey, auth.name);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Authenticates a Firebase client using a full-page redirect flow.\r\n *\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link signInWithRedirect}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n *   // This is the signed-in user\r\n *   const user = result.user;\r\n *   // This gives you a Facebook Access Token.\r\n *   const credential = provider.credentialFromResult(auth, result);\r\n *   const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction signInWithRedirect(auth, provider, resolver) {\n  return _signInWithRedirect(auth, provider, resolver);\n}\nfunction _signInWithRedirect(_x164, _x165, _x166) {\n  return _signInWithRedirect2.apply(this, arguments);\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link reauthenticateWithRedirect}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * // Reauthenticate using a redirect.\r\n * await reauthenticateWithRedirect(result.user, provider);\r\n * // This will again trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction _signInWithRedirect2() {\n  _signInWithRedirect2 = _asyncToGenerator(function* (auth, provider, resolver) {\n    const authInternal = _castAuth(auth);\n    _assertInstanceOf(auth, provider, FederatedAuthProvider);\n    // Wait for auth initialization to complete, this will process pending redirects and clear the\n    // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n    // redirect and creating a PENDING_REDIRECT_KEY entry.\n    yield authInternal._initializationPromise;\n    const resolverInternal = _withDefaultResolver(authInternal, resolver);\n    yield _setPendingRedirectStatus(resolverInternal, authInternal);\n    return resolverInternal._openRedirect(authInternal, provider, \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */);\n  });\n  return _signInWithRedirect2.apply(this, arguments);\n}\nfunction reauthenticateWithRedirect(user, provider, resolver) {\n  return _reauthenticateWithRedirect(user, provider, resolver);\n}\nfunction _reauthenticateWithRedirect(_x167, _x168, _x169) {\n  return _reauthenticateWithRedirect2.apply(this, arguments);\n}\n/**\r\n * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link linkWithRedirect}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithRedirect(result.user, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n *\r\n * @public\r\n */\nfunction _reauthenticateWithRedirect2() {\n  _reauthenticateWithRedirect2 = _asyncToGenerator(function* (user, provider, resolver) {\n    const userInternal = getModularInstance(user);\n    _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n    // Wait for auth initialization to complete, this will process pending redirects and clear the\n    // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n    // redirect and creating a PENDING_REDIRECT_KEY entry.\n    yield userInternal.auth._initializationPromise;\n    // Allow the resolver to error before persisting the redirect user\n    const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n    yield _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n    const eventId = yield prepareUserForRedirect(userInternal);\n    return resolverInternal._openRedirect(userInternal.auth, provider, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId);\n  });\n  return _reauthenticateWithRedirect2.apply(this, arguments);\n}\nfunction linkWithRedirect(user, provider, resolver) {\n  return _linkWithRedirect(user, provider, resolver);\n}\nfunction _linkWithRedirect(_x170, _x171, _x172) {\n  return _linkWithRedirect2.apply(this, arguments);\n}\n/**\r\n * Returns a {@link UserCredential} from the redirect-based sign-in flow.\r\n *\r\n * @remarks\r\n * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an\r\n * error. If no redirect operation was called, returns `null`.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n *   // This is the signed-in user\r\n *   const user = result.user;\r\n *   // This gives you a Facebook Access Token.\r\n *   const credential = provider.credentialFromResult(auth, result);\r\n *   const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction _linkWithRedirect2() {\n  _linkWithRedirect2 = _asyncToGenerator(function* (user, provider, resolver) {\n    const userInternal = getModularInstance(user);\n    _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n    // Wait for auth initialization to complete, this will process pending redirects and clear the\n    // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n    // redirect and creating a PENDING_REDIRECT_KEY entry.\n    yield userInternal.auth._initializationPromise;\n    // Allow the resolver to error before persisting the redirect user\n    const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n    yield _assertLinkedStatus(false, userInternal, provider.providerId);\n    yield _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n    const eventId = yield prepareUserForRedirect(userInternal);\n    return resolverInternal._openRedirect(userInternal.auth, provider, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, eventId);\n  });\n  return _linkWithRedirect2.apply(this, arguments);\n}\nfunction getRedirectResult(_x173, _x174) {\n  return _getRedirectResult2.apply(this, arguments);\n}\nfunction _getRedirectResult2() {\n  _getRedirectResult2 = _asyncToGenerator(function* (auth, resolver) {\n    yield _castAuth(auth)._initializationPromise;\n    return _getRedirectResult(auth, resolver, false);\n  });\n  return _getRedirectResult2.apply(this, arguments);\n}\nfunction _getRedirectResult(_x175, _x176) {\n  return _getRedirectResult3.apply(this, arguments);\n}\nfunction _getRedirectResult3() {\n  _getRedirectResult3 = _asyncToGenerator(function* (auth, resolverExtern, bypassAuthState = false) {\n    const authInternal = _castAuth(auth);\n    const resolver = _withDefaultResolver(authInternal, resolverExtern);\n    const action = new RedirectAction(authInternal, resolver, bypassAuthState);\n    const result = yield action.execute();\n    if (result && !bypassAuthState) {\n      delete result.user._redirectEventId;\n      yield authInternal._persistUserIfCurrent(result.user);\n      yield authInternal._setRedirectUser(null, resolverExtern);\n    }\n    return result;\n  });\n  return _getRedirectResult3.apply(this, arguments);\n}\nfunction prepareUserForRedirect(_x177) {\n  return _prepareUserForRedirect.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// The amount of time to store the UIDs of seen events; this is\n// set to 10 min by default\nfunction _prepareUserForRedirect() {\n  _prepareUserForRedirect = _asyncToGenerator(function* (user) {\n    const eventId = _generateEventId(`${user.uid}:::`);\n    user._redirectEventId = eventId;\n    yield user.auth._setRedirectUser(user);\n    yield user.auth._persistUserIfCurrent(user);\n    return eventId;\n  });\n  return _prepareUserForRedirect.apply(this, arguments);\n}\nconst EVENT_DUPLICATION_CACHE_DURATION_MS = 10 * 60 * 1000;\nclass AuthEventManager {\n  constructor(auth) {\n    this.auth = auth;\n    this.cachedEventUids = new Set();\n    this.consumers = new Set();\n    this.queuedRedirectEvent = null;\n    this.hasHandledPotentialRedirect = false;\n    this.lastProcessedEventTime = Date.now();\n  }\n  registerConsumer(authEventConsumer) {\n    this.consumers.add(authEventConsumer);\n    if (this.queuedRedirectEvent && this.isEventForConsumer(this.queuedRedirectEvent, authEventConsumer)) {\n      this.sendToConsumer(this.queuedRedirectEvent, authEventConsumer);\n      this.saveEventToCache(this.queuedRedirectEvent);\n      this.queuedRedirectEvent = null;\n    }\n  }\n  unregisterConsumer(authEventConsumer) {\n    this.consumers.delete(authEventConsumer);\n  }\n  onEvent(event) {\n    // Check if the event has already been handled\n    if (this.hasEventBeenHandled(event)) {\n      return false;\n    }\n    let handled = false;\n    this.consumers.forEach(consumer => {\n      if (this.isEventForConsumer(event, consumer)) {\n        handled = true;\n        this.sendToConsumer(event, consumer);\n        this.saveEventToCache(event);\n      }\n    });\n    if (this.hasHandledPotentialRedirect || !isRedirectEvent(event)) {\n      // If we've already seen a redirect before, or this is a popup event,\n      // bail now\n      return handled;\n    }\n    this.hasHandledPotentialRedirect = true;\n    // If the redirect wasn't handled, hang on to it\n    if (!handled) {\n      this.queuedRedirectEvent = event;\n      handled = true;\n    }\n    return handled;\n  }\n  sendToConsumer(event, consumer) {\n    var _a;\n    if (event.error && !isNullRedirectEvent(event)) {\n      const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) || \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */;\n      consumer.onError(_createError(this.auth, code));\n    } else {\n      consumer.onAuthEvent(event);\n    }\n  }\n  isEventForConsumer(event, consumer) {\n    const eventIdMatches = consumer.eventId === null || !!event.eventId && event.eventId === consumer.eventId;\n    return consumer.filter.includes(event.type) && eventIdMatches;\n  }\n  hasEventBeenHandled(event) {\n    if (Date.now() - this.lastProcessedEventTime >= EVENT_DUPLICATION_CACHE_DURATION_MS) {\n      this.cachedEventUids.clear();\n    }\n    return this.cachedEventUids.has(eventUid(event));\n  }\n  saveEventToCache(event) {\n    this.cachedEventUids.add(eventUid(event));\n    this.lastProcessedEventTime = Date.now();\n  }\n}\nfunction eventUid(e) {\n  return [e.type, e.eventId, e.sessionId, e.tenantId].filter(v => v).join('-');\n}\nfunction isNullRedirectEvent({\n  type,\n  error\n}) {\n  return type === \"unknown\" /* AuthEventType.UNKNOWN */ && (error === null || error === void 0 ? void 0 : error.code) === `auth/${\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */}`;\n}\nfunction isRedirectEvent(event) {\n  switch (event.type) {\n    case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n    case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n    case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n      return true;\n    case \"unknown\" /* AuthEventType.UNKNOWN */:\n      return isNullRedirectEvent(event);\n    default:\n      return false;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getProjectConfig(_x178) {\n  return _getProjectConfig2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getProjectConfig2() {\n  _getProjectConfig2 = _asyncToGenerator(function* (auth, request = {}) {\n    return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/projects\" /* Endpoint.GET_PROJECT_CONFIG */, request);\n  });\n  return _getProjectConfig2.apply(this, arguments);\n}\nconst IP_ADDRESS_REGEX = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\nconst HTTP_REGEX = /^https?/;\nfunction _validateOrigin(_x179) {\n  return _validateOrigin2.apply(this, arguments);\n}\nfunction _validateOrigin2() {\n  _validateOrigin2 = _asyncToGenerator(function* (auth) {\n    // Skip origin validation if we are in an emulated environment\n    if (auth.config.emulator) {\n      return;\n    }\n    const {\n      authorizedDomains\n    } = yield _getProjectConfig(auth);\n    for (const domain of authorizedDomains) {\n      try {\n        if (matchDomain(domain)) {\n          return;\n        }\n      } catch (_a) {\n        // Do nothing if there's a URL error; just continue searching\n      }\n    }\n    // In the old SDK, this error also provides helpful messages.\n    _fail(auth, \"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */);\n  });\n  return _validateOrigin2.apply(this, arguments);\n}\nfunction matchDomain(expected) {\n  const currentUrl = _getCurrentUrl();\n  const {\n    protocol,\n    hostname\n  } = new URL(currentUrl);\n  if (expected.startsWith('chrome-extension://')) {\n    const ceUrl = new URL(expected);\n    if (ceUrl.hostname === '' && hostname === '') {\n      // For some reason we're not parsing chrome URLs properly\n      return protocol === 'chrome-extension:' && expected.replace('chrome-extension://', '') === currentUrl.replace('chrome-extension://', '');\n    }\n    return protocol === 'chrome-extension:' && ceUrl.hostname === hostname;\n  }\n  if (!HTTP_REGEX.test(protocol)) {\n    return false;\n  }\n  if (IP_ADDRESS_REGEX.test(expected)) {\n    // The domain has to be exactly equal to the pattern, as an IP domain will\n    // only contain the IP, no extra character.\n    return hostname === expected;\n  }\n  // Dots in pattern should be escaped.\n  const escapedDomainPattern = expected.replace(/\\./g, '\\\\.');\n  // Non ip address domains.\n  // domain.com = *.domain.com OR domain.com\n  const re = new RegExp('^(.+\\\\.' + escapedDomainPattern + '|' + escapedDomainPattern + ')$', 'i');\n  return re.test(hostname);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst NETWORK_TIMEOUT = new Delay(30000, 60000);\n/**\r\n * Reset unlaoded GApi modules. If gapi.load fails due to a network error,\r\n * it will stop working after a retrial. This is a hack to fix this issue.\r\n */\nfunction resetUnloadedGapiModules() {\n  // Clear last failed gapi.load state to force next gapi.load to first\n  // load the failed gapi.iframes module.\n  // Get gapix.beacon context.\n  const beacon = _window().___jsl;\n  // Get current hint.\n  if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\n    // Get gapi hint.\n    for (const hint of Object.keys(beacon.H)) {\n      // Requested modules.\n      beacon.H[hint].r = beacon.H[hint].r || [];\n      // Loaded modules.\n      beacon.H[hint].L = beacon.H[hint].L || [];\n      // Set requested modules to a copy of the loaded modules.\n      beacon.H[hint].r = [...beacon.H[hint].L];\n      // Clear pending callbacks.\n      if (beacon.CP) {\n        for (let i = 0; i < beacon.CP.length; i++) {\n          // Remove all failed pending callbacks.\n          beacon.CP[i] = null;\n        }\n      }\n    }\n  }\n}\nfunction loadGapi(auth) {\n  return new Promise((resolve, reject) => {\n    var _a, _b, _c;\n    // Function to run when gapi.load is ready.\n    function loadGapiIframe() {\n      // The developer may have tried to previously run gapi.load and failed.\n      // Run this to fix that.\n      resetUnloadedGapiModules();\n      gapi.load('gapi.iframes', {\n        callback: () => {\n          resolve(gapi.iframes.getContext());\n        },\n        ontimeout: () => {\n          // The above reset may be sufficient, but having this reset after\n          // failure ensures that if the developer calls gapi.load after the\n          // connection is re-established and before another attempt to embed\n          // the iframe, it would work and would not be broken because of our\n          // failed attempt.\n          // Timeout when gapi.iframes.Iframe not loaded.\n          resetUnloadedGapiModules();\n          reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n        },\n\n        timeout: NETWORK_TIMEOUT.get()\n      });\n    }\n    if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {\n      // If gapi.iframes.Iframe available, resolve.\n      resolve(gapi.iframes.getContext());\n    } else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {\n      // Gapi loader ready, load gapi.iframes.\n      loadGapiIframe();\n    } else {\n      // Create a new iframe callback when this is called so as not to overwrite\n      // any previous defined callback. This happens if this method is called\n      // multiple times in parallel and could result in the later callback\n      // overwriting the previous one. This would end up with a iframe\n      // timeout.\n      const cbName = _generateCallbackName('iframefcb');\n      // GApi loader not available, dynamically load platform.js.\n      _window()[cbName] = () => {\n        // GApi loader should be ready.\n        if (!!gapi.load) {\n          loadGapiIframe();\n        } else {\n          // Gapi loader failed, throw error.\n          reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n        }\n      };\n      // Load GApi loader.\n      return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`).catch(e => reject(e));\n    }\n  }).catch(error => {\n    // Reset cached promise to allow for retrial.\n    cachedGApiLoader = null;\n    throw error;\n  });\n}\nlet cachedGApiLoader = null;\nfunction _loadGapi(auth) {\n  cachedGApiLoader = cachedGApiLoader || loadGapi(auth);\n  return cachedGApiLoader;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst PING_TIMEOUT = new Delay(5000, 15000);\nconst IFRAME_PATH = '__/auth/iframe';\nconst EMULATED_IFRAME_PATH = 'emulator/auth/iframe';\nconst IFRAME_ATTRIBUTES = {\n  style: {\n    position: 'absolute',\n    top: '-100px',\n    width: '1px',\n    height: '1px'\n  },\n  'aria-hidden': 'true',\n  tabindex: '-1'\n};\n// Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to\n// anything (not from a list of endpoints with IDs as in legacy), so this is the closest we can get.\nconst EID_FROM_APIHOST = new Map([[\"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */, 'p'], ['staging-identitytoolkit.sandbox.googleapis.com', 's'], ['test-identitytoolkit.sandbox.googleapis.com', 't'] // test\n]);\n\nfunction getIframeUrl(auth) {\n  const config = auth.config;\n  _assert(config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n  const url = config.emulator ? _emulatorUrl(config, EMULATED_IFRAME_PATH) : `https://${auth.config.authDomain}/${IFRAME_PATH}`;\n  const params = {\n    apiKey: config.apiKey,\n    appName: auth.name,\n    v: SDK_VERSION\n  };\n  const eid = EID_FROM_APIHOST.get(auth.config.apiHost);\n  if (eid) {\n    params.eid = eid;\n  }\n  const frameworks = auth._getFrameworks();\n  if (frameworks.length) {\n    params.fw = frameworks.join(',');\n  }\n  return `${url}?${querystring(params).slice(1)}`;\n}\nfunction _openIframe(_x180) {\n  return _openIframe2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _openIframe2() {\n  _openIframe2 = _asyncToGenerator(function* (auth) {\n    const context = yield _loadGapi(auth);\n    const gapi = _window().gapi;\n    _assert(gapi, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    return context.open({\n      where: document.body,\n      url: getIframeUrl(auth),\n      messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER,\n      attributes: IFRAME_ATTRIBUTES,\n      dontclear: true\n    }, iframe => new Promise( /*#__PURE__*/function () {\n      var _ref22 = _asyncToGenerator(function* (resolve, reject) {\n        yield iframe.restyle({\n          // Prevent iframe from closing on mouse out.\n          setHideOnLeave: false\n        });\n        const networkError = _createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */);\n        // Confirm iframe is correctly loaded.\n        // To fallback on failure, set a timeout.\n        const networkErrorTimer = _window().setTimeout(() => {\n          reject(networkError);\n        }, PING_TIMEOUT.get());\n        // Clear timer and resolve pending iframe ready promise.\n        function clearTimerAndResolve() {\n          _window().clearTimeout(networkErrorTimer);\n          resolve(iframe);\n        }\n        // This returns an IThenable. However the reject part does not call\n        // when the iframe is not loaded.\n        iframe.ping(clearTimerAndResolve).then(clearTimerAndResolve, () => {\n          reject(networkError);\n        });\n      });\n      return function (_x182, _x183) {\n        return _ref22.apply(this, arguments);\n      };\n    }()));\n  });\n  return _openIframe2.apply(this, arguments);\n}\nconst BASE_POPUP_OPTIONS = {\n  location: 'yes',\n  resizable: 'yes',\n  statusbar: 'yes',\n  toolbar: 'no'\n};\nconst DEFAULT_WIDTH = 500;\nconst DEFAULT_HEIGHT = 600;\nconst TARGET_BLANK = '_blank';\nconst FIREFOX_EMPTY_URL = 'http://localhost';\nclass AuthPopup {\n  constructor(window) {\n    this.window = window;\n    this.associatedEvent = null;\n  }\n  close() {\n    if (this.window) {\n      try {\n        this.window.close();\n      } catch (e) {}\n    }\n  }\n}\nfunction _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\n  const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();\n  const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();\n  let target = '';\n  const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), {\n    width: width.toString(),\n    height: height.toString(),\n    top,\n    left\n  });\n  // Chrome iOS 7 and 8 is returning an undefined popup win when target is\n  // specified, even though the popup is not necessarily blocked.\n  const ua = getUA().toLowerCase();\n  if (name) {\n    target = _isChromeIOS(ua) ? TARGET_BLANK : name;\n  }\n  if (_isFirefox(ua)) {\n    // Firefox complains when invalid URLs are popped out. Hacky way to bypass.\n    url = url || FIREFOX_EMPTY_URL;\n    // Firefox disables by default scrolling on popup windows, which can create\n    // issues when the user has many Google accounts, for instance.\n    options.scrollbars = 'yes';\n  }\n  const optionsString = Object.entries(options).reduce((accum, [key, value]) => `${accum}${key}=${value},`, '');\n  if (_isIOSStandalone(ua) && target !== '_self') {\n    openAsNewWindowIOS(url || '', target);\n    return new AuthPopup(null);\n  }\n  // about:blank getting sanitized causing browsers like IE/Edge to display\n  // brief error message before redirecting to handler.\n  const newWin = window.open(url || '', target, optionsString);\n  _assert(newWin, auth, \"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */);\n  // Flaky on IE edge, encapsulate with a try and catch.\n  try {\n    newWin.focus();\n  } catch (e) {}\n  return new AuthPopup(newWin);\n}\nfunction openAsNewWindowIOS(url, target) {\n  const el = document.createElement('a');\n  el.href = url;\n  el.target = target;\n  const click = document.createEvent('MouseEvent');\n  click.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 1, null);\n  el.dispatchEvent(click);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * URL for Authentication widget which will initiate the OAuth handshake\r\n *\r\n * @internal\r\n */\nconst WIDGET_PATH = '__/auth/handler';\n/**\r\n * URL for emulated environment\r\n *\r\n * @internal\r\n */\nconst EMULATOR_WIDGET_PATH = 'emulator/auth/handler';\nfunction _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additionalParams) {\n  _assert(auth.config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n  _assert(auth.config.apiKey, auth, \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */);\n  const params = {\n    apiKey: auth.config.apiKey,\n    appName: auth.name,\n    authType,\n    redirectUrl,\n    v: SDK_VERSION,\n    eventId\n  };\n  if (provider instanceof FederatedAuthProvider) {\n    provider.setDefaultLanguage(auth.languageCode);\n    params.providerId = provider.providerId || '';\n    if (!isEmpty(provider.getCustomParameters())) {\n      params.customParameters = JSON.stringify(provider.getCustomParameters());\n    }\n    // TODO set additionalParams from the provider as well?\n    for (const [key, value] of Object.entries(additionalParams || {})) {\n      params[key] = value;\n    }\n  }\n  if (provider instanceof BaseOAuthProvider) {\n    const scopes = provider.getScopes().filter(scope => scope !== '');\n    if (scopes.length > 0) {\n      params.scopes = scopes.join(',');\n    }\n  }\n  if (auth.tenantId) {\n    params.tid = auth.tenantId;\n  }\n  // TODO: maybe set eid as endipointId\n  // TODO: maybe set fw as Frameworks.join(\",\")\n  const paramsDict = params;\n  for (const key of Object.keys(paramsDict)) {\n    if (paramsDict[key] === undefined) {\n      delete paramsDict[key];\n    }\n  }\n  return `${getHandlerBase(auth)}?${querystring(paramsDict).slice(1)}`;\n}\nfunction getHandlerBase({\n  config\n}) {\n  if (!config.emulator) {\n    return `https://${config.authDomain}/${WIDGET_PATH}`;\n  }\n  return _emulatorUrl(config, EMULATOR_WIDGET_PATH);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The special web storage event\r\n *\r\n */\nconst WEB_STORAGE_SUPPORT_KEY = 'webStorageSupport';\nclass BrowserPopupRedirectResolver {\n  constructor() {\n    this.eventManagers = {};\n    this.iframes = {};\n    this.originValidationPromises = {};\n    this._redirectPersistence = browserSessionPersistence;\n    this._completeRedirectFn = _getRedirectResult;\n    this._overrideRedirectResult = _overrideRedirectResult;\n  }\n  // Wrapping in async even though we don't await anywhere in order\n  // to make sure errors are raised as promise rejections\n  _openPopup(auth, provider, authType, eventId) {\n    var _this63 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      debugAssert((_a = _this63.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');\n      const url = _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\n      return _open(auth, url, _generateEventId());\n    })();\n  }\n  _openRedirect(auth, provider, authType, eventId) {\n    var _this64 = this;\n    return _asyncToGenerator(function* () {\n      yield _this64._originValidation(auth);\n      _setWindowLocation(_getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId));\n      return new Promise(() => {});\n    })();\n  }\n  _initialize(auth) {\n    const key = auth._key();\n    if (this.eventManagers[key]) {\n      const {\n        manager,\n        promise\n      } = this.eventManagers[key];\n      if (manager) {\n        return Promise.resolve(manager);\n      } else {\n        debugAssert(promise, 'If manager is not set, promise should be');\n        return promise;\n      }\n    }\n    const promise = this.initAndGetManager(auth);\n    this.eventManagers[key] = {\n      promise\n    };\n    // If the promise is rejected, the key should be removed so that the\n    // operation can be retried later.\n    promise.catch(() => {\n      delete this.eventManagers[key];\n    });\n    return promise;\n  }\n  initAndGetManager(auth) {\n    var _this65 = this;\n    return _asyncToGenerator(function* () {\n      const iframe = yield _openIframe(auth);\n      const manager = new AuthEventManager(auth);\n      iframe.register('authEvent', iframeEvent => {\n        _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, \"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */);\n        // TODO: Consider splitting redirect and popup events earlier on\n        const handled = manager.onEvent(iframeEvent.authEvent);\n        return {\n          status: handled ? \"ACK\" /* GapiOutcome.ACK */ : \"ERROR\" /* GapiOutcome.ERROR */\n        };\n      }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n      _this65.eventManagers[auth._key()] = {\n        manager\n      };\n      _this65.iframes[auth._key()] = iframe;\n      return manager;\n    })();\n  }\n  _isIframeWebStorageSupported(auth, cb) {\n    const iframe = this.iframes[auth._key()];\n    iframe.send(WEB_STORAGE_SUPPORT_KEY, {\n      type: WEB_STORAGE_SUPPORT_KEY\n    }, result => {\n      var _a;\n      const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];\n      if (isSupported !== undefined) {\n        cb(!!isSupported);\n      }\n      _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n    }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n  }\n  _originValidation(auth) {\n    const key = auth._key();\n    if (!this.originValidationPromises[key]) {\n      this.originValidationPromises[key] = _validateOrigin(auth);\n    }\n    return this.originValidationPromises[key];\n  }\n  get _shouldInitProactively() {\n    // Mobile browsers and Safari need to optimistically initialize\n    return _isMobileBrowser() || _isSafari() || _isIOS();\n  }\n}\n/**\r\n * An implementation of {@link PopupRedirectResolver} suitable for browser\r\n * based applications.\r\n *\r\n * @public\r\n */\nconst browserPopupRedirectResolver = BrowserPopupRedirectResolver;\nclass MultiFactorAssertionImpl {\n  constructor(factorId) {\n    this.factorId = factorId;\n  }\n  _process(auth, session, displayName) {\n    switch (session.type) {\n      case \"enroll\" /* MultiFactorSessionType.ENROLL */:\n        return this._finalizeEnroll(auth, session.credential, displayName);\n      case \"signin\" /* MultiFactorSessionType.SIGN_IN */:\n        return this._finalizeSignIn(auth, session.credential);\n      default:\n        return debugFail('unexpected MultiFactorSessionType');\n    }\n  }\n}\n\n/**\r\n * {@inheritdoc PhoneMultiFactorAssertion}\r\n *\r\n * @public\r\n */\nclass PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\n  constructor(credential) {\n    super(\"phone\" /* FactorId.PHONE */);\n    this.credential = credential;\n  }\n  /** @internal */\n  static _fromCredential(credential) {\n    return new PhoneMultiFactorAssertionImpl(credential);\n  }\n  /** @internal */\n  _finalizeEnroll(auth, idToken, displayName) {\n    return finalizeEnrollPhoneMfa(auth, {\n      idToken,\n      displayName,\n      phoneVerificationInfo: this.credential._makeVerificationRequest()\n    });\n  }\n  /** @internal */\n  _finalizeSignIn(auth, mfaPendingCredential) {\n    return finalizeSignInPhoneMfa(auth, {\n      mfaPendingCredential,\n      phoneVerificationInfo: this.credential._makeVerificationRequest()\n    });\n  }\n}\n/**\r\n * Provider for generating a {@link PhoneMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\nlet PhoneMultiFactorGenerator = /*#__PURE__*/(() => {\n  class PhoneMultiFactorGenerator {\n    constructor() {}\n    /**\r\n     * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.\r\n     *\r\n     * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.\r\n     * @returns A {@link PhoneMultiFactorAssertion} which can be used with\r\n     * {@link MultiFactorResolver.resolveSignIn}\r\n     */\n    static assertion(credential) {\n      return PhoneMultiFactorAssertionImpl._fromCredential(credential);\n    }\n  }\n  /**\r\n   * The identifier of the phone second factor: `phone`.\r\n   */\n  PhoneMultiFactorGenerator.FACTOR_ID = 'phone';\n  return PhoneMultiFactorGenerator;\n})();\nvar name = \"@firebase/auth\";\nvar version = \"0.21.5\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthInterop {\n  constructor(auth) {\n    this.auth = auth;\n    this.internalListeners = new Map();\n  }\n  getUid() {\n    var _a;\n    this.assertAuthConfigured();\n    return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;\n  }\n  getToken(forceRefresh) {\n    var _this66 = this;\n    return _asyncToGenerator(function* () {\n      _this66.assertAuthConfigured();\n      yield _this66.auth._initializationPromise;\n      if (!_this66.auth.currentUser) {\n        return null;\n      }\n      const accessToken = yield _this66.auth.currentUser.getIdToken(forceRefresh);\n      return {\n        accessToken\n      };\n    })();\n  }\n  addAuthTokenListener(listener) {\n    this.assertAuthConfigured();\n    if (this.internalListeners.has(listener)) {\n      return;\n    }\n    const unsubscribe = this.auth.onIdTokenChanged(user => {\n      listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);\n    });\n    this.internalListeners.set(listener, unsubscribe);\n    this.updateProactiveRefresh();\n  }\n  removeAuthTokenListener(listener) {\n    this.assertAuthConfigured();\n    const unsubscribe = this.internalListeners.get(listener);\n    if (!unsubscribe) {\n      return;\n    }\n    this.internalListeners.delete(listener);\n    unsubscribe();\n    this.updateProactiveRefresh();\n  }\n  assertAuthConfigured() {\n    _assert(this.auth._initializationPromise, \"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */);\n  }\n\n  updateProactiveRefresh() {\n    if (this.internalListeners.size > 0) {\n      this.auth._startProactiveRefresh();\n    } else {\n      this.auth._stopProactiveRefresh();\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getVersionForPlatform(clientPlatform) {\n  switch (clientPlatform) {\n    case \"Node\" /* ClientPlatform.NODE */:\n      return 'node';\n    case \"ReactNative\" /* ClientPlatform.REACT_NATIVE */:\n      return 'rn';\n    case \"Worker\" /* ClientPlatform.WORKER */:\n      return 'webworker';\n    case \"Cordova\" /* ClientPlatform.CORDOVA */:\n      return 'cordova';\n    default:\n      return undefined;\n  }\n}\n/** @internal */\nfunction registerAuth(clientPlatform) {\n  _registerComponent(new Component(\"auth\" /* _ComponentName.AUTH */, (container, {\n    options: deps\n  }) => {\n    const app = container.getProvider('app').getImmediate();\n    const heartbeatServiceProvider = container.getProvider('heartbeat');\n    const {\n      apiKey,\n      authDomain\n    } = app.options;\n    return ((app, heartbeatServiceProvider) => {\n      _assert(apiKey && !apiKey.includes(':'), \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */, {\n        appName: app.name\n      });\n      // Auth domain is optional if IdP sign in isn't being used\n      _assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(':')), \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, {\n        appName: app.name\n      });\n      const config = {\n        apiKey,\n        authDomain,\n        clientPlatform,\n        apiHost: \"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */,\n        tokenApiHost: \"securetoken.googleapis.com\" /* DefaultConfig.TOKEN_API_HOST */,\n        apiScheme: \"https\" /* DefaultConfig.API_SCHEME */,\n        sdkClientVersion: _getClientVersion(clientPlatform)\n      };\n      const authInstance = new AuthImpl(app, heartbeatServiceProvider, config);\n      _initializeAuthInstance(authInstance, deps);\n      return authInstance;\n    })(app, heartbeatServiceProvider);\n  }, \"PUBLIC\" /* ComponentType.PUBLIC */)\n  /**\r\n   * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()\r\n   * For why we do this, See go/firebase-next-auth-init\r\n   */.setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n  /**\r\n   * Because all firebase products that depend on auth depend on auth-internal directly,\r\n   * we need to initialize auth-internal after auth is initialized to make it available to other firebase products.\r\n   */.setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {\n    const authInternalProvider = container.getProvider(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */);\n    authInternalProvider.initialize();\n  }));\n  _registerComponent(new Component(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */, container => {\n    const auth = _castAuth(container.getProvider(\"auth\" /* _ComponentName.AUTH */).getImmediate());\n    return (auth => new AuthInterop(auth))(auth);\n  }, \"PRIVATE\" /* ComponentType.PRIVATE */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n  registerVersion(name, version, getVersionForPlatform(clientPlatform));\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name, version, 'esm2017');\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;\nconst authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;\nlet lastPostedIdToken = null;\nconst mintCookieFactory = url => /*#__PURE__*/function () {\n  var _ref19 = _asyncToGenerator(function* (user) {\n    const idTokenResult = user && (yield user.getIdTokenResult());\n    const idTokenAge = idTokenResult && (new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;\n    if (idTokenAge && idTokenAge > authIdTokenMaxAge) {\n      return;\n    }\n    // Specifically trip null => undefined when logged out, to delete any existing cookie\n    const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;\n    if (lastPostedIdToken === idToken) {\n      return;\n    }\n    lastPostedIdToken = idToken;\n    yield fetch(url, {\n      method: idToken ? 'POST' : 'DELETE',\n      headers: idToken ? {\n        'Authorization': `Bearer ${idToken}`\n      } : {}\n    });\n  });\n  return function (_x181) {\n    return _ref19.apply(this, arguments);\n  };\n}();\n/**\r\n * Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.\r\n * If no instance exists, initializes an Auth instance with platform-specific default dependencies.\r\n *\r\n * @param app - The Firebase App.\r\n *\r\n * @public\r\n */\nfunction getAuth(app = getApp()) {\n  const provider = _getProvider(app, 'auth');\n  if (provider.isInitialized()) {\n    return provider.getImmediate();\n  }\n  const auth = initializeAuth(app, {\n    popupRedirectResolver: browserPopupRedirectResolver,\n    persistence: [indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence]\n  });\n  const authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');\n  if (authTokenSyncUrl) {\n    const mintCookie = mintCookieFactory(authTokenSyncUrl);\n    beforeAuthStateChanged(auth, mintCookie, () => mintCookie(auth.currentUser));\n    onIdTokenChanged(auth, user => mintCookie(user));\n  }\n  const authEmulatorHost = getDefaultEmulatorHost('auth');\n  if (authEmulatorHost) {\n    connectAuthEmulator(auth, `http://${authEmulatorHost}`);\n  }\n  return auth;\n}\nregisterAuth(\"Browser\" /* ClientPlatform.BROWSER */);\n\nexport { signInWithCustomToken as $, ActionCodeOperation as A, debugErrorMap as B, prodErrorMap as C, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as D, initializeAuth as E, FactorId as F, connectAuthEmulator as G, AuthCredential as H, EmailAuthCredential as I, OAuthCredential as J, PhoneAuthCredential as K, inMemoryPersistence as L, EmailAuthProvider as M, FacebookAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GoogleAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, GithubAuthProvider as T, OAuthProvider as U, SAMLAuthProvider as V, TwitterAuthProvider as W, signInAnonymously as X, signInWithCredential as Y, linkWithCredential as Z, reauthenticateWithCredential as _, browserSessionPersistence as a, sendPasswordResetEmail as a0, confirmPasswordReset as a1, applyActionCode as a2, checkActionCode as a3, verifyPasswordResetCode as a4, createUserWithEmailAndPassword as a5, signInWithEmailAndPassword as a6, sendSignInLinkToEmail as a7, isSignInWithEmailLink as a8, signInWithEmailLink as a9, _persistenceKeyName as aA, _getRedirectResult as aB, _overrideRedirectResult as aC, _clearRedirectOutcomes as aD, _castAuth as aE, UserImpl as aF, AuthImpl as aG, _getClientVersion as aH, _generateEventId as aI, AuthPopup as aJ, FetchProvider as aK, SAMLAuthCredential as aL, fetchSignInMethodsForEmail as aa, sendEmailVerification as ab, verifyBeforeUpdateEmail as ac, ActionCodeURL as ad, parseActionCodeURL as ae, updateProfile as af, updateEmail as ag, updatePassword as ah, getIdToken as ai, getIdTokenResult as aj, unlink as ak, getAdditionalUserInfo as al, reload as am, getMultiFactorResolver as an, multiFactor as ao, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _isIOS7Or8 as av, _createError as aw, _assert as ax, AuthEventManager as ay, _getInstance as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, beforeAuthStateChanged as t, updatePhoneNumber as u, onAuthStateChanged as v, useDeviceLanguage as w, updateCurrentUser as x, signOut as y, deleteUser as z };\n//# sourceMappingURL=index-3363a72a.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/41949417a722ee7e8a70ef854b80e216765e38eff140defce3e6cc376ecb1bac.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/41949417a722ee7e8a70ef854b80e216765e38eff140defce3e6cc376ecb1bac.json
deleted file mode 100644
index c2b07baeb1698a45b1574c4f7e9027668d71bd36..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/41949417a722ee7e8a70ef854b80e216765e38eff140defce3e6cc376ecb1bac.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function find(predicate, thisArg) {\n  return operate(createFind(predicate, thisArg, 'value'));\n}\nexport function createFind(predicate, thisArg, emit) {\n  const findIndex = emit === 'index';\n  return (source, subscriber) => {\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const i = index++;\n      if (predicate.call(thisArg, value, i, source)) {\n        subscriber.next(findIndex ? i : value);\n        subscriber.complete();\n      }\n    }, () => {\n      subscriber.next(findIndex ? -1 : undefined);\n      subscriber.complete();\n    }));\n  };\n}\n//# sourceMappingURL=find.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/438bb6181bd3d5f9ca03a2854a4f13329d208448c1c15901837754f45b34e734.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/438bb6181bd3d5f9ca03a2854a4f13329d208448c1c15901837754f45b34e734.json
deleted file mode 100644
index 5164b726e764818d898b725c950b8a486e0ee46e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/438bb6181bd3d5f9ca03a2854a4f13329d208448c1c15901837754f45b34e734.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { argsOrArgArray } from '../util/argsOrArgArray';\nimport { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext';\nexport function onErrorResumeNextWith(...sources) {\n  const nextSources = argsOrArgArray(sources);\n  return source => oERNCreate(source, ...nextSources);\n}\nexport const onErrorResumeNext = onErrorResumeNextWith;\n//# sourceMappingURL=onErrorResumeNextWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/47120d9a959b1651762fab04eca367c571062fd8eaef219592c583642c2ae229.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/47120d9a959b1651762fab04eca367c571062fd8eaef219592c583642c2ae229.json
deleted file mode 100644
index a1a254a9a5fc6a5ca19b61514358c62a8c9252e5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/47120d9a959b1651762fab04eca367c571062fd8eaef219592c583642c2ae229.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nexport function fromSubscribable(subscribable) {\n  return new Observable(subscriber => subscribable.subscribe(subscriber));\n}\n//# sourceMappingURL=fromSubscribable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/47887687f149badb2f90a6db2e6978932550b13b414cedb653c3cf2c11fe908f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/47887687f149badb2f90a6db2e6978932550b13b414cedb653c3cf2c11fe908f.json
deleted file mode 100644
index d45eed2cd81d01d2a517d7dcaabbb7b72d7631b6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/47887687f149badb2f90a6db2e6978932550b13b414cedb653c3cf2c11fe908f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export {};\n//# sourceMappingURL=types.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/49a91e83b4fff739ab9af5aac960c82c45b938e10d722e076b05012bb680ef29.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/49a91e83b4fff739ab9af5aac960c82c45b938e10d722e076b05012bb680ef29.json
deleted file mode 100644
index add4e3dc69334186e1da1faa2c7b674176964eae..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/49a91e83b4fff739ab9af5aac960c82c45b938e10d722e076b05012bb680ef29.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nexport class AnimationFrameAction extends AsyncAction {\n  constructor(scheduler, work) {\n    super(scheduler, work);\n    this.scheduler = scheduler;\n    this.work = work;\n  }\n  requestAsyncId(scheduler, id, delay = 0) {\n    if (delay !== null && delay > 0) {\n      return super.requestAsyncId(scheduler, id, delay);\n    }\n    scheduler.actions.push(this);\n    return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n  }\n  recycleAsyncId(scheduler, id, delay = 0) {\n    var _a;\n    if (delay != null ? delay > 0 : this.delay > 0) {\n      return super.recycleAsyncId(scheduler, id, delay);\n    }\n    const {\n      actions\n    } = scheduler;\n    if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n      animationFrameProvider.cancelAnimationFrame(id);\n      scheduler._scheduled = undefined;\n    }\n    return undefined;\n  }\n}\n//# sourceMappingURL=AnimationFrameAction.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4bf5cbf1209198f67507fd7a73255ce993576b6bc9457a62535ebff0987d637f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4bf5cbf1209198f67507fd7a73255ce993576b6bc9457a62535ebff0987d637f.json
deleted file mode 100644
index 422da58d07abe4279c103689fa1f7fa07ca5c0be..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4bf5cbf1209198f67507fd7a73255ce993576b6bc9457a62535ebff0987d637f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/messaging';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4dacd1a2a9916f9c6ff1b1587aced2fdd369a4a55053a02f7c1b2bd2b9592607.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4dacd1a2a9916f9c6ff1b1587aced2fdd369a4a55053a02f7c1b2bd2b9592607.json
deleted file mode 100644
index 94bca627111578796e4f4b3720841a45d53ebb97..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4dacd1a2a9916f9c6ff1b1587aced2fdd369a4a55053a02f7c1b2bd2b9592607.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function sample(notifier) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    let lastValue = null;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      hasValue = true;\n      lastValue = value;\n    }));\n    innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => {\n      if (hasValue) {\n        hasValue = false;\n        const value = lastValue;\n        lastValue = null;\n        subscriber.next(value);\n      }\n    }, noop));\n  });\n}\n//# sourceMappingURL=sample.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4dc4e073d006cb7d6f808807ff77118f3f153b6ae93c8fa28d6195fb3cfa13b6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4dc4e073d006cb7d6f808807ff77118f3f153b6ae93c8fa28d6195fb3cfa13b6.json
deleted file mode 100644
index f07877fae0c227caabba2b8c159748a743d48e0f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4dc4e073d006cb7d6f808807ff77118f3f153b6ae93c8fa28d6195fb3cfa13b6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period = 0, scheduler = asyncScheduler) {\n  if (period < 0) {\n    period = 0;\n  }\n  return timer(period, period, scheduler);\n}\n//# sourceMappingURL=interval.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4f3f750956b7b5472efadd0392ce75ae889164437e533ba24b7ae255aed63af4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4f3f750956b7b5472efadd0392ce75ae889164437e533ba24b7ae255aed63af4.json
deleted file mode 100644
index 8a2f21938df9cea41a49122612ddb6289ac228d5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4f3f750956b7b5472efadd0392ce75ae889164437e533ba24b7ae255aed63af4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nimport { defer } from './defer';\nimport { scheduleIterable } from '../scheduled/scheduleIterable';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {\n  let resultSelector;\n  let initialState;\n  if (arguments.length === 1) {\n    ({\n      initialState,\n      condition,\n      iterate,\n      resultSelector = identity,\n      scheduler\n    } = initialStateOrOptions);\n  } else {\n    initialState = initialStateOrOptions;\n    if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {\n      resultSelector = identity;\n      scheduler = resultSelectorOrScheduler;\n    } else {\n      resultSelector = resultSelectorOrScheduler;\n    }\n  }\n  function* gen() {\n    for (let state = initialState; !condition || condition(state); state = iterate(state)) {\n      yield resultSelector(state);\n    }\n  }\n  return defer(scheduler ? () => scheduleIterable(gen(), scheduler) : gen);\n}\n//# sourceMappingURL=generate.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4f889caa30255f3760b2a6e805d5d1cc86d794b555d1eb3f3dd50d644a5e3ce1.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4f889caa30255f3760b2a6e805d5d1cc86d794b555d1eb3f3dd50d644a5e3ce1.json
deleted file mode 100644
index c052b36f5fa23aaf3b365da06a3d8789810d3ac7..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4f889caa30255f3760b2a6e805d5d1cc86d794b555d1eb3f3dd50d644a5e3ce1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../../Observable';\nimport { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../../scheduler/animationFrameProvider';\nexport function animationFrames(timestampProvider) {\n  return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;\n}\nfunction animationFramesFactory(timestampProvider) {\n  return new Observable(subscriber => {\n    const provider = timestampProvider || performanceTimestampProvider;\n    const start = provider.now();\n    let id = 0;\n    const run = () => {\n      if (!subscriber.closed) {\n        id = animationFrameProvider.requestAnimationFrame(timestamp => {\n          id = 0;\n          const now = provider.now();\n          subscriber.next({\n            timestamp: timestampProvider ? now : timestamp,\n            elapsed: now - start\n          });\n          run();\n        });\n      }\n    };\n    run();\n    return () => {\n      if (id) {\n        animationFrameProvider.cancelAnimationFrame(id);\n      }\n    };\n  });\n}\nconst DEFAULT_ANIMATION_FRAMES = animationFramesFactory();\n//# sourceMappingURL=animationFrames.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/4fcfcb85fd49b0cda12cfc2bb516608340e7b4142dd1777b65f1cca84bfbe69a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/4fcfcb85fd49b0cda12cfc2bb516608340e7b4142dd1777b65f1cca84bfbe69a.json
deleted file mode 100644
index c3cb371583649f8d38fae4739850059ddd091ec2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/4fcfcb85fd49b0cda12cfc2bb516608340e7b4142dd1777b65f1cca84bfbe69a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { timeout } from './timeout';\nexport function timeoutWith(due, withObservable, scheduler) {\n  let first;\n  let each;\n  let _with;\n  scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;\n  if (isValidDate(due)) {\n    first = due;\n  } else if (typeof due === 'number') {\n    each = due;\n  }\n  if (withObservable) {\n    _with = () => withObservable;\n  } else {\n    throw new TypeError('No observable provided to switch to');\n  }\n  if (first == null && each == null) {\n    throw new TypeError('No timeout provided.');\n  }\n  return timeout({\n    first,\n    each,\n    scheduler,\n    with: _with\n  });\n}\n//# sourceMappingURL=timeoutWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/532c008b7787b127568c89725b66adeb121b381c1f8bdb54e9b13578a1d4acec.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/532c008b7787b127568c89725b66adeb121b381c1f8bdb54e9b13578a1d4acec.json
deleted file mode 100644
index 84f90367af9009975607c6c566d63800bf40c20e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/532c008b7787b127568c89725b66adeb121b381c1f8bdb54e9b13578a1d4acec.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n  return operate((source, subscriber) => {\n    source.subscribe(createOperatorSubscriber(subscriber, value => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), err => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n  });\n}\n//# sourceMappingURL=observeOn.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/541e9da1cace82ab3cca1438f92c97b0cb9c9051041a600dc1b3c4069cdc503b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/541e9da1cace82ab3cca1438f92c97b0cb9c9051041a600dc1b3c4069cdc503b.json
deleted file mode 100644
index be4d0e272becc934228871a186efdd57595a2189..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/541e9da1cace82ab3cca1438f92c97b0cb9c9051041a600dc1b3c4069cdc503b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass(_super => function ObjectUnsubscribedErrorImpl() {\n  _super(this);\n  this.name = 'ObjectUnsubscribedError';\n  this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/54533ac0bb44c8d92ecaa9a6e5af4c404d982ee0012b622b7b70ad1a0ddb72f9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/54533ac0bb44c8d92ecaa9a6e5af4c404d982ee0012b622b7b70ad1a0ddb72f9.json
deleted file mode 100644
index 7fe81cd2a7c66b2c961ca3484b070ade20f30827..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/54533ac0bb44c8d92ecaa9a6e5af4c404d982ee0012b622b7b70ad1a0ddb72f9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport '@firebase/installations';\nimport { Component } from '@firebase/component';\nimport { openDB, deleteDB } from 'idb';\nimport { ErrorFactory, validateIndexedDBOpenable, isIndexedDBAvailable, areCookiesEnabled, getModularInstance } from '@firebase/util';\nimport { _registerComponent, registerVersion, _getProvider, getApp } from '@firebase/app';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_SW_PATH = '/firebase-messaging-sw.js';\nconst DEFAULT_SW_SCOPE = '/firebase-cloud-messaging-push-scope';\nconst DEFAULT_VAPID_KEY = 'BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4';\nconst ENDPOINT = 'https://fcmregistrations.googleapis.com/v1';\nconst CONSOLE_CAMPAIGN_ID = 'google.c.a.c_id';\nconst CONSOLE_CAMPAIGN_NAME = 'google.c.a.c_l';\nconst CONSOLE_CAMPAIGN_TIME = 'google.c.a.ts';\n/** Set to '1' if Analytics is enabled for the campaign */\nconst CONSOLE_CAMPAIGN_ANALYTICS_ENABLED = 'google.c.a.e';\nvar MessageType$1 = /*#__PURE__*/(() => {\n  (function (MessageType) {\n    MessageType[MessageType[\"DATA_MESSAGE\"] = 1] = \"DATA_MESSAGE\";\n    MessageType[MessageType[\"DISPLAY_NOTIFICATION\"] = 3] = \"DISPLAY_NOTIFICATION\";\n  })(MessageType$1 || (MessageType$1 = {}));\n  return MessageType$1;\n})();\n/**\r\n * @license\r\n * Copyright 2018 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\r\n * in compliance with the License. You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software distributed under the License\r\n * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\r\n * or implied. See the License for the specific language governing permissions and limitations under\r\n * the License.\r\n */\nvar MessageType = /*#__PURE__*/(() => {\n  (function (MessageType) {\n    MessageType[\"PUSH_RECEIVED\"] = \"push-received\";\n    MessageType[\"NOTIFICATION_CLICKED\"] = \"notification-clicked\";\n  })(MessageType || (MessageType = {}));\n  return MessageType;\n})();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction arrayToBase64(array) {\n  const uint8Array = new Uint8Array(array);\n  const base64String = btoa(String.fromCharCode(...uint8Array));\n  return base64String.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nfunction base64ToArray(base64String) {\n  const padding = '='.repeat((4 - base64String.length % 4) % 4);\n  const base64 = (base64String + padding).replace(/\\-/g, '+').replace(/_/g, '/');\n  const rawData = atob(base64);\n  const outputArray = new Uint8Array(rawData.length);\n  for (let i = 0; i < rawData.length; ++i) {\n    outputArray[i] = rawData.charCodeAt(i);\n  }\n  return outputArray;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst OLD_DB_NAME = 'fcm_token_details_db';\n/**\r\n * The last DB version of 'fcm_token_details_db' was 4. This is one higher, so that the upgrade\r\n * callback is called for all versions of the old DB.\r\n */\nconst OLD_DB_VERSION = 5;\nconst OLD_OBJECT_STORE_NAME = 'fcm_token_object_Store';\nfunction migrateOldDatabase(_x) {\n  return _migrateOldDatabase.apply(this, arguments);\n}\nfunction _migrateOldDatabase() {\n  _migrateOldDatabase = _asyncToGenerator(function* (senderId) {\n    if ('databases' in indexedDB) {\n      // indexedDb.databases() is an IndexedDB v3 API and does not exist in all browsers. TODO: Remove\n      // typecast when it lands in TS types.\n      const databases = yield indexedDB.databases();\n      const dbNames = databases.map(db => db.name);\n      if (!dbNames.includes(OLD_DB_NAME)) {\n        // old DB didn't exist, no need to open.\n        return null;\n      }\n    }\n    let tokenDetails = null;\n    const db = yield openDB(OLD_DB_NAME, OLD_DB_VERSION, {\n      upgrade: function () {\n        var _ref = _asyncToGenerator(function* (db, oldVersion, newVersion, upgradeTransaction) {\n          var _a;\n          if (oldVersion < 2) {\n            // Database too old, skip migration.\n            return;\n          }\n          if (!db.objectStoreNames.contains(OLD_OBJECT_STORE_NAME)) {\n            // Database did not exist. Nothing to do.\n            return;\n          }\n          const objectStore = upgradeTransaction.objectStore(OLD_OBJECT_STORE_NAME);\n          const value = yield objectStore.index('fcmSenderId').get(senderId);\n          yield objectStore.clear();\n          if (!value) {\n            // No entry in the database, nothing to migrate.\n            return;\n          }\n          if (oldVersion === 2) {\n            const oldDetails = value;\n            if (!oldDetails.auth || !oldDetails.p256dh || !oldDetails.endpoint) {\n              return;\n            }\n            tokenDetails = {\n              token: oldDetails.fcmToken,\n              createTime: (_a = oldDetails.createTime) !== null && _a !== void 0 ? _a : Date.now(),\n              subscriptionOptions: {\n                auth: oldDetails.auth,\n                p256dh: oldDetails.p256dh,\n                endpoint: oldDetails.endpoint,\n                swScope: oldDetails.swScope,\n                vapidKey: typeof oldDetails.vapidKey === 'string' ? oldDetails.vapidKey : arrayToBase64(oldDetails.vapidKey)\n              }\n            };\n          } else if (oldVersion === 3) {\n            const oldDetails = value;\n            tokenDetails = {\n              token: oldDetails.fcmToken,\n              createTime: oldDetails.createTime,\n              subscriptionOptions: {\n                auth: arrayToBase64(oldDetails.auth),\n                p256dh: arrayToBase64(oldDetails.p256dh),\n                endpoint: oldDetails.endpoint,\n                swScope: oldDetails.swScope,\n                vapidKey: arrayToBase64(oldDetails.vapidKey)\n              }\n            };\n          } else if (oldVersion === 4) {\n            const oldDetails = value;\n            tokenDetails = {\n              token: oldDetails.fcmToken,\n              createTime: oldDetails.createTime,\n              subscriptionOptions: {\n                auth: arrayToBase64(oldDetails.auth),\n                p256dh: arrayToBase64(oldDetails.p256dh),\n                endpoint: oldDetails.endpoint,\n                swScope: oldDetails.swScope,\n                vapidKey: arrayToBase64(oldDetails.vapidKey)\n              }\n            };\n          }\n        });\n        return function upgrade(_x36, _x37, _x38, _x39) {\n          return _ref.apply(this, arguments);\n        };\n      }()\n    });\n    db.close();\n    // Delete all old databases.\n    yield deleteDB(OLD_DB_NAME);\n    yield deleteDB('fcm_vapid_details_db');\n    yield deleteDB('undefined');\n    return checkTokenDetails(tokenDetails) ? tokenDetails : null;\n  });\n  return _migrateOldDatabase.apply(this, arguments);\n}\nfunction checkTokenDetails(tokenDetails) {\n  if (!tokenDetails || !tokenDetails.subscriptionOptions) {\n    return false;\n  }\n  const {\n    subscriptionOptions\n  } = tokenDetails;\n  return typeof tokenDetails.createTime === 'number' && tokenDetails.createTime > 0 && typeof tokenDetails.token === 'string' && tokenDetails.token.length > 0 && typeof subscriptionOptions.auth === 'string' && subscriptionOptions.auth.length > 0 && typeof subscriptionOptions.p256dh === 'string' && subscriptionOptions.p256dh.length > 0 && typeof subscriptionOptions.endpoint === 'string' && subscriptionOptions.endpoint.length > 0 && typeof subscriptionOptions.swScope === 'string' && subscriptionOptions.swScope.length > 0 && typeof subscriptionOptions.vapidKey === 'string' && subscriptionOptions.vapidKey.length > 0;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Exported for tests.\nconst DATABASE_NAME = 'firebase-messaging-database';\nconst DATABASE_VERSION = 1;\nconst OBJECT_STORE_NAME = 'firebase-messaging-store';\nlet dbPromise = null;\nfunction getDbPromise() {\n  if (!dbPromise) {\n    dbPromise = openDB(DATABASE_NAME, DATABASE_VERSION, {\n      upgrade: (upgradeDb, oldVersion) => {\n        // We don't use 'break' in this switch statement, the fall-through behavior is what we want,\n        // because if there are multiple versions between the old version and the current version, we\n        // want ALL the migrations that correspond to those versions to run, not only the last one.\n        // eslint-disable-next-line default-case\n        switch (oldVersion) {\n          case 0:\n            upgradeDb.createObjectStore(OBJECT_STORE_NAME);\n        }\n      }\n    });\n  }\n  return dbPromise;\n}\n/** Gets record(s) from the objectStore that match the given key. */\nfunction dbGet(_x2) {\n  return _dbGet.apply(this, arguments);\n}\n/** Assigns or overwrites the record for the given key with the given value. */\nfunction _dbGet() {\n  _dbGet = _asyncToGenerator(function* (firebaseDependencies) {\n    const key = getKey(firebaseDependencies);\n    const db = yield getDbPromise();\n    const tokenDetails = yield db.transaction(OBJECT_STORE_NAME).objectStore(OBJECT_STORE_NAME).get(key);\n    if (tokenDetails) {\n      return tokenDetails;\n    } else {\n      // Check if there is a tokenDetails object in the old DB.\n      const oldTokenDetails = yield migrateOldDatabase(firebaseDependencies.appConfig.senderId);\n      if (oldTokenDetails) {\n        yield dbSet(firebaseDependencies, oldTokenDetails);\n        return oldTokenDetails;\n      }\n    }\n  });\n  return _dbGet.apply(this, arguments);\n}\nfunction dbSet(_x3, _x4) {\n  return _dbSet.apply(this, arguments);\n}\n/** Removes record(s) from the objectStore that match the given key. */\nfunction _dbSet() {\n  _dbSet = _asyncToGenerator(function* (firebaseDependencies, tokenDetails) {\n    const key = getKey(firebaseDependencies);\n    const db = yield getDbPromise();\n    const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n    yield tx.objectStore(OBJECT_STORE_NAME).put(tokenDetails, key);\n    yield tx.done;\n    return tokenDetails;\n  });\n  return _dbSet.apply(this, arguments);\n}\nfunction dbRemove(_x5) {\n  return _dbRemove.apply(this, arguments);\n}\nfunction _dbRemove() {\n  _dbRemove = _asyncToGenerator(function* (firebaseDependencies) {\n    const key = getKey(firebaseDependencies);\n    const db = yield getDbPromise();\n    const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n    yield tx.objectStore(OBJECT_STORE_NAME).delete(key);\n    yield tx.done;\n  });\n  return _dbRemove.apply(this, arguments);\n}\nfunction getKey({\n  appConfig\n}) {\n  return appConfig.appId;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERROR_MAP = {\n  [\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */]: 'Missing App configuration value: \"{$valueName}\"',\n  [\"only-available-in-window\" /* ErrorCode.AVAILABLE_IN_WINDOW */]: 'This method is available in a Window context.',\n  [\"only-available-in-sw\" /* ErrorCode.AVAILABLE_IN_SW */]: 'This method is available in a service worker context.',\n  [\"permission-default\" /* ErrorCode.PERMISSION_DEFAULT */]: 'The notification permission was not granted and dismissed instead.',\n  [\"permission-blocked\" /* ErrorCode.PERMISSION_BLOCKED */]: 'The notification permission was not granted and blocked instead.',\n  [\"unsupported-browser\" /* ErrorCode.UNSUPPORTED_BROWSER */]: \"This browser doesn't support the API's required to use the Firebase SDK.\",\n  [\"indexed-db-unsupported\" /* ErrorCode.INDEXED_DB_UNSUPPORTED */]: \"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)\",\n  [\"failed-service-worker-registration\" /* ErrorCode.FAILED_DEFAULT_REGISTRATION */]: 'We are unable to register the default service worker. {$browserErrorMessage}',\n  [\"token-subscribe-failed\" /* ErrorCode.TOKEN_SUBSCRIBE_FAILED */]: 'A problem occurred while subscribing the user to FCM: {$errorInfo}',\n  [\"token-subscribe-no-token\" /* ErrorCode.TOKEN_SUBSCRIBE_NO_TOKEN */]: 'FCM returned no token when subscribing the user to push.',\n  [\"token-unsubscribe-failed\" /* ErrorCode.TOKEN_UNSUBSCRIBE_FAILED */]: 'A problem occurred while unsubscribing the ' + 'user from FCM: {$errorInfo}',\n  [\"token-update-failed\" /* ErrorCode.TOKEN_UPDATE_FAILED */]: 'A problem occurred while updating the user from FCM: {$errorInfo}',\n  [\"token-update-no-token\" /* ErrorCode.TOKEN_UPDATE_NO_TOKEN */]: 'FCM returned no token when updating the user to push.',\n  [\"use-sw-after-get-token\" /* ErrorCode.USE_SW_AFTER_GET_TOKEN */]: 'The useServiceWorker() method may only be called once and must be ' + 'called before calling getToken() to ensure your service worker is used.',\n  [\"invalid-sw-registration\" /* ErrorCode.INVALID_SW_REGISTRATION */]: 'The input to useServiceWorker() must be a ServiceWorkerRegistration.',\n  [\"invalid-bg-handler\" /* ErrorCode.INVALID_BG_HANDLER */]: 'The input to setBackgroundMessageHandler() must be a function.',\n  [\"invalid-vapid-key\" /* ErrorCode.INVALID_VAPID_KEY */]: 'The public VAPID key must be a string.',\n  [\"use-vapid-key-after-get-token\" /* ErrorCode.USE_VAPID_KEY_AFTER_GET_TOKEN */]: 'The usePublicVapidKey() method may only be called once and must be ' + 'called before calling getToken() to ensure your VAPID key is used.'\n};\nconst ERROR_FACTORY = new ErrorFactory('messaging', 'Messaging', ERROR_MAP);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction requestGetToken(_x6, _x7) {\n  return _requestGetToken.apply(this, arguments);\n}\nfunction _requestGetToken() {\n  _requestGetToken = _asyncToGenerator(function* (firebaseDependencies, subscriptionOptions) {\n    const headers = yield getHeaders(firebaseDependencies);\n    const body = getBody(subscriptionOptions);\n    const subscribeOptions = {\n      method: 'POST',\n      headers,\n      body: JSON.stringify(body)\n    };\n    let responseData;\n    try {\n      const response = yield fetch(getEndpoint(firebaseDependencies.appConfig), subscribeOptions);\n      responseData = yield response.json();\n    } catch (err) {\n      throw ERROR_FACTORY.create(\"token-subscribe-failed\" /* ErrorCode.TOKEN_SUBSCRIBE_FAILED */, {\n        errorInfo: err === null || err === void 0 ? void 0 : err.toString()\n      });\n    }\n    if (responseData.error) {\n      const message = responseData.error.message;\n      throw ERROR_FACTORY.create(\"token-subscribe-failed\" /* ErrorCode.TOKEN_SUBSCRIBE_FAILED */, {\n        errorInfo: message\n      });\n    }\n    if (!responseData.token) {\n      throw ERROR_FACTORY.create(\"token-subscribe-no-token\" /* ErrorCode.TOKEN_SUBSCRIBE_NO_TOKEN */);\n    }\n\n    return responseData.token;\n  });\n  return _requestGetToken.apply(this, arguments);\n}\nfunction requestUpdateToken(_x8, _x9) {\n  return _requestUpdateToken.apply(this, arguments);\n}\nfunction _requestUpdateToken() {\n  _requestUpdateToken = _asyncToGenerator(function* (firebaseDependencies, tokenDetails) {\n    const headers = yield getHeaders(firebaseDependencies);\n    const body = getBody(tokenDetails.subscriptionOptions);\n    const updateOptions = {\n      method: 'PATCH',\n      headers,\n      body: JSON.stringify(body)\n    };\n    let responseData;\n    try {\n      const response = yield fetch(`${getEndpoint(firebaseDependencies.appConfig)}/${tokenDetails.token}`, updateOptions);\n      responseData = yield response.json();\n    } catch (err) {\n      throw ERROR_FACTORY.create(\"token-update-failed\" /* ErrorCode.TOKEN_UPDATE_FAILED */, {\n        errorInfo: err === null || err === void 0 ? void 0 : err.toString()\n      });\n    }\n    if (responseData.error) {\n      const message = responseData.error.message;\n      throw ERROR_FACTORY.create(\"token-update-failed\" /* ErrorCode.TOKEN_UPDATE_FAILED */, {\n        errorInfo: message\n      });\n    }\n    if (!responseData.token) {\n      throw ERROR_FACTORY.create(\"token-update-no-token\" /* ErrorCode.TOKEN_UPDATE_NO_TOKEN */);\n    }\n\n    return responseData.token;\n  });\n  return _requestUpdateToken.apply(this, arguments);\n}\nfunction requestDeleteToken(_x10, _x11) {\n  return _requestDeleteToken.apply(this, arguments);\n}\nfunction _requestDeleteToken() {\n  _requestDeleteToken = _asyncToGenerator(function* (firebaseDependencies, token) {\n    const headers = yield getHeaders(firebaseDependencies);\n    const unsubscribeOptions = {\n      method: 'DELETE',\n      headers\n    };\n    try {\n      const response = yield fetch(`${getEndpoint(firebaseDependencies.appConfig)}/${token}`, unsubscribeOptions);\n      const responseData = yield response.json();\n      if (responseData.error) {\n        const message = responseData.error.message;\n        throw ERROR_FACTORY.create(\"token-unsubscribe-failed\" /* ErrorCode.TOKEN_UNSUBSCRIBE_FAILED */, {\n          errorInfo: message\n        });\n      }\n    } catch (err) {\n      throw ERROR_FACTORY.create(\"token-unsubscribe-failed\" /* ErrorCode.TOKEN_UNSUBSCRIBE_FAILED */, {\n        errorInfo: err === null || err === void 0 ? void 0 : err.toString()\n      });\n    }\n  });\n  return _requestDeleteToken.apply(this, arguments);\n}\nfunction getEndpoint({\n  projectId\n}) {\n  return `${ENDPOINT}/projects/${projectId}/registrations`;\n}\nfunction getHeaders(_x12) {\n  return _getHeaders.apply(this, arguments);\n}\nfunction _getHeaders() {\n  _getHeaders = _asyncToGenerator(function* ({\n    appConfig,\n    installations\n  }) {\n    const authToken = yield installations.getToken();\n    return new Headers({\n      'Content-Type': 'application/json',\n      Accept: 'application/json',\n      'x-goog-api-key': appConfig.apiKey,\n      'x-goog-firebase-installations-auth': `FIS ${authToken}`\n    });\n  });\n  return _getHeaders.apply(this, arguments);\n}\nfunction getBody({\n  p256dh,\n  auth,\n  endpoint,\n  vapidKey\n}) {\n  const body = {\n    web: {\n      endpoint,\n      auth,\n      p256dh\n    }\n  };\n  if (vapidKey !== DEFAULT_VAPID_KEY) {\n    body.web.applicationPubKey = vapidKey;\n  }\n  return body;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// UpdateRegistration will be called once every week.\nconst TOKEN_EXPIRATION_MS = 7 * 24 * 60 * 60 * 1000; // 7 days\nfunction getTokenInternal(_x13) {\n  return _getTokenInternal.apply(this, arguments);\n}\n/**\r\n * This method deletes the token from the database, unsubscribes the token from FCM, and unregisters\r\n * the push subscription if it exists.\r\n */\nfunction _getTokenInternal() {\n  _getTokenInternal = _asyncToGenerator(function* (messaging) {\n    const pushSubscription = yield getPushSubscription(messaging.swRegistration, messaging.vapidKey);\n    const subscriptionOptions = {\n      vapidKey: messaging.vapidKey,\n      swScope: messaging.swRegistration.scope,\n      endpoint: pushSubscription.endpoint,\n      auth: arrayToBase64(pushSubscription.getKey('auth')),\n      p256dh: arrayToBase64(pushSubscription.getKey('p256dh'))\n    };\n    const tokenDetails = yield dbGet(messaging.firebaseDependencies);\n    if (!tokenDetails) {\n      // No token, get a new one.\n      return getNewToken(messaging.firebaseDependencies, subscriptionOptions);\n    } else if (!isTokenValid(tokenDetails.subscriptionOptions, subscriptionOptions)) {\n      // Invalid token, get a new one.\n      try {\n        yield requestDeleteToken(messaging.firebaseDependencies, tokenDetails.token);\n      } catch (e) {\n        // Suppress errors because of #2364\n        console.warn(e);\n      }\n      return getNewToken(messaging.firebaseDependencies, subscriptionOptions);\n    } else if (Date.now() >= tokenDetails.createTime + TOKEN_EXPIRATION_MS) {\n      // Weekly token refresh\n      return updateToken(messaging, {\n        token: tokenDetails.token,\n        createTime: Date.now(),\n        subscriptionOptions\n      });\n    } else {\n      // Valid token, nothing to do.\n      return tokenDetails.token;\n    }\n  });\n  return _getTokenInternal.apply(this, arguments);\n}\nfunction deleteTokenInternal(_x14) {\n  return _deleteTokenInternal.apply(this, arguments);\n}\nfunction _deleteTokenInternal() {\n  _deleteTokenInternal = _asyncToGenerator(function* (messaging) {\n    const tokenDetails = yield dbGet(messaging.firebaseDependencies);\n    if (tokenDetails) {\n      yield requestDeleteToken(messaging.firebaseDependencies, tokenDetails.token);\n      yield dbRemove(messaging.firebaseDependencies);\n    }\n    // Unsubscribe from the push subscription.\n    const pushSubscription = yield messaging.swRegistration.pushManager.getSubscription();\n    if (pushSubscription) {\n      return pushSubscription.unsubscribe();\n    }\n    // If there's no SW, consider it a success.\n    return true;\n  });\n  return _deleteTokenInternal.apply(this, arguments);\n}\nfunction updateToken(_x15, _x16) {\n  return _updateToken.apply(this, arguments);\n}\nfunction _updateToken() {\n  _updateToken = _asyncToGenerator(function* (messaging, tokenDetails) {\n    try {\n      const updatedToken = yield requestUpdateToken(messaging.firebaseDependencies, tokenDetails);\n      const updatedTokenDetails = Object.assign(Object.assign({}, tokenDetails), {\n        token: updatedToken,\n        createTime: Date.now()\n      });\n      yield dbSet(messaging.firebaseDependencies, updatedTokenDetails);\n      return updatedToken;\n    } catch (e) {\n      yield deleteTokenInternal(messaging);\n      throw e;\n    }\n  });\n  return _updateToken.apply(this, arguments);\n}\nfunction getNewToken(_x17, _x18) {\n  return _getNewToken.apply(this, arguments);\n}\n/**\r\n * Gets a PushSubscription for the current user.\r\n */\nfunction _getNewToken() {\n  _getNewToken = _asyncToGenerator(function* (firebaseDependencies, subscriptionOptions) {\n    const token = yield requestGetToken(firebaseDependencies, subscriptionOptions);\n    const tokenDetails = {\n      token,\n      createTime: Date.now(),\n      subscriptionOptions\n    };\n    yield dbSet(firebaseDependencies, tokenDetails);\n    return tokenDetails.token;\n  });\n  return _getNewToken.apply(this, arguments);\n}\nfunction getPushSubscription(_x19, _x20) {\n  return _getPushSubscription.apply(this, arguments);\n}\n/**\r\n * Checks if the saved tokenDetails object matches the configuration provided.\r\n */\nfunction _getPushSubscription() {\n  _getPushSubscription = _asyncToGenerator(function* (swRegistration, vapidKey) {\n    const subscription = yield swRegistration.pushManager.getSubscription();\n    if (subscription) {\n      return subscription;\n    }\n    return swRegistration.pushManager.subscribe({\n      userVisibleOnly: true,\n      // Chrome <= 75 doesn't support base64-encoded VAPID key. For backward compatibility, VAPID key\n      // submitted to pushManager#subscribe must be of type Uint8Array.\n      applicationServerKey: base64ToArray(vapidKey)\n    });\n  });\n  return _getPushSubscription.apply(this, arguments);\n}\nfunction isTokenValid(dbOptions, currentOptions) {\n  const isVapidKeyEqual = currentOptions.vapidKey === dbOptions.vapidKey;\n  const isEndpointEqual = currentOptions.endpoint === dbOptions.endpoint;\n  const isAuthEqual = currentOptions.auth === dbOptions.auth;\n  const isP256dhEqual = currentOptions.p256dh === dbOptions.p256dh;\n  return isVapidKeyEqual && isEndpointEqual && isAuthEqual && isP256dhEqual;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction externalizePayload(internalPayload) {\n  const payload = {\n    from: internalPayload.from,\n    // eslint-disable-next-line camelcase\n    collapseKey: internalPayload.collapse_key,\n    // eslint-disable-next-line camelcase\n    messageId: internalPayload.fcmMessageId\n  };\n  propagateNotificationPayload(payload, internalPayload);\n  propagateDataPayload(payload, internalPayload);\n  propagateFcmOptions(payload, internalPayload);\n  return payload;\n}\nfunction propagateNotificationPayload(payload, messagePayloadInternal) {\n  if (!messagePayloadInternal.notification) {\n    return;\n  }\n  payload.notification = {};\n  const title = messagePayloadInternal.notification.title;\n  if (!!title) {\n    payload.notification.title = title;\n  }\n  const body = messagePayloadInternal.notification.body;\n  if (!!body) {\n    payload.notification.body = body;\n  }\n  const image = messagePayloadInternal.notification.image;\n  if (!!image) {\n    payload.notification.image = image;\n  }\n  const icon = messagePayloadInternal.notification.icon;\n  if (!!icon) {\n    payload.notification.icon = icon;\n  }\n}\nfunction propagateDataPayload(payload, messagePayloadInternal) {\n  if (!messagePayloadInternal.data) {\n    return;\n  }\n  payload.data = messagePayloadInternal.data;\n}\nfunction propagateFcmOptions(payload, messagePayloadInternal) {\n  var _a, _b, _c, _d, _e;\n  // fcmOptions.link value is written into notification.click_action. see more in b/232072111\n  if (!messagePayloadInternal.fcmOptions && !((_a = messagePayloadInternal.notification) === null || _a === void 0 ? void 0 : _a.click_action)) {\n    return;\n  }\n  payload.fcmOptions = {};\n  const link = (_c = (_b = messagePayloadInternal.fcmOptions) === null || _b === void 0 ? void 0 : _b.link) !== null && _c !== void 0 ? _c : (_d = messagePayloadInternal.notification) === null || _d === void 0 ? void 0 : _d.click_action;\n  if (!!link) {\n    payload.fcmOptions.link = link;\n  }\n  // eslint-disable-next-line camelcase\n  const analyticsLabel = (_e = messagePayloadInternal.fcmOptions) === null || _e === void 0 ? void 0 : _e.analytics_label;\n  if (!!analyticsLabel) {\n    payload.fcmOptions.analyticsLabel = analyticsLabel;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isConsoleMessage(data) {\n  // This message has a campaign ID, meaning it was sent using the Firebase Console.\n  return typeof data === 'object' && !!data && CONSOLE_CAMPAIGN_ID in data;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n_mergeStrings('hts/frbslgigp.ogepscmv/ieo/eaylg', 'tp:/ieaeogn-agolai.o/1frlglgc/o');\n_mergeStrings('AzSCbw63g1R0nCw85jG8', 'Iaya3yLKwmgvh7cF0q4');\nfunction _mergeStrings(s1, s2) {\n  const resultArray = [];\n  for (let i = 0; i < s1.length; i++) {\n    resultArray.push(s1.charAt(i));\n    if (i < s2.length) {\n      resultArray.push(s2.charAt(i));\n    }\n  }\n  return resultArray.join('');\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction extractAppConfig(app) {\n  if (!app || !app.options) {\n    throw getMissingValueError('App Configuration Object');\n  }\n  if (!app.name) {\n    throw getMissingValueError('App Name');\n  }\n  // Required app config keys\n  const configKeys = ['projectId', 'apiKey', 'appId', 'messagingSenderId'];\n  const {\n    options\n  } = app;\n  for (const keyName of configKeys) {\n    if (!options[keyName]) {\n      throw getMissingValueError(keyName);\n    }\n  }\n  return {\n    appName: app.name,\n    projectId: options.projectId,\n    apiKey: options.apiKey,\n    appId: options.appId,\n    senderId: options.messagingSenderId\n  };\n}\nfunction getMissingValueError(valueName) {\n  return ERROR_FACTORY.create(\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */, {\n    valueName\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MessagingService {\n  constructor(app, installations, analyticsProvider) {\n    // logging is only done with end user consent. Default to false.\n    this.deliveryMetricsExportedToBigQueryEnabled = false;\n    this.onBackgroundMessageHandler = null;\n    this.onMessageHandler = null;\n    this.logEvents = [];\n    this.isLogServiceStarted = false;\n    const appConfig = extractAppConfig(app);\n    this.firebaseDependencies = {\n      app,\n      appConfig,\n      installations,\n      analyticsProvider\n    };\n  }\n  _delete() {\n    return Promise.resolve();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction registerDefaultSw(_x21) {\n  return _registerDefaultSw.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _registerDefaultSw() {\n  _registerDefaultSw = _asyncToGenerator(function* (messaging) {\n    try {\n      messaging.swRegistration = yield navigator.serviceWorker.register(DEFAULT_SW_PATH, {\n        scope: DEFAULT_SW_SCOPE\n      });\n      // The timing when browser updates sw when sw has an update is unreliable from experiment. It\n      // leads to version conflict when the SDK upgrades to a newer version in the main page, but sw\n      // is stuck with the old version. For example,\n      // https://github.com/firebase/firebase-js-sdk/issues/2590 The following line reliably updates\n      // sw if there was an update.\n      messaging.swRegistration.update().catch(() => {\n        /* it is non blocking and we don't care if it failed */\n      });\n    } catch (e) {\n      throw ERROR_FACTORY.create(\"failed-service-worker-registration\" /* ErrorCode.FAILED_DEFAULT_REGISTRATION */, {\n        browserErrorMessage: e === null || e === void 0 ? void 0 : e.message\n      });\n    }\n  });\n  return _registerDefaultSw.apply(this, arguments);\n}\nfunction updateSwReg(_x22, _x23) {\n  return _updateSwReg.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _updateSwReg() {\n  _updateSwReg = _asyncToGenerator(function* (messaging, swRegistration) {\n    if (!swRegistration && !messaging.swRegistration) {\n      yield registerDefaultSw(messaging);\n    }\n    if (!swRegistration && !!messaging.swRegistration) {\n      return;\n    }\n    if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n      throw ERROR_FACTORY.create(\"invalid-sw-registration\" /* ErrorCode.INVALID_SW_REGISTRATION */);\n    }\n\n    messaging.swRegistration = swRegistration;\n  });\n  return _updateSwReg.apply(this, arguments);\n}\nfunction updateVapidKey(_x24, _x25) {\n  return _updateVapidKey.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _updateVapidKey() {\n  _updateVapidKey = _asyncToGenerator(function* (messaging, vapidKey) {\n    if (!!vapidKey) {\n      messaging.vapidKey = vapidKey;\n    } else if (!messaging.vapidKey) {\n      messaging.vapidKey = DEFAULT_VAPID_KEY;\n    }\n  });\n  return _updateVapidKey.apply(this, arguments);\n}\nfunction getToken$1(_x26, _x27) {\n  return _getToken$.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getToken$() {\n  _getToken$ = _asyncToGenerator(function* (messaging, options) {\n    if (!navigator) {\n      throw ERROR_FACTORY.create(\"only-available-in-window\" /* ErrorCode.AVAILABLE_IN_WINDOW */);\n    }\n\n    if (Notification.permission === 'default') {\n      yield Notification.requestPermission();\n    }\n    if (Notification.permission !== 'granted') {\n      throw ERROR_FACTORY.create(\"permission-blocked\" /* ErrorCode.PERMISSION_BLOCKED */);\n    }\n\n    yield updateVapidKey(messaging, options === null || options === void 0 ? void 0 : options.vapidKey);\n    yield updateSwReg(messaging, options === null || options === void 0 ? void 0 : options.serviceWorkerRegistration);\n    return getTokenInternal(messaging);\n  });\n  return _getToken$.apply(this, arguments);\n}\nfunction logToScion(_x28, _x29, _x30) {\n  return _logToScion.apply(this, arguments);\n}\nfunction _logToScion() {\n  _logToScion = _asyncToGenerator(function* (messaging, messageType, data) {\n    const eventType = getEventType(messageType);\n    const analytics = yield messaging.firebaseDependencies.analyticsProvider.get();\n    analytics.logEvent(eventType, {\n      /* eslint-disable camelcase */\n      message_id: data[CONSOLE_CAMPAIGN_ID],\n      message_name: data[CONSOLE_CAMPAIGN_NAME],\n      message_time: data[CONSOLE_CAMPAIGN_TIME],\n      message_device_time: Math.floor(Date.now() / 1000)\n      /* eslint-enable camelcase */\n    });\n  });\n  return _logToScion.apply(this, arguments);\n}\nfunction getEventType(messageType) {\n  switch (messageType) {\n    case MessageType.NOTIFICATION_CLICKED:\n      return 'notification_open';\n    case MessageType.PUSH_RECEIVED:\n      return 'notification_foreground';\n    default:\n      throw new Error();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction messageEventListener(_x31, _x32) {\n  return _messageEventListener.apply(this, arguments);\n}\nfunction _messageEventListener() {\n  _messageEventListener = _asyncToGenerator(function* (messaging, event) {\n    const internalPayload = event.data;\n    if (!internalPayload.isFirebaseMessaging) {\n      return;\n    }\n    if (messaging.onMessageHandler && internalPayload.messageType === MessageType.PUSH_RECEIVED) {\n      if (typeof messaging.onMessageHandler === 'function') {\n        messaging.onMessageHandler(externalizePayload(internalPayload));\n      } else {\n        messaging.onMessageHandler.next(externalizePayload(internalPayload));\n      }\n    }\n    // Log to Scion if applicable\n    const dataPayload = internalPayload.data;\n    if (isConsoleMessage(dataPayload) && dataPayload[CONSOLE_CAMPAIGN_ANALYTICS_ENABLED] === '1') {\n      yield logToScion(messaging, internalPayload.messageType, dataPayload);\n    }\n  });\n  return _messageEventListener.apply(this, arguments);\n}\nconst name = \"@firebase/messaging\";\nconst version = \"0.12.4\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst WindowMessagingFactory = container => {\n  const messaging = new MessagingService(container.getProvider('app').getImmediate(), container.getProvider('installations-internal').getImmediate(), container.getProvider('analytics-internal'));\n  navigator.serviceWorker.addEventListener('message', e => messageEventListener(messaging, e));\n  return messaging;\n};\nconst WindowMessagingInternalFactory = container => {\n  const messaging = container.getProvider('messaging').getImmediate();\n  const messagingInternal = {\n    getToken: options => getToken$1(messaging, options)\n  };\n  return messagingInternal;\n};\nfunction registerMessagingInWindow() {\n  _registerComponent(new Component('messaging', WindowMessagingFactory, \"PUBLIC\" /* ComponentType.PUBLIC */));\n  _registerComponent(new Component('messaging-internal', WindowMessagingInternalFactory, \"PRIVATE\" /* ComponentType.PRIVATE */));\n  registerVersion(name, version);\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name, version, 'esm2017');\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Checks if all required APIs exist in the browser.\r\n * @returns a Promise that resolves to a boolean.\r\n *\r\n * @public\r\n */\nfunction isWindowSupported() {\n  return _isWindowSupported.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _isWindowSupported() {\n  _isWindowSupported = _asyncToGenerator(function* () {\n    try {\n      // This throws if open() is unsupported, so adding it to the conditional\n      // statement below can cause an uncaught error.\n      yield validateIndexedDBOpenable();\n    } catch (e) {\n      return false;\n    }\n    // firebase-js-sdk/issues/2393 reveals that idb#open in Safari iframe and Firefox private browsing\n    // might be prohibited to run. In these contexts, an error would be thrown during the messaging\n    // instantiating phase, informing the developers to import/call isSupported for special handling.\n    return typeof window !== 'undefined' && isIndexedDBAvailable() && areCookiesEnabled() && 'serviceWorker' in navigator && 'PushManager' in window && 'Notification' in window && 'fetch' in window && ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') && PushSubscription.prototype.hasOwnProperty('getKey');\n  });\n  return _isWindowSupported.apply(this, arguments);\n}\nfunction deleteToken$1(_x33) {\n  return _deleteToken$.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _deleteToken$() {\n  _deleteToken$ = _asyncToGenerator(function* (messaging) {\n    if (!navigator) {\n      throw ERROR_FACTORY.create(\"only-available-in-window\" /* ErrorCode.AVAILABLE_IN_WINDOW */);\n    }\n\n    if (!messaging.swRegistration) {\n      yield registerDefaultSw(messaging);\n    }\n    return deleteTokenInternal(messaging);\n  });\n  return _deleteToken$.apply(this, arguments);\n}\nfunction onMessage$1(messaging, nextOrObserver) {\n  if (!navigator) {\n    throw ERROR_FACTORY.create(\"only-available-in-window\" /* ErrorCode.AVAILABLE_IN_WINDOW */);\n  }\n\n  messaging.onMessageHandler = nextOrObserver;\n  return () => {\n    messaging.onMessageHandler = null;\n  };\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Retrieves a Firebase Cloud Messaging instance.\r\n *\r\n * @returns The Firebase Cloud Messaging instance associated with the provided firebase app.\r\n *\r\n * @public\r\n */\nfunction getMessagingInWindow(app = getApp()) {\n  // Conscious decision to make this async check non-blocking during the messaging instance\n  // initialization phase for performance consideration. An error would be thrown latter for\n  // developer's information. Developers can then choose to import and call `isSupported` for\n  // special handling.\n  isWindowSupported().then(isSupported => {\n    // If `isWindowSupported()` resolved, but returned false.\n    if (!isSupported) {\n      throw ERROR_FACTORY.create(\"unsupported-browser\" /* ErrorCode.UNSUPPORTED_BROWSER */);\n    }\n  }, _ => {\n    // If `isWindowSupported()` rejected.\n    throw ERROR_FACTORY.create(\"indexed-db-unsupported\" /* ErrorCode.INDEXED_DB_UNSUPPORTED */);\n  });\n\n  return _getProvider(getModularInstance(app), 'messaging').getImmediate();\n}\n/**\r\n * Subscribes the {@link Messaging} instance to push notifications. Returns an Firebase Cloud\r\n * Messaging registration token that can be used to send push messages to that {@link Messaging}\r\n * instance.\r\n *\r\n * If a notification permission isn't already granted, this method asks the user for permission. The\r\n * returned promise rejects if the user does not allow the app to show notifications.\r\n *\r\n * @param messaging - The {@link Messaging} instance.\r\n * @param options - Provides an optional vapid key and an optinoal service worker registration\r\n *\r\n * @returns The promise resolves with an FCM registration token.\r\n *\r\n * @public\r\n */\nfunction getToken(_x34, _x35) {\n  return _getToken.apply(this, arguments);\n}\n/**\r\n * Deletes the registration token associated with this {@link Messaging} instance and unsubscribes\r\n * the {@link Messaging} instance from the push subscription.\r\n *\r\n * @param messaging - The {@link Messaging} instance.\r\n *\r\n * @returns The promise resolves when the token has been successfully deleted.\r\n *\r\n * @public\r\n */\nfunction _getToken() {\n  _getToken = _asyncToGenerator(function* (messaging, options) {\n    messaging = getModularInstance(messaging);\n    return getToken$1(messaging, options);\n  });\n  return _getToken.apply(this, arguments);\n}\nfunction deleteToken(messaging) {\n  messaging = getModularInstance(messaging);\n  return deleteToken$1(messaging);\n}\n/**\r\n * When a push message is received and the user is currently on a page for your origin, the\r\n * message is passed to the page and an `onMessage()` event is dispatched with the payload of\r\n * the push message.\r\n *\r\n *\r\n * @param messaging - The {@link Messaging} instance.\r\n * @param nextOrObserver - This function, or observer object with `next` defined,\r\n *     is called when a message is received and the user is currently viewing your page.\r\n * @returns To stop listening for messages execute this returned function.\r\n *\r\n * @public\r\n */\nfunction onMessage(messaging, nextOrObserver) {\n  messaging = getModularInstance(messaging);\n  return onMessage$1(messaging, nextOrObserver);\n}\n\n/**\r\n * Firebase Cloud Messaging\r\n *\r\n * @packageDocumentation\r\n */\nregisterMessagingInWindow();\nexport { deleteToken, getMessagingInWindow as getMessaging, getToken, isWindowSupported as isSupported, onMessage };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5508f2123605b623eb71640b7eadbbce4b0a615543fc2c964561a7f76ff0522b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5508f2123605b623eb71640b7eadbbce4b0a615543fc2c964561a7f76ff0522b.json
deleted file mode 100644
index 2100154d347b40cff3cfddfbd47180b4881fe026..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5508f2123605b623eb71640b7eadbbce4b0a615543fc2c964561a7f76ff0522b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeMap } from './mergeMap';\nexport const flatMap = mergeMap;\n//# sourceMappingURL=flatMap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/55244f4319db6fce98659e90f33f37c8a516e2aab99bea0977632dfcaac08a13.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/55244f4319db6fce98659e90f33f37c8a516e2aab99bea0977632dfcaac08a13.json
deleted file mode 100644
index 39d1b0be8bdadd8c5f646977c491a563d713b139..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/55244f4319db6fce98659e90f33f37c8a516e2aab99bea0977632dfcaac08a13.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n  return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/553f4751dca6c372e9c509a9c36141309e658f36fd7c0f56dfb82f5470980dee.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/553f4751dca6c372e9c509a9c36141309e658f36fd7c0f56dfb82f5470980dee.json
deleted file mode 100644
index 85795bf983f70debdce801d5ad1396e4ee380881..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/553f4751dca6c372e9c509a9c36141309e658f36fd7c0f56dfb82f5470980dee.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"const {\n  isArray\n} = Array;\nexport function argsOrArgArray(args) {\n  return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n//# sourceMappingURL=argsOrArgArray.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/56ef428e11e24b518d66252da946433b1b9d268a4b4f88b89bccc7ea2d9128f9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/56ef428e11e24b518d66252da946433b1b9d268a4b4f88b89bccc7ea2d9128f9.json
deleted file mode 100644
index 41dd60c4d47902c5fd4c825583fed69daa3eb915..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/56ef428e11e24b518d66252da946433b1b9d268a4b4f88b89bccc7ea2d9128f9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n  return new Observable(subscriber => {\n    let i = 0;\n    return scheduler.schedule(function () {\n      if (i === input.length) {\n        subscriber.complete();\n      } else {\n        subscriber.next(input[i++]);\n        if (!subscriber.closed) {\n          this.schedule();\n        }\n      }\n    });\n  });\n}\n//# sourceMappingURL=scheduleArray.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5881e4c660003c4f36040b2a548af2c7170774bccac8a877760cf776e3cc4602.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5881e4c660003c4f36040b2a548af2c7170774bccac8a877760cf776e3cc4602.json
deleted file mode 100644
index ebd05f67263a5ae7d83a70edcf8c6c8242ee11cb..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5881e4c660003c4f36040b2a548af2c7170774bccac8a877760cf776e3cc4602.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"const {\n  isArray\n} = Array;\nconst {\n  getPrototypeOf,\n  prototype: objectProto,\n  keys: getKeys\n} = Object;\nexport function argsArgArrayOrObject(args) {\n  if (args.length === 1) {\n    const first = args[0];\n    if (isArray(first)) {\n      return {\n        args: first,\n        keys: null\n      };\n    }\n    if (isPOJO(first)) {\n      const keys = getKeys(first);\n      return {\n        args: keys.map(key => first[key]),\n        keys\n      };\n    }\n  }\n  return {\n    args: args,\n    keys: null\n  };\n}\nfunction isPOJO(obj) {\n  return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/58b0c6aed231b4e09751745b4f3d0495e5ecfa55f627bbf36ee0b26d4edea630.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/58b0c6aed231b4e09751745b4f3d0495e5ecfa55f627bbf36ee0b26d4edea630.json
deleted file mode 100644
index 2381b078a8dfcde57b15149cd8f04be921405d3d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/58b0c6aed231b4e09751745b4f3d0495e5ecfa55f627bbf36ee0b26d4edea630.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function createObject(keys, values) {\n  return keys.reduce((result, key, i) => (result[key] = values[i], result), {});\n}\n//# sourceMappingURL=createObject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5a1680b2567721d52f0fadee62eff1f196616716cc4dfbdf68723aba6b123fb9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5a1680b2567721d52f0fadee62eff1f196616716cc4dfbdf68723aba6b123fb9.json
deleted file mode 100644
index 7806ffe726686e467817d26ff556b5cfb20ec30b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5a1680b2567721d52f0fadee62eff1f196616716cc4dfbdf68723aba6b123fb9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function buffer(closingNotifier) {\n  return operate((source, subscriber) => {\n    let currentBuffer = [];\n    source.subscribe(createOperatorSubscriber(subscriber, value => currentBuffer.push(value), () => {\n      subscriber.next(currentBuffer);\n      subscriber.complete();\n    }));\n    innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => {\n      const b = currentBuffer;\n      currentBuffer = [];\n      subscriber.next(b);\n    }, noop));\n    return () => {\n      currentBuffer = null;\n    };\n  });\n}\n//# sourceMappingURL=buffer.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5ae2db96054d957f18c0d3d338f430e6be87be10809364e7ecc77cd677448660.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5ae2db96054d957f18c0d3d338f430e6be87be10809364e7ecc77cd677448660.json
deleted file mode 100644
index ec8397309cd6de4d2d201c76af743cbcb6fe1bb9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5ae2db96054d957f18c0d3d338f430e6be87be10809364e7ecc77cd677448660.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeAll } from './mergeAll';\nexport function concatAll() {\n  return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5be5eeb4433bba90cb5ff14282860d5779495b394a5dc33e5bd5b7d14e89f06c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5be5eeb4433bba90cb5ff14282860d5779495b394a5dc33e5bd5b7d14e89f06c.json
deleted file mode 100644
index 29d62b6dad863208a583ac9f29ef9d8a44f5d74a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5be5eeb4433bba90cb5ff14282860d5779495b394a5dc33e5bd5b7d14e89f06c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"'use strict';\n\n/**\n * @license Angular v15.1.0-next.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n(function (global) {\n  const performance = global['performance'];\n  function mark(name) {\n    performance && performance['mark'] && performance['mark'](name);\n  }\n  function performanceMeasure(name, label) {\n    performance && performance['measure'] && performance['measure'](name, label);\n  }\n  mark('Zone');\n  // Initialize before it's accessed below.\n  // __Zone_symbol_prefix global can be used to override the default zone\n  // symbol prefix with a custom one if needed.\n  const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n  function __symbol__(name) {\n    return symbolPrefix + name;\n  }\n  const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n  if (global['Zone']) {\n    // if global['Zone'] already exists (maybe zone.js was already loaded or\n    // some other lib also registered a global object named Zone), we may need\n    // to throw an error, but sometimes user may not want this error.\n    // For example,\n    // we have two web pages, page1 includes zone.js, page2 doesn't.\n    // and the 1st time user load page1 and page2, everything work fine,\n    // but when user load page2 again, error occurs because global['Zone'] already exists.\n    // so we add a flag to let user choose whether to throw this error or not.\n    // By default, if existing Zone is from zone.js, we will not throw the error.\n    if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n      throw new Error('Zone already loaded.');\n    } else {\n      return global['Zone'];\n    }\n  }\n  let Zone = /*#__PURE__*/(() => {\n    class Zone {\n      constructor(parent, zoneSpec) {\n        this._parent = parent;\n        this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';\n        this._properties = zoneSpec && zoneSpec.properties || {};\n        this._zoneDelegate = new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n      }\n      static assertZonePatched() {\n        if (global['Promise'] !== patches['ZoneAwarePromise']) {\n          throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + 'has been overwritten.\\n' + 'Most likely cause is that a Promise polyfill has been loaded ' + 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + 'If you must load one, do so before loading zone.js.)');\n        }\n      }\n      static get root() {\n        let zone = Zone.current;\n        while (zone.parent) {\n          zone = zone.parent;\n        }\n        return zone;\n      }\n      static get current() {\n        return _currentZoneFrame.zone;\n      }\n      static get currentTask() {\n        return _currentTask;\n      }\n      // tslint:disable-next-line:require-internal-with-underscore\n      static __load_patch(name, fn, ignoreDuplicate = false) {\n        if (patches.hasOwnProperty(name)) {\n          // `checkDuplicate` option is defined from global variable\n          // so it works for all modules.\n          // `ignoreDuplicate` can work for the specified module\n          if (!ignoreDuplicate && checkDuplicate) {\n            throw Error('Already loaded patch: ' + name);\n          }\n        } else if (!global['__Zone_disable_' + name]) {\n          const perfName = 'Zone:' + name;\n          mark(perfName);\n          patches[name] = fn(global, Zone, _api);\n          performanceMeasure(perfName, perfName);\n        }\n      }\n      get parent() {\n        return this._parent;\n      }\n      get name() {\n        return this._name;\n      }\n      get(key) {\n        const zone = this.getZoneWith(key);\n        if (zone) return zone._properties[key];\n      }\n      getZoneWith(key) {\n        let current = this;\n        while (current) {\n          if (current._properties.hasOwnProperty(key)) {\n            return current;\n          }\n          current = current._parent;\n        }\n        return null;\n      }\n      fork(zoneSpec) {\n        if (!zoneSpec) throw new Error('ZoneSpec required!');\n        return this._zoneDelegate.fork(this, zoneSpec);\n      }\n      wrap(callback, source) {\n        if (typeof callback !== 'function') {\n          throw new Error('Expecting function got: ' + callback);\n        }\n        const _callback = this._zoneDelegate.intercept(this, callback, source);\n        const zone = this;\n        return function () {\n          return zone.runGuarded(_callback, this, arguments, source);\n        };\n      }\n      run(callback, applyThis, applyArgs, source) {\n        _currentZoneFrame = {\n          parent: _currentZoneFrame,\n          zone: this\n        };\n        try {\n          return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n        } finally {\n          _currentZoneFrame = _currentZoneFrame.parent;\n        }\n      }\n      runGuarded(callback, applyThis = null, applyArgs, source) {\n        _currentZoneFrame = {\n          parent: _currentZoneFrame,\n          zone: this\n        };\n        try {\n          try {\n            return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n          } catch (error) {\n            if (this._zoneDelegate.handleError(this, error)) {\n              throw error;\n            }\n          }\n        } finally {\n          _currentZoneFrame = _currentZoneFrame.parent;\n        }\n      }\n      runTask(task, applyThis, applyArgs) {\n        if (task.zone != this) {\n          throw new Error('A task can only be run in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n        }\n        // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n        // will run in notScheduled(canceled) state, we should not try to\n        // run such kind of task but just return\n        if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n          return;\n        }\n        const reEntryGuard = task.state != running;\n        reEntryGuard && task._transitionTo(running, scheduled);\n        task.runCount++;\n        const previousTask = _currentTask;\n        _currentTask = task;\n        _currentZoneFrame = {\n          parent: _currentZoneFrame,\n          zone: this\n        };\n        try {\n          if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n            task.cancelFn = undefined;\n          }\n          try {\n            return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n          } catch (error) {\n            if (this._zoneDelegate.handleError(this, error)) {\n              throw error;\n            }\n          }\n        } finally {\n          // if the task's state is notScheduled or unknown, then it has already been cancelled\n          // we should not reset the state to scheduled\n          if (task.state !== notScheduled && task.state !== unknown) {\n            if (task.type == eventTask || task.data && task.data.isPeriodic) {\n              reEntryGuard && task._transitionTo(scheduled, running);\n            } else {\n              task.runCount = 0;\n              this._updateTaskCount(task, -1);\n              reEntryGuard && task._transitionTo(notScheduled, running, notScheduled);\n            }\n          }\n          _currentZoneFrame = _currentZoneFrame.parent;\n          _currentTask = previousTask;\n        }\n      }\n      scheduleTask(task) {\n        if (task.zone && task.zone !== this) {\n          // check if the task was rescheduled, the newZone\n          // should not be the children of the original zone\n          let newZone = this;\n          while (newZone) {\n            if (newZone === task.zone) {\n              throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n            }\n            newZone = newZone.parent;\n          }\n        }\n        task._transitionTo(scheduling, notScheduled);\n        const zoneDelegates = [];\n        task._zoneDelegates = zoneDelegates;\n        task._zone = this;\n        try {\n          task = this._zoneDelegate.scheduleTask(this, task);\n        } catch (err) {\n          // should set task's state to unknown when scheduleTask throw error\n          // because the err may from reschedule, so the fromState maybe notScheduled\n          task._transitionTo(unknown, scheduling, notScheduled);\n          // TODO: @JiaLiPassion, should we check the result from handleError?\n          this._zoneDelegate.handleError(this, err);\n          throw err;\n        }\n        if (task._zoneDelegates === zoneDelegates) {\n          // we have to check because internally the delegate can reschedule the task.\n          this._updateTaskCount(task, 1);\n        }\n        if (task.state == scheduling) {\n          task._transitionTo(scheduled, scheduling);\n        }\n        return task;\n      }\n      scheduleMicroTask(source, callback, data, customSchedule) {\n        return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n      }\n      scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n        return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n      }\n      scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n        return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n      }\n      cancelTask(task) {\n        if (task.zone != this) throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n        if (task.state !== scheduled && task.state !== running) {\n          return;\n        }\n        task._transitionTo(canceling, scheduled, running);\n        try {\n          this._zoneDelegate.cancelTask(this, task);\n        } catch (err) {\n          // if error occurs when cancelTask, transit the state to unknown\n          task._transitionTo(unknown, canceling);\n          this._zoneDelegate.handleError(this, err);\n          throw err;\n        }\n        this._updateTaskCount(task, -1);\n        task._transitionTo(notScheduled, canceling);\n        task.runCount = 0;\n        return task;\n      }\n      _updateTaskCount(task, count) {\n        const zoneDelegates = task._zoneDelegates;\n        if (count == -1) {\n          task._zoneDelegates = null;\n        }\n        for (let i = 0; i < zoneDelegates.length; i++) {\n          zoneDelegates[i]._updateTaskCount(task.type, count);\n        }\n      }\n    }\n    // tslint:disable-next-line:require-internal-with-underscore\n    Zone.__symbol__ = __symbol__;\n    return Zone;\n  })();\n  const DELEGATE_ZS = {\n    name: '',\n    onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n    onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n    onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n    onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n  };\n  class _ZoneDelegate {\n    constructor(zone, parentDelegate, zoneSpec) {\n      this._taskCounts = {\n        'microTask': 0,\n        'macroTask': 0,\n        'eventTask': 0\n      };\n      this.zone = zone;\n      this._parentDelegate = parentDelegate;\n      this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n      this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n      this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n      this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n      this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n      this._interceptCurrZone = zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n      this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n      this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n      this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n      this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n      this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n      this._handleErrorCurrZone = zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n      this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n      this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n      this._scheduleTaskCurrZone = zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n      this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n      this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n      this._invokeTaskCurrZone = zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n      this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n      this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n      this._cancelTaskCurrZone = zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n      this._hasTaskZS = null;\n      this._hasTaskDlgt = null;\n      this._hasTaskDlgtOwner = null;\n      this._hasTaskCurrZone = null;\n      const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n      const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n      if (zoneSpecHasTask || parentHasTask) {\n        // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n        // a case all task related interceptors must go through this ZD. We can't short circuit it.\n        this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n        this._hasTaskDlgt = parentDelegate;\n        this._hasTaskDlgtOwner = this;\n        this._hasTaskCurrZone = zone;\n        if (!zoneSpec.onScheduleTask) {\n          this._scheduleTaskZS = DELEGATE_ZS;\n          this._scheduleTaskDlgt = parentDelegate;\n          this._scheduleTaskCurrZone = this.zone;\n        }\n        if (!zoneSpec.onInvokeTask) {\n          this._invokeTaskZS = DELEGATE_ZS;\n          this._invokeTaskDlgt = parentDelegate;\n          this._invokeTaskCurrZone = this.zone;\n        }\n        if (!zoneSpec.onCancelTask) {\n          this._cancelTaskZS = DELEGATE_ZS;\n          this._cancelTaskDlgt = parentDelegate;\n          this._cancelTaskCurrZone = this.zone;\n        }\n      }\n    }\n    fork(targetZone, zoneSpec) {\n      return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : new Zone(targetZone, zoneSpec);\n    }\n    intercept(targetZone, callback, source) {\n      return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : callback;\n    }\n    invoke(targetZone, callback, applyThis, applyArgs, source) {\n      return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : callback.apply(applyThis, applyArgs);\n    }\n    handleError(targetZone, error) {\n      return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : true;\n    }\n    scheduleTask(targetZone, task) {\n      let returnTask = task;\n      if (this._scheduleTaskZS) {\n        if (this._hasTaskZS) {\n          returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n        }\n        // clang-format off\n        returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n        // clang-format on\n        if (!returnTask) returnTask = task;\n      } else {\n        if (task.scheduleFn) {\n          task.scheduleFn(task);\n        } else if (task.type == microTask) {\n          scheduleMicroTask(task);\n        } else {\n          throw new Error('Task is missing scheduleFn.');\n        }\n      }\n      return returnTask;\n    }\n    invokeTask(targetZone, task, applyThis, applyArgs) {\n      return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : task.callback.apply(applyThis, applyArgs);\n    }\n    cancelTask(targetZone, task) {\n      let value;\n      if (this._cancelTaskZS) {\n        value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n      } else {\n        if (!task.cancelFn) {\n          throw Error('Task is not cancelable');\n        }\n        value = task.cancelFn(task);\n      }\n      return value;\n    }\n    hasTask(targetZone, isEmpty) {\n      // hasTask should not throw error so other ZoneDelegate\n      // can still trigger hasTask callback\n      try {\n        this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n      } catch (err) {\n        this.handleError(targetZone, err);\n      }\n    }\n    // tslint:disable-next-line:require-internal-with-underscore\n    _updateTaskCount(type, count) {\n      const counts = this._taskCounts;\n      const prev = counts[type];\n      const next = counts[type] = prev + count;\n      if (next < 0) {\n        throw new Error('More tasks executed then were scheduled.');\n      }\n      if (prev == 0 || next == 0) {\n        const isEmpty = {\n          microTask: counts['microTask'] > 0,\n          macroTask: counts['macroTask'] > 0,\n          eventTask: counts['eventTask'] > 0,\n          change: type\n        };\n        this.hasTask(this.zone, isEmpty);\n      }\n    }\n  }\n  class ZoneTask {\n    constructor(type, source, callback, options, scheduleFn, cancelFn) {\n      // tslint:disable-next-line:require-internal-with-underscore\n      this._zone = null;\n      this.runCount = 0;\n      // tslint:disable-next-line:require-internal-with-underscore\n      this._zoneDelegates = null;\n      // tslint:disable-next-line:require-internal-with-underscore\n      this._state = 'notScheduled';\n      this.type = type;\n      this.source = source;\n      this.data = options;\n      this.scheduleFn = scheduleFn;\n      this.cancelFn = cancelFn;\n      if (!callback) {\n        throw new Error('callback is not defined');\n      }\n      this.callback = callback;\n      const self = this;\n      // TODO: @JiaLiPassion options should have interface\n      if (type === eventTask && options && options.useG) {\n        this.invoke = ZoneTask.invokeTask;\n      } else {\n        this.invoke = function () {\n          return ZoneTask.invokeTask.call(global, self, this, arguments);\n        };\n      }\n    }\n    static invokeTask(task, target, args) {\n      if (!task) {\n        task = this;\n      }\n      _numberOfNestedTaskFrames++;\n      try {\n        task.runCount++;\n        return task.zone.runTask(task, target, args);\n      } finally {\n        if (_numberOfNestedTaskFrames == 1) {\n          drainMicroTaskQueue();\n        }\n        _numberOfNestedTaskFrames--;\n      }\n    }\n    get zone() {\n      return this._zone;\n    }\n    get state() {\n      return this._state;\n    }\n    cancelScheduleRequest() {\n      this._transitionTo(notScheduled, scheduling);\n    }\n    // tslint:disable-next-line:require-internal-with-underscore\n    _transitionTo(toState, fromState1, fromState2) {\n      if (this._state === fromState1 || this._state === fromState2) {\n        this._state = toState;\n        if (toState == notScheduled) {\n          this._zoneDelegates = null;\n        }\n      } else {\n        throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n      }\n    }\n    toString() {\n      if (this.data && typeof this.data.handleId !== 'undefined') {\n        return this.data.handleId.toString();\n      } else {\n        return Object.prototype.toString.call(this);\n      }\n    }\n    // add toJSON method to prevent cyclic error when\n    // call JSON.stringify(zoneTask)\n    toJSON() {\n      return {\n        type: this.type,\n        state: this.state,\n        source: this.source,\n        zone: this.zone.name,\n        runCount: this.runCount\n      };\n    }\n  }\n  //////////////////////////////////////////////////////\n  //////////////////////////////////////////////////////\n  ///  MICROTASK QUEUE\n  //////////////////////////////////////////////////////\n  //////////////////////////////////////////////////////\n  const symbolSetTimeout = __symbol__('setTimeout');\n  const symbolPromise = __symbol__('Promise');\n  const symbolThen = __symbol__('then');\n  let _microTaskQueue = [];\n  let _isDrainingMicrotaskQueue = false;\n  let nativeMicroTaskQueuePromise;\n  function nativeScheduleMicroTask(func) {\n    if (!nativeMicroTaskQueuePromise) {\n      if (global[symbolPromise]) {\n        nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n      }\n    }\n    if (nativeMicroTaskQueuePromise) {\n      let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n      if (!nativeThen) {\n        // native Promise is not patchable, we need to use `then` directly\n        // issue 1078\n        nativeThen = nativeMicroTaskQueuePromise['then'];\n      }\n      nativeThen.call(nativeMicroTaskQueuePromise, func);\n    } else {\n      global[symbolSetTimeout](func, 0);\n    }\n  }\n  function scheduleMicroTask(task) {\n    // if we are not running in any task, and there has not been anything scheduled\n    // we must bootstrap the initial task creation by manually scheduling the drain\n    if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n      // We are not running in Task, so we need to kickstart the microtask queue.\n      nativeScheduleMicroTask(drainMicroTaskQueue);\n    }\n    task && _microTaskQueue.push(task);\n  }\n  function drainMicroTaskQueue() {\n    if (!_isDrainingMicrotaskQueue) {\n      _isDrainingMicrotaskQueue = true;\n      while (_microTaskQueue.length) {\n        const queue = _microTaskQueue;\n        _microTaskQueue = [];\n        for (let i = 0; i < queue.length; i++) {\n          const task = queue[i];\n          try {\n            task.zone.runTask(task, null, null);\n          } catch (error) {\n            _api.onUnhandledError(error);\n          }\n        }\n      }\n      _api.microtaskDrainDone();\n      _isDrainingMicrotaskQueue = false;\n    }\n  }\n  //////////////////////////////////////////////////////\n  //////////////////////////////////////////////////////\n  ///  BOOTSTRAP\n  //////////////////////////////////////////////////////\n  //////////////////////////////////////////////////////\n  const NO_ZONE = {\n    name: 'NO ZONE'\n  };\n  const notScheduled = 'notScheduled',\n    scheduling = 'scheduling',\n    scheduled = 'scheduled',\n    running = 'running',\n    canceling = 'canceling',\n    unknown = 'unknown';\n  const microTask = 'microTask',\n    macroTask = 'macroTask',\n    eventTask = 'eventTask';\n  const patches = {};\n  const _api = {\n    symbol: __symbol__,\n    currentZoneFrame: () => _currentZoneFrame,\n    onUnhandledError: noop,\n    microtaskDrainDone: noop,\n    scheduleMicroTask: scheduleMicroTask,\n    showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n    patchEventTarget: () => [],\n    patchOnProperties: noop,\n    patchMethod: () => noop,\n    bindArguments: () => [],\n    patchThen: () => noop,\n    patchMacroTask: () => noop,\n    patchEventPrototype: () => noop,\n    isIEOrEdge: () => false,\n    getGlobalObjects: () => undefined,\n    ObjectDefineProperty: () => noop,\n    ObjectGetOwnPropertyDescriptor: () => undefined,\n    ObjectCreate: () => undefined,\n    ArraySlice: () => [],\n    patchClass: () => noop,\n    wrapWithCurrentZone: () => noop,\n    filterProperties: () => [],\n    attachOriginToPatched: () => noop,\n    _redefineProperty: () => noop,\n    patchCallbacks: () => noop,\n    nativeScheduleMicroTask: nativeScheduleMicroTask\n  };\n  let _currentZoneFrame = {\n    parent: null,\n    zone: new Zone(null, null)\n  };\n  let _currentTask = null;\n  let _numberOfNestedTaskFrames = 0;\n  function noop() {}\n  performanceMeasure('Zone', 'Zone');\n  return global['Zone'] = Zone;\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// <reference types=\"node\"/>\n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n  return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n  return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n  for (let i = args.length - 1; i >= 0; i--) {\n    if (typeof args[i] === 'function') {\n      args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n    }\n  }\n  return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n  const source = prototype.constructor['name'];\n  for (let i = 0; i < fnNames.length; i++) {\n    const name = fnNames[i];\n    const delegate = prototype[name];\n    if (delegate) {\n      const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n      if (!isPropertyWritable(prototypeDesc)) {\n        continue;\n      }\n      prototype[name] = (delegate => {\n        const patched = function () {\n          return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n        };\n        attachOriginToPatched(patched, delegate);\n        return patched;\n      })(delegate);\n    }\n  }\n}\nfunction isPropertyWritable(propertyDesc) {\n  if (!propertyDesc) {\n    return true;\n  }\n  if (propertyDesc.writable === false) {\n    return false;\n  }\n  return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = !('nw' in _global) && typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]';\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]' && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n  // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n  // event will be undefined, so we need to use window.event\n  event = event || _global.event;\n  if (!event) {\n    return;\n  }\n  let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n  if (!eventNameSymbol) {\n    eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n  }\n  const target = this || event.target || _global;\n  const listener = target[eventNameSymbol];\n  let result;\n  if (isBrowser && target === internalWindow && event.type === 'error') {\n    // window.onerror have different signature\n    // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n    // and onerror callback will prevent default when callback return true\n    const errorEvent = event;\n    result = listener && listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n    if (result === true) {\n      event.preventDefault();\n    }\n  } else {\n    result = listener && listener.apply(this, arguments);\n    if (result != undefined && !result) {\n      event.preventDefault();\n    }\n  }\n  return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n  let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n  if (!desc && prototype) {\n    // when patch window object, use prototype to check prop exist or not\n    const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n    if (prototypeDesc) {\n      desc = {\n        enumerable: true,\n        configurable: true\n      };\n    }\n  }\n  // if the descriptor not exists or is not configurable\n  // just return\n  if (!desc || !desc.configurable) {\n    return;\n  }\n  const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n  if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n    return;\n  }\n  // A property descriptor cannot have getter/setter and be writable\n  // deleting the writable and value properties avoids this error:\n  //\n  // TypeError: property descriptors must not specify a value or be writable when a\n  // getter or setter has been specified\n  delete desc.writable;\n  delete desc.value;\n  const originalDescGet = desc.get;\n  const originalDescSet = desc.set;\n  // slice(2) cuz 'onclick' -> 'click', etc\n  const eventName = prop.slice(2);\n  let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n  if (!eventNameSymbol) {\n    eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n  }\n  desc.set = function (newValue) {\n    // in some of windows's onproperty callback, this is undefined\n    // so we need to check it\n    let target = this;\n    if (!target && obj === _global) {\n      target = _global;\n    }\n    if (!target) {\n      return;\n    }\n    const previousValue = target[eventNameSymbol];\n    if (typeof previousValue === 'function') {\n      target.removeEventListener(eventName, wrapFn);\n    }\n    // issue #978, when onload handler was added before loading zone.js\n    // we should remove it with originalDescSet\n    originalDescSet && originalDescSet.call(target, null);\n    target[eventNameSymbol] = newValue;\n    if (typeof newValue === 'function') {\n      target.addEventListener(eventName, wrapFn, false);\n    }\n  };\n  // The getter would return undefined for unassigned properties but the default value of an\n  // unassigned property is null\n  desc.get = function () {\n    // in some of windows's onproperty callback, this is undefined\n    // so we need to check it\n    let target = this;\n    if (!target && obj === _global) {\n      target = _global;\n    }\n    if (!target) {\n      return null;\n    }\n    const listener = target[eventNameSymbol];\n    if (listener) {\n      return listener;\n    } else if (originalDescGet) {\n      // result will be null when use inline event attribute,\n      // such as <button onclick=\"func();\">OK</button>\n      // because the onclick function is internal raw uncompiled handler\n      // the onclick will be evaluated when first time event was triggered or\n      // the property is accessed, https://github.com/angular/zone.js/issues/525\n      // so we should use original native get to retrieve the handler\n      let value = originalDescGet.call(this);\n      if (value) {\n        desc.set.call(this, value);\n        if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n          target.removeAttribute(prop);\n        }\n        return value;\n      }\n    }\n    return null;\n  };\n  ObjectDefineProperty(obj, prop, desc);\n  obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n  if (properties) {\n    for (let i = 0; i < properties.length; i++) {\n      patchProperty(obj, 'on' + properties[i], prototype);\n    }\n  } else {\n    const onProperties = [];\n    for (const prop in obj) {\n      if (prop.slice(0, 2) == 'on') {\n        onProperties.push(prop);\n      }\n    }\n    for (let j = 0; j < onProperties.length; j++) {\n      patchProperty(obj, onProperties[j], prototype);\n    }\n  }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n  const OriginalClass = _global[className];\n  if (!OriginalClass) return;\n  // keep original class in global\n  _global[zoneSymbol(className)] = OriginalClass;\n  _global[className] = function () {\n    const a = bindArguments(arguments, className);\n    switch (a.length) {\n      case 0:\n        this[originalInstanceKey] = new OriginalClass();\n        break;\n      case 1:\n        this[originalInstanceKey] = new OriginalClass(a[0]);\n        break;\n      case 2:\n        this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n        break;\n      case 3:\n        this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n        break;\n      case 4:\n        this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n        break;\n      default:\n        throw new Error('Arg list too long.');\n    }\n  };\n  // attach original delegate to patched function\n  attachOriginToPatched(_global[className], OriginalClass);\n  const instance = new OriginalClass(function () {});\n  let prop;\n  for (prop in instance) {\n    // https://bugs.webkit.org/show_bug.cgi?id=44721\n    if (className === 'XMLHttpRequest' && prop === 'responseBlob') continue;\n    (function (prop) {\n      if (typeof instance[prop] === 'function') {\n        _global[className].prototype[prop] = function () {\n          return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n        };\n      } else {\n        ObjectDefineProperty(_global[className].prototype, prop, {\n          set: function (fn) {\n            if (typeof fn === 'function') {\n              this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n              // keep callback in wrapped function so we can\n              // use it in Function.prototype.toString to return\n              // the native one.\n              attachOriginToPatched(this[originalInstanceKey][prop], fn);\n            } else {\n              this[originalInstanceKey][prop] = fn;\n            }\n          },\n          get: function () {\n            return this[originalInstanceKey][prop];\n          }\n        });\n      }\n    })(prop);\n  }\n  for (prop in OriginalClass) {\n    if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n      _global[className][prop] = OriginalClass[prop];\n    }\n  }\n}\nfunction patchMethod(target, name, patchFn) {\n  let proto = target;\n  while (proto && !proto.hasOwnProperty(name)) {\n    proto = ObjectGetPrototypeOf(proto);\n  }\n  if (!proto && target[name]) {\n    // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n    proto = target;\n  }\n  const delegateName = zoneSymbol(name);\n  let delegate = null;\n  if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n    delegate = proto[delegateName] = proto[name];\n    // check whether proto[name] is writable\n    // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n    const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n    if (isPropertyWritable(desc)) {\n      const patchDelegate = patchFn(delegate, delegateName, name);\n      proto[name] = function () {\n        return patchDelegate(this, arguments);\n      };\n      attachOriginToPatched(proto[name], delegate);\n    }\n  }\n  return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n  let setNative = null;\n  function scheduleTask(task) {\n    const data = task.data;\n    data.args[data.cbIdx] = function () {\n      task.invoke.apply(this, arguments);\n    };\n    setNative.apply(data.target, data.args);\n    return task;\n  }\n  setNative = patchMethod(obj, funcName, delegate => function (self, args) {\n    const meta = metaCreator(self, args);\n    if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n      return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n    } else {\n      // cause an error by calling it directly.\n      return delegate.apply(self, args);\n    }\n  });\n}\nfunction attachOriginToPatched(patched, original) {\n  patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n  try {\n    const ua = internalWindow.navigator.userAgent;\n    if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n      return true;\n    }\n  } catch (error) {}\n  return false;\n}\nfunction isIEOrEdge() {\n  if (isDetectedIEOrEdge) {\n    return ieOrEdge;\n  }\n  isDetectedIEOrEdge = true;\n  try {\n    const ua = internalWindow.navigator.userAgent;\n    if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n      ieOrEdge = true;\n    }\n  } catch (error) {}\n  return ieOrEdge;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n  const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n  const ObjectDefineProperty = Object.defineProperty;\n  function readableObjectToString(obj) {\n    if (obj && obj.toString === Object.prototype.toString) {\n      const className = obj.constructor && obj.constructor.name;\n      return (className ? className : '') + ': ' + JSON.stringify(obj);\n    }\n    return obj ? obj.toString() : Object.prototype.toString.call(obj);\n  }\n  const __symbol__ = api.symbol;\n  const _uncaughtPromiseErrors = [];\n  const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n  const symbolPromise = __symbol__('Promise');\n  const symbolThen = __symbol__('then');\n  const creationTrace = '__creationTrace__';\n  api.onUnhandledError = e => {\n    if (api.showUncaughtError()) {\n      const rejection = e && e.rejection;\n      if (rejection) {\n        console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n      } else {\n        console.error(e);\n      }\n    }\n  };\n  api.microtaskDrainDone = () => {\n    while (_uncaughtPromiseErrors.length) {\n      const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n      try {\n        uncaughtPromiseError.zone.runGuarded(() => {\n          if (uncaughtPromiseError.throwOriginal) {\n            throw uncaughtPromiseError.rejection;\n          }\n          throw uncaughtPromiseError;\n        });\n      } catch (error) {\n        handleUnhandledRejection(error);\n      }\n    }\n  };\n  const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n  function handleUnhandledRejection(e) {\n    api.onUnhandledError(e);\n    try {\n      const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n      if (typeof handler === 'function') {\n        handler.call(this, e);\n      }\n    } catch (err) {}\n  }\n  function isThenable(value) {\n    return value && value.then;\n  }\n  function forwardResolution(value) {\n    return value;\n  }\n  function forwardRejection(rejection) {\n    return ZoneAwarePromise.reject(rejection);\n  }\n  const symbolState = __symbol__('state');\n  const symbolValue = __symbol__('value');\n  const symbolFinally = __symbol__('finally');\n  const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n  const symbolParentPromiseState = __symbol__('parentPromiseState');\n  const source = 'Promise.then';\n  const UNRESOLVED = null;\n  const RESOLVED = true;\n  const REJECTED = false;\n  const REJECTED_NO_CATCH = 0;\n  function makeResolver(promise, state) {\n    return v => {\n      try {\n        resolvePromise(promise, state, v);\n      } catch (err) {\n        resolvePromise(promise, false, err);\n      }\n      // Do not return value or you will break the Promise spec.\n    };\n  }\n\n  const once = function () {\n    let wasCalled = false;\n    return function wrapper(wrappedFunction) {\n      return function () {\n        if (wasCalled) {\n          return;\n        }\n        wasCalled = true;\n        wrappedFunction.apply(null, arguments);\n      };\n    };\n  };\n  const TYPE_ERROR = 'Promise resolved with itself';\n  const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n  // Promise Resolution\n  function resolvePromise(promise, state, value) {\n    const onceWrapper = once();\n    if (promise === value) {\n      throw new TypeError(TYPE_ERROR);\n    }\n    if (promise[symbolState] === UNRESOLVED) {\n      // should only get value.then once based on promise spec.\n      let then = null;\n      try {\n        if (typeof value === 'object' || typeof value === 'function') {\n          then = value && value.then;\n        }\n      } catch (err) {\n        onceWrapper(() => {\n          resolvePromise(promise, false, err);\n        })();\n        return promise;\n      }\n      // if (value instanceof ZoneAwarePromise) {\n      if (state !== REJECTED && value instanceof ZoneAwarePromise && value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && value[symbolState] !== UNRESOLVED) {\n        clearRejectedNoCatch(value);\n        resolvePromise(promise, value[symbolState], value[symbolValue]);\n      } else if (state !== REJECTED && typeof then === 'function') {\n        try {\n          then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n        } catch (err) {\n          onceWrapper(() => {\n            resolvePromise(promise, false, err);\n          })();\n        }\n      } else {\n        promise[symbolState] = state;\n        const queue = promise[symbolValue];\n        promise[symbolValue] = value;\n        if (promise[symbolFinally] === symbolFinally) {\n          // the promise is generated by Promise.prototype.finally\n          if (state === RESOLVED) {\n            // the state is resolved, should ignore the value\n            // and use parent promise value\n            promise[symbolState] = promise[symbolParentPromiseState];\n            promise[symbolValue] = promise[symbolParentPromiseValue];\n          }\n        }\n        // record task information in value when error occurs, so we can\n        // do some additional work such as render longStackTrace\n        if (state === REJECTED && value instanceof Error) {\n          // check if longStackTraceZone is here\n          const trace = Zone.currentTask && Zone.currentTask.data && Zone.currentTask.data[creationTrace];\n          if (trace) {\n            // only keep the long stack trace into error when in longStackTraceZone\n            ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, {\n              configurable: true,\n              enumerable: false,\n              writable: true,\n              value: trace\n            });\n          }\n        }\n        for (let i = 0; i < queue.length;) {\n          scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n        }\n        if (queue.length == 0 && state == REJECTED) {\n          promise[symbolState] = REJECTED_NO_CATCH;\n          let uncaughtPromiseError = value;\n          try {\n            // Here we throws a new Error to print more readable error log\n            // and if the value is not an error, zone.js builds an `Error`\n            // Object here to attach the stack information.\n            throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + (value && value.stack ? '\\n' + value.stack : ''));\n          } catch (err) {\n            uncaughtPromiseError = err;\n          }\n          if (isDisableWrappingUncaughtPromiseRejection) {\n            // If disable wrapping uncaught promise reject\n            // use the value instead of wrapping it.\n            uncaughtPromiseError.throwOriginal = true;\n          }\n          uncaughtPromiseError.rejection = value;\n          uncaughtPromiseError.promise = promise;\n          uncaughtPromiseError.zone = Zone.current;\n          uncaughtPromiseError.task = Zone.currentTask;\n          _uncaughtPromiseErrors.push(uncaughtPromiseError);\n          api.scheduleMicroTask(); // to make sure that it is running\n        }\n      }\n    }\n    // Resolving an already resolved promise is a noop.\n    return promise;\n  }\n  const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n  function clearRejectedNoCatch(promise) {\n    if (promise[symbolState] === REJECTED_NO_CATCH) {\n      // if the promise is rejected no catch status\n      // and queue.length > 0, means there is a error handler\n      // here to handle the rejected promise, we should trigger\n      // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n      // eventHandler\n      try {\n        const handler = Zone[REJECTION_HANDLED_HANDLER];\n        if (handler && typeof handler === 'function') {\n          handler.call(this, {\n            rejection: promise[symbolValue],\n            promise: promise\n          });\n        }\n      } catch (err) {}\n      promise[symbolState] = REJECTED;\n      for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n        if (promise === _uncaughtPromiseErrors[i].promise) {\n          _uncaughtPromiseErrors.splice(i, 1);\n        }\n      }\n    }\n  }\n  function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n    clearRejectedNoCatch(promise);\n    const promiseState = promise[symbolState];\n    const delegate = promiseState ? typeof onFulfilled === 'function' ? onFulfilled : forwardResolution : typeof onRejected === 'function' ? onRejected : forwardRejection;\n    zone.scheduleMicroTask(source, () => {\n      try {\n        const parentPromiseValue = promise[symbolValue];\n        const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n        if (isFinallyPromise) {\n          // if the promise is generated from finally call, keep parent promise's state and value\n          chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n          chainPromise[symbolParentPromiseState] = promiseState;\n        }\n        // should not pass value to finally callback\n        const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]);\n        resolvePromise(chainPromise, true, value);\n      } catch (error) {\n        // if error occurs, should always return this error\n        resolvePromise(chainPromise, false, error);\n      }\n    }, chainPromise);\n  }\n  const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n  const noop = function () {};\n  const AggregateError = global.AggregateError;\n  class ZoneAwarePromise {\n    static toString() {\n      return ZONE_AWARE_PROMISE_TO_STRING;\n    }\n    static resolve(value) {\n      return resolvePromise(new this(null), RESOLVED, value);\n    }\n    static reject(error) {\n      return resolvePromise(new this(null), REJECTED, error);\n    }\n    static any(values) {\n      if (!values || typeof values[Symbol.iterator] !== 'function') {\n        return Promise.reject(new AggregateError([], 'All promises were rejected'));\n      }\n      const promises = [];\n      let count = 0;\n      try {\n        for (let v of values) {\n          count++;\n          promises.push(ZoneAwarePromise.resolve(v));\n        }\n      } catch (err) {\n        return Promise.reject(new AggregateError([], 'All promises were rejected'));\n      }\n      if (count === 0) {\n        return Promise.reject(new AggregateError([], 'All promises were rejected'));\n      }\n      let finished = false;\n      const errors = [];\n      return new ZoneAwarePromise((resolve, reject) => {\n        for (let i = 0; i < promises.length; i++) {\n          promises[i].then(v => {\n            if (finished) {\n              return;\n            }\n            finished = true;\n            resolve(v);\n          }, err => {\n            errors.push(err);\n            count--;\n            if (count === 0) {\n              finished = true;\n              reject(new AggregateError(errors, 'All promises were rejected'));\n            }\n          });\n        }\n      });\n    }\n    static race(values) {\n      let resolve;\n      let reject;\n      let promise = new this((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n      function onResolve(value) {\n        resolve(value);\n      }\n      function onReject(error) {\n        reject(error);\n      }\n      for (let value of values) {\n        if (!isThenable(value)) {\n          value = this.resolve(value);\n        }\n        value.then(onResolve, onReject);\n      }\n      return promise;\n    }\n    static all(values) {\n      return ZoneAwarePromise.allWithCallback(values);\n    }\n    static allSettled(values) {\n      const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n      return P.allWithCallback(values, {\n        thenCallback: value => ({\n          status: 'fulfilled',\n          value\n        }),\n        errorCallback: err => ({\n          status: 'rejected',\n          reason: err\n        })\n      });\n    }\n    static allWithCallback(values, callback) {\n      let resolve;\n      let reject;\n      let promise = new this((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n      // Start at 2 to prevent prematurely resolving if .then is called immediately.\n      let unresolvedCount = 2;\n      let valueIndex = 0;\n      const resolvedValues = [];\n      for (let value of values) {\n        if (!isThenable(value)) {\n          value = this.resolve(value);\n        }\n        const curValueIndex = valueIndex;\n        try {\n          value.then(value => {\n            resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n            unresolvedCount--;\n            if (unresolvedCount === 0) {\n              resolve(resolvedValues);\n            }\n          }, err => {\n            if (!callback) {\n              reject(err);\n            } else {\n              resolvedValues[curValueIndex] = callback.errorCallback(err);\n              unresolvedCount--;\n              if (unresolvedCount === 0) {\n                resolve(resolvedValues);\n              }\n            }\n          });\n        } catch (thenErr) {\n          reject(thenErr);\n        }\n        unresolvedCount++;\n        valueIndex++;\n      }\n      // Make the unresolvedCount zero-based again.\n      unresolvedCount -= 2;\n      if (unresolvedCount === 0) {\n        resolve(resolvedValues);\n      }\n      return promise;\n    }\n    constructor(executor) {\n      const promise = this;\n      if (!(promise instanceof ZoneAwarePromise)) {\n        throw new Error('Must be an instanceof Promise.');\n      }\n      promise[symbolState] = UNRESOLVED;\n      promise[symbolValue] = []; // queue;\n      try {\n        const onceWrapper = once();\n        executor && executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n      } catch (error) {\n        resolvePromise(promise, false, error);\n      }\n    }\n    get [Symbol.toStringTag]() {\n      return 'Promise';\n    }\n    get [Symbol.species]() {\n      return ZoneAwarePromise;\n    }\n    then(onFulfilled, onRejected) {\n      var _a;\n      // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n      // may be an object without a prototype (created through `Object.create(null)`); thus\n      // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n      // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n      // object and copies promise properties into that object (within the `getOrCreateLoad`\n      // function). The zone.js then checks if the resolved value has the `then` method and invokes\n      // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read\n      // properties of undefined (reading 'Symbol(Symbol.species)')`.\n      let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n      if (!C || typeof C !== 'function') {\n        C = this.constructor || ZoneAwarePromise;\n      }\n      const chainPromise = new C(noop);\n      const zone = Zone.current;\n      if (this[symbolState] == UNRESOLVED) {\n        this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n      } else {\n        scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n      }\n      return chainPromise;\n    }\n    catch(onRejected) {\n      return this.then(null, onRejected);\n    }\n    finally(onFinally) {\n      var _a;\n      // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n      let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n      if (!C || typeof C !== 'function') {\n        C = ZoneAwarePromise;\n      }\n      const chainPromise = new C(noop);\n      chainPromise[symbolFinally] = symbolFinally;\n      const zone = Zone.current;\n      if (this[symbolState] == UNRESOLVED) {\n        this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n      } else {\n        scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n      }\n      return chainPromise;\n    }\n  }\n  // Protect against aggressive optimizers dropping seemingly unused properties.\n  // E.g. Closure Compiler in advanced mode.\n  ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n  ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n  ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n  ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n  const NativePromise = global[symbolPromise] = global['Promise'];\n  global['Promise'] = ZoneAwarePromise;\n  const symbolThenPatched = __symbol__('thenPatched');\n  function patchThen(Ctor) {\n    const proto = Ctor.prototype;\n    const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n    if (prop && (prop.writable === false || !prop.configurable)) {\n      // check Ctor.prototype.then propertyDescriptor is writable or not\n      // in meteor env, writable is false, we should ignore such case\n      return;\n    }\n    const originalThen = proto.then;\n    // Keep a reference to the original method.\n    proto[symbolThen] = originalThen;\n    Ctor.prototype.then = function (onResolve, onReject) {\n      const wrapped = new ZoneAwarePromise((resolve, reject) => {\n        originalThen.call(this, resolve, reject);\n      });\n      return wrapped.then(onResolve, onReject);\n    };\n    Ctor[symbolThenPatched] = true;\n  }\n  api.patchThen = patchThen;\n  function zoneify(fn) {\n    return function (self, args) {\n      let resultPromise = fn.apply(self, args);\n      if (resultPromise instanceof ZoneAwarePromise) {\n        return resultPromise;\n      }\n      let ctor = resultPromise.constructor;\n      if (!ctor[symbolThenPatched]) {\n        patchThen(ctor);\n      }\n      return resultPromise;\n    };\n  }\n  if (NativePromise) {\n    patchThen(NativePromise);\n    patchMethod(global, 'fetch', delegate => zoneify(delegate));\n  }\n  // This is not part of public API, but it is useful for tests, so we expose it.\n  Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n  return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', global => {\n  // patch Func.prototype.toString to let them look like native\n  const originalFunctionToString = Function.prototype.toString;\n  const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n  const PROMISE_SYMBOL = zoneSymbol('Promise');\n  const ERROR_SYMBOL = zoneSymbol('Error');\n  const newFunctionToString = function toString() {\n    if (typeof this === 'function') {\n      const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n      if (originalDelegate) {\n        if (typeof originalDelegate === 'function') {\n          return originalFunctionToString.call(originalDelegate);\n        } else {\n          return Object.prototype.toString.call(originalDelegate);\n        }\n      }\n      if (this === Promise) {\n        const nativePromise = global[PROMISE_SYMBOL];\n        if (nativePromise) {\n          return originalFunctionToString.call(nativePromise);\n        }\n      }\n      if (this === Error) {\n        const nativeError = global[ERROR_SYMBOL];\n        if (nativeError) {\n          return originalFunctionToString.call(nativeError);\n        }\n      }\n    }\n    return originalFunctionToString.call(this);\n  };\n  newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n  Function.prototype.toString = newFunctionToString;\n  // patch Object.prototype.toString to let them look like native\n  const originalObjectToString = Object.prototype.toString;\n  const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n  Object.prototype.toString = function () {\n    if (typeof Promise === 'function' && this instanceof Promise) {\n      return PROMISE_OBJECT_TO_STRING;\n    }\n    return originalObjectToString.call(this);\n  };\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n  try {\n    const options = Object.defineProperty({}, 'passive', {\n      get: function () {\n        passiveSupported = true;\n      }\n    });\n    // Note: We pass the `options` object as the event handler too. This is not compatible with the\n    // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n    // without an actual handler.\n    window.addEventListener('test', options, options);\n    window.removeEventListener('test', options, options);\n  } catch (err) {\n    passiveSupported = false;\n  }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n  useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n  const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n  const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n  const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n  const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n  zoneSymbolEventNames[eventName] = {};\n  zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n  zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n  const ADD_EVENT_LISTENER = patchOptions && patchOptions.add || ADD_EVENT_LISTENER_STR;\n  const REMOVE_EVENT_LISTENER = patchOptions && patchOptions.rm || REMOVE_EVENT_LISTENER_STR;\n  const LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.listeners || 'eventListeners';\n  const REMOVE_ALL_LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.rmAll || 'removeAllListeners';\n  const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n  const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n  const PREPEND_EVENT_LISTENER = 'prependListener';\n  const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n  const invokeTask = function (task, target, event) {\n    // for better performance, check isRemoved which is set\n    // by removeEventListener\n    if (task.isRemoved) {\n      return;\n    }\n    const delegate = task.callback;\n    if (typeof delegate === 'object' && delegate.handleEvent) {\n      // create the bind version of handleEvent when invoke\n      task.callback = event => delegate.handleEvent(event);\n      task.originalDelegate = delegate;\n    }\n    // invoke static task.invoke\n    // need to try/catch error here, otherwise, the error in one event listener\n    // will break the executions of the other event listeners. Also error will\n    // not remove the event listener when `once` options is true.\n    let error;\n    try {\n      task.invoke(task, target, [event]);\n    } catch (err) {\n      error = err;\n    }\n    const options = task.options;\n    if (options && typeof options === 'object' && options.once) {\n      // if options.once is true, after invoke once remove listener here\n      // only browser need to do this, nodejs eventEmitter will cal removeListener\n      // inside EventEmitter.once\n      const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n      target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n    }\n    return error;\n  };\n  function globalCallback(context, event, isCapture) {\n    // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n    // event will be undefined, so we need to use window.event\n    event = event || _global.event;\n    if (!event) {\n      return;\n    }\n    // event.target is needed for Samsung TV and SourceBuffer\n    // || global is needed https://github.com/angular/zone.js/issues/190\n    const target = context || event.target || _global;\n    const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n    if (tasks) {\n      const errors = [];\n      // invoke all tasks which attached to current target with given event.type and capture = false\n      // for performance concern, if task.length === 1, just invoke\n      if (tasks.length === 1) {\n        const err = invokeTask(tasks[0], target, event);\n        err && errors.push(err);\n      } else {\n        // https://github.com/angular/zone.js/issues/836\n        // copy the tasks array before invoke, to avoid\n        // the callback will remove itself or other listener\n        const copyTasks = tasks.slice();\n        for (let i = 0; i < copyTasks.length; i++) {\n          if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n            break;\n          }\n          const err = invokeTask(copyTasks[i], target, event);\n          err && errors.push(err);\n        }\n      }\n      // Since there is only one error, we don't need to schedule microTask\n      // to throw the error.\n      if (errors.length === 1) {\n        throw errors[0];\n      } else {\n        for (let i = 0; i < errors.length; i++) {\n          const err = errors[i];\n          api.nativeScheduleMicroTask(() => {\n            throw err;\n          });\n        }\n      }\n    }\n  }\n  // global shared zoneAwareCallback to handle all event callback with capture = false\n  const globalZoneAwareCallback = function (event) {\n    return globalCallback(this, event, false);\n  };\n  // global shared zoneAwareCallback to handle all event callback with capture = true\n  const globalZoneAwareCaptureCallback = function (event) {\n    return globalCallback(this, event, true);\n  };\n  function patchEventTargetMethods(obj, patchOptions) {\n    if (!obj) {\n      return false;\n    }\n    let useGlobalCallback = true;\n    if (patchOptions && patchOptions.useG !== undefined) {\n      useGlobalCallback = patchOptions.useG;\n    }\n    const validateHandler = patchOptions && patchOptions.vh;\n    let checkDuplicate = true;\n    if (patchOptions && patchOptions.chkDup !== undefined) {\n      checkDuplicate = patchOptions.chkDup;\n    }\n    let returnTarget = false;\n    if (patchOptions && patchOptions.rt !== undefined) {\n      returnTarget = patchOptions.rt;\n    }\n    let proto = obj;\n    while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n      proto = ObjectGetPrototypeOf(proto);\n    }\n    if (!proto && obj[ADD_EVENT_LISTENER]) {\n      // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n      proto = obj;\n    }\n    if (!proto) {\n      return false;\n    }\n    if (proto[zoneSymbolAddEventListener]) {\n      return false;\n    }\n    const eventNameToString = patchOptions && patchOptions.eventNameToString;\n    // a shared global taskData to pass data for scheduleEventTask\n    // so we do not need to create a new object just for pass some data\n    const taskData = {};\n    const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n    const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = proto[REMOVE_EVENT_LISTENER];\n    const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = proto[LISTENERS_EVENT_LISTENER];\n    const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n    let nativePrependEventListener;\n    if (patchOptions && patchOptions.prepend) {\n      nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = proto[patchOptions.prepend];\n    }\n    /**\n     * This util function will build an option object with passive option\n     * to handle all possible input from the user.\n     */\n    function buildEventListenerOptions(options, passive) {\n      if (!passiveSupported && typeof options === 'object' && options) {\n        // doesn't support passive but user want to pass an object as options.\n        // this will not work on some old browser, so we just pass a boolean\n        // as useCapture parameter\n        return !!options.capture;\n      }\n      if (!passiveSupported || !passive) {\n        return options;\n      }\n      if (typeof options === 'boolean') {\n        return {\n          capture: options,\n          passive: true\n        };\n      }\n      if (!options) {\n        return {\n          passive: true\n        };\n      }\n      if (typeof options === 'object' && options.passive !== false) {\n        return Object.assign(Object.assign({}, options), {\n          passive: true\n        });\n      }\n      return options;\n    }\n    const customScheduleGlobal = function (task) {\n      // if there is already a task for the eventName + capture,\n      // just return, because we use the shared globalZoneAwareCallback here.\n      if (taskData.isExisting) {\n        return;\n      }\n      return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n    };\n    const customCancelGlobal = function (task) {\n      // if task is not marked as isRemoved, this call is directly\n      // from Zone.prototype.cancelTask, we should remove the task\n      // from tasksList of target first\n      if (!task.isRemoved) {\n        const symbolEventNames = zoneSymbolEventNames[task.eventName];\n        let symbolEventName;\n        if (symbolEventNames) {\n          symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n        }\n        const existingTasks = symbolEventName && task.target[symbolEventName];\n        if (existingTasks) {\n          for (let i = 0; i < existingTasks.length; i++) {\n            const existingTask = existingTasks[i];\n            if (existingTask === task) {\n              existingTasks.splice(i, 1);\n              // set isRemoved to data for faster invokeTask check\n              task.isRemoved = true;\n              if (existingTasks.length === 0) {\n                // all tasks for the eventName + capture have gone,\n                // remove globalZoneAwareCallback and remove the task cache from target\n                task.allRemoved = true;\n                task.target[symbolEventName] = null;\n              }\n              break;\n            }\n          }\n        }\n      }\n      // if all tasks for the eventName + capture have gone,\n      // we will really remove the global event callback,\n      // if not, return\n      if (!task.allRemoved) {\n        return;\n      }\n      return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n    };\n    const customScheduleNonGlobal = function (task) {\n      return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n    };\n    const customSchedulePrepend = function (task) {\n      return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n    };\n    const customCancelNonGlobal = function (task) {\n      return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n    };\n    const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n    const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n    const compareTaskCallbackVsDelegate = function (task, delegate) {\n      const typeOfDelegate = typeof delegate;\n      return typeOfDelegate === 'function' && task.callback === delegate || typeOfDelegate === 'object' && task.originalDelegate === delegate;\n    };\n    const compare = patchOptions && patchOptions.diff ? patchOptions.diff : compareTaskCallbackVsDelegate;\n    const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n    const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n    const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n      return function () {\n        const target = this || _global;\n        let eventName = arguments[0];\n        if (patchOptions && patchOptions.transferEventName) {\n          eventName = patchOptions.transferEventName(eventName);\n        }\n        let delegate = arguments[1];\n        if (!delegate) {\n          return nativeListener.apply(this, arguments);\n        }\n        if (isNode && eventName === 'uncaughtException') {\n          // don't patch uncaughtException of nodejs to prevent endless loop\n          return nativeListener.apply(this, arguments);\n        }\n        // don't create the bind delegate function for handleEvent\n        // case here to improve addEventListener performance\n        // we will create the bind delegate when invoke\n        let isHandleEvent = false;\n        if (typeof delegate !== 'function') {\n          if (!delegate.handleEvent) {\n            return nativeListener.apply(this, arguments);\n          }\n          isHandleEvent = true;\n        }\n        if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n          return;\n        }\n        const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n        const options = buildEventListenerOptions(arguments[2], passive);\n        if (unpatchedEvents) {\n          // check unpatched list\n          for (let i = 0; i < unpatchedEvents.length; i++) {\n            if (eventName === unpatchedEvents[i]) {\n              if (passive) {\n                return nativeListener.call(target, eventName, delegate, options);\n              } else {\n                return nativeListener.apply(this, arguments);\n              }\n            }\n          }\n        }\n        const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n        const once = options && typeof options === 'object' ? options.once : false;\n        const zone = Zone.current;\n        let symbolEventNames = zoneSymbolEventNames[eventName];\n        if (!symbolEventNames) {\n          prepareEventNames(eventName, eventNameToString);\n          symbolEventNames = zoneSymbolEventNames[eventName];\n        }\n        const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n        let existingTasks = target[symbolEventName];\n        let isExisting = false;\n        if (existingTasks) {\n          // already have task registered\n          isExisting = true;\n          if (checkDuplicate) {\n            for (let i = 0; i < existingTasks.length; i++) {\n              if (compare(existingTasks[i], delegate)) {\n                // same callback, same capture, same event name, just return\n                return;\n              }\n            }\n          }\n        } else {\n          existingTasks = target[symbolEventName] = [];\n        }\n        let source;\n        const constructorName = target.constructor['name'];\n        const targetSource = globalSources[constructorName];\n        if (targetSource) {\n          source = targetSource[eventName];\n        }\n        if (!source) {\n          source = constructorName + addSource + (eventNameToString ? eventNameToString(eventName) : eventName);\n        }\n        // do not create a new object as task.data to pass those things\n        // just use the global shared one\n        taskData.options = options;\n        if (once) {\n          // if addEventListener with once options, we don't pass it to\n          // native addEventListener, instead we keep the once setting\n          // and handle ourselves.\n          taskData.options.once = false;\n        }\n        taskData.target = target;\n        taskData.capture = capture;\n        taskData.eventName = eventName;\n        taskData.isExisting = isExisting;\n        const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n        // keep taskData into data to allow onScheduleEventTask to access the task information\n        if (data) {\n          data.taskData = taskData;\n        }\n        const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n        // should clear taskData.target to avoid memory leak\n        // issue, https://github.com/angular/angular/issues/20442\n        taskData.target = null;\n        // need to clear up taskData because it is a global object\n        if (data) {\n          data.taskData = null;\n        }\n        // have to save those information to task in case\n        // application may call task.zone.cancelTask() directly\n        if (once) {\n          options.once = true;\n        }\n        if (!(!passiveSupported && typeof task.options === 'boolean')) {\n          // if not support passive, and we pass an option object\n          // to addEventListener, we should save the options to task\n          task.options = options;\n        }\n        task.target = target;\n        task.capture = capture;\n        task.eventName = eventName;\n        if (isHandleEvent) {\n          // save original delegate for compare to check duplicate\n          task.originalDelegate = delegate;\n        }\n        if (!prepend) {\n          existingTasks.push(task);\n        } else {\n          existingTasks.unshift(task);\n        }\n        if (returnTarget) {\n          return target;\n        }\n      };\n    };\n    proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n    if (nativePrependEventListener) {\n      proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n    }\n    proto[REMOVE_EVENT_LISTENER] = function () {\n      const target = this || _global;\n      let eventName = arguments[0];\n      if (patchOptions && patchOptions.transferEventName) {\n        eventName = patchOptions.transferEventName(eventName);\n      }\n      const options = arguments[2];\n      const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n      const delegate = arguments[1];\n      if (!delegate) {\n        return nativeRemoveEventListener.apply(this, arguments);\n      }\n      if (validateHandler && !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n        return;\n      }\n      const symbolEventNames = zoneSymbolEventNames[eventName];\n      let symbolEventName;\n      if (symbolEventNames) {\n        symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n      }\n      const existingTasks = symbolEventName && target[symbolEventName];\n      if (existingTasks) {\n        for (let i = 0; i < existingTasks.length; i++) {\n          const existingTask = existingTasks[i];\n          if (compare(existingTask, delegate)) {\n            existingTasks.splice(i, 1);\n            // set isRemoved to data for faster invokeTask check\n            existingTask.isRemoved = true;\n            if (existingTasks.length === 0) {\n              // all tasks for the eventName + capture have gone,\n              // remove globalZoneAwareCallback and remove the task cache from target\n              existingTask.allRemoved = true;\n              target[symbolEventName] = null;\n              // in the target, we have an event listener which is added by on_property\n              // such as target.onclick = function() {}, so we need to clear this internal\n              // property too if all delegates all removed\n              if (typeof eventName === 'string') {\n                const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n                target[onPropertySymbol] = null;\n              }\n            }\n            existingTask.zone.cancelTask(existingTask);\n            if (returnTarget) {\n              return target;\n            }\n            return;\n          }\n        }\n      }\n      // issue 930, didn't find the event name or callback\n      // from zone kept existingTasks, the callback maybe\n      // added outside of zone, we need to call native removeEventListener\n      // to try to remove it.\n      return nativeRemoveEventListener.apply(this, arguments);\n    };\n    proto[LISTENERS_EVENT_LISTENER] = function () {\n      const target = this || _global;\n      let eventName = arguments[0];\n      if (patchOptions && patchOptions.transferEventName) {\n        eventName = patchOptions.transferEventName(eventName);\n      }\n      const listeners = [];\n      const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n      for (let i = 0; i < tasks.length; i++) {\n        const task = tasks[i];\n        let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n        listeners.push(delegate);\n      }\n      return listeners;\n    };\n    proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n      const target = this || _global;\n      let eventName = arguments[0];\n      if (!eventName) {\n        const keys = Object.keys(target);\n        for (let i = 0; i < keys.length; i++) {\n          const prop = keys[i];\n          const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n          let evtName = match && match[1];\n          // in nodejs EventEmitter, removeListener event is\n          // used for monitoring the removeListener call,\n          // so just keep removeListener eventListener until\n          // all other eventListeners are removed\n          if (evtName && evtName !== 'removeListener') {\n            this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n          }\n        }\n        // remove removeListener listener finally\n        this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n      } else {\n        if (patchOptions && patchOptions.transferEventName) {\n          eventName = patchOptions.transferEventName(eventName);\n        }\n        const symbolEventNames = zoneSymbolEventNames[eventName];\n        if (symbolEventNames) {\n          const symbolEventName = symbolEventNames[FALSE_STR];\n          const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n          const tasks = target[symbolEventName];\n          const captureTasks = target[symbolCaptureEventName];\n          if (tasks) {\n            const removeTasks = tasks.slice();\n            for (let i = 0; i < removeTasks.length; i++) {\n              const task = removeTasks[i];\n              let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n              this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n            }\n          }\n          if (captureTasks) {\n            const removeTasks = captureTasks.slice();\n            for (let i = 0; i < removeTasks.length; i++) {\n              const task = removeTasks[i];\n              let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n              this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n            }\n          }\n        }\n      }\n      if (returnTarget) {\n        return this;\n      }\n    };\n    // for native toString patch\n    attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n    attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n    if (nativeRemoveAllListeners) {\n      attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n    }\n    if (nativeListeners) {\n      attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n    }\n    return true;\n  }\n  let results = [];\n  for (let i = 0; i < apis.length; i++) {\n    results[i] = patchEventTargetMethods(apis[i], patchOptions);\n  }\n  return results;\n}\nfunction findEventTasks(target, eventName) {\n  if (!eventName) {\n    const foundTasks = [];\n    for (let prop in target) {\n      const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n      let evtName = match && match[1];\n      if (evtName && (!eventName || evtName === eventName)) {\n        const tasks = target[prop];\n        if (tasks) {\n          for (let i = 0; i < tasks.length; i++) {\n            foundTasks.push(tasks[i]);\n          }\n        }\n      }\n    }\n    return foundTasks;\n  }\n  let symbolEventName = zoneSymbolEventNames[eventName];\n  if (!symbolEventName) {\n    prepareEventNames(eventName);\n    symbolEventName = zoneSymbolEventNames[eventName];\n  }\n  const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n  const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n  if (!captureFalseTasks) {\n    return captureTrueTasks ? captureTrueTasks.slice() : [];\n  } else {\n    return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : captureFalseTasks.slice();\n  }\n}\nfunction patchEventPrototype(global, api) {\n  const Event = global['Event'];\n  if (Event && Event.prototype) {\n    api.patchMethod(Event.prototype, 'stopImmediatePropagation', delegate => function (self, args) {\n      self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n      // we need to call the native stopImmediatePropagation\n      // in case in some hybrid application, some part of\n      // application will be controlled by zone, some are not\n      delegate && delegate.apply(self, args);\n    });\n  }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n  const symbol = Zone.__symbol__(method);\n  if (target[symbol]) {\n    return;\n  }\n  const nativeDelegate = target[symbol] = target[method];\n  target[method] = function (name, opts, options) {\n    if (opts && opts.prototype) {\n      callbacks.forEach(function (callback) {\n        const source = `${targetName}.${method}::` + callback;\n        const prototype = opts.prototype;\n        // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n        // `customElements.define`. We explicitly wrap the patching code into try-catch since\n        // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n        // make those properties non-writable. This means that patching callback will throw an error\n        // `cannot assign to read-only property`. See this code as an example:\n        // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n        // We don't want to stop the application rendering if we couldn't patch some\n        // callback, e.g. `attributeChangedCallback`.\n        try {\n          if (prototype.hasOwnProperty(callback)) {\n            const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n            if (descriptor && descriptor.value) {\n              descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n              api._redefineProperty(opts.prototype, callback, descriptor);\n            } else if (prototype[callback]) {\n              prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n            }\n          } else if (prototype[callback]) {\n            prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n          }\n        } catch (_a) {\n          // Note: we leave the catch block empty since there's no way to handle the error related\n          // to non-writable property.\n        }\n      });\n    }\n    return nativeDelegate.call(target, name, opts, options);\n  };\n  api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n  if (!ignoreProperties || ignoreProperties.length === 0) {\n    return onProperties;\n  }\n  const tip = ignoreProperties.filter(ip => ip.target === target);\n  if (!tip || tip.length === 0) {\n    return onProperties;\n  }\n  const targetIgnoreProperties = tip[0].ignoreProperties;\n  return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n  // check whether target is available, sometimes target will be undefined\n  // because different browser or some 3rd party plugin.\n  if (!target) {\n    return;\n  }\n  const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n  patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n  return Object.getOwnPropertyNames(target).filter(name => name.startsWith('on') && name.length > 2).map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n  if (isNode && !isMix) {\n    return;\n  }\n  if (Zone[api.symbol('patchEvents')]) {\n    // events are already been patched by legacy patch.\n    return;\n  }\n  const ignoreProperties = _global['__Zone_ignore_on_properties'];\n  // for browsers that we can patch the descriptor:  Chrome & Firefox\n  let patchTargets = [];\n  if (isBrowser) {\n    const internalWindow = window;\n    patchTargets = patchTargets.concat(['Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement', 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker']);\n    const ignoreErrorProperties = isIE() ? [{\n      target: internalWindow,\n      ignoreProperties: ['error']\n    }] : [];\n    // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n    // so we need to pass WindowPrototype to check onProp exist or not\n    patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n  }\n  patchTargets = patchTargets.concat(['XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest', 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket']);\n  for (let i = 0; i < patchTargets.length; i++) {\n    const target = _global[patchTargets[i]];\n    target && target.prototype && patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n  }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('util', (global, Zone, api) => {\n  // Collect native event names by looking at properties\n  // on the global namespace, e.g. 'onclick'.\n  const eventNames = getOnEventNames(global);\n  api.patchOnProperties = patchOnProperties;\n  api.patchMethod = patchMethod;\n  api.bindArguments = bindArguments;\n  api.patchMacroTask = patchMacroTask;\n  // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n  // define which events will not be patched by `Zone.js`.\n  // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n  // the name consistent with angular repo.\n  // The  `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n  // backwards compatibility.\n  const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n  const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n  if (global[SYMBOL_UNPATCHED_EVENTS]) {\n    global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n  }\n  if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n    Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS];\n  }\n  api.patchEventPrototype = patchEventPrototype;\n  api.patchEventTarget = patchEventTarget;\n  api.isIEOrEdge = isIEOrEdge;\n  api.ObjectDefineProperty = ObjectDefineProperty;\n  api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n  api.ObjectCreate = ObjectCreate;\n  api.ArraySlice = ArraySlice;\n  api.patchClass = patchClass;\n  api.wrapWithCurrentZone = wrapWithCurrentZone;\n  api.filterProperties = filterProperties;\n  api.attachOriginToPatched = attachOriginToPatched;\n  api._redefineProperty = Object.defineProperty;\n  api.patchCallbacks = patchCallbacks;\n  api.getGlobalObjects = () => ({\n    globalSources,\n    zoneSymbolEventNames,\n    eventNames,\n    isBrowser,\n    isMix,\n    isNode,\n    TRUE_STR,\n    FALSE_STR,\n    ZONE_SYMBOL_PREFIX,\n    ADD_EVENT_LISTENER_STR,\n    REMOVE_EVENT_LISTENER_STR\n  });\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n  let setNative = null;\n  let clearNative = null;\n  setName += nameSuffix;\n  cancelName += nameSuffix;\n  const tasksByHandleId = {};\n  function scheduleTask(task) {\n    const data = task.data;\n    data.args[0] = function () {\n      return task.invoke.apply(this, arguments);\n    };\n    data.handleId = setNative.apply(window, data.args);\n    return task;\n  }\n  function clearTask(task) {\n    return clearNative.call(window, task.data.handleId);\n  }\n  setNative = patchMethod(window, setName, delegate => function (self, args) {\n    if (typeof args[0] === 'function') {\n      const options = {\n        isPeriodic: nameSuffix === 'Interval',\n        delay: nameSuffix === 'Timeout' || nameSuffix === 'Interval' ? args[1] || 0 : undefined,\n        args: args\n      };\n      const callback = args[0];\n      args[0] = function timer() {\n        try {\n          return callback.apply(this, arguments);\n        } finally {\n          // issue-934, task will be cancelled\n          // even it is a periodic task such as\n          // setInterval\n          // https://github.com/angular/angular/issues/40387\n          // Cleanup tasksByHandleId should be handled before scheduleTask\n          // Since some zoneSpec may intercept and doesn't trigger\n          // scheduleFn(scheduleTask) provided here.\n          if (!options.isPeriodic) {\n            if (typeof options.handleId === 'number') {\n              // in non-nodejs env, we remove timerId\n              // from local cache\n              delete tasksByHandleId[options.handleId];\n            } else if (options.handleId) {\n              // Node returns complex objects as handleIds\n              // we remove task reference from timer object\n              options.handleId[taskSymbol] = null;\n            }\n          }\n        }\n      };\n      const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n      if (!task) {\n        return task;\n      }\n      // Node.js must additionally support the ref and unref functions.\n      const handle = task.data.handleId;\n      if (typeof handle === 'number') {\n        // for non nodejs env, we save handleId: task\n        // mapping in local cache for clearTimeout\n        tasksByHandleId[handle] = task;\n      } else if (handle) {\n        // for nodejs env, we save task\n        // reference in timerId Object for clearTimeout\n        handle[taskSymbol] = task;\n      }\n      // check whether handle is null, because some polyfill or browser\n      // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n      if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && typeof handle.unref === 'function') {\n        task.ref = handle.ref.bind(handle);\n        task.unref = handle.unref.bind(handle);\n      }\n      if (typeof handle === 'number' || handle) {\n        return handle;\n      }\n      return task;\n    } else {\n      // cause an error by calling it directly.\n      return delegate.apply(window, args);\n    }\n  });\n  clearNative = patchMethod(window, cancelName, delegate => function (self, args) {\n    const id = args[0];\n    let task;\n    if (typeof id === 'number') {\n      // non nodejs env.\n      task = tasksByHandleId[id];\n    } else {\n      // nodejs env.\n      task = id && id[taskSymbol];\n      // other environments.\n      if (!task) {\n        task = id;\n      }\n    }\n    if (task && typeof task.type === 'string') {\n      if (task.state !== 'notScheduled' && (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n        if (typeof id === 'number') {\n          delete tasksByHandleId[id];\n        } else if (id) {\n          id[taskSymbol] = null;\n        }\n        // Do not cancel already canceled functions\n        task.zone.cancelTask(task);\n      }\n    } else {\n      // cause an error by calling it directly.\n      delegate.apply(window, args);\n    }\n  });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCustomElements(_global, api) {\n  const {\n    isBrowser,\n    isMix\n  } = api.getGlobalObjects();\n  if (!isBrowser && !isMix || !_global['customElements'] || !('customElements' in _global)) {\n    return;\n  }\n  const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n  api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n  if (Zone[api.symbol('patchEventTarget')]) {\n    // EventTarget is already patched.\n    return;\n  }\n  const {\n    eventNames,\n    zoneSymbolEventNames,\n    TRUE_STR,\n    FALSE_STR,\n    ZONE_SYMBOL_PREFIX\n  } = api.getGlobalObjects();\n  //  predefine all __zone_symbol__ + eventName + true/false string\n  for (let i = 0; i < eventNames.length; i++) {\n    const eventName = eventNames[i];\n    const falseEventName = eventName + FALSE_STR;\n    const trueEventName = eventName + TRUE_STR;\n    const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n    const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n    zoneSymbolEventNames[eventName] = {};\n    zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n    zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n  }\n  const EVENT_TARGET = _global['EventTarget'];\n  if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n    return;\n  }\n  api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n  return true;\n}\nfunction patchEvent(global, api) {\n  api.patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('legacy', global => {\n  const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n  if (legacyPatch) {\n    legacyPatch();\n  }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n  api.patchMethod(global, 'queueMicrotask', delegate => {\n    return function (self, args) {\n      Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n    };\n  });\n});\nZone.__load_patch('timers', global => {\n  const set = 'set';\n  const clear = 'clear';\n  patchTimer(global, set, clear, 'Timeout');\n  patchTimer(global, set, clear, 'Interval');\n  patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', global => {\n  patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n  patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n  patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n  const blockingMethods = ['alert', 'prompt', 'confirm'];\n  for (let i = 0; i < blockingMethods.length; i++) {\n    const name = blockingMethods[i];\n    patchMethod(global, name, (delegate, symbol, name) => {\n      return function (s, args) {\n        return Zone.current.run(delegate, global, args, name);\n      };\n    });\n  }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n  patchEvent(global, api);\n  eventTargetPatch(global, api);\n  // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n  const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n  if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n    api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n  }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n  patchClass('MutationObserver');\n  patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n  patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n  patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n  propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n  patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n  // Treat XMLHttpRequest as a macrotask.\n  patchXHR(global);\n  const XHR_TASK = zoneSymbol('xhrTask');\n  const XHR_SYNC = zoneSymbol('xhrSync');\n  const XHR_LISTENER = zoneSymbol('xhrListener');\n  const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n  const XHR_URL = zoneSymbol('xhrURL');\n  const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n  function patchXHR(window) {\n    const XMLHttpRequest = window['XMLHttpRequest'];\n    if (!XMLHttpRequest) {\n      // XMLHttpRequest is not available in service worker\n      return;\n    }\n    const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n    function findPendingTask(target) {\n      return target[XHR_TASK];\n    }\n    let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n    let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n    if (!oriAddListener) {\n      const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n      if (XMLHttpRequestEventTarget) {\n        const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n        oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n        oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n      }\n    }\n    const READY_STATE_CHANGE = 'readystatechange';\n    const SCHEDULED = 'scheduled';\n    function scheduleTask(task) {\n      const data = task.data;\n      const target = data.target;\n      target[XHR_SCHEDULED] = false;\n      target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n      // remove existing event listener\n      const listener = target[XHR_LISTENER];\n      if (!oriAddListener) {\n        oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n        oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n      }\n      if (listener) {\n        oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n      }\n      const newListener = target[XHR_LISTENER] = () => {\n        if (target.readyState === target.DONE) {\n          // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n          // readyState=4 multiple times, so we need to check task state here\n          if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n            // check whether the xhr has registered onload listener\n            // if that is the case, the task should invoke after all\n            // onload listeners finish.\n            // Also if the request failed without response (status = 0), the load event handler\n            // will not be triggered, in that case, we should also invoke the placeholder callback\n            // to close the XMLHttpRequest::send macroTask.\n            // https://github.com/angular/angular/issues/38795\n            const loadTasks = target[Zone.__symbol__('loadfalse')];\n            if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n              const oriInvoke = task.invoke;\n              task.invoke = function () {\n                // need to load the tasks again, because in other\n                // load listener, they may remove themselves\n                const loadTasks = target[Zone.__symbol__('loadfalse')];\n                for (let i = 0; i < loadTasks.length; i++) {\n                  if (loadTasks[i] === task) {\n                    loadTasks.splice(i, 1);\n                  }\n                }\n                if (!data.aborted && task.state === SCHEDULED) {\n                  oriInvoke.call(task);\n                }\n              };\n              loadTasks.push(task);\n            } else {\n              task.invoke();\n            }\n          } else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n            // error occurs when xhr.send()\n            target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n          }\n        }\n      };\n      oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n      const storedTask = target[XHR_TASK];\n      if (!storedTask) {\n        target[XHR_TASK] = task;\n      }\n      sendNative.apply(target, data.args);\n      target[XHR_SCHEDULED] = true;\n      return task;\n    }\n    function placeholderCallback() {}\n    function clearTask(task) {\n      const data = task.data;\n      // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n      // to prevent it from firing. So instead, we store info for the event listener.\n      data.aborted = true;\n      return abortNative.apply(data.target, data.args);\n    }\n    const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n      self[XHR_SYNC] = args[2] == false;\n      self[XHR_URL] = args[1];\n      return openNative.apply(self, args);\n    });\n    const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n    const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n    const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n    const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n      if (Zone.current[fetchTaskScheduling] === true) {\n        // a fetch is scheduling, so we are using xhr to polyfill fetch\n        // and because we already schedule macroTask for fetch, we should\n        // not schedule a macroTask for xhr again\n        return sendNative.apply(self, args);\n      }\n      if (self[XHR_SYNC]) {\n        // if the XHR is sync there is no task to schedule, just execute the code.\n        return sendNative.apply(self, args);\n      } else {\n        const options = {\n          target: self,\n          url: self[XHR_URL],\n          isPeriodic: false,\n          args: args,\n          aborted: false\n        };\n        const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n        if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && task.state === SCHEDULED) {\n          // xhr request throw error when send\n          // we should invoke task instead of leaving a scheduled\n          // pending macroTask\n          task.invoke();\n        }\n      }\n    });\n    const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n      const task = findPendingTask(self);\n      if (task && typeof task.type == 'string') {\n        // If the XHR has already completed, do nothing.\n        // If the XHR has already been aborted, do nothing.\n        // Fix #569, call abort multiple times before done will cause\n        // macroTask task count be negative number\n        if (task.cancelFn == null || task.data && task.data.aborted) {\n          return;\n        }\n        task.zone.cancelTask(task);\n      } else if (Zone.current[fetchTaskAborting] === true) {\n        // the abort is called from fetch polyfill, we need to call native abort of XHR.\n        return abortNative.apply(self, args);\n      }\n      // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n      // task\n      // to cancel. Do nothing.\n    });\n  }\n});\n\nZone.__load_patch('geolocation', global => {\n  /// GEO_LOCATION\n  if (global['navigator'] && global['navigator'].geolocation) {\n    patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n  }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n  // handle unhandled promise rejection\n  function findPromiseRejectionHandler(evtName) {\n    return function (e) {\n      const eventTasks = findEventTasks(global, evtName);\n      eventTasks.forEach(eventTask => {\n        // windows has added unhandledrejection event listener\n        // trigger the event listener\n        const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n        if (PromiseRejectionEvent) {\n          const evt = new PromiseRejectionEvent(evtName, {\n            promise: e.promise,\n            reason: e.rejection\n          });\n          eventTask.invoke(evt);\n        }\n      });\n    };\n  }\n  if (global['PromiseRejectionEvent']) {\n    Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = findPromiseRejectionHandler('unhandledrejection');\n    Zone[zoneSymbol('rejectionHandledHandler')] = findPromiseRejectionHandler('rejectionhandled');\n  }\n});","map":null,"metadata":{},"sourceType":"script","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5c6a782d2ebf18d4cdfc030e2621f77f7d479605884c6ca7cf8e9a29cd9812c7.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5c6a782d2ebf18d4cdfc030e2621f77f7d479605884c6ca7cf8e9a29cd9812c7.json
deleted file mode 100644
index 2927706e17bdf2423db4ad6222cfe8db5f5e72b4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5c6a782d2ebf18d4cdfc030e2621f77f7d479605884c6ca7cf8e9a29cd9812c7.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { map } from \"../operators/map\";\nconst {\n  isArray\n} = Array;\nfunction callOrApply(fn, args) {\n  return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n  return map(args => callOrApply(fn, args));\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5c7d3d1108d8b4508e718e9b880ba28e14b6c85ee4de64e15b7419c7bc4538e2.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5c7d3d1108d8b4508e718e9b880ba28e14b6c85ee4de64e15b7419c7bc4538e2.json
deleted file mode 100644
index 2d0a7f477b8ca1c2857eeccb7e2554e35e8fdf5a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5c7d3d1108d8b4508e718e9b880ba28e14b6c85ee4de64e15b7419c7bc4538e2.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/analytics';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/5f4e3e8f7a8814de7a3f735aede869549e48315836ec854806d741d227a564c9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/5f4e3e8f7a8814de7a3f735aede869549e48315836ec854806d741d227a564c9.json
deleted file mode 100644
index 9f98b8608bcc073f1a871a8ffe02354ccdb4b7b7..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/5f4e3e8f7a8814de7a3f735aede869549e48315836ec854806d741d227a564c9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function sequenceEqual(compareTo, comparator = (a, b) => a === b) {\n  return operate((source, subscriber) => {\n    const aState = createState();\n    const bState = createState();\n    const emit = isEqual => {\n      subscriber.next(isEqual);\n      subscriber.complete();\n    };\n    const createSubscriber = (selfState, otherState) => {\n      const sequenceEqualSubscriber = createOperatorSubscriber(subscriber, a => {\n        const {\n          buffer,\n          complete\n        } = otherState;\n        if (buffer.length === 0) {\n          complete ? emit(false) : selfState.buffer.push(a);\n        } else {\n          !comparator(a, buffer.shift()) && emit(false);\n        }\n      }, () => {\n        selfState.complete = true;\n        const {\n          complete,\n          buffer\n        } = otherState;\n        complete && emit(buffer.length === 0);\n        sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe();\n      });\n      return sequenceEqualSubscriber;\n    };\n    source.subscribe(createSubscriber(aState, bState));\n    innerFrom(compareTo).subscribe(createSubscriber(bState, aState));\n  });\n}\nfunction createState() {\n  return {\n    buffer: [],\n    complete: false\n  };\n}\n//# sourceMappingURL=sequenceEqual.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6076c3eef884af7dfb8f36f866ab8b7b54f2e1e69af708f6b89a76250f263d1a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6076c3eef884af7dfb8f36f866ab8b7b54f2e1e69af708f6b89a76250f263d1a.json
deleted file mode 100644
index 59ff531d96a98bd4ffa008f4cc4564a8786e55a5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6076c3eef884af7dfb8f36f866ab8b7b54f2e1e69af708f6b89a76250f263d1a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\n * @license Angular v15.2.3\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, inject, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';\n\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n  constructor() {\n    super(...arguments);\n    this.supportsDOMEvents = true;\n  }\n}\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n  static makeCurrent() {\n    ɵsetRootDomAdapter(new BrowserDomAdapter());\n  }\n  onAndCancel(el, evt, listener) {\n    el.addEventListener(evt, listener, false);\n    // Needed to follow Dart's subscription semantic, until fix of\n    // https://code.google.com/p/dart/issues/detail?id=17406\n    return () => {\n      el.removeEventListener(evt, listener, false);\n    };\n  }\n  dispatchEvent(el, evt) {\n    el.dispatchEvent(evt);\n  }\n  remove(node) {\n    if (node.parentNode) {\n      node.parentNode.removeChild(node);\n    }\n  }\n  createElement(tagName, doc) {\n    doc = doc || this.getDefaultDocument();\n    return doc.createElement(tagName);\n  }\n  createHtmlDocument() {\n    return document.implementation.createHTMLDocument('fakeTitle');\n  }\n  getDefaultDocument() {\n    return document;\n  }\n  isElementNode(node) {\n    return node.nodeType === Node.ELEMENT_NODE;\n  }\n  isShadowRoot(node) {\n    return node instanceof DocumentFragment;\n  }\n  /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n  getGlobalEventTarget(doc, target) {\n    if (target === 'window') {\n      return window;\n    }\n    if (target === 'document') {\n      return doc;\n    }\n    if (target === 'body') {\n      return doc.body;\n    }\n    return null;\n  }\n  getBaseHref(doc) {\n    const href = getBaseElementHref();\n    return href == null ? null : relativePath(href);\n  }\n  resetBaseElement() {\n    baseElement = null;\n  }\n  getUserAgent() {\n    return window.navigator.userAgent;\n  }\n  getCookie(name) {\n    return ɵparseCookieValue(document.cookie, name);\n  }\n}\nlet baseElement = null;\nfunction getBaseElementHref() {\n  baseElement = baseElement || document.querySelector('base');\n  return baseElement ? baseElement.getAttribute('href') : null;\n}\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode;\nfunction relativePath(url) {\n  urlParsingNode = urlParsingNode || document.createElement('a');\n  urlParsingNode.setAttribute('href', url);\n  const pathName = urlParsingNode.pathname;\n  return pathName.charAt(0) === '/' ? pathName : `/${pathName}`;\n}\n\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nconst TRANSITION_ID = /*#__PURE__*/new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n  return () => {\n    // Wait for all application initializers to be completed before removing the styles set by\n    // the server.\n    injector.get(ApplicationInitStatus).donePromise.then(() => {\n      const dom = ɵgetDOM();\n      const styles = document.querySelectorAll(`style[ng-transition=\"${transitionId}\"]`);\n      for (let i = 0; i < styles.length; i++) {\n        dom.remove(styles[i]);\n      }\n    });\n  };\n}\nconst SERVER_TRANSITION_PROVIDERS = [{\n  provide: APP_INITIALIZER,\n  useFactory: appInitializerFactory,\n  deps: [TRANSITION_ID, DOCUMENT, Injector],\n  multi: true\n}];\nclass BrowserGetTestability {\n  addToWindow(registry) {\n    ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n      const testability = registry.findTestabilityInTree(elem, findInAncestors);\n      if (testability == null) {\n        throw new Error('Could not find testability for element.');\n      }\n      return testability;\n    };\n    ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n    ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n    const whenAllStable = (callback /** TODO #9100 */) => {\n      const testabilities = ɵglobal['getAllAngularTestabilities']();\n      let count = testabilities.length;\n      let didWork = false;\n      const decrement = function (didWork_ /** TODO #9100 */) {\n        didWork = didWork || didWork_;\n        count--;\n        if (count == 0) {\n          callback(didWork);\n        }\n      };\n      testabilities.forEach(function (testability /** TODO #9100 */) {\n        testability.whenStable(decrement);\n      });\n    };\n    if (!ɵglobal['frameworkStabilizers']) {\n      ɵglobal['frameworkStabilizers'] = [];\n    }\n    ɵglobal['frameworkStabilizers'].push(whenAllStable);\n  }\n  findTestabilityInTree(registry, elem, findInAncestors) {\n    if (elem == null) {\n      return null;\n    }\n    const t = registry.getTestability(elem);\n    if (t != null) {\n      return t;\n    } else if (!findInAncestors) {\n      return null;\n    }\n    if (ɵgetDOM().isShadowRoot(elem)) {\n      return this.findTestabilityInTree(registry, elem.host, true);\n    }\n    return this.findTestabilityInTree(registry, elem.parentElement, true);\n  }\n}\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nlet BrowserXhr = /*#__PURE__*/(() => {\n  class BrowserXhr {\n    build() {\n      return new XMLHttpRequest();\n    }\n  }\n  BrowserXhr.ɵfac = function BrowserXhr_Factory(t) {\n    return new (t || BrowserXhr)();\n  };\n  BrowserXhr.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: BrowserXhr,\n    factory: BrowserXhr.ɵfac\n  });\n  return BrowserXhr;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nconst EVENT_MANAGER_PLUGINS = /*#__PURE__*/new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nlet EventManager = /*#__PURE__*/(() => {\n  class EventManager {\n    /**\n     * Initializes an instance of the event-manager service.\n     */\n    constructor(plugins, _zone) {\n      this._zone = _zone;\n      this._eventNameToPlugin = new Map();\n      plugins.forEach(plugin => {\n        plugin.manager = this;\n      });\n      this._plugins = plugins.slice().reverse();\n    }\n    /**\n     * Registers a handler for a specific element and event.\n     *\n     * @param element The HTML element to receive event notifications.\n     * @param eventName The name of the event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns  A callback function that can be used to remove the handler.\n     */\n    addEventListener(element, eventName, handler) {\n      const plugin = this._findPluginFor(eventName);\n      return plugin.addEventListener(element, eventName, handler);\n    }\n    /**\n     * Registers a global handler for an event in a target view.\n     *\n     * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n     * @param eventName The name of the event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns A callback function that can be used to remove the handler.\n     * @deprecated No longer being used in Ivy code. To be removed in version 14.\n     */\n    addGlobalEventListener(target, eventName, handler) {\n      const plugin = this._findPluginFor(eventName);\n      return plugin.addGlobalEventListener(target, eventName, handler);\n    }\n    /**\n     * Retrieves the compilation zone in which event listeners are registered.\n     */\n    getZone() {\n      return this._zone;\n    }\n    /** @internal */\n    _findPluginFor(eventName) {\n      const plugin = this._eventNameToPlugin.get(eventName);\n      if (plugin) {\n        return plugin;\n      }\n      const plugins = this._plugins;\n      for (let i = 0; i < plugins.length; i++) {\n        const plugin = plugins[i];\n        if (plugin.supports(eventName)) {\n          this._eventNameToPlugin.set(eventName, plugin);\n          return plugin;\n        }\n      }\n      throw new Error(`No event manager plugin found for event ${eventName}`);\n    }\n  }\n  EventManager.ɵfac = function EventManager_Factory(t) {\n    return new (t || EventManager)(i0.ɵɵinject(EVENT_MANAGER_PLUGINS), i0.ɵɵinject(i0.NgZone));\n  };\n  EventManager.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: EventManager,\n    factory: EventManager.ɵfac\n  });\n  return EventManager;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass EventManagerPlugin {\n  constructor(_doc) {\n    this._doc = _doc;\n  }\n  addGlobalEventListener(element, eventName, handler) {\n    const target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n    if (!target) {\n      throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n    }\n    return this.addEventListener(target, eventName, handler);\n  }\n}\nlet SharedStylesHost = /*#__PURE__*/(() => {\n  class SharedStylesHost {\n    constructor() {\n      this.usageCount = new Map();\n    }\n    addStyles(styles) {\n      for (const style of styles) {\n        const usageCount = this.changeUsageCount(style, 1);\n        if (usageCount === 1) {\n          this.onStyleAdded(style);\n        }\n      }\n    }\n    removeStyles(styles) {\n      for (const style of styles) {\n        const usageCount = this.changeUsageCount(style, -1);\n        if (usageCount === 0) {\n          this.onStyleRemoved(style);\n        }\n      }\n    }\n    onStyleRemoved(style) {}\n    onStyleAdded(style) {}\n    getAllStyles() {\n      return this.usageCount.keys();\n    }\n    changeUsageCount(style, delta) {\n      const map = this.usageCount;\n      let usage = map.get(style) ?? 0;\n      usage += delta;\n      if (usage > 0) {\n        map.set(style, usage);\n      } else {\n        map.delete(style);\n      }\n      return usage;\n    }\n    ngOnDestroy() {\n      for (const style of this.getAllStyles()) {\n        this.onStyleRemoved(style);\n      }\n      this.usageCount.clear();\n    }\n  }\n  SharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) {\n    return new (t || SharedStylesHost)();\n  };\n  SharedStylesHost.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: SharedStylesHost,\n    factory: SharedStylesHost.ɵfac\n  });\n  return SharedStylesHost;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet DomSharedStylesHost = /*#__PURE__*/(() => {\n  class DomSharedStylesHost extends SharedStylesHost {\n    constructor(doc) {\n      super();\n      this.doc = doc;\n      // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n      this.styleRef = new Map();\n      this.hostNodes = new Set();\n      this.resetHostNodes();\n    }\n    onStyleAdded(style) {\n      for (const host of this.hostNodes) {\n        this.addStyleToHost(host, style);\n      }\n    }\n    onStyleRemoved(style) {\n      const styleRef = this.styleRef;\n      const styleElements = styleRef.get(style);\n      styleElements?.forEach(e => e.remove());\n      styleRef.delete(style);\n    }\n    ngOnDestroy() {\n      super.ngOnDestroy();\n      this.styleRef.clear();\n      this.resetHostNodes();\n    }\n    addHost(hostNode) {\n      this.hostNodes.add(hostNode);\n      for (const style of this.getAllStyles()) {\n        this.addStyleToHost(hostNode, style);\n      }\n    }\n    removeHost(hostNode) {\n      this.hostNodes.delete(hostNode);\n    }\n    addStyleToHost(host, style) {\n      const styleEl = this.doc.createElement('style');\n      styleEl.textContent = style;\n      host.appendChild(styleEl);\n      const styleElRef = this.styleRef.get(style);\n      if (styleElRef) {\n        styleElRef.push(styleEl);\n      } else {\n        this.styleRef.set(style, [styleEl]);\n      }\n    }\n    resetHostNodes() {\n      const hostNodes = this.hostNodes;\n      hostNodes.clear();\n      // Re-add the head element back since this is the default host.\n      hostNodes.add(this.doc.head);\n    }\n  }\n  DomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) {\n    return new (t || DomSharedStylesHost)(i0.ɵɵinject(DOCUMENT));\n  };\n  DomSharedStylesHost.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DomSharedStylesHost,\n    factory: DomSharedStylesHost.ɵfac\n  });\n  return DomSharedStylesHost;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NAMESPACE_URIS = {\n  'svg': 'http://www.w3.org/2000/svg',\n  'xhtml': 'http://www.w3.org/1999/xhtml',\n  'xlink': 'http://www.w3.org/1999/xlink',\n  'xml': 'http://www.w3.org/XML/1998/namespace',\n  'xmlns': 'http://www.w3.org/2000/xmlns/',\n  'math': 'http://www.w3.org/1998/MathML/'\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = false;\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `false`. This will be changed in the next major version.\n * @publicApi\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY = /*#__PURE__*/new InjectionToken('RemoveStylesOnCompDestory', {\n  providedIn: 'root',\n  factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT\n});\nfunction shimContentAttribute(componentShortId) {\n  return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n  return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles) {\n  // Cannot use `Infinity` as depth as `infinity` is not a number literal in TypeScript.\n  // See: https://github.com/microsoft/TypeScript/issues/32277\n  return styles.flat(100).map(s => s.replace(COMPONENT_REGEX, compId));\n}\nfunction decoratePreventDefault(eventHandler) {\n  // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n  // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n  // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n  // the listener (see below).\n  return event => {\n    // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n    // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n    // can inspect the listener toString contents for the existence of this special token. Because\n    // the token is a string literal, it is ensured to not be modified by compiled code.\n    if (event === '__ngUnwrap__') {\n      return eventHandler;\n    }\n    const allowDefaultBehavior = eventHandler(event);\n    if (allowDefaultBehavior === false) {\n      // TODO(tbosch): move preventDefault into event plugins...\n      event.preventDefault();\n      event.returnValue = false;\n    }\n    return undefined;\n  };\n}\nlet DomRendererFactory2 = /*#__PURE__*/(() => {\n  class DomRendererFactory2 {\n    constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestory) {\n      this.eventManager = eventManager;\n      this.sharedStylesHost = sharedStylesHost;\n      this.appId = appId;\n      this.removeStylesOnCompDestory = removeStylesOnCompDestory;\n      this.rendererByCompId = new Map();\n      this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n    }\n    createRenderer(element, type) {\n      if (!element || !type) {\n        return this.defaultRenderer;\n      }\n      const renderer = this.getOrCreateRenderer(element, type);\n      // Renderers have different logic due to different encapsulation behaviours.\n      // Ex: for emulated, an attribute is added to the element.\n      if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n        renderer.applyToHost(element);\n      } else if (renderer instanceof NoneEncapsulationDomRenderer) {\n        renderer.applyStyles();\n      }\n      return renderer;\n    }\n    getOrCreateRenderer(element, type) {\n      const rendererByCompId = this.rendererByCompId;\n      let renderer = rendererByCompId.get(type.id);\n      if (!renderer) {\n        const eventManager = this.eventManager;\n        const sharedStylesHost = this.sharedStylesHost;\n        const removeStylesOnCompDestory = this.removeStylesOnCompDestory;\n        switch (type.encapsulation) {\n          case ViewEncapsulation.Emulated:\n            renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestory);\n            break;\n          case ViewEncapsulation.ShadowDom:\n            return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type);\n          default:\n            renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestory);\n            break;\n        }\n        renderer.onDestroy = () => rendererByCompId.delete(type.id);\n        rendererByCompId.set(type.id, renderer);\n      }\n      return renderer;\n    }\n    ngOnDestroy() {\n      this.rendererByCompId.clear();\n    }\n    begin() {}\n    end() {}\n  }\n  DomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) {\n    return new (t || DomRendererFactory2)(i0.ɵɵinject(EventManager), i0.ɵɵinject(DomSharedStylesHost), i0.ɵɵinject(APP_ID), i0.ɵɵinject(REMOVE_STYLES_ON_COMPONENT_DESTROY));\n  };\n  DomRendererFactory2.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DomRendererFactory2,\n    factory: DomRendererFactory2.ɵfac\n  });\n  return DomRendererFactory2;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass DefaultDomRenderer2 {\n  constructor(eventManager) {\n    this.eventManager = eventManager;\n    this.data = Object.create(null);\n    this.destroyNode = null;\n  }\n  destroy() {}\n  createElement(name, namespace) {\n    if (namespace) {\n      // TODO: `|| namespace` was added in\n      // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n      // support how Ivy passed around the namespace URI rather than short name at the time. It did\n      // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n      // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n      // namespaces should be and make it consistent.\n      // Related issues:\n      // https://github.com/angular/angular/issues/44028\n      // https://github.com/angular/angular/issues/44883\n      return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n    }\n    return document.createElement(name);\n  }\n  createComment(value) {\n    return document.createComment(value);\n  }\n  createText(value) {\n    return document.createTextNode(value);\n  }\n  appendChild(parent, newChild) {\n    const targetParent = isTemplateNode(parent) ? parent.content : parent;\n    targetParent.appendChild(newChild);\n  }\n  insertBefore(parent, newChild, refChild) {\n    if (parent) {\n      const targetParent = isTemplateNode(parent) ? parent.content : parent;\n      targetParent.insertBefore(newChild, refChild);\n    }\n  }\n  removeChild(parent, oldChild) {\n    if (parent) {\n      parent.removeChild(oldChild);\n    }\n  }\n  selectRootElement(selectorOrNode, preserveContent) {\n    let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) : selectorOrNode;\n    if (!el) {\n      throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n    }\n    if (!preserveContent) {\n      el.textContent = '';\n    }\n    return el;\n  }\n  parentNode(node) {\n    return node.parentNode;\n  }\n  nextSibling(node) {\n    return node.nextSibling;\n  }\n  setAttribute(el, name, value, namespace) {\n    if (namespace) {\n      name = namespace + ':' + name;\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.setAttributeNS(namespaceUri, name, value);\n      } else {\n        el.setAttribute(name, value);\n      }\n    } else {\n      el.setAttribute(name, value);\n    }\n  }\n  removeAttribute(el, name, namespace) {\n    if (namespace) {\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.removeAttributeNS(namespaceUri, name);\n      } else {\n        el.removeAttribute(`${namespace}:${name}`);\n      }\n    } else {\n      el.removeAttribute(name);\n    }\n  }\n  addClass(el, name) {\n    el.classList.add(name);\n  }\n  removeClass(el, name) {\n    el.classList.remove(name);\n  }\n  setStyle(el, style, value, flags) {\n    if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n      el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n    } else {\n      el.style[style] = value;\n    }\n  }\n  removeStyle(el, style, flags) {\n    if (flags & RendererStyleFlags2.DashCase) {\n      el.style.removeProperty(style);\n    } else {\n      // IE requires '' instead of null\n      // see https://github.com/angular/angular/issues/7916\n      el.style[style] = '';\n    }\n  }\n  setProperty(el, name, value) {\n    NG_DEV_MODE$1 && checkNoSyntheticProp(name, 'property');\n    el[name] = value;\n  }\n  setValue(node, value) {\n    node.nodeValue = value;\n  }\n  listen(target, event, callback) {\n    NG_DEV_MODE$1 && checkNoSyntheticProp(event, 'listener');\n    if (typeof target === 'string') {\n      return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n    }\n    return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n  }\n}\nconst AT_CHARCODE = /*#__PURE__*/(() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n  if (name.charCodeAt(0) === AT_CHARCODE) {\n    throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n  - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n  - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n  }\n}\nfunction isTemplateNode(node) {\n  return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n  constructor(eventManager, sharedStylesHost, hostEl, component) {\n    super(eventManager);\n    this.sharedStylesHost = sharedStylesHost;\n    this.hostEl = hostEl;\n    this.shadowRoot = hostEl.attachShadow({\n      mode: 'open'\n    });\n    this.sharedStylesHost.addHost(this.shadowRoot);\n    const styles = flattenStyles(component.id, component.styles);\n    for (const style of styles) {\n      const styleEl = document.createElement('style');\n      styleEl.textContent = style;\n      this.shadowRoot.appendChild(styleEl);\n    }\n  }\n  nodeOrShadowRoot(node) {\n    return node === this.hostEl ? this.shadowRoot : node;\n  }\n  appendChild(parent, newChild) {\n    return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n  }\n  insertBefore(parent, newChild, refChild) {\n    return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n  }\n  removeChild(parent, oldChild) {\n    return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n  }\n  parentNode(node) {\n    return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n  }\n  destroy() {\n    this.sharedStylesHost.removeHost(this.shadowRoot);\n  }\n}\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n  constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId = component.id) {\n    super(eventManager);\n    this.sharedStylesHost = sharedStylesHost;\n    this.removeStylesOnCompDestory = removeStylesOnCompDestory;\n    this.rendererUsageCount = 0;\n    this.styles = flattenStyles(compId, component.styles);\n  }\n  applyStyles() {\n    this.sharedStylesHost.addStyles(this.styles);\n    this.rendererUsageCount++;\n  }\n  destroy() {\n    if (!this.removeStylesOnCompDestory) {\n      return;\n    }\n    this.sharedStylesHost.removeStyles(this.styles);\n    this.rendererUsageCount--;\n    if (this.rendererUsageCount === 0) {\n      this.onDestroy?.();\n    }\n  }\n}\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n  constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestory) {\n    const compId = appId + '-' + component.id;\n    super(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId);\n    this.contentAttr = shimContentAttribute(compId);\n    this.hostAttr = shimHostAttribute(compId);\n  }\n  applyToHost(element) {\n    this.applyStyles();\n    this.setAttribute(element, this.hostAttr, '');\n  }\n  createElement(parent, name) {\n    const el = super.createElement(parent, name);\n    super.setAttribute(el, this.contentAttr, '');\n    return el;\n  }\n}\nlet DomEventsPlugin = /*#__PURE__*/(() => {\n  class DomEventsPlugin extends EventManagerPlugin {\n    constructor(doc) {\n      super(doc);\n    }\n    // This plugin should come last in the list of plugins, because it accepts all\n    // events.\n    supports(eventName) {\n      return true;\n    }\n    addEventListener(element, eventName, handler) {\n      element.addEventListener(eventName, handler, false);\n      return () => this.removeEventListener(element, eventName, handler);\n    }\n    removeEventListener(target, eventName, callback) {\n      return target.removeEventListener(eventName, callback);\n    }\n  }\n  DomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) {\n    return new (t || DomEventsPlugin)(i0.ɵɵinject(DOCUMENT));\n  };\n  DomEventsPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DomEventsPlugin,\n    factory: DomEventsPlugin.ɵfac\n  });\n  return DomEventsPlugin;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap = {\n  '\\b': 'Backspace',\n  '\\t': 'Tab',\n  '\\x7F': 'Delete',\n  '\\x1B': 'Escape',\n  'Del': 'Delete',\n  'Esc': 'Escape',\n  'Left': 'ArrowLeft',\n  'Right': 'ArrowRight',\n  'Up': 'ArrowUp',\n  'Down': 'ArrowDown',\n  'Menu': 'ContextMenu',\n  'Scroll': 'ScrollLock',\n  'Win': 'OS'\n};\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n  'alt': event => event.altKey,\n  'control': event => event.ctrlKey,\n  'meta': event => event.metaKey,\n  'shift': event => event.shiftKey\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nlet KeyEventsPlugin = /*#__PURE__*/(() => {\n  class KeyEventsPlugin extends EventManagerPlugin {\n    /**\n     * Initializes an instance of the browser plug-in.\n     * @param doc The document in which key events will be detected.\n     */\n    constructor(doc) {\n      super(doc);\n    }\n    /**\n     * Reports whether a named key event is supported.\n     * @param eventName The event name to query.\n     * @return True if the named key event is supported.\n     */\n    supports(eventName) {\n      return KeyEventsPlugin.parseEventName(eventName) != null;\n    }\n    /**\n     * Registers a handler for a specific element and key event.\n     * @param element The HTML element to receive event notifications.\n     * @param eventName The name of the key event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns The key event that was registered.\n     */\n    addEventListener(element, eventName, handler) {\n      const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n      const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n      return this.manager.getZone().runOutsideAngular(() => {\n        return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n      });\n    }\n    /**\n     * Parses the user provided full keyboard event definition and normalizes it for\n     * later internal use. It ensures the string is all lowercase, converts special\n     * characters to a standard spelling, and orders all the values consistently.\n     *\n     * @param eventName The name of the key event to listen for.\n     * @returns an object with the full, normalized string, and the dom event name\n     * or null in the case when the event doesn't match a keyboard event.\n     */\n    static parseEventName(eventName) {\n      const parts = eventName.toLowerCase().split('.');\n      const domEventName = parts.shift();\n      if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n        return null;\n      }\n      const key = KeyEventsPlugin._normalizeKey(parts.pop());\n      let fullKey = '';\n      let codeIX = parts.indexOf('code');\n      if (codeIX > -1) {\n        parts.splice(codeIX, 1);\n        fullKey = 'code.';\n      }\n      MODIFIER_KEYS.forEach(modifierName => {\n        const index = parts.indexOf(modifierName);\n        if (index > -1) {\n          parts.splice(index, 1);\n          fullKey += modifierName + '.';\n        }\n      });\n      fullKey += key;\n      if (parts.length != 0 || key.length === 0) {\n        // returning null instead of throwing to let another plugin process the event\n        return null;\n      }\n      // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n      //       The code must remain in the `result['domEventName']` form.\n      // return {domEventName, fullKey};\n      const result = {};\n      result['domEventName'] = domEventName;\n      result['fullKey'] = fullKey;\n      return result;\n    }\n    /**\n     * Determines whether the actual keys pressed match the configured key code string.\n     * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n     * event is attached to the DOM during the `addEventListener` call. This is unseen\n     * by the end user and is normalized for internal consistency and parsing.\n     *\n     * @param event The keyboard event.\n     * @param fullKeyCode The normalized user defined expected key event string\n     * @returns boolean.\n     */\n    static matchEventFullKeyCode(event, fullKeyCode) {\n      let keycode = _keyMap[event.key] || event.key;\n      let key = '';\n      if (fullKeyCode.indexOf('code.') > -1) {\n        keycode = event.code;\n        key = 'code.';\n      }\n      // the keycode could be unidentified so we have to check here\n      if (keycode == null || !keycode) return false;\n      keycode = keycode.toLowerCase();\n      if (keycode === ' ') {\n        keycode = 'space'; // for readability\n      } else if (keycode === '.') {\n        keycode = 'dot'; // because '.' is used as a separator in event names\n      }\n\n      MODIFIER_KEYS.forEach(modifierName => {\n        if (modifierName !== keycode) {\n          const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n          if (modifierGetter(event)) {\n            key += modifierName + '.';\n          }\n        }\n      });\n      key += keycode;\n      return key === fullKeyCode;\n    }\n    /**\n     * Configures a handler callback for a key event.\n     * @param fullKey The event name that combines all simultaneous keystrokes.\n     * @param handler The function that responds to the key event.\n     * @param zone The zone in which the event occurred.\n     * @returns A callback function.\n     */\n    static eventCallback(fullKey, handler, zone) {\n      return event => {\n        if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n          zone.runGuarded(() => handler(event));\n        }\n      };\n    }\n    /** @internal */\n    static _normalizeKey(keyName) {\n      // TODO: switch to a Map if the mapping grows too much\n      switch (keyName) {\n        case 'esc':\n          return 'escape';\n        default:\n          return keyName;\n      }\n    }\n  }\n  KeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) {\n    return new (t || KeyEventsPlugin)(i0.ɵɵinject(DOCUMENT));\n  };\n  KeyEventsPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: KeyEventsPlugin,\n    factory: KeyEventsPlugin.ɵfac\n  });\n  return KeyEventsPlugin;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```typescript\n * @Component({\n *   standalone: true,\n *   template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n *   ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     importProvidersFrom(SomeNgModule)\n *   ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n *     additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction bootstrapApplication(rootComponent, options) {\n  return ɵinternalCreateApplication({\n    rootComponent,\n    ...createProvidersConfig(options)\n  });\n}\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n *     additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction createApplication(options) {\n  return ɵinternalCreateApplication(createProvidersConfig(options));\n}\nfunction createProvidersConfig(options) {\n  return {\n    appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])],\n    platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS\n  };\n}\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n *     available for testing using Protractor.\n *\n * @publicApi\n */\nfunction provideProtractorTestingSupport() {\n  // Return a copy to prevent changes to the original array in case any in-place\n  // alterations are performed to the `provideProtractorTestingSupport` call results in app code.\n  return [...TESTABILITY_PROVIDERS];\n}\nfunction initDomAdapter() {\n  BrowserDomAdapter.makeCurrent();\n}\nfunction errorHandler() {\n  return new ErrorHandler();\n}\nfunction _document() {\n  // Tell ivy about the global document\n  ɵsetDocument(document);\n  return document;\n}\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{\n  provide: PLATFORM_ID,\n  useValue: ɵPLATFORM_BROWSER_ID\n}, {\n  provide: PLATFORM_INITIALIZER,\n  useValue: initDomAdapter,\n  multi: true\n}, {\n  provide: DOCUMENT,\n  useFactory: _document,\n  deps: []\n}];\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nconst platformBrowser = /*#__PURE__*/createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = /*#__PURE__*/new InjectionToken(NG_DEV_MODE ? 'BrowserModule Providers Marker' : '');\nconst TESTABILITY_PROVIDERS = [{\n  provide: ɵTESTABILITY_GETTER,\n  useClass: BrowserGetTestability,\n  deps: []\n}, {\n  provide: ɵTESTABILITY,\n  useClass: Testability,\n  deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n}, {\n  provide: Testability,\n  useClass: Testability,\n  deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n}];\nconst BROWSER_MODULE_PROVIDERS = [{\n  provide: ɵINJECTOR_SCOPE,\n  useValue: 'root'\n}, {\n  provide: ErrorHandler,\n  useFactory: errorHandler,\n  deps: []\n}, {\n  provide: EVENT_MANAGER_PLUGINS,\n  useClass: DomEventsPlugin,\n  multi: true,\n  deps: [DOCUMENT, NgZone, PLATFORM_ID]\n}, {\n  provide: EVENT_MANAGER_PLUGINS,\n  useClass: KeyEventsPlugin,\n  multi: true,\n  deps: [DOCUMENT]\n}, {\n  provide: DomRendererFactory2,\n  useClass: DomRendererFactory2,\n  deps: [EventManager, DomSharedStylesHost, APP_ID, REMOVE_STYLES_ON_COMPONENT_DESTROY]\n}, {\n  provide: RendererFactory2,\n  useExisting: DomRendererFactory2\n}, {\n  provide: SharedStylesHost,\n  useExisting: DomSharedStylesHost\n}, {\n  provide: DomSharedStylesHost,\n  useClass: DomSharedStylesHost,\n  deps: [DOCUMENT]\n}, {\n  provide: EventManager,\n  useClass: EventManager,\n  deps: [EVENT_MANAGER_PLUGINS, NgZone]\n}, {\n  provide: XhrFactory,\n  useClass: BrowserXhr,\n  deps: []\n}, NG_DEV_MODE ? {\n  provide: BROWSER_MODULE_PROVIDERS_MARKER,\n  useValue: true\n} : []];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nlet BrowserModule = /*#__PURE__*/(() => {\n  class BrowserModule {\n    constructor(providersAlreadyPresent) {\n      if (NG_DEV_MODE && providersAlreadyPresent) {\n        throw new Error(`Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` + `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`);\n      }\n    }\n    /**\n     * Configures a browser-based app to transition from a server-rendered app, if\n     * one is present on the page.\n     *\n     * @param params An object containing an identifier for the app to transition.\n     * The ID must match between the client and server versions of the app.\n     * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n     */\n    static withServerTransition(params) {\n      return {\n        ngModule: BrowserModule,\n        providers: [{\n          provide: APP_ID,\n          useValue: params.appId\n        }, {\n          provide: TRANSITION_ID,\n          useExisting: APP_ID\n        }, SERVER_TRANSITION_PROVIDERS]\n      };\n    }\n  }\n  BrowserModule.ɵfac = function BrowserModule_Factory(t) {\n    return new (t || BrowserModule)(i0.ɵɵinject(BROWSER_MODULE_PROVIDERS_MARKER, 12));\n  };\n  BrowserModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: BrowserModule\n  });\n  BrowserModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],\n    imports: [CommonModule, ApplicationModule]\n  });\n  return BrowserModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\nfunction createMeta() {\n  return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\nlet Meta = /*#__PURE__*/(() => {\n  class Meta {\n    constructor(_doc) {\n      this._doc = _doc;\n      this._dom = ɵgetDOM();\n    }\n    /**\n     * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * If an existing element is found, it is returned and is not modified in any way.\n     * @param tag The definition of a `<meta>` element to match or create.\n     * @param forceCreation True to create a new element without checking whether one already exists.\n     * @returns The existing element with the same attributes and values if found,\n     * the new element if no match is found, or `null` if the tag parameter is not defined.\n     */\n    addTag(tag, forceCreation = false) {\n      if (!tag) return null;\n      return this._getOrCreateElement(tag, forceCreation);\n    }\n    /**\n     * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * @param tags An array of tag definitions to match or create.\n     * @param forceCreation True to create new elements without checking whether they already exist.\n     * @returns The matching elements if found, or the new elements.\n     */\n    addTags(tags, forceCreation = false) {\n      if (!tags) return [];\n      return tags.reduce((result, tag) => {\n        if (tag) {\n          result.push(this._getOrCreateElement(tag, forceCreation));\n        }\n        return result;\n      }, []);\n    }\n    /**\n     * Retrieves a `<meta>` tag element in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching element, if any.\n     */\n    getTag(attrSelector) {\n      if (!attrSelector) return null;\n      return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n    }\n    /**\n     * Retrieves a set of `<meta>` tag elements in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching elements, if any.\n     */\n    getTags(attrSelector) {\n      if (!attrSelector) return [];\n      const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n      return list ? [].slice.call(list) : [];\n    }\n    /**\n     * Modifies an existing `<meta>` tag element in the current HTML document.\n     * @param tag The tag description with which to replace the existing tag content.\n     * @param selector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n     * replacement tag.\n     * @return The modified element.\n     */\n    updateTag(tag, selector) {\n      if (!tag) return null;\n      selector = selector || this._parseSelector(tag);\n      const meta = this.getTag(selector);\n      if (meta) {\n        return this._setMetaElementAttributes(tag, meta);\n      }\n      return this._getOrCreateElement(tag, true);\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param attrSelector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     */\n    removeTag(attrSelector) {\n      this.removeTagElement(this.getTag(attrSelector));\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param meta The tag definition to match against to identify an existing tag.\n     */\n    removeTagElement(meta) {\n      if (meta) {\n        this._dom.remove(meta);\n      }\n    }\n    _getOrCreateElement(meta, forceCreation = false) {\n      if (!forceCreation) {\n        const selector = this._parseSelector(meta);\n        // It's allowed to have multiple elements with the same name so it's not enough to\n        // just check that element with the same name already present on the page. We also need to\n        // check if element has tag attributes\n        const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0];\n        if (elem !== undefined) return elem;\n      }\n      const element = this._dom.createElement('meta');\n      this._setMetaElementAttributes(meta, element);\n      const head = this._doc.getElementsByTagName('head')[0];\n      head.appendChild(element);\n      return element;\n    }\n    _setMetaElementAttributes(tag, el) {\n      Object.keys(tag).forEach(prop => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n      return el;\n    }\n    _parseSelector(tag) {\n      const attr = tag.name ? 'name' : 'property';\n      return `${attr}=\"${tag[attr]}\"`;\n    }\n    _containsAttributes(tag, elem) {\n      return Object.keys(tag).every(key => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n    }\n    _getMetaKeyMap(prop) {\n      return META_KEYS_MAP[prop] || prop;\n    }\n  }\n  Meta.ɵfac = function Meta_Factory(t) {\n    return new (t || Meta)(i0.ɵɵinject(DOCUMENT));\n  };\n  Meta.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: Meta,\n    factory: function Meta_Factory(t) {\n      let r = null;\n      if (t) {\n        r = new t();\n      } else {\n        r = createMeta();\n      }\n      return r;\n    },\n    providedIn: 'root'\n  });\n  return Meta;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP = {\n  httpEquiv: 'http-equiv'\n};\n\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n  return new Title(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nlet Title = /*#__PURE__*/(() => {\n  class Title {\n    constructor(_doc) {\n      this._doc = _doc;\n    }\n    /**\n     * Get the title of the current HTML document.\n     */\n    getTitle() {\n      return this._doc.title;\n    }\n    /**\n     * Set the title of the current HTML document.\n     * @param newTitle\n     */\n    setTitle(newTitle) {\n      this._doc.title = newTitle || '';\n    }\n  }\n  Title.ɵfac = function Title_Factory(t) {\n    return new (t || Title)(i0.ɵɵinject(DOCUMENT));\n  };\n  Title.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: Title,\n    factory: function Title_Factory(t) {\n      let r = null;\n      if (t) {\n        r = new t();\n      } else {\n        r = createTitle();\n      }\n      return r;\n    },\n    providedIn: 'root'\n  });\n  return Title;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n  if (typeof COMPILED === 'undefined' || !COMPILED) {\n    // Note: we can't export `ng` when using closure enhanced optimization as:\n    // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n    // - we can't declare a closure extern as the namespace `ng` is already used within Google\n    //   for typings for angularJS (via `goog.provide('ng....')`).\n    const ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n    ng[name] = value;\n  }\n}\nconst win = typeof window !== 'undefined' && window || {};\nclass ChangeDetectionPerfRecord {\n  constructor(msPerTick, numTicks) {\n    this.msPerTick = msPerTick;\n    this.numTicks = numTicks;\n  }\n}\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nclass AngularProfiler {\n  constructor(ref) {\n    this.appRef = ref.injector.get(ApplicationRef);\n  }\n  // tslint:disable:no-console\n  /**\n   * Exercises change detection in a loop and then prints the average amount of\n   * time in milliseconds how long a single round of change detection takes for\n   * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n   * of 500 milliseconds.\n   *\n   * Optionally, a user may pass a `config` parameter containing a map of\n   * options. Supported options are:\n   *\n   * `record` (boolean) - causes the profiler to record a CPU profile while\n   * it exercises the change detector. Example:\n   *\n   * ```\n   * ng.profiler.timeChangeDetection({record: true})\n   * ```\n   */\n  timeChangeDetection(config) {\n    const record = config && config['record'];\n    const profileName = 'Change Detection';\n    // Profiler is not available in Android browsers without dev tools opened\n    const isProfilerAvailable = win.console.profile != null;\n    if (record && isProfilerAvailable) {\n      win.console.profile(profileName);\n    }\n    const start = performanceNow();\n    let numTicks = 0;\n    while (numTicks < 5 || performanceNow() - start < 500) {\n      this.appRef.tick();\n      numTicks++;\n    }\n    const end = performanceNow();\n    if (record && isProfilerAvailable) {\n      win.console.profileEnd(profileName);\n    }\n    const msPerTick = (end - start) / numTicks;\n    win.console.log(`ran ${numTicks} change detection cycles`);\n    win.console.log(`${msPerTick.toFixed(2)} ms per check`);\n    return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n  }\n}\nfunction performanceNow() {\n  return win.performance && win.performance.now ? win.performance.now() : new Date().getTime();\n}\nconst PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n *    then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n  exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n  return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n  exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\nfunction escapeHtml(text) {\n  const escapedText = {\n    '&': '&a;',\n    '\"': '&q;',\n    '\\'': '&s;',\n    '<': '&l;',\n    '>': '&g;'\n  };\n  return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\nfunction unescapeHtml(text) {\n  const unescapedText = {\n    '&a;': '&',\n    '&q;': '\"',\n    '&s;': '\\'',\n    '&l;': '<',\n    '&g;': '>'\n  };\n  return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n  return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nlet TransferState = /*#__PURE__*/(() => {\n  class TransferState {\n    constructor() {\n      this.store = {};\n      this.onSerializeCallbacks = {};\n      this.store = retrieveTransferredState(inject(DOCUMENT), inject(APP_ID));\n    }\n    /**\n     * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n     */\n    get(key, defaultValue) {\n      return this.store[key] !== undefined ? this.store[key] : defaultValue;\n    }\n    /**\n     * Set the value corresponding to a key.\n     */\n    set(key, value) {\n      this.store[key] = value;\n    }\n    /**\n     * Remove a key from the store.\n     */\n    remove(key) {\n      delete this.store[key];\n    }\n    /**\n     * Test whether a key exists in the store.\n     */\n    hasKey(key) {\n      return this.store.hasOwnProperty(key);\n    }\n    /**\n     * Indicates whether the state is empty.\n     */\n    get isEmpty() {\n      return Object.keys(this.store).length === 0;\n    }\n    /**\n     * Register a callback to provide the value for a key when `toJson` is called.\n     */\n    onSerialize(key, callback) {\n      this.onSerializeCallbacks[key] = callback;\n    }\n    /**\n     * Serialize the current state of the store to JSON.\n     */\n    toJson() {\n      // Call the onSerialize callbacks and put those values into the store.\n      for (const key in this.onSerializeCallbacks) {\n        if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n          try {\n            this.store[key] = this.onSerializeCallbacks[key]();\n          } catch (e) {\n            console.warn('Exception in onSerialize callback: ', e);\n          }\n        }\n      }\n      return JSON.stringify(this.store);\n    }\n  }\n  TransferState.ɵfac = function TransferState_Factory(t) {\n    return new (t || TransferState)();\n  };\n  TransferState.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: TransferState,\n    factory: TransferState.ɵfac,\n    providedIn: 'root'\n  });\n  return TransferState;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction retrieveTransferredState(doc, appId) {\n  // Locate the script tag with the JSON data transferred from the server.\n  // The id of the script tag is set to the Angular appId + 'state'.\n  const script = doc.getElementById(appId + '-state');\n  let initialState = {};\n  if (script && script.textContent) {\n    try {\n      // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n      initialState = JSON.parse(unescapeHtml(script.textContent));\n    } catch (e) {\n      console.warn('Exception while restoring TransferState for app ' + appId, e);\n    }\n  }\n  return initialState;\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n * @deprecated no longer needed, you can inject the `TransferState` in an app without providing\n *     this module.\n */\nlet BrowserTransferStateModule = /*#__PURE__*/(() => {\n  class BrowserTransferStateModule {}\n  BrowserTransferStateModule.ɵfac = function BrowserTransferStateModule_Factory(t) {\n    return new (t || BrowserTransferStateModule)();\n  };\n  BrowserTransferStateModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: BrowserTransferStateModule\n  });\n  BrowserTransferStateModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n  return BrowserTransferStateModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nclass By {\n  /**\n   * Match all nodes.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n   */\n  static all() {\n    return () => true;\n  }\n  /**\n   * Match elements by the given CSS selector.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n   */\n  static css(selector) {\n    return debugElement => {\n      return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false;\n    };\n  }\n  /**\n   * Match nodes that have the given directive present.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n   */\n  static directive(type) {\n    return debugNode => debugNode.providerTokens.indexOf(type) !== -1;\n  }\n}\nfunction elementMatches(n, selector) {\n  if (ɵgetDOM().isElementNode(n)) {\n    return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n  }\n  return false;\n}\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n  // pan\n  'pan': true,\n  'panstart': true,\n  'panmove': true,\n  'panend': true,\n  'pancancel': true,\n  'panleft': true,\n  'panright': true,\n  'panup': true,\n  'pandown': true,\n  // pinch\n  'pinch': true,\n  'pinchstart': true,\n  'pinchmove': true,\n  'pinchend': true,\n  'pinchcancel': true,\n  'pinchin': true,\n  'pinchout': true,\n  // press\n  'press': true,\n  'pressup': true,\n  // rotate\n  'rotate': true,\n  'rotatestart': true,\n  'rotatemove': true,\n  'rotateend': true,\n  'rotatecancel': true,\n  // swipe\n  'swipe': true,\n  'swipeleft': true,\n  'swiperight': true,\n  'swipeup': true,\n  'swipedown': true,\n  // tap\n  'tap': true,\n  'doubletap': true\n};\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nconst HAMMER_GESTURE_CONFIG = /*#__PURE__*/new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nconst HAMMER_LOADER = /*#__PURE__*/new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nlet HammerGestureConfig = /*#__PURE__*/(() => {\n  class HammerGestureConfig {\n    constructor() {\n      /**\n       * A set of supported event names for gestures to be used in Angular.\n       * Angular supports all built-in recognizers, as listed in\n       * [HammerJS documentation](https://hammerjs.github.io/).\n       */\n      this.events = [];\n      /**\n       * Maps gesture event names to a set of configuration options\n       * that specify overrides to the default values for specific properties.\n       *\n       * The key is a supported event name to be configured,\n       * and the options object contains a set of properties, with override values\n       * to be applied to the named recognizer event.\n       * For example, to disable recognition of the rotate event, specify\n       *  `{\"rotate\": {\"enable\": false}}`.\n       *\n       * Properties that are not present take the HammerJS default values.\n       * For information about which properties are supported for which events,\n       * and their allowed and default values, see\n       * [HammerJS documentation](https://hammerjs.github.io/).\n       *\n       */\n      this.overrides = {};\n    }\n    /**\n     * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n     * and attaches it to a given HTML element.\n     * @param element The element that will recognize gestures.\n     * @returns A HammerJS event-manager object.\n     */\n    buildHammer(element) {\n      const mc = new Hammer(element, this.options);\n      mc.get('pinch').set({\n        enable: true\n      });\n      mc.get('rotate').set({\n        enable: true\n      });\n      for (const eventName in this.overrides) {\n        mc.get(eventName).set(this.overrides[eventName]);\n      }\n      return mc;\n    }\n  }\n  HammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) {\n    return new (t || HammerGestureConfig)();\n  };\n  HammerGestureConfig.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: HammerGestureConfig,\n    factory: HammerGestureConfig.ɵfac\n  });\n  return HammerGestureConfig;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nlet HammerGesturesPlugin = /*#__PURE__*/(() => {\n  class HammerGesturesPlugin extends EventManagerPlugin {\n    constructor(doc, _config, console, loader) {\n      super(doc);\n      this._config = _config;\n      this.console = console;\n      this.loader = loader;\n      this._loaderPromise = null;\n    }\n    supports(eventName) {\n      if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n        return false;\n      }\n      if (!window.Hammer && !this.loader) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          this.console.warn(`The \"${eventName}\" event cannot be bound because Hammer.JS is not ` + `loaded and no custom loader has been specified.`);\n        }\n        return false;\n      }\n      return true;\n    }\n    addEventListener(element, eventName, handler) {\n      const zone = this.manager.getZone();\n      eventName = eventName.toLowerCase();\n      // If Hammer is not present but a loader is specified, we defer adding the event listener\n      // until Hammer is loaded.\n      if (!window.Hammer && this.loader) {\n        this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader());\n        // This `addEventListener` method returns a function to remove the added listener.\n        // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n        // than remove anything.\n        let cancelRegistration = false;\n        let deregister = () => {\n          cancelRegistration = true;\n        };\n        zone.runOutsideAngular(() => this._loaderPromise.then(() => {\n          // If Hammer isn't actually loaded when the custom loader resolves, give up.\n          if (!window.Hammer) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n              this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n            }\n            deregister = () => {};\n            return;\n          }\n          if (!cancelRegistration) {\n            // Now that Hammer is loaded and the listener is being loaded for real,\n            // the deregistration function changes from canceling registration to\n            // removal.\n            deregister = this.addEventListener(element, eventName, handler);\n          }\n        }).catch(() => {\n          if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            this.console.warn(`The \"${eventName}\" event cannot be bound because the custom ` + `Hammer.JS loader failed.`);\n          }\n          deregister = () => {};\n        }));\n        // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n        // can change the behavior of `deregister` once the listener is added. Using a closure in\n        // this way allows us to avoid any additional data structures to track listener removal.\n        return () => {\n          deregister();\n        };\n      }\n      return zone.runOutsideAngular(() => {\n        // Creating the manager bind events, must be done outside of angular\n        const mc = this._config.buildHammer(element);\n        const callback = function (eventObj) {\n          zone.runGuarded(function () {\n            handler(eventObj);\n          });\n        };\n        mc.on(eventName, callback);\n        return () => {\n          mc.off(eventName, callback);\n          // destroy mc to prevent memory leak\n          if (typeof mc.destroy === 'function') {\n            mc.destroy();\n          }\n        };\n      });\n    }\n    isCustomEvent(eventName) {\n      return this._config.events.indexOf(eventName) > -1;\n    }\n  }\n  HammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) {\n    return new (t || HammerGesturesPlugin)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(HAMMER_GESTURE_CONFIG), i0.ɵɵinject(i0.ɵConsole), i0.ɵɵinject(HAMMER_LOADER, 8));\n  };\n  HammerGesturesPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: HammerGesturesPlugin,\n    factory: HammerGesturesPlugin.ɵfac\n  });\n  return HammerGesturesPlugin;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\nlet HammerModule = /*#__PURE__*/(() => {\n  class HammerModule {}\n  HammerModule.ɵfac = function HammerModule_Factory(t) {\n    return new (t || HammerModule)();\n  };\n  HammerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: HammerModule\n  });\n  HammerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [{\n      provide: EVENT_MANAGER_PLUGINS,\n      useClass: HammerGesturesPlugin,\n      multi: true,\n      deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n    }, {\n      provide: HAMMER_GESTURE_CONFIG,\n      useClass: HammerGestureConfig,\n      deps: []\n    }]\n  });\n  return HammerModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\nlet DomSanitizer = /*#__PURE__*/(() => {\n  class DomSanitizer {}\n  DomSanitizer.ɵfac = function DomSanitizer_Factory(t) {\n    return new (t || DomSanitizer)();\n  };\n  DomSanitizer.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DomSanitizer,\n    factory: function DomSanitizer_Factory(t) {\n      let r = null;\n      if (t) {\n        r = new (t || DomSanitizer)();\n      } else {\n        r = i0.ɵɵinject(DomSanitizerImpl);\n      }\n      return r;\n    },\n    providedIn: 'root'\n  });\n  return DomSanitizer;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction domSanitizerImplFactory(injector) {\n  return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\nlet DomSanitizerImpl = /*#__PURE__*/(() => {\n  class DomSanitizerImpl extends DomSanitizer {\n    constructor(_doc) {\n      super();\n      this._doc = _doc;\n    }\n    sanitize(ctx, value) {\n      if (value == null) return null;\n      switch (ctx) {\n        case SecurityContext.NONE:\n          return value;\n        case SecurityContext.HTML:\n          if (ɵallowSanitizationBypassAndThrow(value, \"HTML\" /* BypassType.Html */)) {\n            return ɵunwrapSafeValue(value);\n          }\n          return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n        case SecurityContext.STYLE:\n          if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* BypassType.Style */)) {\n            return ɵunwrapSafeValue(value);\n          }\n          return value;\n        case SecurityContext.SCRIPT:\n          if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* BypassType.Script */)) {\n            return ɵunwrapSafeValue(value);\n          }\n          throw new Error('unsafe value used in a script context');\n        case SecurityContext.URL:\n          if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* BypassType.Url */)) {\n            return ɵunwrapSafeValue(value);\n          }\n          return ɵ_sanitizeUrl(String(value));\n        case SecurityContext.RESOURCE_URL:\n          if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n            return ɵunwrapSafeValue(value);\n          }\n          throw new Error(`unsafe value used in a resource URL context (see ${ɵXSS_SECURITY_URL})`);\n        default:\n          throw new Error(`Unexpected SecurityContext ${ctx} (see ${ɵXSS_SECURITY_URL})`);\n      }\n    }\n    bypassSecurityTrustHtml(value) {\n      return ɵbypassSanitizationTrustHtml(value);\n    }\n    bypassSecurityTrustStyle(value) {\n      return ɵbypassSanitizationTrustStyle(value);\n    }\n    bypassSecurityTrustScript(value) {\n      return ɵbypassSanitizationTrustScript(value);\n    }\n    bypassSecurityTrustUrl(value) {\n      return ɵbypassSanitizationTrustUrl(value);\n    }\n    bypassSecurityTrustResourceUrl(value) {\n      return ɵbypassSanitizationTrustResourceUrl(value);\n    }\n  }\n  DomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) {\n    return new (t || DomSanitizerImpl)(i0.ɵɵinject(DOCUMENT));\n  };\n  DomSanitizerImpl.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DomSanitizerImpl,\n    factory: function DomSanitizerImpl_Factory(t) {\n      let r = null;\n      if (t) {\n        r = new t();\n      } else {\n        r = domSanitizerImplFactory(i0.ɵɵinject(Injector));\n      }\n      return r;\n    },\n    providedIn: 'root'\n  });\n  return DomSanitizerImpl;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser package.\n */\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('15.2.3');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, TransferState, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideProtractorTestingSupport, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n//# sourceMappingURL=platform-browser.mjs.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/60bc05c745e99bd7697f1a6e220d0f6eacf2f08d8a20cde46e14894e1ff3a52e.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/60bc05c745e99bd7697f1a6e220d0f6eacf2f08d8a20cde46e14894e1ff3a52e.json
deleted file mode 100644
index f0bc15d0d3eb97bbab2aa5ec017ed5a6fe6902d9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/60bc05c745e99bd7697f1a6e220d0f6eacf2f08d8a20cde46e14894e1ff3a52e.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n//# sourceMappingURL=observable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/610c2fe3241d61a40e78ff057543f8448f37fc1c99e9a245e044e5b21a57cd20.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/610c2fe3241d61a40e78ff057543f8448f37fc1c99e9a245e044e5b21a57cd20.json
deleted file mode 100644
index a051c090b73c9cc582129e9ba508cee783a56bc9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/610c2fe3241d61a40e78ff057543f8448f37fc1c99e9a245e044e5b21a57cd20.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { filter } from './filter';\nexport function skip(count) {\n  return filter((_, index) => count <= index);\n}\n//# sourceMappingURL=skip.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/610d67d190e7fad227e014b888314718fee189584eb3a3068bff25619052d1fa.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/610d67d190e7fad227e014b888314718fee189584eb3a3068bff25619052d1fa.json
deleted file mode 100644
index dfb47da5caacefbad290efd139a0b03e3ca03964..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/610d67d190e7fad227e014b888314718fee189584eb3a3068bff25619052d1fa.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n  return operate((source, subscriber) => {\n    source.subscribe(createOperatorSubscriber(subscriber, notification => observeNotification(notification, subscriber)));\n  });\n}\n//# sourceMappingURL=dematerialize.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/61eba2557c4574a2c10649cb61313c02a93a480afd44854c22ea7903eb577c24.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/61eba2557c4574a2c10649cb61313c02a93a480afd44854c22ea7903eb577c24.json
deleted file mode 100644
index 8bd8401d7d2e18da6dbbaafc70893b8f5d1ce871..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/61eba2557c4574a2c10649cb61313c02a93a480afd44854c22ea7903eb577c24.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n  return operate((source, subscriber) => {\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const result = predicate(value, index++);\n      (result || inclusive) && subscriber.next(value);\n      !result && subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=takeWhile.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/634707e23a9c09d42a1211f1a967c9257a8affcb8c4499a61b914562f2f06891.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/634707e23a9c09d42a1211f1a967c9257a8affcb8c4499a61b914562f2f06891.json
deleted file mode 100644
index 44fd992466ec6a91f3209644b6160b333d6191cf..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/634707e23a9c09d42a1211f1a967c9257a8affcb8c4499a61b914562f2f06891.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport let VirtualTimeScheduler = /*#__PURE__*/(() => {\n  class VirtualTimeScheduler extends AsyncScheduler {\n    constructor(schedulerActionCtor = VirtualAction, maxFrames = Infinity) {\n      super(schedulerActionCtor, () => this.frame);\n      this.maxFrames = maxFrames;\n      this.frame = 0;\n      this.index = -1;\n    }\n    flush() {\n      const {\n        actions,\n        maxFrames\n      } = this;\n      let error;\n      let action;\n      while ((action = actions[0]) && action.delay <= maxFrames) {\n        actions.shift();\n        this.frame = action.delay;\n        if (error = action.execute(action.state, action.delay)) {\n          break;\n        }\n      }\n      if (error) {\n        while (action = actions.shift()) {\n          action.unsubscribe();\n        }\n        throw error;\n      }\n    }\n  }\n  VirtualTimeScheduler.frameTimeFactor = 10;\n  return VirtualTimeScheduler;\n})();\nexport class VirtualAction extends AsyncAction {\n  constructor(scheduler, work, index = scheduler.index += 1) {\n    super(scheduler, work);\n    this.scheduler = scheduler;\n    this.work = work;\n    this.index = index;\n    this.active = true;\n    this.index = scheduler.index = index;\n  }\n  schedule(state, delay = 0) {\n    if (Number.isFinite(delay)) {\n      if (!this.id) {\n        return super.schedule(state, delay);\n      }\n      this.active = false;\n      const action = new VirtualAction(this.scheduler, this.work);\n      this.add(action);\n      return action.schedule(state, delay);\n    } else {\n      return Subscription.EMPTY;\n    }\n  }\n  requestAsyncId(scheduler, id, delay = 0) {\n    this.delay = scheduler.frame + delay;\n    const {\n      actions\n    } = scheduler;\n    actions.push(this);\n    actions.sort(VirtualAction.sortActions);\n    return 1;\n  }\n  recycleAsyncId(scheduler, id, delay = 0) {\n    return undefined;\n  }\n  _execute(state, delay) {\n    if (this.active === true) {\n      return super._execute(state, delay);\n    }\n  }\n  static sortActions(a, b) {\n    if (a.delay === b.delay) {\n      if (a.index === b.index) {\n        return 0;\n      } else if (a.index > b.index) {\n        return 1;\n      } else {\n        return -1;\n      }\n    } else if (a.delay > b.delay) {\n      return 1;\n    } else {\n      return -1;\n    }\n  }\n}\n//# sourceMappingURL=VirtualTimeScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/635d11eb01c17c5d91e5cd1feb5b9657af950463792e8756935bce128ac327a9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/635d11eb01c17c5d91e5cd1feb5b9657af950463792e8756935bce128ac327a9.json
deleted file mode 100644
index fa9b08587af4bde2740d3137486229a5de6a1062..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/635d11eb01c17c5d91e5cd1feb5b9657af950463792e8756935bce128ac327a9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n  return operate((source, subscriber) => {\n    let innerSub;\n    let syncResub = false;\n    let errors$;\n    const subscribeForRetryWhen = () => {\n      innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, err => {\n        if (!errors$) {\n          errors$ = new Subject();\n          innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : syncResub = true));\n        }\n        if (errors$) {\n          errors$.next(err);\n        }\n      }));\n      if (syncResub) {\n        innerSub.unsubscribe();\n        innerSub = null;\n        syncResub = false;\n        subscribeForRetryWhen();\n      }\n    };\n    subscribeForRetryWhen();\n  });\n}\n//# sourceMappingURL=retryWhen.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6375237189d580db59eb78114101a303d50d775994f36bf14a83a431df2af8a4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6375237189d580db59eb78114101a303d50d775994f36bf14a83a431df2af8a4.json
deleted file mode 100644
index b7595e0646864a55a00546684ec714096e235567..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6375237189d580db59eb78114101a303d50d775994f36bf14a83a431df2af8a4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function windowToggle(openings, closingSelector) {\n  return operate((source, subscriber) => {\n    const windows = [];\n    const handleError = err => {\n      while (0 < windows.length) {\n        windows.shift().error(err);\n      }\n      subscriber.error(err);\n    };\n    innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, openValue => {\n      const window = new Subject();\n      windows.push(window);\n      const closingSubscription = new Subscription();\n      const closeWindow = () => {\n        arrRemove(windows, window);\n        window.complete();\n        closingSubscription.unsubscribe();\n      };\n      let closingNotifier;\n      try {\n        closingNotifier = innerFrom(closingSelector(openValue));\n      } catch (err) {\n        handleError(err);\n        return;\n      }\n      subscriber.next(window.asObservable());\n      closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));\n    }, noop));\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const windowsCopy = windows.slice();\n      for (const window of windowsCopy) {\n        window.next(value);\n      }\n    }, () => {\n      while (0 < windows.length) {\n        windows.shift().complete();\n      }\n      subscriber.complete();\n    }, handleError, () => {\n      while (0 < windows.length) {\n        windows.shift().unsubscribe();\n      }\n    }));\n  });\n}\n//# sourceMappingURL=windowToggle.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/63c4f9601d58f8c4cd3cac839eff931fb6e2aba525f0e262fea5ed662e79454f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/63c4f9601d58f8c4cd3cac839eff931fb6e2aba525f0e262fea5ed662e79454f.json
deleted file mode 100644
index cf15a25b479851dadd6ca53730b48e4a27b4a3ec..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/63c4f9601d58f8c4cd3cac839eff931fb6e2aba525f0e262fea5ed662e79454f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { BrowserModule } from '@angular/platform-browser';\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { initializeApp, provideFirebaseApp } from '@angular/fire/app';\nimport { environment } from '../environments/environment';\nimport { provideFirestore, getFirestore } from '@angular/fire/firestore';\nimport { provideStorage, getStorage } from '@angular/fire/storage';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/fire/app\";\nimport * as i2 from \"@angular/fire/firestore\";\nimport * as i3 from \"@angular/fire/storage\";\nexport let AppModule = /*#__PURE__*/(() => {\n  class AppModule {}\n  AppModule.ɵfac = function AppModule_Factory(t) {\n    return new (t || AppModule)();\n  };\n  AppModule.ɵmod = /*@__PURE__*/i0.ɵɵdefineNgModule({\n    type: AppModule,\n    bootstrap: [AppComponent]\n  });\n  AppModule.ɵinj = /*@__PURE__*/i0.ɵɵdefineInjector({\n    imports: [BrowserModule, AppRoutingModule, provideFirebaseApp(() => initializeApp(environment.firebase)), provideFirestore(() => getFirestore()), provideStorage(() => getStorage())]\n  });\n  return AppModule;\n})();","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/64cf909168c767fa55f9c0e1b586409b5ff30b157c0fba94f7660cec8fed5a08.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/64cf909168c767fa55f9c0e1b586409b5ff30b157c0fba94f7660cec8fed5a08.json
deleted file mode 100644
index a4a59291d2e3b6014e2d50bd4580528f48734c07..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/64cf909168c767fa55f9c0e1b586409b5ff30b157c0fba94f7660cec8fed5a08.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { switchMap } from './switchMap';\nimport { isFunction } from '../util/isFunction';\nexport function switchMapTo(innerObservable, resultSelector) {\n  return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);\n}\n//# sourceMappingURL=switchMapTo.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/64d68293a01254b1e215aa47a969a43a622a8351a74617aff32fba309a4a5786.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/64d68293a01254b1e215aa47a969a43a622a8351a74617aff32fba309a4a5786.json
deleted file mode 100644
index b773b8f02010a9f0d0ef7d8cb294601bc010f368..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/64d68293a01254b1e215aa47a969a43a622a8351a74617aff32fba309a4a5786.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nexport const EMPTY = new Observable(subscriber => subscriber.complete());\nexport function empty(scheduler) {\n  return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n  return new Observable(subscriber => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/65ba8aff0cd39e3a1119c41f8ac366efeddd61018c88a8c2006103cfb13a8b34.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/65ba8aff0cd39e3a1119c41f8ac366efeddd61018c88a8c2006103cfb13a8b34.json
deleted file mode 100644
index 024891a895e71231071be0108651a811f9545883..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/65ba8aff0cd39e3a1119c41f8ac366efeddd61018c88a8c2006103cfb13a8b34.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function isFunction(value) {\n  return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6655572963e671a8483331439f5b0a9df122b7e07314a2a73e2403d264d5d171.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6655572963e671a8483331439f5b0a9df122b7e07314a2a73e2403d264d5d171.json
deleted file mode 100644
index cab844f9df1793c11679f3e820c9801ead312cce..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6655572963e671a8483331439f5b0a9df122b7e07314a2a73e2403d264d5d171.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n//# sourceMappingURL=asap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/67b1ce9a48dfe6407ef90a97244b9992422b5f5b95239547e8be41f71b0cdeb5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/67b1ce9a48dfe6407ef90a97244b9992422b5f5b95239547e8be41f71b0cdeb5.json
deleted file mode 100644
index b21e16a91be4450110af6e0ad7644e14535c12bc..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/67b1ce9a48dfe6407ef90a97244b9992422b5f5b95239547e8be41f71b0cdeb5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n  if (index < 0) {\n    throw new ArgumentOutOfRangeError();\n  }\n  const hasDefaultValue = arguments.length >= 2;\n  return source => source.pipe(filter((v, i) => i === index), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new ArgumentOutOfRangeError()));\n}\n//# sourceMappingURL=elementAt.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/693626c47d25c8e8e16cab0338f767309e7efff0106977dc4314e71d818fa1a8.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/693626c47d25c8e8e16cab0338f767309e7efff0106977dc4314e71d818fa1a8.json
deleted file mode 100644
index 6973f023108612211e6d70d340f6dc6304cef649..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/693626c47d25c8e8e16cab0338f767309e7efff0106977dc4314e71d818fa1a8.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Immediate } from '../util/Immediate';\nconst {\n  setImmediate,\n  clearImmediate\n} = Immediate;\nexport const immediateProvider = {\n  setImmediate(...args) {\n    const {\n      delegate\n    } = immediateProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args);\n  },\n  clearImmediate(handle) {\n    const {\n      delegate\n    } = immediateProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=immediateProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6aa2f5ae8ba5c974e182bcb793922b45561c47b98511a7d8c0bb549d5675b4dc.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6aa2f5ae8ba5c974e182bcb793922b45561c47b98511a7d8c0bb549d5675b4dc.json
deleted file mode 100644
index 6175158e378bf7093fe6a2084ef197f7fdbe82cd..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6aa2f5ae8ba5c974e182bcb793922b45561c47b98511a7d8c0bb549d5675b4dc.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncScheduler } from './AsyncScheduler';\nexport class QueueScheduler extends AsyncScheduler {}\n//# sourceMappingURL=QueueScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6ab489237d59ee85d99d68770a16c0f278f7b0b3e9ed4c17bc4ca756aad98c18.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6ab489237d59ee85d99d68770a16c0f278f7b0b3e9ed4c17bc4ca756aad98c18.json
deleted file mode 100644
index ff65fe6ee50a71b85c5988fd346b6de8694fc224..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6ab489237d59ee85d99d68770a16c0f278f7b0b3e9ed4c17bc4ca756aad98c18.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n  if (input != null) {\n    if (isInteropObservable(input)) {\n      return scheduleObservable(input, scheduler);\n    }\n    if (isArrayLike(input)) {\n      return scheduleArray(input, scheduler);\n    }\n    if (isPromise(input)) {\n      return schedulePromise(input, scheduler);\n    }\n    if (isAsyncIterable(input)) {\n      return scheduleAsyncIterable(input, scheduler);\n    }\n    if (isIterable(input)) {\n      return scheduleIterable(input, scheduler);\n    }\n    if (isReadableStreamLike(input)) {\n      return scheduleReadableStreamLike(input, scheduler);\n    }\n  }\n  throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6b67d649e88da6efe661196c9a6c522393b068701214fd6d413ae33ac2f7bcdd.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6b67d649e88da6efe661196c9a6c522393b068701214fd6d413ae33ac2f7bcdd.json
deleted file mode 100644
index 501c04e14ee0c05ca6454c7e654aef09c32d3c57..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6b67d649e88da6efe661196c9a6c522393b068701214fd6d413ae33ac2f7bcdd.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { registerVersion } from '@firebase/app';\nexport * from '@firebase/app';\nvar name = \"firebase\";\nvar version = \"9.18.0\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nregisterVersion(name, version, 'app');\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6cac5720be83e74d178f07d03ac0e5f1071ecc488a7b4f98eae9860a43d77f79.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6cac5720be83e74d178f07d03ac0e5f1071ecc488a7b4f98eae9860a43d77f79.json
deleted file mode 100644
index e771b36d524dd0b2ef0cf162951ef67fffa56f20..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6cac5720be83e74d178f07d03ac0e5f1071ecc488a7b4f98eae9860a43d77f79.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n  constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n    super();\n    this._bufferSize = _bufferSize;\n    this._windowTime = _windowTime;\n    this._timestampProvider = _timestampProvider;\n    this._buffer = [];\n    this._infiniteTimeWindow = true;\n    this._infiniteTimeWindow = _windowTime === Infinity;\n    this._bufferSize = Math.max(1, _bufferSize);\n    this._windowTime = Math.max(1, _windowTime);\n  }\n  next(value) {\n    const {\n      isStopped,\n      _buffer,\n      _infiniteTimeWindow,\n      _timestampProvider,\n      _windowTime\n    } = this;\n    if (!isStopped) {\n      _buffer.push(value);\n      !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n    }\n    this._trimBuffer();\n    super.next(value);\n  }\n  _subscribe(subscriber) {\n    this._throwIfClosed();\n    this._trimBuffer();\n    const subscription = this._innerSubscribe(subscriber);\n    const {\n      _infiniteTimeWindow,\n      _buffer\n    } = this;\n    const copy = _buffer.slice();\n    for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n      subscriber.next(copy[i]);\n    }\n    this._checkFinalizedStatuses(subscriber);\n    return subscription;\n  }\n  _trimBuffer() {\n    const {\n      _bufferSize,\n      _timestampProvider,\n      _buffer,\n      _infiniteTimeWindow\n    } = this;\n    const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n    _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n    if (!_infiniteTimeWindow) {\n      const now = _timestampProvider.now();\n      let last = 0;\n      for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n        last = i;\n      }\n      last && _buffer.splice(0, last + 1);\n    }\n  }\n}\n//# sourceMappingURL=ReplaySubject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/6cdcf3c16ea43c1cef79b1957905d5e04a002549a4dcd640a842e1c332f02c41.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/6cdcf3c16ea43c1cef79b1957905d5e04a002549a4dcd640a842e1c332f02c41.json
deleted file mode 100644
index 5007e5a95c6e9856f3cfffc2423b4c03f2f50b96..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/6cdcf3c16ea43c1cef79b1957905d5e04a002549a4dcd640a842e1c332f02c41.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n  constructor(source, subjectFactory) {\n    super();\n    this.source = source;\n    this.subjectFactory = subjectFactory;\n    this._subject = null;\n    this._refCount = 0;\n    this._connection = null;\n    if (hasLift(source)) {\n      this.lift = source.lift;\n    }\n  }\n  _subscribe(subscriber) {\n    return this.getSubject().subscribe(subscriber);\n  }\n  getSubject() {\n    const subject = this._subject;\n    if (!subject || subject.isStopped) {\n      this._subject = this.subjectFactory();\n    }\n    return this._subject;\n  }\n  _teardown() {\n    this._refCount = 0;\n    const {\n      _connection\n    } = this;\n    this._subject = this._connection = null;\n    _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n  }\n  connect() {\n    let connection = this._connection;\n    if (!connection) {\n      connection = this._connection = new Subscription();\n      const subject = this.getSubject();\n      connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n        this._teardown();\n        subject.complete();\n      }, err => {\n        this._teardown();\n        subject.error(err);\n      }, () => this._teardown())));\n      if (connection.closed) {\n        this._connection = null;\n        connection = Subscription.EMPTY;\n      }\n    }\n    return connection;\n  }\n  refCount() {\n    return higherOrderRefCount()(this);\n  }\n}\n//# sourceMappingURL=ConnectableObservable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/70181b11a12613889c1880ef51775f60d016ab14bb5fa4e16ef0ca8a91aafda4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/70181b11a12613889c1880ef51775f60d016ab14bb5fa4e16ef0ca8a91aafda4.json
deleted file mode 100644
index 0ce50fd19d2a21dd04374059628216470709cda6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/70181b11a12613889c1880ef51775f60d016ab14bb5fa4e16ef0ca8a91aafda4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n  return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/71b00fa838247448348a7a0255fa4ce7d802ce7e38fc90c39f3e50ff9755268d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/71b00fa838247448348a7a0255fa4ce7d802ce7e38fc90c39f3e50ff9755268d.json
deleted file mode 100644
index f9b489e0e9bb8457b0040351c6cdd36242c1e005..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/71b00fa838247448348a7a0255fa4ce7d802ce7e38fc90c39f3e50ff9755268d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function window(windowBoundaries) {\n  return operate((source, subscriber) => {\n    let windowSubject = new Subject();\n    subscriber.next(windowSubject.asObservable());\n    const errorHandler = err => {\n      windowSubject.error(err);\n      subscriber.error(err);\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, value => windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value), () => {\n      windowSubject.complete();\n      subscriber.complete();\n    }, errorHandler));\n    innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, () => {\n      windowSubject.complete();\n      subscriber.next(windowSubject = new Subject());\n    }, noop, errorHandler));\n    return () => {\n      windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe();\n      windowSubject = null;\n    };\n  });\n}\n//# sourceMappingURL=window.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/72c6fc9f688e8622e5f4914dac57d3c9195d402f642beb9b9fd666c01cb69282.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/72c6fc9f688e8622e5f4914dac57d3c9195d402f642beb9b9fd666c01cb69282.json
deleted file mode 100644
index eb0a5b63c5f600560aeda0623531dee1302abe4f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/72c6fc9f688e8622e5f4914dac57d3c9195d402f642beb9b9fd666c01cb69282.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/735da09ad31a4c1fee14178c65f4a7b12968d1ef15f4680a2c948b00b0a8b947.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/735da09ad31a4c1fee14178c65f4a7b12968d1ef15f4680a2c948b00b0a8b947.json
deleted file mode 100644
index 498ee781975aac9f9c02adbf635ccff99e5ce56e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/735da09ad31a4c1fee14178c65f4a7b12968d1ef15f4680a2c948b00b0a8b947.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function distinct(keySelector, flushes) {\n  return operate((source, subscriber) => {\n    const distinctKeys = new Set();\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const key = keySelector ? keySelector(value) : value;\n      if (!distinctKeys.has(key)) {\n        distinctKeys.add(key);\n        subscriber.next(value);\n      }\n    }));\n    flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop));\n  });\n}\n//# sourceMappingURL=distinct.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/74628f7692ec8317d10680646a1e192d864e91520d7bef8a428b6c5f1ad33b9b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/74628f7692ec8317d10680646a1e192d864e91520d7bef8a428b6c5f1ad33b9b.json
deleted file mode 100644
index b41f6dc1e7848284b464ced559440a4fc9e9d457..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/74628f7692ec8317d10680646a1e192d864e91520d7bef8a428b6c5f1ad33b9b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n  return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/75a965112ca43db4c54aa22f78bae4fee8ac341c02720119f5a6131141757680.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/75a965112ca43db4c54aa22f78bae4fee8ac341c02720119f5a6131141757680.json
deleted file mode 100644
index cfe81fed732a6e98d56b11a8dff3e92245b493de..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/75a965112ca43db4c54aa22f78bae4fee8ac341c02720119f5a6131141757680.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n  if (resultSelector) {\n    return source => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n  }\n  return operate((source, subscriber) => {\n    let index = 0;\n    let innerSub = null;\n    let isComplete = false;\n    source.subscribe(createOperatorSubscriber(subscriber, outerValue => {\n      if (!innerSub) {\n        innerSub = createOperatorSubscriber(subscriber, undefined, () => {\n          innerSub = null;\n          isComplete && subscriber.complete();\n        });\n        innerFrom(project(outerValue, index++)).subscribe(innerSub);\n      }\n    }, () => {\n      isComplete = true;\n      !innerSub && subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=exhaustMap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/75b271a5109c24fd8bb936f1d0569c92037237a4780acba8a76b553b4a5f371b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/75b271a5109c24fd8bb936f1d0569c92037237a4780acba8a76b553b4a5f371b.json
deleted file mode 100644
index f4e4579699b536eaf5535632e4ce8cee79e61f4f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/75b271a5109c24fd8bb936f1d0569c92037237a4780acba8a76b553b4a5f371b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { zip } from './zip';\nexport function zipWith(...otherInputs) {\n  return zip(...otherInputs);\n}\n//# sourceMappingURL=zipWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7684a8e2a7b5c471c8956ae9264fe0f2754e3363f4077bb08cb503acdd19ec68.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7684a8e2a7b5c471c8956ae9264fe0f2754e3363f4077bb08cb503acdd19ec68.json
deleted file mode 100644
index c0f1c466abbb79e95df4ffa217e00e1d1fdc7530..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7684a8e2a7b5c471c8956ae9264fe0f2754e3363f4077bb08cb503acdd19ec68.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function isEmpty() {\n  return operate((source, subscriber) => {\n    source.subscribe(createOperatorSubscriber(subscriber, () => {\n      subscriber.next(false);\n      subscriber.complete();\n    }, () => {\n      subscriber.next(true);\n      subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=isEmpty.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/77ca0e325f6b57ee210bd2f336cadc99d23a9853e03625325162aad817257273.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/77ca0e325f6b57ee210bd2f336cadc99d23a9853e03625325162aad817257273.json
deleted file mode 100644
index e9fb527d58482b4995579088702ea7808aeed996..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/77ca0e325f6b57ee210bd2f336cadc99d23a9853e03625325162aad817257273.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { asyncScheduler } from '../scheduler/async';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function bufferTime(bufferTimeSpan, ...otherArgs) {\n  var _a, _b;\n  const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n  const bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n  const maxBufferSize = otherArgs[1] || Infinity;\n  return operate((source, subscriber) => {\n    let bufferRecords = [];\n    let restartOnEmit = false;\n    const emit = record => {\n      const {\n        buffer,\n        subs\n      } = record;\n      subs.unsubscribe();\n      arrRemove(bufferRecords, record);\n      subscriber.next(buffer);\n      restartOnEmit && startBuffer();\n    };\n    const startBuffer = () => {\n      if (bufferRecords) {\n        const subs = new Subscription();\n        subscriber.add(subs);\n        const buffer = [];\n        const record = {\n          buffer,\n          subs\n        };\n        bufferRecords.push(record);\n        executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan);\n      }\n    };\n    if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {\n      executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);\n    } else {\n      restartOnEmit = true;\n    }\n    startBuffer();\n    const bufferTimeSubscriber = createOperatorSubscriber(subscriber, value => {\n      const recordsCopy = bufferRecords.slice();\n      for (const record of recordsCopy) {\n        const {\n          buffer\n        } = record;\n        buffer.push(value);\n        maxBufferSize <= buffer.length && emit(record);\n      }\n    }, () => {\n      while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) {\n        subscriber.next(bufferRecords.shift().buffer);\n      }\n      bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe();\n      subscriber.complete();\n      subscriber.unsubscribe();\n    }, undefined, () => bufferRecords = null);\n    source.subscribe(bufferTimeSubscriber);\n  });\n}\n//# sourceMappingURL=bufferTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7905004978f78abce4523bd99b39e7aa3c1c10b77d376d9de51ce621ea24de0a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7905004978f78abce4523bd99b39e7aa3c1c10b77d376d9de51ce621ea24de0a.json
deleted file mode 100644
index ff94483dc6f78c40f7d6081033e20f90b57d207d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7905004978f78abce4523bd99b39e7aa3c1c10b77d376d9de51ce621ea24de0a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n  return defer(() => condition() ? trueResult : falseResult);\n}\n//# sourceMappingURL=iif.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7959c49a509f56d2ce6755157b2c44ce61bec85981b827a1892f2745b04f4e1d.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7959c49a509f56d2ce6755157b2c44ce61bec85981b827a1892f2745b04f4e1d.json
deleted file mode 100644
index c12c0ce4bea02192b826aaf7abbfabdbb88f3c5a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7959c49a509f56d2ce6755157b2c44ce61bec85981b827a1892f2745b04f4e1d.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function arrRemove(arr, item) {\n  if (arr) {\n    const index = arr.indexOf(item);\n    0 <= index && arr.splice(index, 1);\n  }\n}\n//# sourceMappingURL=arrRemove.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7a26c4106f5dd37e5fec7062a73c7dd776966884ebf54ee8c8533922dcc91c5f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7a26c4106f5dd37e5fec7062a73c7dd776966884ebf54ee8c8533922dcc91c5f.json
deleted file mode 100644
index 9bd8e51896eb790e59dcaababd39e73ff9b53e78..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7a26c4106f5dd37e5fec7062a73c7dd776966884ebf54ee8c8533922dcc91c5f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n  return operate((source, subscriber) => {\n    let prev;\n    let hasPrev = false;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const p = prev;\n      prev = value;\n      hasPrev && subscriber.next([p, value]);\n      hasPrev = true;\n    }));\n  });\n}\n//# sourceMappingURL=pairwise.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7a96320529fda5637f03aeb27796b44e8019a5b64b151470912bf4e1598353d5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7a96320529fda5637f03aeb27796b44e8019a5b64b151470912bf4e1598353d5.json
deleted file mode 100644
index a97f5fd25a9748691588d97f82b08600ea32810c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7a96320529fda5637f03aeb27796b44e8019a5b64b151470912bf4e1598353d5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { scanInternals } from './scanInternals';\nimport { operate } from '../util/lift';\nexport function reduce(accumulator, seed) {\n  return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true));\n}\n//# sourceMappingURL=reduce.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ac98a00829cafb8beb77709cd614edbf74eeb4158ecab3b8949c8480759b0d6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7ac98a00829cafb8beb77709cd614edbf74eeb4158ecab3b8949c8480759b0d6.json
deleted file mode 100644
index d33112fc84ed724fb470795692ed75e61b5c0b7f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ac98a00829cafb8beb77709cd614edbf74eeb4158ecab3b8949c8480759b0d6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c);\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n  return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]);\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n  return cursorAdvanceMethods || (cursorAdvanceMethods = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey]);\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n  const promise = new Promise((resolve, reject) => {\n    const unlisten = () => {\n      request.removeEventListener('success', success);\n      request.removeEventListener('error', error);\n    };\n    const success = () => {\n      resolve(wrap(request.result));\n      unlisten();\n    };\n    const error = () => {\n      reject(request.error);\n      unlisten();\n    };\n    request.addEventListener('success', success);\n    request.addEventListener('error', error);\n  });\n  promise.then(value => {\n    // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n    // (see wrapFunction).\n    if (value instanceof IDBCursor) {\n      cursorRequestMap.set(value, request);\n    }\n    // Catching to avoid \"Uncaught Promise exceptions\"\n  }).catch(() => {});\n  // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n  // is because we create many promises from a single IDBRequest.\n  reverseTransformCache.set(promise, request);\n  return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n  // Early bail if we've already created a done promise for this transaction.\n  if (transactionDoneMap.has(tx)) return;\n  const done = new Promise((resolve, reject) => {\n    const unlisten = () => {\n      tx.removeEventListener('complete', complete);\n      tx.removeEventListener('error', error);\n      tx.removeEventListener('abort', error);\n    };\n    const complete = () => {\n      resolve();\n      unlisten();\n    };\n    const error = () => {\n      reject(tx.error || new DOMException('AbortError', 'AbortError'));\n      unlisten();\n    };\n    tx.addEventListener('complete', complete);\n    tx.addEventListener('error', error);\n    tx.addEventListener('abort', error);\n  });\n  // Cache it for later retrieval.\n  transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n  get(target, prop, receiver) {\n    if (target instanceof IDBTransaction) {\n      // Special handling for transaction.done.\n      if (prop === 'done') return transactionDoneMap.get(target);\n      // Polyfill for objectStoreNames because of Edge.\n      if (prop === 'objectStoreNames') {\n        return target.objectStoreNames || transactionStoreNamesMap.get(target);\n      }\n      // Make tx.store return the only store in the transaction, or undefined if there are many.\n      if (prop === 'store') {\n        return receiver.objectStoreNames[1] ? undefined : receiver.objectStore(receiver.objectStoreNames[0]);\n      }\n    }\n    // Else transform whatever we get back.\n    return wrap(target[prop]);\n  },\n  set(target, prop, value) {\n    target[prop] = value;\n    return true;\n  },\n  has(target, prop) {\n    if (target instanceof IDBTransaction && (prop === 'done' || prop === 'store')) {\n      return true;\n    }\n    return prop in target;\n  }\n};\nfunction replaceTraps(callback) {\n  idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n  // Due to expected object equality (which is enforced by the caching in `wrap`), we\n  // only create one new func per func.\n  // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n  if (func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype)) {\n    return function (storeNames, ...args) {\n      const tx = func.call(unwrap(this), storeNames, ...args);\n      transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n      return wrap(tx);\n    };\n  }\n  // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n  // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n  // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n  // with real promises, so each advance methods returns a new promise for the cursor object, or\n  // undefined if the end of the cursor has been reached.\n  if (getCursorAdvanceMethods().includes(func)) {\n    return function (...args) {\n      // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n      // the original object.\n      func.apply(unwrap(this), args);\n      return wrap(cursorRequestMap.get(this));\n    };\n  }\n  return function (...args) {\n    // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n    // the original object.\n    return wrap(func.apply(unwrap(this), args));\n  };\n}\nfunction transformCachableValue(value) {\n  if (typeof value === 'function') return wrapFunction(value);\n  // This doesn't return, it just creates a 'done' promise for the transaction,\n  // which is later returned for transaction.done (see idbObjectHandler).\n  if (value instanceof IDBTransaction) cacheDonePromiseForTransaction(value);\n  if (instanceOfAny(value, getIdbProxyableTypes())) return new Proxy(value, idbProxyTraps);\n  // Return the same value back if we're not going to transform it.\n  return value;\n}\nfunction wrap(value) {\n  // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n  // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n  if (value instanceof IDBRequest) return promisifyRequest(value);\n  // If we've already transformed this value before, reuse the transformed value.\n  // This is faster, but it also provides object equality.\n  if (transformCache.has(value)) return transformCache.get(value);\n  const newValue = transformCachableValue(value);\n  // Not all types are transformed.\n  // These may be primitive types, so they can't be WeakMap keys.\n  if (newValue !== value) {\n    transformCache.set(value, newValue);\n    reverseTransformCache.set(newValue, value);\n  }\n  return newValue;\n}\nconst unwrap = value => reverseTransformCache.get(value);\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ba30183d907b7c2b18b1f54d6126423f241583c7e2eee8546556666f87262e5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7ba30183d907b7c2b18b1f54d6126423f241583c7e2eee8546556666f87262e5.json
deleted file mode 100644
index fcbf9bb99a365f4213118870e9fd917a03b4dbb4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ba30183d907b7c2b18b1f54d6126423f241583c7e2eee8546556666f87262e5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\n * @license Angular v15.2.3\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n  for (let key in objWithPropertyToExtract) {\n    if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n      return key;\n    }\n  }\n  throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n  for (const key in source) {\n    if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n      target[key] = source[key];\n    }\n  }\n}\nfunction stringify(token) {\n  if (typeof token === 'string') {\n    return token;\n  }\n  if (Array.isArray(token)) {\n    return '[' + token.map(stringify).join(', ') + ']';\n  }\n  if (token == null) {\n    return '' + token;\n  }\n  if (token.overriddenName) {\n    return `${token.overriddenName}`;\n  }\n  if (token.name) {\n    return `${token.name}`;\n  }\n  const res = token.toString();\n  if (res == null) {\n    return '' + res;\n  }\n  const newLineIndex = res.indexOf('\\n');\n  return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n  return before == null || before === '' ? after === null ? '' : after : after == null || after === '' ? before : before + ' ' + after;\n}\nconst __forward_ref__ = /*#__PURE__*/getClosureSafeProperty({\n  __forward_ref__: getClosureSafeProperty\n});\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n  forwardRefFn.__forward_ref__ = forwardRef;\n  forwardRefFn.toString = function () {\n    return stringify(this());\n  };\n  return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n  return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n  return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\nfunction isEnvironmentProviders(value) {\n  return value && !!value.ɵproviders;\n}\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n *  - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n *  - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n *  throw new RuntimeError(\n *    RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n *    ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.\n */\nclass RuntimeError extends Error {\n  constructor(code, message) {\n    super(formatRuntimeError(code, message));\n    this.code = code;\n  }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n  // Error code might be a negative number, which is a special marker that instructs the logic to\n  // generate a link to the error details page on angular.io.\n  // We also prepend `0` to non-compile-time errors.\n  const fullCode = `NG0${Math.abs(code)}`;\n  let errorMessage = `${fullCode}${message ? ': ' + message.trim() : ''}`;\n  if (ngDevMode && code < 0) {\n    const addPeriodSeparator = !errorMessage.match(/[.,;!?]$/);\n    const separator = addPeriodSeparator ? '.' : '';\n    errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n  }\n  return errorMessage;\n}\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n  if (typeof value === 'string') return value;\n  if (value == null) return '';\n  // Use `String` so that it invokes the `toString` method of the value. Note that this\n  // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n  return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n  if (typeof value === 'function') return value.name || value.toString();\n  if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n    return value.type.name || value.type.toString();\n  }\n  return renderStringify(value);\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n  const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n  throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);\n}\nfunction throwMixedMultiProviderError() {\n  throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n  if (ngModuleType && providers) {\n    const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n    throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n  } else if (isEnvironmentProviders(provider)) {\n    if (provider.ɵfromNgModule) {\n      throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n    } else {\n      throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n    }\n  } else {\n    throw new Error('Invalid provider');\n  }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n  const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n  throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n\n// The functions in this file verify that the assumptions we are making\nfunction assertNumber(actual, msg) {\n  if (!(typeof actual === 'number')) {\n    throwError(msg, typeof actual, 'number', '===');\n  }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n  assertNumber(actual, 'Expected a number');\n  assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n  assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n  if (!(typeof actual === 'string')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n  }\n}\nfunction assertFunction(actual, msg) {\n  if (!(typeof actual === 'function')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n  }\n}\nfunction assertEqual(actual, expected, msg) {\n  if (!(actual == expected)) {\n    throwError(msg, actual, expected, '==');\n  }\n}\nfunction assertNotEqual(actual, expected, msg) {\n  if (!(actual != expected)) {\n    throwError(msg, actual, expected, '!=');\n  }\n}\nfunction assertSame(actual, expected, msg) {\n  if (!(actual === expected)) {\n    throwError(msg, actual, expected, '===');\n  }\n}\nfunction assertNotSame(actual, expected, msg) {\n  if (!(actual !== expected)) {\n    throwError(msg, actual, expected, '!==');\n  }\n}\nfunction assertLessThan(actual, expected, msg) {\n  if (!(actual < expected)) {\n    throwError(msg, actual, expected, '<');\n  }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n  if (!(actual <= expected)) {\n    throwError(msg, actual, expected, '<=');\n  }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n  if (!(actual > expected)) {\n    throwError(msg, actual, expected, '>');\n  }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n  if (!(actual >= expected)) {\n    throwError(msg, actual, expected, '>=');\n  }\n}\nfunction assertNotDefined(actual, msg) {\n  if (actual != null) {\n    throwError(msg, actual, null, '==');\n  }\n}\nfunction assertDefined(actual, msg) {\n  if (actual == null) {\n    throwError(msg, actual, null, '!=');\n  }\n}\nfunction throwError(msg, actual, expected, comparison) {\n  throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n  // If we're in a worker, `Node` will not be defined.\n  if (!(typeof Node !== 'undefined' && node instanceof Node) && !(typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode')) {\n    throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n  }\n}\nfunction assertIndexInRange(arr, index) {\n  assertDefined(arr, 'Array must be defined.');\n  const maxLen = arr.length;\n  if (index < 0 || index >= maxLen) {\n    throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n  }\n}\nfunction assertOneOf(value, ...validValues) {\n  if (validValues.indexOf(value) !== -1) return true;\n  throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n *   provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n *   The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n  return {\n    token: opts.token,\n    providedIn: opts.providedIn || null,\n    factory: opts.factory,\n    value: undefined\n  };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n *   either have a factory or point to a type which has a `ɵprov` static property (the\n *   type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n *   whose providers will also be added to the injector. Locally provided types will override\n *   providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n  return {\n    providers: options.providers || [],\n    imports: options.imports || []\n  };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n  return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n  return getInjectableDef(type) !== null;\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n  return type.hasOwnProperty(field) ? type[field] : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n *     scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n  const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n  if (def) {\n    const typeName = getTypeName(type);\n    ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token \"${typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the \"${typeName}\" class.`);\n    return def;\n  } else {\n    return null;\n  }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n  // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n  // it'll always return the name of the function itself, no matter how many other functions it\n  // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n  // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n  // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n  // the issue by converting the function to a string and parsing its name out that way via a regex.\n  if (type.hasOwnProperty('name')) {\n    return type.name;\n  }\n  const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n  return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n  return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;\n}\nconst NG_PROV_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵprov: getClosureSafeProperty\n});\nconst NG_INJ_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵinj: getClosureSafeProperty\n});\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ngInjectableDef: getClosureSafeProperty\n});\nconst NG_INJECTOR_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ngInjectorDef: getClosureSafeProperty\n});\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for `inject` instead.\n */\nvar InjectFlags = /*#__PURE__*/(() => {\n  InjectFlags = InjectFlags || {};\n  // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n  // writes exports of it into ngfactory files.\n  /** Check self and check parent injector if needed */\n  InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n  /**\n   * Specifies that an injector should retrieve a dependency from any injector until reaching the\n   * host element of the current component. (Only used with Element Injector)\n   */\n  InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n  /** Don't ascend to ancestors of the node requesting injection. */\n  InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n  /** Skip the node that is requesting injection. */\n  InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n  /** Inject `defaultValue` instead if token not found. */\n  InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n  return InjectFlags;\n})();\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n *  1. `Injector` should not depend on ivy logic.\n *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n  return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n  const previous = _injectImplementation;\n  _injectImplementation = impl;\n  return previous;\n}\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n  const injectableDef = getInjectableDef(token);\n  if (injectableDef && injectableDef.providedIn == 'root') {\n    return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n  }\n  if (flags & InjectFlags.Optional) return null;\n  if (notFoundValue !== undefined) return notFoundValue;\n  throwProviderNotFoundError(stringify(token), 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n  ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = /* @__PURE__ */(() => typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global || typeof window !== 'undefined' && window || typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self)();\nfunction ngDevModeResetPerfCounters() {\n  const locationString = typeof location !== 'undefined' ? location.toString() : '';\n  const newCounters = {\n    namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n    firstCreatePass: 0,\n    tNode: 0,\n    tView: 0,\n    rendererCreateTextNode: 0,\n    rendererSetText: 0,\n    rendererCreateElement: 0,\n    rendererAddEventListener: 0,\n    rendererSetAttribute: 0,\n    rendererRemoveAttribute: 0,\n    rendererSetProperty: 0,\n    rendererSetClassName: 0,\n    rendererAddClass: 0,\n    rendererRemoveClass: 0,\n    rendererSetStyle: 0,\n    rendererRemoveStyle: 0,\n    rendererDestroy: 0,\n    rendererDestroyNode: 0,\n    rendererMoveNode: 0,\n    rendererRemoveNode: 0,\n    rendererAppendChild: 0,\n    rendererInsertBefore: 0,\n    rendererCreateComment: 0\n  };\n  // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n  const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n  _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n  return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n *  get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n  // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n  // reset the counters.\n  // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n  // yet.\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (typeof ngDevMode !== 'object') {\n      ngDevModeResetPerfCounters();\n    }\n    return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n  }\n  return false;\n}\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n  const former = _currentInjector;\n  _currentInjector = injector;\n  return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n  if (_currentInjector === undefined) {\n    throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode && `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`EnvironmentInjector#runInContext\\`.`);\n  } else if (_currentInjector === null) {\n    return injectRootLimpMode(token, undefined, flags);\n  } else {\n    return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n  }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n  return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n  throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, ngDevMode && `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported during instantiation of a dependency by the DI system. It can be used\n * during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n *   radio: Radio|undefined;\n *   // OK: field initializer\n *   spareTyre = inject(Tyre);\n *\n *   constructor() {\n *     // OK: constructor body\n *     this.radio = inject(Radio);\n *   }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n *   {provide: Car, useFactory: () => {\n *     // OK: a class factory\n *     const engine = inject(Engine);\n *     return new Car(engine);\n *   }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n *   ngOnInit() {\n *     // ERROR: too late, the component instance was already created\n *     const engine = inject(Engine);\n *     engine.start();\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n  return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n  if (typeof flags === 'undefined' || typeof flags === 'number') {\n    return flags;\n  }\n  // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n  // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n  // `InjectOptions` to `InjectFlags`.\n  return 0 /* InternalInjectFlags.Default */ | (\n  // comment to force a line break in the formatter\n  flags.optional && 8 /* InternalInjectFlags.Optional */) | (flags.host && 1 /* InternalInjectFlags.Host */) | (flags.self && 2 /* InternalInjectFlags.Self */) | (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */);\n}\n\nfunction injectArgs(types) {\n  const args = [];\n  for (let i = 0; i < types.length; i++) {\n    const arg = resolveForwardRef(types[i]);\n    if (Array.isArray(arg)) {\n      if (arg.length === 0) {\n        throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n      }\n      let type = undefined;\n      let flags = InjectFlags.Default;\n      for (let j = 0; j < arg.length; j++) {\n        const meta = arg[j];\n        const flag = getInjectFlag(meta);\n        if (typeof flag === 'number') {\n          // Special case when we handle @Inject decorator.\n          if (flag === -1 /* DecoratorFlags.Inject */) {\n            type = meta.token;\n          } else {\n            flags |= flag;\n          }\n        } else {\n          type = meta;\n        }\n      }\n      args.push(ɵɵinject(type, flags));\n    } else {\n      args.push(ɵɵinject(arg));\n    }\n  }\n  return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n  decorator[DI_DECORATOR_FLAG] = flag;\n  decorator.prototype[DI_DECORATOR_FLAG] = flag;\n  return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n  return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n  const tokenPath = e[NG_TEMP_TOKEN_PATH];\n  if (token[SOURCE]) {\n    tokenPath.unshift(token[SOURCE]);\n  }\n  e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n  e[NG_TOKEN_PATH] = tokenPath;\n  e[NG_TEMP_TOKEN_PATH] = null;\n  throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n  text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n  let context = stringify(obj);\n  if (Array.isArray(obj)) {\n    context = obj.map(stringify).join(' -> ');\n  } else if (typeof obj === 'object') {\n    let parts = [];\n    for (let key in obj) {\n      if (obj.hasOwnProperty(key)) {\n        let value = obj[key];\n        parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n      }\n    }\n    context = `{${parts.join(', ')}}`;\n  }\n  return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n  ')}`;\n}\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n  return {\n    toString: fn\n  }.toString();\n}\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy = /*#__PURE__*/(() => {\n  ChangeDetectionStrategy = ChangeDetectionStrategy || {};\n  /**\n   * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n   * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n   * Change detection can still be explicitly invoked.\n   * This strategy applies to all child directives and cannot be overridden.\n   */\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n  /**\n   * Use the default `CheckAlways` strategy, in which change detection is automatic until\n   * explicitly deactivated.\n   */\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n  return ChangeDetectionStrategy;\n})();\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1 = /*#__PURE__*/(() => {\n  (function (ViewEncapsulation) {\n    // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n    // https://github.com/angular/angular/issues/44119 for additional information.\n    /**\n     * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n     * component's host element and applying the same attribute to all the CSS selectors provided\n     * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n     *\n     * This is the default option.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n    /**\n     * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n     * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n     * to any HTML element of the application regardless of their host Component.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    /**\n     * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n     * a ShadowRoot for the component's host element which is then used to encapsulate\n     * all the Component's styling.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n  })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n  return ViewEncapsulation$1;\n})();\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && /*#__PURE__*/initNgDevMode()) {\n  // These property accesses can be ignored because ngDevMode will be set to false\n  // when optimizing code and the whole if statement will be dropped.\n  // tslint:disable-next-line:no-toplevel-property-access\n  /*#__PURE__*/Object.freeze(EMPTY_OBJ);\n  // tslint:disable-next-line:no-toplevel-property-access\n  /*#__PURE__*/Object.freeze(EMPTY_ARRAY);\n}\nconst NG_COMP_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵcmp: getClosureSafeProperty\n});\nconst NG_DIR_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵdir: getClosureSafeProperty\n});\nconst NG_PIPE_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵpipe: getClosureSafeProperty\n});\nconst NG_MOD_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵmod: getClosureSafeProperty\n});\nconst NG_FACTORY_DEF = /*#__PURE__*/getClosureSafeProperty({\n  ɵfac: getClosureSafeProperty\n});\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = /*#__PURE__*/getClosureSafeProperty({\n  __NG_ELEMENT_ID__: getClosureSafeProperty\n});\n\n/** Counter used to generate unique IDs for component definitions. */\nlet componentDefCount = 0;\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyComponent {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵcmp = defineComponent({\n *     ...\n *   });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n  return noSideEffects(() => {\n    // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n    // See the `initNgDevMode` docstring for more information.\n    (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n    const baseDef = getNgDirectiveDef(componentDefinition);\n    const def = {\n      ...baseDef,\n      decls: componentDefinition.decls,\n      vars: componentDefinition.vars,\n      template: componentDefinition.template,\n      consts: componentDefinition.consts || null,\n      ngContentSelectors: componentDefinition.ngContentSelectors,\n      onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n      directiveDefs: null,\n      pipeDefs: null,\n      dependencies: baseDef.standalone && componentDefinition.dependencies || null,\n      getStandaloneInjector: null,\n      data: componentDefinition.data || {},\n      encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n      id: `c${componentDefCount++}`,\n      styles: componentDefinition.styles || EMPTY_ARRAY,\n      _: null,\n      schemas: componentDefinition.schemas || null,\n      tView: null\n    };\n    initFeatures(def);\n    const dependencies = componentDefinition.dependencies;\n    def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */false);\n    def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */true);\n    return def;\n  });\n}\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n  const def = type.ɵcmp;\n  def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */false);\n  def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */true);\n}\nfunction extractDirectiveDef(type) {\n  return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n  return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n  return noSideEffects(() => {\n    const res = {\n      type: def.type,\n      bootstrap: def.bootstrap || EMPTY_ARRAY,\n      declarations: def.declarations || EMPTY_ARRAY,\n      imports: def.imports || EMPTY_ARRAY,\n      exports: def.exports || EMPTY_ARRAY,\n      transitiveCompileScopes: null,\n      schemas: def.schemas || null,\n      id: def.id || null\n    };\n    return res;\n  });\n}\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nfunction ɵɵsetNgModuleScope(type, scope) {\n  return noSideEffects(() => {\n    const ngModuleDef = getNgModuleDef(type, true);\n    ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n    ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n    ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n  });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n *   @Input()\n *   propName1: string;\n *\n *   @Input('publicName2')\n *   declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n *   propName1: 'propName1',\n *   declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n *   minifiedPropName1: 'propName1',\n *   minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n *  'propName1': 'minifiedPropName1',\n *  'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n *  'propName1': 'propName1',\n *  'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n  if (obj == null) return EMPTY_OBJ;\n  const newLookup = {};\n  for (const minifiedKey in obj) {\n    if (obj.hasOwnProperty(minifiedKey)) {\n      let publicName = obj[minifiedKey];\n      let declaredName = publicName;\n      if (Array.isArray(publicName)) {\n        declaredName = publicName[1];\n        publicName = publicName[0];\n      }\n      newLookup[publicName] = minifiedKey;\n      if (secondary) {\n        secondary[publicName] = declaredName;\n      }\n    }\n  }\n  return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵdir = ɵɵdefineDirective({\n *     ...\n *   });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdefineDirective(directiveDefinition) {\n  return noSideEffects(() => {\n    const def = getNgDirectiveDef(directiveDefinition);\n    initFeatures(def);\n    return def;\n  });\n}\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n *   // Generated by Angular Template Compiler\n *   static ɵpipe = definePipe({\n *     ...\n *   });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n  return {\n    type: pipeDef.type,\n    name: pipeDef.name,\n    factory: null,\n    pure: pipeDef.pure !== false,\n    standalone: pipeDef.standalone === true,\n    onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n  };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n  return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n  return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n  return type[NG_PIPE_DEF] || null;\n}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See this guide for additional information: https://angular.io/guide/standalone-components\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nfunction isStandalone(type) {\n  const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n  return def !== null ? def.standalone : false;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n  const ngModuleDef = type[NG_MOD_DEF] || null;\n  if (!ngModuleDef && throwNotFound === true) {\n    throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n  }\n  return ngModuleDef;\n}\nfunction getNgDirectiveDef(directiveDefinition) {\n  const declaredInputs = {};\n  return {\n    type: directiveDefinition.type,\n    providersResolver: null,\n    factory: null,\n    hostBindings: directiveDefinition.hostBindings || null,\n    hostVars: directiveDefinition.hostVars || 0,\n    hostAttrs: directiveDefinition.hostAttrs || null,\n    contentQueries: directiveDefinition.contentQueries || null,\n    declaredInputs,\n    exportAs: directiveDefinition.exportAs || null,\n    standalone: directiveDefinition.standalone === true,\n    selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n    viewQuery: directiveDefinition.viewQuery || null,\n    features: directiveDefinition.features || null,\n    setInput: null,\n    findHostDirectiveDefs: null,\n    hostDirectives: null,\n    inputs: invertObject(directiveDefinition.inputs, declaredInputs),\n    outputs: invertObject(directiveDefinition.outputs)\n  };\n}\nfunction initFeatures(definition) {\n  definition.features?.forEach(fn => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n  if (!dependencies) {\n    return null;\n  }\n  const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n  return () => (typeof dependencies === 'function' ? dependencies() : dependencies).map(dep => defExtractor(dep)).filter(nonNull);\n}\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nconst T_HOST = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR$1 = 9;\nconst RENDERER_FACTORY = 10;\nconst RENDERER = 11;\nconst SANITIZER = 12;\nconst CHILD_HEAD = 13;\nconst CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 15;\nconst DECLARATION_COMPONENT_VIEW = 16;\nconst DECLARATION_LCONTAINER = 17;\nconst PREORDER_HOOK_FLAGS = 18;\nconst QUERIES = 19;\nconst ID = 20;\nconst EMBEDDED_VIEW_INJECTOR = 21;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 22;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$4 = 1;\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nconst HAS_TRANSPLANTED_VIEWS = 2;\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$3 = 1;\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n  return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n  return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n  return (tNode.flags & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n  return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n  return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\n\nfunction isComponentDef(def) {\n  return !!def.template;\n}\nfunction isRootView(target) {\n  return (target[FLAGS] & 256 /* LViewFlags.IsRoot */) !== 0;\n}\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n  assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n  assertTNode(tNode);\n  tNode.hasOwnProperty('tView_') && assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n  assertDefined(tNode, 'TNode must be defined');\n  if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n    throwError('Not of type TNode, got: ' + tNode);\n  }\n}\nfunction assertTIcu(tIcu) {\n  assertDefined(tIcu, 'Expected TIcu to be defined');\n  if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n    throwError('Object is not of TIcu type.');\n  }\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n  if (!getComponentDef(actual)) {\n    throwError(msg);\n  }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n  if (!getNgModuleDef(actual)) {\n    throwError(msg);\n  }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n  assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n  assertDefined(tNode, 'currentTNode should exist!');\n  assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n  assertDefined(value, 'LContainer must be defined');\n  assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n  value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n  assertDefined(value, 'LView must be defined');\n  assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n  assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n  assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n  if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n    throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n  }\n}\nfunction assertIndexInDeclRange(lView, index) {\n  const tView = lView[1];\n  assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n  const tView = lView[1];\n  assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n  if (!(lower <= index && index < upper)) {\n    throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n  }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n  assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n  assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n  assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n  assertIndexInExpandoRange(lView, injectorIndex);\n  assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */);\n  assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n  assertNumber(lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\nfunction getFactoryDef(type, throwNotFound) {\n  const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n  if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n    throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n  }\n  return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nclass SimpleChange {\n  constructor(previousValue, currentValue, firstChange) {\n    this.previousValue = previousValue;\n    this.currentValue = currentValue;\n    this.firstChange = firstChange;\n  }\n  /**\n   * Check whether the new value is the first value assigned.\n   */\n  isFirstChange() {\n    return this.firstChange;\n  }\n}\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n *   ...\n *   inputs: {name: 'publicName'},\n *   features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n  return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n  if (definition.type.prototype.ngOnChanges) {\n    definition.setInput = ngOnChangesSetInput;\n  }\n  return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n *     it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n  const simpleChangesStore = getSimpleChangesStore(this);\n  const current = simpleChangesStore?.current;\n  if (current) {\n    const previous = simpleChangesStore.previous;\n    if (previous === EMPTY_OBJ) {\n      simpleChangesStore.previous = current;\n    } else {\n      // New changes are copied to the previous store, so that we don't lose history for inputs\n      // which were not changed this time\n      for (let key in current) {\n        previous[key] = current[key];\n      }\n    }\n    simpleChangesStore.current = null;\n    this.ngOnChanges(current);\n  }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n  const declaredName = this.declaredInputs[publicName];\n  ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n  const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {\n    previous: EMPTY_OBJ,\n    current: null\n  });\n  const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n  const previous = simpleChangesStore.previous;\n  const previousChange = previous[declaredName];\n  current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n  instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n  return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n  return instance[SIMPLE_CHANGES_STORE] = store;\n}\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = profiler => {\n  profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n *  execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n  if (profilerCallback != null /* both `null` and `undefined` */) {\n    profilerCallback(event, instance, hookOrListener);\n  }\n};\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n *   - `typeof value[TYPE] === 'object'` => `LView`\n *      - This happens when we have a component at a given location\n *   - `typeof value[TYPE] === true` => `LContainer`\n *      - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n  while (Array.isArray(value)) {\n    value = value[HOST];\n  }\n  return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n  while (Array.isArray(value)) {\n    // This check is same as `isLView()` but we don't call at as we don't want to call\n    // `Array.isArray()` twice and give JITer more work for inlining.\n    if (typeof value[TYPE] === 'object') return value;\n    value = value[HOST];\n  }\n  return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n  ngDevMode && assertIndexInRange(lView, index);\n  ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n  return unwrapRNode(lView[index]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  ngDevMode && assertIndexInRange(lView, tNode.index);\n  const node = unwrapRNode(lView[tNode.index]);\n  return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n  const index = tNode === null ? -1 : tNode.index;\n  if (index !== -1) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    const node = unwrapRNode(lView[index]);\n    return node;\n  }\n  return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n  ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n  ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n  const tNode = tView.data[index];\n  ngDevMode && tNode !== null && assertTNode(tNode);\n  return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n  ngDevMode && assertIndexInRange(view, index);\n  return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n  // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n  ngDevMode && assertIndexInRange(hostView, nodeIndex);\n  const slotValue = hostView[nodeIndex];\n  const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n  return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n  return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n  return (view[FLAGS] & 64 /* LViewFlags.Attached */) === 64 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n  return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n  if (index === null || index === undefined) return null;\n  ngDevMode && assertIndexInRange(consts, index);\n  return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n  lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n *  1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n *  or\n *  2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nfunction updateTransplantedViewCount(lContainer, amount) {\n  lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n  let viewOrContainer = lContainer;\n  let parent = lContainer[PARENT];\n  while (parent !== null && (amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1 || amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0)) {\n    parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n    viewOrContainer = parent;\n    parent = parent[PARENT];\n  }\n}\nconst instructionState = {\n  lFrame: /*#__PURE__*/createLFrame(null),\n  bindingsEnabled: true\n};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n  return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n  return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n  instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n  instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n  return instructionState.bindingsEnabled;\n}\n/**\n * Enables directive matching on elements.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n  instructionState.bindingsEnabled = true;\n}\n/**\n * Disables directive matching on element.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n  instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n  return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n  return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n  instructionState.lFrame.contextLView = viewToRestore;\n  return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n  instructionState.lFrame.contextLView = null;\n  return value;\n}\nfunction getCurrentTNode() {\n  let currentTNode = getCurrentTNodePlaceholderOk();\n  while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n    currentTNode = currentTNode.parent;\n  }\n  return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n  return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n  const lFrame = instructionState.lFrame;\n  const currentTNode = lFrame.currentTNode;\n  return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n  ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n  const lFrame = instructionState.lFrame;\n  lFrame.currentTNode = tNode;\n  lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n  return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n  instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n  const contextLView = instructionState.lFrame.contextLView;\n  ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n  return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n  !ngDevMode && throwError('Must never be called in production mode');\n  return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n  !ngDevMode && throwError('Must never be called in production mode');\n  _isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n  const lFrame = instructionState.lFrame;\n  let index = lFrame.bindingRootIndex;\n  if (index === -1) {\n    index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n  }\n  return index;\n}\nfunction getBindingIndex() {\n  return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n  return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n  return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n  const lFrame = instructionState.lFrame;\n  const index = lFrame.bindingIndex;\n  lFrame.bindingIndex = lFrame.bindingIndex + count;\n  return index;\n}\nfunction isInI18nBlock() {\n  return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n  instructionState.lFrame.inI18n = isInI18nBlock;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n *        whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n  const lFrame = instructionState.lFrame;\n  lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n  setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n  return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n  instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n  const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n  return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n  return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n  instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n  const tView = lView[TVIEW];\n  // Return the declaration parent for embedded views\n  if (tView.type === 2 /* TViewType.Embedded */) {\n    ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n    return tView.declTNode;\n  }\n  // Components don't have `TView.declTNode` because each instance of component could be\n  // inserted in different location, hence `TView.declTNode` is meaningless.\n  // Falling back to `T_HOST` in case we cross component boundary.\n  if (tView.type === 1 /* TViewType.Component */) {\n    return lView[T_HOST];\n  }\n  // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n  return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n *     tree from `tNode`  until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n *     `TNode` if `flags` has  `SkipSelf`). Failing to enter DI implies that no associated\n *     `NodeInjector` can be found and we should instead use `ModuleInjector`.\n *     - If `true` than this call must be fallowed by `leaveDI`\n *     - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n  ngDevMode && assertLViewOrUndefined(lView);\n  if (flags & InjectFlags.SkipSelf) {\n    ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n    let parentTNode = tNode;\n    let parentLView = lView;\n    while (true) {\n      ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n      parentTNode = parentTNode.parent;\n      if (parentTNode === null && !(flags & InjectFlags.Host)) {\n        parentTNode = getDeclarationTNode(parentLView);\n        if (parentTNode === null) break;\n        // In this case, a parent exists and is definitely an element. So it will definitely\n        // have an existing lView as the declaration view, which is why we can assume it's defined.\n        ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n        parentLView = parentLView[DECLARATION_VIEW];\n        // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n        // We want to skip those and look only at Elements and ElementContainers to ensure\n        // we're looking at true parent nodes, and not content or other types.\n        if (parentTNode.type & (2 /* TNodeType.Element */ | 8 /* TNodeType.ElementContainer */)) {\n          break;\n        }\n      } else {\n        break;\n      }\n    }\n    if (parentTNode === null) {\n      // If we failed to find a parent TNode this means that we should use module injector.\n      return false;\n    } else {\n      tNode = parentTNode;\n      lView = parentLView;\n    }\n  }\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  const lFrame = instructionState.lFrame = allocLFrame();\n  lFrame.currentTNode = tNode;\n  lFrame.lView = lView;\n  return true;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nfunction enterView(newView) {\n  ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n  ngDevMode && assertLViewOrUndefined(newView);\n  const newLFrame = allocLFrame();\n  if (ngDevMode) {\n    assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n    assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n    assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n    assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n    assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n    assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n    assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n    assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n    assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n  }\n  const tView = newView[TVIEW];\n  instructionState.lFrame = newLFrame;\n  ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n  newLFrame.currentTNode = tView.firstChild;\n  newLFrame.lView = newView;\n  newLFrame.tView = tView;\n  newLFrame.contextLView = newView;\n  newLFrame.bindingIndex = tView.bindingStartIndex;\n  newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n  const currentLFrame = instructionState.lFrame;\n  const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n  const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n  return newLFrame;\n}\nfunction createLFrame(parent) {\n  const lFrame = {\n    currentTNode: null,\n    isParent: true,\n    lView: null,\n    tView: null,\n    selectedIndex: -1,\n    contextLView: null,\n    elementDepthCount: 0,\n    currentNamespace: null,\n    currentDirectiveIndex: -1,\n    bindingRootIndex: -1,\n    bindingIndex: -1,\n    currentQueryIndex: 0,\n    parent: parent,\n    child: null,\n    inI18n: false\n  };\n  parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n  return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n  const oldLFrame = instructionState.lFrame;\n  instructionState.lFrame = oldLFrame.parent;\n  oldLFrame.currentTNode = null;\n  oldLFrame.lView = null;\n  return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n  const oldLFrame = leaveViewLight();\n  oldLFrame.isParent = true;\n  oldLFrame.tView = null;\n  oldLFrame.selectedIndex = -1;\n  oldLFrame.contextLView = null;\n  oldLFrame.elementDepthCount = 0;\n  oldLFrame.currentDirectiveIndex = -1;\n  oldLFrame.currentNamespace = null;\n  oldLFrame.bindingRootIndex = -1;\n  oldLFrame.bindingIndex = -1;\n  oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n  const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n  return contextLView[CONTEXT];\n}\nfunction walkUpViews(nestingLevel, currentView) {\n  while (nestingLevel > 0) {\n    ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n    currentView = currentView[DECLARATION_VIEW];\n    nestingLevel--;\n  }\n  return currentView;\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n  return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n  ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n  ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n  instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n  const lFrame = instructionState.lFrame;\n  return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n  instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n  instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n  namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n  instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace$1() {\n  return instructionState.lFrame.currentNamespace;\n}\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n  ngDevMode && assertFirstCreatePass(tView);\n  const {\n    ngOnChanges,\n    ngOnInit,\n    ngDoCheck\n  } = directiveDef.type.prototype;\n  if (ngOnChanges) {\n    const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, wrappedOnChanges);\n  }\n  if (ngOnInit) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n  }\n  if (ngDoCheck) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n  }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n  ngDevMode && assertFirstCreatePass(tView);\n  // It's necessary to loop through the directives at elementEnd() (rather than processing in\n  // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n  // hooks for projected components and directives must be called *before* their hosts.\n  for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n    const directiveDef = tView.data[i];\n    ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n    const lifecycleHooks = directiveDef.type.prototype;\n    const {\n      ngAfterContentInit,\n      ngAfterContentChecked,\n      ngAfterViewInit,\n      ngAfterViewChecked,\n      ngOnDestroy\n    } = lifecycleHooks;\n    if (ngAfterContentInit) {\n      (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n    }\n    if (ngAfterContentChecked) {\n      (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n      (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n    }\n    if (ngAfterViewInit) {\n      (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n    }\n    if (ngAfterViewChecked) {\n      (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n      (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n    }\n    if (ngOnDestroy != null) {\n      (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n    }\n  }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the  array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n  callHooks(lView, hooks, 3 /* InitPhaseState.InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n  ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n  if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n    callHooks(lView, hooks, initPhase, nodeIndex);\n  }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n  ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n  let flags = lView[FLAGS];\n  if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n    flags &= 2047 /* LViewFlags.IndexWithinInitPhaseReset */;\n    flags += 1 /* LViewFlags.InitPhaseStateIncrementer */;\n    lView[FLAGS] = flags;\n  }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n  ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n  const startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */ : 0;\n  const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n  const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n  let lastNodeIndexFound = 0;\n  for (let i = startIndex; i < max; i++) {\n    const hook = arr[i + 1];\n    if (typeof hook === 'number') {\n      lastNodeIndexFound = arr[i];\n      if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n        break;\n      }\n    } else {\n      const isInitHook = arr[i] < 0;\n      if (isInitHook) currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n      if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n        callHook(currentView, initPhase, arr, i);\n        currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i + 2;\n      }\n      i++;\n    }\n  }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n  const isInitHook = arr[i] < 0;\n  const hook = arr[i + 1];\n  const directiveIndex = isInitHook ? -arr[i] : arr[i];\n  const directive = currentView[directiveIndex];\n  if (isInitHook) {\n    const indexWithintInitPhase = currentView[FLAGS] >> 11 /* LViewFlags.IndexWithinInitPhaseShift */;\n    // The init phase state must be always checked here as it may have been recursively updated.\n    if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */ && (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n      currentView[FLAGS] += 2048 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n      profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n      try {\n        hook.call(directive);\n      } finally {\n        profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n      }\n    }\n  } else {\n    profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n    try {\n      hook.call(directive);\n    } finally {\n      profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n    }\n  }\n}\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n *    // Cumulative bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Cumulative bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Cumulative bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Cumulative bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Cumulative bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Cumulative bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Cumulative bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Cumulative bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // We need to store a reference to the injector's parent so DI can keep looking up\n *    // the injector tree until it finds the dependency it's looking for.\n *    [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n *    // Shared node bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Shared node bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Shared node bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Shared node bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Shared node bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Shared node bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Shared node bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Shared node bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // Necessary to find directive indices for a particular node.\n *    [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n *  }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n  constructor(\n  /**\n   * Factory to invoke in order to create a new instance.\n   */\n  factory,\n  /**\n   * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n   */\n  isViewProvider, injectImplementation) {\n    this.factory = factory;\n    /**\n     * Marker set to true during factory invocation to see if we get into recursive loop.\n     * Recursive loop causes an error to be displayed.\n     */\n    this.resolving = false;\n    ngDevMode && assertDefined(factory, 'Factory not specified');\n    ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n    this.canSeeViewProviders = isViewProvider;\n    this.injectImpl = injectImplementation;\n  }\n}\nfunction isFactory(obj) {\n  return obj instanceof NodeInjectorFactory;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$2 = 1;\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n  let text = '';\n  tNodeType & 1 /* TNodeType.Text */ && (text += '|Text');\n  tNodeType & 2 /* TNodeType.Element */ && (text += '|Element');\n  tNodeType & 4 /* TNodeType.Container */ && (text += '|Container');\n  tNodeType & 8 /* TNodeType.ElementContainer */ && (text += '|ElementContainer');\n  tNodeType & 16 /* TNodeType.Projection */ && (text += '|Projection');\n  tNodeType & 32 /* TNodeType.Icu */ && (text += '|IcuContainer');\n  tNodeType & 64 /* TNodeType.Placeholder */ && (text += '|Placeholder');\n  return text.length > 0 ? text.substring(1) : text;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$1 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n  return (tNode.flags & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n  return (tNode.flags & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\nfunction assertTNodeType(tNode, expectedTypes, message) {\n  assertDefined(tNode, 'should be called with a TNode');\n  if ((tNode.type & expectedTypes) === 0) {\n    throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n  }\n}\nfunction assertPureTNodeType(type) {\n  if (!(type === 2 /* TNodeType.Element */ ||\n  //\n  type === 1 /* TNodeType.Text */ ||\n  //\n  type === 4 /* TNodeType.Container */ ||\n  //\n  type === 8 /* TNodeType.ElementContainer */ ||\n  //\n  type === 32 /* TNodeType.Icu */ ||\n  //\n  type === 16 /* TNodeType.Projection */ ||\n  //\n  type === 64 /* TNodeType.Placeholder */)) {\n    throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n  }\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n *  attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n *  attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n  let i = 0;\n  while (i < attrs.length) {\n    const value = attrs[i];\n    if (typeof value === 'number') {\n      // only namespaces are supported. Other value types (such as style/class\n      // entries) are not supported in this function.\n      if (value !== 0 /* AttributeMarker.NamespaceURI */) {\n        break;\n      }\n      // we just landed on the marker value ... therefore\n      // we should skip to the next entry\n      i++;\n      const namespaceURI = attrs[i++];\n      const attrName = attrs[i++];\n      const attrVal = attrs[i++];\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n    } else {\n      // attrName is string;\n      const attrName = value;\n      const attrVal = attrs[++i];\n      // Standard attributes\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      if (isAnimationProp(attrName)) {\n        renderer.setProperty(native, attrName, attrVal);\n      } else {\n        renderer.setAttribute(native, attrName, attrVal);\n      }\n      i++;\n    }\n  }\n  // another piece of code may iterate over the same attributes array. Therefore\n  // it may be helpful to return the exact spot where the attributes array exited\n  // whether by running into an unsupported marker or if all the static values were\n  // iterated over.\n  return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n  return marker === 3 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ || marker === 6 /* AttributeMarker.I18n */;\n}\n\nfunction isAnimationProp(name) {\n  // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n  // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n  // charCodeAt doesn't allocate memory to return a substring.\n  return name.charCodeAt(0) === 64 /* CharCode.AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n  if (src === null || src.length === 0) {\n    // do nothing\n  } else if (dst === null || dst.length === 0) {\n    // We have source, but dst is empty, just make a copy.\n    dst = src.slice();\n  } else {\n    let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n    for (let i = 0; i < src.length; i++) {\n      const item = src[i];\n      if (typeof item === 'number') {\n        srcMarker = item;\n      } else {\n        if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n          // Case where we need to consume `key1`, `key2`, `value` items.\n        } else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ || srcMarker === 2 /* AttributeMarker.Styles */) {\n          // Case where we have to consume `key1` and `value` only.\n          mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n        } else {\n          // Case where we have to consume `key1` only.\n          mergeHostAttribute(dst, srcMarker, item, null, null);\n        }\n      }\n    }\n  }\n  return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n  let i = 0;\n  // Assume that new markers will be inserted at the end.\n  let markerInsertPosition = dst.length;\n  // scan until correct type.\n  if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n    markerInsertPosition = -1;\n  } else {\n    while (i < dst.length) {\n      const dstValue = dst[i++];\n      if (typeof dstValue === 'number') {\n        if (dstValue === marker) {\n          markerInsertPosition = -1;\n          break;\n        } else if (dstValue > marker) {\n          // We need to save this as we want the markers to be inserted in specific order.\n          markerInsertPosition = i - 1;\n          break;\n        }\n      }\n    }\n  }\n  // search until you find place of insertion\n  while (i < dst.length) {\n    const item = dst[i];\n    if (typeof item === 'number') {\n      // since `i` started as the index after the marker, we did not find it if we are at the next\n      // marker\n      break;\n    } else if (item === key1) {\n      // We already have same token\n      if (key2 === null) {\n        if (value !== null) {\n          dst[i + 1] = value;\n        }\n        return;\n      } else if (key2 === dst[i + 1]) {\n        dst[i + 2] = value;\n        return;\n      }\n    }\n    // Increment counter.\n    i++;\n    if (key2 !== null) i++;\n    if (value !== null) i++;\n  }\n  // insert at location.\n  if (markerInsertPosition !== -1) {\n    dst.splice(markerInsertPosition, 0, marker);\n    i = markerInsertPosition + 1;\n  }\n  dst.splice(i++, 0, key1);\n  if (key2 !== null) {\n    dst.splice(i++, 0, key2);\n  }\n  if (value !== null) {\n    dst.splice(i++, 0, value);\n  }\n}\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n  return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n  ngDevMode && assertNumber(parentLocation, 'Number expected');\n  ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n  const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n  ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n  return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\n\nfunction getParentInjectorViewOffset(parentLocation) {\n  return parentLocation >> 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n  let viewOffset = getParentInjectorViewOffset(location);\n  let parentView = startView;\n  // For most cases, the parent injector can be found on the host node (e.g. for component\n  // or container), but we must keep the loop here to support the rarer case of deeply nested\n  // <ng-template> tags or inline views, where the parent injector might live many views\n  // above the child injector.\n  while (viewOffset > 0) {\n    parentView = parentView[DECLARATION_VIEW];\n    viewOffset--;\n  }\n  return parentView;\n}\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n *   constructor(public value: String) {}\n * }\n *\n * @Component({\n *   providers: [\n *     MyService,\n *     {provide: String, value: 'providers' }\n *   ]\n *   viewProviders: [\n *     {provide: String, value: 'viewProviders'}\n *   ]\n * })\n * class MyComponent {\n *   constructor(myService: MyService, value: String) {\n *     // We expect that Component can see into `viewProviders`.\n *     expect(value).toEqual('viewProviders');\n *     // `MyService` was not declared in `viewProviders` hence it can't see it.\n *     expect(myService.value).toEqual('providers');\n *   }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n  const oldValue = includeViewProviders;\n  includeViewProviders = v;\n  return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n  ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n  let id;\n  if (typeof type === 'string') {\n    id = type.charCodeAt(0) || 0;\n  } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n    id = type[NG_ELEMENT_ID];\n  }\n  // Set a unique ID on the directive type, so if something tries to inject the directive,\n  // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n  if (id == null) {\n    id = type[NG_ELEMENT_ID] = nextNgElementId++;\n  }\n  // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n  // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n  const bloomHash = id & BLOOM_MASK;\n  // Create a mask that targets the specific bit associated with the directive.\n  // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n  // to bit positions 0 - 31 in a 32 bit integer.\n  const mask = 1 << bloomHash;\n  // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n  // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n  // should be written to.\n  tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n  const existingInjectorIndex = getInjectorIndex(tNode, lView);\n  if (existingInjectorIndex !== -1) {\n    return existingInjectorIndex;\n  }\n  const tView = lView[TVIEW];\n  if (tView.firstCreatePass) {\n    tNode.injectorIndex = lView.length;\n    insertBloom(tView.data, tNode); // foundation for node bloom\n    insertBloom(lView, null); // foundation for cumulative bloom\n    insertBloom(tView.blueprint, null);\n  }\n  const parentLoc = getParentInjectorLocation(tNode, lView);\n  const injectorIndex = tNode.injectorIndex;\n  // If a parent injector can't be found, its location is set to -1.\n  // In that case, we don't need to set up a cumulative bloom\n  if (hasParentInjector(parentLoc)) {\n    const parentIndex = getParentInjectorIndex(parentLoc);\n    const parentLView = getParentInjectorView(parentLoc, lView);\n    const parentData = parentLView[TVIEW].data;\n    // Creates a cumulative bloom filter that merges the parent's bloom filter\n    // and its own cumulative bloom (which contains tokens for all ancestors)\n    for (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n      lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n    }\n  }\n  lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = parentLoc;\n  return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n  arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n  if (tNode.injectorIndex === -1 ||\n  // If the injector index is the same as its parent's injector index, then the index has been\n  // copied down from the parent node. No injector has been created yet on this node.\n  tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex ||\n  // After the first template pass, the injector index might exist but the parent values\n  // might not have been calculated yet for this instance\n  lView[tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */] === null) {\n    return -1;\n  } else {\n    ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n    return tNode.injectorIndex;\n  }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n  if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n    // If we have a parent `TNode` and there is an injector associated with it we are done, because\n    // the parent injector is within the current `LView`.\n    return tNode.parent.injectorIndex; // ViewOffset is 0\n  }\n  // When parent injector location is computed it may be outside of the current view. (ie it could\n  // be pointing to a declared parent location). This variable stores number of declaration parents\n  // we need to walk up in order to find the parent injector location.\n  let declarationViewOffset = 0;\n  let parentTNode = null;\n  let lViewCursor = lView;\n  // The parent injector is not in the current `LView`. We will have to walk the declared parent\n  // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n  // `NodeInjector`.\n  while (lViewCursor !== null) {\n    parentTNode = getTNodeFromLView(lViewCursor);\n    if (parentTNode === null) {\n      // If we have no parent, than we are done.\n      return NO_PARENT_INJECTOR;\n    }\n    ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n    // Every iteration of the loop requires that we go to the declared parent.\n    declarationViewOffset++;\n    lViewCursor = lViewCursor[DECLARATION_VIEW];\n    if (parentTNode.injectorIndex !== -1) {\n      // We found a NodeInjector which points to something.\n      return parentTNode.injectorIndex | declarationViewOffset << 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n    }\n  }\n\n  return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n  bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n *  at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n *   constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n *   factory: () => new MyComponent(injectAttribute('title'))\n *   ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n  ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n  ngDevMode && assertDefined(tNode, 'expecting tNode');\n  if (attrNameToInject === 'class') {\n    return tNode.classes;\n  }\n  if (attrNameToInject === 'style') {\n    return tNode.styles;\n  }\n  const attrs = tNode.attrs;\n  if (attrs) {\n    const attrsLength = attrs.length;\n    let i = 0;\n    while (i < attrsLength) {\n      const value = attrs[i];\n      // If we hit a `Bindings` or `Template` marker then we are done.\n      if (isNameOnlyAttributeMarker(value)) break;\n      // Skip namespaced attributes\n      if (value === 0 /* AttributeMarker.NamespaceURI */) {\n        // we skip the next two values\n        // as namespaced attributes looks like\n        // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n        // 'existValue', ...]\n        i = i + 2;\n      } else if (typeof value === 'number') {\n        // Skip to the first value of the marked attribute.\n        i++;\n        while (i < attrsLength && typeof attrs[i] === 'string') {\n          i++;\n        }\n      } else if (value === attrNameToInject) {\n        return attrs[i + 1];\n      } else {\n        i = i + 2;\n      }\n    }\n  }\n  return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n  if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n    return notFoundValue;\n  } else {\n    throwProviderNotFoundError(token, 'NodeInjector');\n  }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n  if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n    // This must be set or the NullInjector will throw for optional deps\n    notFoundValue = null;\n  }\n  if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n    const moduleInjector = lView[INJECTOR$1];\n    // switch to `injectInjectorOnly` implementation for module injector, since module injector\n    // should not have access to Component/Directive DI scope (that may happen through\n    // `directiveInject` implementation)\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      if (moduleInjector) {\n        return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n      } else {\n        return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n      }\n    } finally {\n      setInjectImplementation(previousInjectImplementation);\n    }\n  }\n  return notFoundValueOrThrow(notFoundValue, token, flags);\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n  if (tNode !== null) {\n    // If the view or any of its ancestors have an embedded\n    // view injector, we have to look it up there first.\n    if (lView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) {\n      const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n      if (embeddedInjectorValue !== NOT_FOUND) {\n        return embeddedInjectorValue;\n      }\n    }\n    // Otherwise try the node injector.\n    const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n    if (value !== NOT_FOUND) {\n      return value;\n    }\n  }\n  // Finally, fall back to the module injector.\n  return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n  const bloomHash = bloomHashBitOrFactory(token);\n  // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n  // so just call the factory function to create it.\n  if (typeof bloomHash === 'function') {\n    if (!enterDI(lView, tNode, flags)) {\n      // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n      // flag, the module injector is not searched for that token in Ivy.\n      return flags & InjectFlags.Host ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n    }\n    try {\n      const value = bloomHash(flags);\n      if (value == null && !(flags & InjectFlags.Optional)) {\n        throwProviderNotFoundError(token);\n      } else {\n        return value;\n      }\n    } finally {\n      leaveDI();\n    }\n  } else if (typeof bloomHash === 'number') {\n    // A reference to the previous injector TView that was found while climbing the element\n    // injector tree. This is used to know if viewProviders can be accessed on the current\n    // injector.\n    let previousTView = null;\n    let injectorIndex = getInjectorIndex(tNode, lView);\n    let parentLocation = NO_PARENT_INJECTOR;\n    let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n    // If we should skip this injector, or if there is no injector on this node, start by\n    // searching the parent injector.\n    if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n      parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n      if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n        injectorIndex = -1;\n      } else {\n        previousTView = lView[TVIEW];\n        injectorIndex = getParentInjectorIndex(parentLocation);\n        lView = getParentInjectorView(parentLocation, lView);\n      }\n    }\n    // Traverse up the injector tree until we find a potential match or until we know there\n    // *isn't* a match.\n    while (injectorIndex !== -1) {\n      ngDevMode && assertNodeInjector(lView, injectorIndex);\n      // Check the current injector. If it matches, see if it contains token.\n      const tView = lView[TVIEW];\n      ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */], lView);\n      if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n        // At this point, we have an injector which *may* contain the token, so we step through\n        // the providers and directives associated with the injector's corresponding node to get\n        // the instance.\n        const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n        if (instance !== NOT_FOUND) {\n          return instance;\n        }\n      }\n      parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n      if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {\n        // The def wasn't found anywhere on this node, so it was a false positive.\n        // Traverse up the tree and continue searching.\n        previousTView = tView;\n        injectorIndex = getParentInjectorIndex(parentLocation);\n        lView = getParentInjectorView(parentLocation, lView);\n      } else {\n        // If we should not search parent OR If the ancestor bloom filter value does not have the\n        // bit corresponding to the directive we can give up on traversing up to find the specific\n        // injector.\n        injectorIndex = -1;\n      }\n    }\n  }\n  return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n  const currentTView = lView[TVIEW];\n  const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n  // First, we need to determine if view providers can be accessed by the starting element.\n  // There are two possibilities\n  const canAccessViewProviders = previousTView == null ?\n  // 1) This is the first invocation `previousTView == null` which means that we are at the\n  // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n  // to look into the ViewProviders is if:\n  // - we are on a component\n  // - AND the injector set `includeViewProviders` to true (implying that the token can see\n  // ViewProviders because it is the Component or a Service which itself was declared in\n  // ViewProviders)\n  isComponentHost(tNode) && includeViewProviders :\n  // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n  // In such a case we are only allowed to look into the ViewProviders if:\n  // - We just crossed from child View to Parent View `previousTView != currentTView`\n  // - AND the parent TNode is an Element.\n  // This means that we just came from the Component's View and therefore are allowed to see\n  // into the ViewProviders.\n  previousTView != currentTView && (tNode.type & 3 /* TNodeType.AnyRNode */) !== 0;\n  // This special case happens when there is a @host on the inject and when we are searching\n  // on the host element node.\n  const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n  const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n  if (injectableIdx !== null) {\n    return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n  } else {\n    return NOT_FOUND;\n  }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n  const nodeProviderIndexes = tNode.providerIndexes;\n  const tInjectables = tView.data;\n  const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n  const directivesStart = tNode.directiveStart;\n  const directiveEnd = tNode.directiveEnd;\n  const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n  const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n  // When the host special case applies, only the viewProviders and the component are visible\n  const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n  for (let i = startingIndex; i < endIndex; i++) {\n    const providerTokenOrDef = tInjectables[i];\n    if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n      return i;\n    }\n  }\n  if (isHostSpecialCase) {\n    const dirDef = tInjectables[directivesStart];\n    if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n      return directivesStart;\n    }\n  }\n  return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n  let value = lView[index];\n  const tData = tView.data;\n  if (isFactory(value)) {\n    const factory = value;\n    if (factory.resolving) {\n      throwCyclicDependencyError(stringifyForError(tData[index]));\n    }\n    const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n    factory.resolving = true;\n    const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n    const success = enterDI(lView, tNode, InjectFlags.Default);\n    ngDevMode && assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n    try {\n      value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n      // This code path is hit for both directives and providers.\n      // For perf reasons, we want to avoid searching for hooks on providers.\n      // It does no harm to try (the hooks just won't exist), but the extra\n      // checks are unnecessary and this is a hot path. So we check to see\n      // if the index of the dependency is in the directive range for this\n      // tNode. If it's not, we know it's a provider and skip hook registration.\n      if (tView.firstCreatePass && index >= tNode.directiveStart) {\n        ngDevMode && assertDirectiveDef(tData[index]);\n        registerPreOrderHooks(index, tData[index], tView);\n      }\n    } finally {\n      previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);\n      setIncludeViewProviders(previousIncludeViewProviders);\n      factory.resolving = false;\n      leaveDI();\n    }\n  }\n  return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n *   When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n  ngDevMode && assertDefined(token, 'token must be defined');\n  if (typeof token === 'string') {\n    return token.charCodeAt(0) || 0;\n  }\n  const tokenId =\n  // First check with `hasOwnProperty` so we don't get an inherited ID.\n  token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n  // Negative token IDs are used for special objects such as `Injector`\n  if (typeof tokenId === 'number') {\n    if (tokenId >= 0) {\n      return tokenId & BLOOM_MASK;\n    } else {\n      ngDevMode && assertEqual(tokenId, -1 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n      return createNodeInjector;\n    }\n  } else {\n    return tokenId;\n  }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n  // Create a mask that targets the specific bit associated with the directive we're looking for.\n  // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n  // to bit positions 0 - 31 in a 32 bit integer.\n  const mask = 1 << bloomHash;\n  // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n  // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n  // that should be used.\n  const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n  // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n  // this injector is a potential match.\n  return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n  return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nclass NodeInjector {\n  constructor(_tNode, _lView) {\n    this._tNode = _tNode;\n    this._lView = _lView;\n  }\n  get(token, notFoundValue, flags) {\n    return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n  }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n  return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n  return noSideEffects(() => {\n    const ownConstructor = type.prototype.constructor;\n    const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n    const objectPrototype = Object.prototype;\n    let parent = Object.getPrototypeOf(type.prototype).constructor;\n    // Go up the prototype until we hit `Object`.\n    while (parent && parent !== objectPrototype) {\n      const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n      // If we hit something that has a factory and the factory isn't the same as the type,\n      // we've found the inherited factory. Note the check that the factory isn't the type's\n      // own factory is redundant in most cases, but if the user has custom decorators on the\n      // class, this lookup will start one level down in the prototype chain, causing us to\n      // find the own factory first and potentially triggering an infinite loop downstream.\n      if (factory && factory !== ownFactory) {\n        return factory;\n      }\n      parent = Object.getPrototypeOf(parent);\n    }\n    // There is no factory defined. Either this was improper usage of inheritance\n    // (no Angular decorator on the superclass) or there is no constructor at all\n    // in the inheritance chain. Since the two cases cannot be distinguished, the\n    // latter has to be assumed.\n    return t => new t();\n  });\n}\nfunction getFactoryOf(type) {\n  if (isForwardRef(type)) {\n    return () => {\n      const factory = getFactoryOf(resolveForwardRef(type));\n      return factory && factory();\n    };\n  }\n  return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n  let currentTNode = tNode;\n  let currentLView = lView;\n  // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n  // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n  // Since the bloom filters for the node injectors have already been constructed and we don't\n  // have a way of extracting the records from an injector, the only way to maintain the correct\n  // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n  // the token at each level.\n  while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */ && !(currentLView[FLAGS] & 256 /* LViewFlags.IsRoot */)) {\n    ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n    // Note that this lookup on the node injector is using the `Self` flag, because\n    // we don't want the node injector to look at any parent injectors since we\n    // may hit the embedded view injector first.\n    const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n    if (nodeInjectorValue !== NOT_FOUND) {\n      return nodeInjectorValue;\n    }\n    // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n    let parentTNode = currentTNode.parent;\n    // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n    // it means that we've hit the view boundary and we need to go up to the next view.\n    if (!parentTNode) {\n      // Before we go to the next LView, check if the token exists on the current embedded injector.\n      const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n      if (embeddedViewInjector) {\n        const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n        if (embeddedViewInjectorValue !== NOT_FOUND) {\n          return embeddedViewInjectorValue;\n        }\n      }\n      // Otherwise keep going up the tree.\n      parentTNode = getTNodeFromLView(currentLView);\n      currentLView = currentLView[DECLARATION_VIEW];\n    }\n    currentTNode = parentTNode;\n  }\n  return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n  const tView = lView[TVIEW];\n  const tViewType = tView.type;\n  // The parent pointer differs based on `TView.type`.\n  if (tViewType === 2 /* TViewType.Embedded */) {\n    ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n    return tView.declTNode;\n  } else if (tViewType === 1 /* TViewType.Component */) {\n    // Components don't have `TView.declTNode` because each instance of component could be\n    // inserted in different location, hence `TView.declTNode` is meaningless.\n    return lView[T_HOST];\n  }\n  return null;\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n  return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n  return noSideEffects(() => {\n    const metaCtor = makeMetadataCtor(props);\n    function DecoratorFactory(...args) {\n      if (this instanceof DecoratorFactory) {\n        metaCtor.call(this, ...args);\n        return this;\n      }\n      const annotationInstance = new DecoratorFactory(...args);\n      return function TypeDecorator(cls) {\n        if (typeFn) typeFn(cls, ...args);\n        // Use of Object.defineProperty is important since it creates non-enumerable property which\n        // prevents the property is copied during subclassing.\n        const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {\n          value: []\n        })[ANNOTATIONS];\n        annotations.push(annotationInstance);\n        if (additionalProcessing) additionalProcessing(cls);\n        return cls;\n      };\n    }\n    if (parentClass) {\n      DecoratorFactory.prototype = Object.create(parentClass.prototype);\n    }\n    DecoratorFactory.prototype.ngMetadataName = name;\n    DecoratorFactory.annotationCls = DecoratorFactory;\n    return DecoratorFactory;\n  });\n}\nfunction makeMetadataCtor(props) {\n  return function ctor(...args) {\n    if (props) {\n      const values = props(...args);\n      for (const propName in values) {\n        this[propName] = values[propName];\n      }\n    }\n  };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n  return noSideEffects(() => {\n    const metaCtor = makeMetadataCtor(props);\n    function ParamDecoratorFactory(...args) {\n      if (this instanceof ParamDecoratorFactory) {\n        metaCtor.apply(this, args);\n        return this;\n      }\n      const annotationInstance = new ParamDecoratorFactory(...args);\n      ParamDecorator.annotation = annotationInstance;\n      return ParamDecorator;\n      function ParamDecorator(cls, unusedKey, index) {\n        // Use of Object.defineProperty is important since it creates non-enumerable property which\n        // prevents the property is copied during subclassing.\n        const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {\n          value: []\n        })[PARAMETERS];\n        // there might be gaps if some in between parameters do not have annotations.\n        // we pad with nulls.\n        while (parameters.length <= index) {\n          parameters.push(null);\n        }\n        (parameters[index] = parameters[index] || []).push(annotationInstance);\n        return cls;\n      }\n    }\n    if (parentClass) {\n      ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n    }\n    ParamDecoratorFactory.prototype.ngMetadataName = name;\n    ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n    return ParamDecoratorFactory;\n  });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n  return noSideEffects(() => {\n    const metaCtor = makeMetadataCtor(props);\n    function PropDecoratorFactory(...args) {\n      if (this instanceof PropDecoratorFactory) {\n        metaCtor.apply(this, args);\n        return this;\n      }\n      const decoratorInstance = new PropDecoratorFactory(...args);\n      function PropDecorator(target, name) {\n        const constructor = target.constructor;\n        // Use of Object.defineProperty is important because it creates a non-enumerable property\n        // which prevents the property from being copied during subclassing.\n        const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {\n          value: {}\n        })[PROP_METADATA];\n        meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n        meta[name].unshift(decoratorInstance);\n        if (additionalProcessing) additionalProcessing(target, name, ...args);\n      }\n      return PropDecorator;\n    }\n    if (parentClass) {\n      PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n    }\n    PropDecoratorFactory.prototype.ngMetadataName = name;\n    PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n    return PropDecoratorFactory;\n  });\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = /*#__PURE__*/makeParamDecorator('Attribute', attributeName => ({\n  attributeName,\n  __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName)\n}));\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nclass InjectionToken {\n  /**\n   * @param _desc   Description for the token,\n   *                used only for debugging purposes,\n   *                it should but does not need to be unique\n   * @param options Options for the token's usage, as described above\n   */\n  constructor(_desc, options) {\n    this._desc = _desc;\n    /** @internal */\n    this.ngMetadataName = 'InjectionToken';\n    this.ɵprov = undefined;\n    if (typeof options == 'number') {\n      (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here');\n      // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n      // See `InjectorMarkers`\n      this.__NG_ELEMENT_ID__ = options;\n    } else if (options !== undefined) {\n      this.ɵprov = ɵɵdefineInjectable({\n        token: this,\n        providedIn: options.providedIn || 'root',\n        factory: options.factory\n      });\n    }\n  }\n  /**\n   * @internal\n   */\n  get multi() {\n    return this;\n  }\n  toString() {\n    return `InjectionToken ${this._desc}`;\n  }\n}\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n *   return [\n *     {provide: ROUTES, useValue: routes},\n *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n *   ];\n * }\n *\n * // user code\n * let routes = [\n *   {path: '/root', component: RootComp},\n *   {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n *   providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nconst ANALYZE_FOR_ENTRY_COMPONENTS = /*#__PURE__*/new InjectionToken('AnalyzeForEntryComponents');\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nclass Query {}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = /*#__PURE__*/makePropDecorator('ContentChildren', (selector, data = {}) => ({\n  selector,\n  first: false,\n  isViewQuery: false,\n  descendants: false,\n  emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n  ...data\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = /*#__PURE__*/makePropDecorator('ContentChild', (selector, data = {}) => ({\n  selector,\n  first: true,\n  isViewQuery: false,\n  descendants: true,\n  ...data\n}), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = /*#__PURE__*/makePropDecorator('ViewChildren', (selector, data = {}) => ({\n  selector,\n  first: false,\n  isViewQuery: true,\n  descendants: true,\n  emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n  ...data\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = /*#__PURE__*/makePropDecorator('ViewChild', (selector, data) => ({\n  selector,\n  first: true,\n  isViewQuery: true,\n  descendants: true,\n  ...data\n}), Query);\nvar FactoryTarget = /*#__PURE__*/(() => {\n  FactoryTarget = FactoryTarget || {};\n  FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n  FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n  FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n  FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n  FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n  return FactoryTarget;\n})();\nvar R3TemplateDependencyKind = /*#__PURE__*/(() => {\n  R3TemplateDependencyKind = R3TemplateDependencyKind || {};\n  R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n  R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n  R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n  return R3TemplateDependencyKind;\n})();\nvar ViewEncapsulation = /*#__PURE__*/(() => {\n  ViewEncapsulation = ViewEncapsulation || {};\n  ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n  // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n  ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n  ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n  return ViewEncapsulation;\n})();\nfunction getCompilerFacade(request) {\n  const globalNg = _global['ng'];\n  if (globalNg && globalNg.ɵcompilerFacade) {\n    return globalNg.ɵcompilerFacade;\n  }\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    // Log the type as an error so that a developer can easily navigate to the type from the\n    // console.\n    console.error(`JIT compilation failed for ${request.kind}`, request.type);\n    let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n    if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n      message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n      message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n      message += '\\n';\n      message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n    } else {\n      message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n    }\n    message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n    message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n    throw new Error(message);\n  } else {\n    throw new Error('JIT compiler unavailable');\n  }\n}\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n  return typeof v === 'function';\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n *     the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; i++) {\n    let valueA = a[i];\n    let valueB = b[i];\n    if (identityAccessor) {\n      valueA = identityAccessor(valueA);\n      valueB = identityAccessor(valueB);\n    }\n    if (valueB !== valueA) {\n      return false;\n    }\n  }\n  return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list) {\n  return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n  input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n  // perf: array.push is faster than array.splice!\n  if (index >= arr.length) {\n    arr.push(value);\n  } else {\n    arr.splice(index, 0, value);\n  }\n}\nfunction removeFromArray(arr, index) {\n  // perf: array.pop is faster than array.splice!\n  if (index >= arr.length - 1) {\n    return arr.pop();\n  } else {\n    return arr.splice(index, 1)[0];\n  }\n}\nfunction newArray(size, value) {\n  const list = [];\n  for (let i = 0; i < size; i++) {\n    list.push(value);\n  }\n  return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n  const length = array.length - count;\n  while (index < length) {\n    array[index] = array[index + count];\n    index++;\n  }\n  while (count--) {\n    array.pop(); // shrink the array\n  }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n  ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n  let end = array.length;\n  while (end > index) {\n    const previousEnd = end - 1;\n    array[end] = array[previousEnd];\n    end = previousEnd;\n  }\n  array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n  ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n  let end = array.length;\n  if (end == index) {\n    // inserting at the end.\n    array.push(value1, value2);\n  } else if (end === 1) {\n    // corner case when we have less items in array than we have items to insert.\n    array.push(value2, array[0]);\n    array[0] = value1;\n  } else {\n    end--;\n    array.push(array[end - 1], array[end]);\n    while (end > index) {\n      const previousEnd = end - 2;\n      array[end] = array[previousEnd];\n      end--;\n    }\n    array[index] = value1;\n    array[index + 1] = value2;\n  }\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     located)\n */\nfunction arrayIndexOfSorted(array, value) {\n  return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n  let index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it set it.\n    keyValueArray[index | 1] = value;\n  } else {\n    index = ~index;\n    arrayInsert2(keyValueArray, index, key, value);\n  }\n  return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n  const index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it retrieve it.\n    return keyValueArray[index | 1];\n  }\n  return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n *   - positive (even) index if key found.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n  return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n *   - positive (even) index if key found and deleted.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n  const index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it remove it.\n    arraySplice(keyValueArray, index, 2);\n  }\n  return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n *   - `0` means look at every location\n *   - `1` means only look at every other (even) location (the odd locations are to be ignored as\n *         they are values.)\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n  ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n  let start = 0;\n  let end = array.length >> shift;\n  while (end !== start) {\n    const middle = start + (end - start >> 1); // find the middle.\n    const current = array[middle << shift];\n    if (value === current) {\n      return middle << shift;\n    } else if (current > value) {\n      end = middle;\n    } else {\n      start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n    }\n  }\n\n  return ~(end << shift);\n}\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n  return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);\n}\nclass ReflectionCapabilities {\n  constructor(reflect) {\n    this._reflect = reflect || _global['Reflect'];\n  }\n  factory(t) {\n    return (...args) => new t(...args);\n  }\n  /** @internal */\n  _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n    let result;\n    if (typeof paramTypes === 'undefined') {\n      result = newArray(paramAnnotations.length);\n    } else {\n      result = newArray(paramTypes.length);\n    }\n    for (let i = 0; i < result.length; i++) {\n      // TS outputs Object for parameters without types, while Traceur omits\n      // the annotations. For now we preserve the Traceur behavior to aid\n      // migration, but this can be revisited.\n      if (typeof paramTypes === 'undefined') {\n        result[i] = [];\n      } else if (paramTypes[i] && paramTypes[i] != Object) {\n        result[i] = [paramTypes[i]];\n      } else {\n        result[i] = [];\n      }\n      if (paramAnnotations && paramAnnotations[i] != null) {\n        result[i] = result[i].concat(paramAnnotations[i]);\n      }\n    }\n    return result;\n  }\n  _ownParameters(type, parentCtor) {\n    const typeStr = type.toString();\n    // If we have no decorators, we only have function.length as metadata.\n    // In that case, to detect whether a child class declared an own constructor or not,\n    // we need to look inside of that constructor to check whether it is\n    // just calling the parent.\n    // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n    // that sets 'design:paramtypes' to []\n    // if a class inherits from another class but has no ctor declared itself.\n    if (isDelegateCtor(typeStr)) {\n      return null;\n    }\n    // Prefer the direct API.\n    if (type.parameters && type.parameters !== parentCtor.parameters) {\n      return type.parameters;\n    }\n    // API of tsickle for lowering decorators to properties on the class.\n    const tsickleCtorParams = type.ctorParameters;\n    if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n      // Newer tsickle uses a function closure\n      // Retain the non-function case for compatibility with older tsickle\n      const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n      const paramTypes = ctorParameters.map(ctorParam => ctorParam && ctorParam.type);\n      const paramAnnotations = ctorParameters.map(ctorParam => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n      return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n    }\n    // API for metadata created by invoking the decorators.\n    const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n    const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n    if (paramTypes || paramAnnotations) {\n      return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n    }\n    // If a class has no decorators, at least create metadata\n    // based on function.length.\n    // Note: We know that this is a real constructor as we checked\n    // the content of the constructor above.\n    return newArray(type.length);\n  }\n  parameters(type) {\n    // Note: only report metadata if we have at least one class decorator\n    // to stay in sync with the static reflector.\n    if (!isType(type)) {\n      return [];\n    }\n    const parentCtor = getParentCtor(type);\n    let parameters = this._ownParameters(type, parentCtor);\n    if (!parameters && parentCtor !== Object) {\n      parameters = this.parameters(parentCtor);\n    }\n    return parameters || [];\n  }\n  _ownAnnotations(typeOrFunc, parentCtor) {\n    // Prefer the direct API.\n    if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n      let annotations = typeOrFunc.annotations;\n      if (typeof annotations === 'function' && annotations.annotations) {\n        annotations = annotations.annotations;\n      }\n      return annotations;\n    }\n    // API of tsickle for lowering decorators to properties on the class.\n    if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n      return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n    }\n    // API for metadata created by invoking the decorators.\n    if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n      return typeOrFunc[ANNOTATIONS];\n    }\n    return null;\n  }\n  annotations(typeOrFunc) {\n    if (!isType(typeOrFunc)) {\n      return [];\n    }\n    const parentCtor = getParentCtor(typeOrFunc);\n    const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n    const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n    return parentAnnotations.concat(ownAnnotations);\n  }\n  _ownPropMetadata(typeOrFunc, parentCtor) {\n    // Prefer the direct API.\n    if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n      let propMetadata = typeOrFunc.propMetadata;\n      if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n        propMetadata = propMetadata.propMetadata;\n      }\n      return propMetadata;\n    }\n    // API of tsickle for lowering decorators to properties on the class.\n    if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n      const propDecorators = typeOrFunc.propDecorators;\n      const propMetadata = {};\n      Object.keys(propDecorators).forEach(prop => {\n        propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n      });\n      return propMetadata;\n    }\n    // API for metadata created by invoking the decorators.\n    if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n      return typeOrFunc[PROP_METADATA];\n    }\n    return null;\n  }\n  propMetadata(typeOrFunc) {\n    if (!isType(typeOrFunc)) {\n      return {};\n    }\n    const parentCtor = getParentCtor(typeOrFunc);\n    const propMetadata = {};\n    if (parentCtor !== Object) {\n      const parentPropMetadata = this.propMetadata(parentCtor);\n      Object.keys(parentPropMetadata).forEach(propName => {\n        propMetadata[propName] = parentPropMetadata[propName];\n      });\n    }\n    const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n    if (ownPropMetadata) {\n      Object.keys(ownPropMetadata).forEach(propName => {\n        const decorators = [];\n        if (propMetadata.hasOwnProperty(propName)) {\n          decorators.push(...propMetadata[propName]);\n        }\n        decorators.push(...ownPropMetadata[propName]);\n        propMetadata[propName] = decorators;\n      });\n    }\n    return propMetadata;\n  }\n  ownPropMetadata(typeOrFunc) {\n    if (!isType(typeOrFunc)) {\n      return {};\n    }\n    return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n  }\n  hasLifecycleHook(type, lcProperty) {\n    return type instanceof Type && lcProperty in type.prototype;\n  }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n  if (!decoratorInvocations) {\n    return [];\n  }\n  return decoratorInvocations.map(decoratorInvocation => {\n    const decoratorType = decoratorInvocation.type;\n    const annotationCls = decoratorType.annotationCls;\n    const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n    return new annotationCls(...annotationArgs);\n  });\n}\nfunction getParentCtor(ctor) {\n  const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n  const parentCtor = parentProto ? parentProto.constructor : null;\n  // Note: We always use `Object` as the null value\n  // to simplify checking later on.\n  return parentCtor || Object;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = /*#__PURE__*/attachInjectFlag(\n/*#__PURE__*/\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', token => ({\n  token\n})), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\nlet _reflect = null;\nfunction getReflect() {\n  return _reflect = _reflect || new ReflectionCapabilities();\n}\nfunction reflectDependencies(type) {\n  return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n  return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n  const meta = {\n    token: null,\n    attribute: null,\n    host: false,\n    optional: false,\n    self: false,\n    skipSelf: false\n  };\n  if (Array.isArray(dep) && dep.length > 0) {\n    for (let j = 0; j < dep.length; j++) {\n      const param = dep[j];\n      if (param === undefined) {\n        // param may be undefined if type of dep is not set by ngtsc\n        continue;\n      }\n      const proto = Object.getPrototypeOf(param);\n      if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n        meta.optional = true;\n      } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n        meta.skipSelf = true;\n      } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n        meta.self = true;\n      } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n        meta.host = true;\n      } else if (param instanceof Inject) {\n        meta.token = param.token;\n      } else if (param instanceof Attribute) {\n        if (param.attributeName === undefined) {\n          throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n        }\n        meta.attribute = param.attributeName;\n      } else {\n        meta.token = param;\n      }\n    }\n  } else if (dep === undefined || Array.isArray(dep) && dep.length === 0) {\n    meta.token = null;\n  } else {\n    meta.token = dep;\n  }\n  return meta;\n}\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n *   selector: 'my-comp',\n *   templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n *   // After resolution all URLs have been converted into `template` strings.\n *   renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n  // Store all promises which are fetching the resources.\n  const componentResolved = [];\n  // Cache so that we don't fetch the same resource more than once.\n  const urlMap = new Map();\n  function cachedResourceResolve(url) {\n    let promise = urlMap.get(url);\n    if (!promise) {\n      const resp = resourceResolver(url);\n      urlMap.set(url, promise = resp.then(unwrapResponse));\n    }\n    return promise;\n  }\n  componentResourceResolutionQueue.forEach((component, type) => {\n    const promises = [];\n    if (component.templateUrl) {\n      promises.push(cachedResourceResolve(component.templateUrl).then(template => {\n        component.template = template;\n      }));\n    }\n    const styleUrls = component.styleUrls;\n    const styles = component.styles || (component.styles = []);\n    const styleOffset = component.styles.length;\n    styleUrls && styleUrls.forEach((styleUrl, index) => {\n      styles.push(''); // pre-allocate array.\n      promises.push(cachedResourceResolve(styleUrl).then(style => {\n        styles[styleOffset + index] = style;\n        styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n        if (styleUrls.length == 0) {\n          component.styleUrls = undefined;\n        }\n      }));\n    });\n    const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n    componentResolved.push(fullyResolved);\n  });\n  clearResolutionOfComponentResourcesQueue();\n  return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = /*#__PURE__*/new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = /*#__PURE__*/new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n  if (componentNeedsResolution(metadata)) {\n    componentResourceResolutionQueue.set(type, metadata);\n    componentDefPendingResolution.add(type);\n  }\n}\nfunction isComponentDefPendingResolution(type) {\n  return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n  return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n  const old = componentResourceResolutionQueue;\n  componentResourceResolutionQueue = new Map();\n  return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n  componentDefPendingResolution.clear();\n  queue.forEach((_, type) => componentDefPendingResolution.add(type));\n  componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n  return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n  return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n  componentDefPendingResolution.delete(type);\n}\n\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = /*#__PURE__*/new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n  if (type && type !== incoming && checkForDuplicateNgModules) {\n    throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n  }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n  const existing = modules.get(id) || null;\n  assertSameOrNotExisting(id, existing, ngModuleType);\n  modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n  modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n  return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n  checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n  name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n  name: 'no-errors-schema'\n};\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n  shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n  return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n  shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n  return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\n  // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n  // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n  // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n  // execute the check below.\n  if (schemas === null) return;\n  // If the element matches any directive, it's considered as valid.\n  if (!hasDirectives && tagName !== null) {\n    // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n    // as a custom element. Note that unknown elements with a dash in their name won't be instances\n    // of HTMLUnknownElement in browsers that support web components.\n    const isUnknown =\n    // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n    // because while most browsers return 'function', IE returns 'object'.\n    typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);\n    if (isUnknown && !matchingSchemas(schemas, tagName)) {\n      const isHostStandalone = isHostComponentStandalone(lView);\n      const templateLocation = getTemplateLocationDetails(lView);\n      const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n      let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n      message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared'}.\\n`;\n      if (tagName && tagName.indexOf('-') > -1) {\n        message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n      } else {\n        message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n      }\n      if (shouldThrowErrorOnUnknownElement) {\n        throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n      } else {\n        console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n      }\n    }\n  }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, schemas) {\n  // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n  // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n  // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n  // execute the check below.\n  if (schemas === null) return true;\n  // The property is considered valid if the element matches the schema, it exists on the element,\n  // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n  if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n    return true;\n  }\n  // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n  // need to account for both here, while being careful with `typeof null` also returning 'object'.\n  return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n  // Special-case a situation when a structural directive is applied to\n  // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n  // In this case the compiler generates the `ɵɵtemplate` instruction with\n  // the `null` as the tagName. The directive matching logic at runtime relies\n  // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n  // a default value of the `tNode.value` is not feasible at this moment.\n  if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n    tagName = 'ng-template';\n  }\n  const isHostStandalone = isHostComponentStandalone(lView);\n  const templateLocation = getTemplateLocationDetails(lView);\n  let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n  const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n  const importLocation = isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared';\n  if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n    // Most likely this is a control flow directive (such as `*ngIf`) used in\n    // a template, but the directive or the `CommonModule` is not imported.\n    const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n    message += `\\nIf the '${propName}' is an Angular control flow directive, ` + `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n  } else {\n    // May be an Angular component, which is not imported/declared?\n    message += `\\n1. If '${tagName}' is an Angular component and it has the ` + `'${propName}' input, then verify that it is ${importLocation}.`;\n    // May be a Web Component?\n    if (tagName && tagName.indexOf('-') > -1) {\n      message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` + `to the ${schemas} of this component to suppress this message.`;\n      message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n    } else {\n      // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n      message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n    }\n  }\n  reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n  if (shouldThrowErrorOnUnknownProperty) {\n    throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n  } else {\n    console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n  }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n  !ngDevMode && throwError('Must never be called in production mode');\n  const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n  const context = declarationLView[CONTEXT];\n  // Unable to obtain a context.\n  if (!context) return null;\n  return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n  !ngDevMode && throwError('Must never be called in production mode');\n  const componentDef = getDeclarationComponentDef(lView);\n  // Treat host component as non-standalone if we can't obtain the def.\n  return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n  !ngDevMode && throwError('Must never be called in production mode');\n  const hostComponentDef = getDeclarationComponentDef(lView);\n  const componentClassName = hostComponentDef?.type?.name;\n  return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = /*#__PURE__*/new Map([['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'], ['ngSwitchDefault', 'NgSwitchDefault']]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n  if (schemas !== null) {\n    for (let i = 0; i < schemas.length; i++) {\n      const schema = schemas[i];\n      if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2 = /*#__PURE__*/(() => {\n  RendererStyleFlags2 = RendererStyleFlags2 || {};\n  // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n  // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n  // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n  /**\n   * Marks a style as important.\n   */\n  RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n  /**\n   * Marks a style as using dash case naming (this-is-dash-case).\n   */\n  RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n  return RendererStyleFlags2;\n})();\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n *     sequence.\n */\nfunction escapeCommentText(value) {\n  return value.replace(COMMENT_DISALLOWED, text => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = /*#__PURE__*/new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n  return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n  ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n  TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n  ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n  return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n  ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n  TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n  /** Component's parent view data. */\n  get lView() {\n    return getLViewById(this.lViewId);\n  }\n  constructor(\n  /**\n   * ID of the component's parent view data.\n   */\n  lViewId,\n  /**\n   * The index instance of the node.\n   */\n  nodeIndex,\n  /**\n   * The instance of the DOM node that is attached to the lNode.\n   */\n  native) {\n    this.lViewId = lViewId;\n    this.nodeIndex = nodeIndex;\n    this.native = native;\n  }\n}\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n  let mpValue = readPatchedData(target);\n  if (mpValue) {\n    // only when it's an array is it considered an LView instance\n    // ... otherwise it's an already constructed LContext instance\n    if (isLView(mpValue)) {\n      const lView = mpValue;\n      let nodeIndex;\n      let component = undefined;\n      let directives = undefined;\n      if (isComponentInstance(target)) {\n        nodeIndex = findViaComponent(lView, target);\n        if (nodeIndex == -1) {\n          throw new Error('The provided component was not found in the application');\n        }\n        component = target;\n      } else if (isDirectiveInstance(target)) {\n        nodeIndex = findViaDirective(lView, target);\n        if (nodeIndex == -1) {\n          throw new Error('The provided directive was not found in the application');\n        }\n        directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n      } else {\n        nodeIndex = findViaNativeElement(lView, target);\n        if (nodeIndex == -1) {\n          return null;\n        }\n      }\n      // the goal is not to fill the entire context full of data because the lookups\n      // are expensive. Instead, only the target data (the element, component, container, ICU\n      // expression or directive details) are filled into the context. If called multiple times\n      // with different target values then the missing target data will be filled in.\n      const native = unwrapRNode(lView[nodeIndex]);\n      const existingCtx = readPatchedData(native);\n      const context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native);\n      // only when the component has been discovered then update the monkey-patch\n      if (component && context.component === undefined) {\n        context.component = component;\n        attachPatchData(context.component, context);\n      }\n      // only when the directives have been discovered then update the monkey-patch\n      if (directives && context.directives === undefined) {\n        context.directives = directives;\n        for (let i = 0; i < directives.length; i++) {\n          attachPatchData(directives[i], context);\n        }\n      }\n      attachPatchData(context.native, context);\n      mpValue = context;\n    }\n  } else {\n    const rElement = target;\n    ngDevMode && assertDomNode(rElement);\n    // if the context is not found then we need to traverse upwards up the DOM\n    // to find the nearest element that has already been monkey patched with data\n    let parent = rElement;\n    while (parent = parent.parentNode) {\n      const parentContext = readPatchedData(parent);\n      if (parentContext) {\n        const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\n        // the edge of the app was also reached here through another means\n        // (maybe because the DOM was changed manually).\n        if (!lView) {\n          return null;\n        }\n        const index = findViaNativeElement(lView, rElement);\n        if (index >= 0) {\n          const native = unwrapRNode(lView[index]);\n          const context = createLContext(lView, index, native);\n          attachPatchData(native, context);\n          mpValue = context;\n          break;\n        }\n      }\n    }\n  }\n  return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n  return new LContext(lView[ID], nodeIndex, native);\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n  let patchedData = readPatchedData(componentInstance);\n  let lView;\n  if (isLView(patchedData)) {\n    const contextLView = patchedData;\n    const nodeIndex = findViaComponent(contextLView, componentInstance);\n    lView = getComponentLViewByIndex(nodeIndex, contextLView);\n    const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n    context.component = componentInstance;\n    attachPatchData(componentInstance, context);\n    attachPatchData(context.native, context);\n  } else {\n    const context = patchedData;\n    const contextLView = context.lView;\n    ngDevMode && assertLView(contextLView);\n    lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n  }\n  return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n  ngDevMode && assertDefined(target, 'Target expected');\n  // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n  // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n  // we can't know when to remove an `LContext`.\n  if (isLView(data)) {\n    target[MONKEY_PATCH_KEY_NAME] = data[ID];\n    registerLView(data);\n  } else {\n    target[MONKEY_PATCH_KEY_NAME] = data;\n  }\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n  ngDevMode && assertDefined(target, 'Target expected');\n  const data = target[MONKEY_PATCH_KEY_NAME];\n  return typeof data === 'number' ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n  const value = readPatchedData(target);\n  if (value) {\n    return isLView(value) ? value : value.lView;\n  }\n  return null;\n}\nfunction isComponentInstance(instance) {\n  return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n  return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n  const tView = lView[TVIEW];\n  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n    if (unwrapRNode(lView[i]) === target) {\n      return i;\n    }\n  }\n  return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n  if (tNode.child) {\n    return tNode.child;\n  } else if (tNode.next) {\n    return tNode.next;\n  } else {\n    // Let's take the following template: <div><span>text</span></div><component/>\n    // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n    // in this case the parent `div`, so that we can find the component.\n    while (tNode.parent && !tNode.parent.next) {\n      tNode = tNode.parent;\n    }\n    return tNode.parent && tNode.parent.next;\n  }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n  const componentIndices = lView[TVIEW].components;\n  if (componentIndices) {\n    for (let i = 0; i < componentIndices.length; i++) {\n      const elementComponentIndex = componentIndices[i];\n      const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n      if (componentView[CONTEXT] === componentInstance) {\n        return elementComponentIndex;\n      }\n    }\n  } else {\n    const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n    const rootComponent = rootComponentView[CONTEXT];\n    if (rootComponent === componentInstance) {\n      // we are dealing with the root element here therefore we know that the\n      // element is the very first element after the HEADER data in the lView\n      return HEADER_OFFSET;\n    }\n  }\n  return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n  // if a directive is monkey patched then it will (by default)\n  // have a reference to the LView of the current view. The\n  // element bound to the directive being search lives somewhere\n  // in the view data. We loop through the nodes and check their\n  // list of directives for the instance.\n  let tNode = lView[TVIEW].firstChild;\n  while (tNode) {\n    const directiveIndexStart = tNode.directiveStart;\n    const directiveIndexEnd = tNode.directiveEnd;\n    for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n      if (lView[i] === directiveInstance) {\n        return tNode.index;\n      }\n    }\n    tNode = traverseNextElement(tNode);\n  }\n  return -1;\n}\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n  const tNode = lView[TVIEW].data[nodeIndex];\n  if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n  const results = [];\n  for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n    const directiveInstance = lView[i];\n    if (!isComponentInstance(directiveInstance)) {\n      results.push(directiveInstance);\n    }\n  }\n  return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n  const tNode = lView[TVIEW].data[nodeIndex];\n  const {\n    directiveStart,\n    componentOffset\n  } = tNode;\n  return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n  const tNode = lView[TVIEW].data[nodeIndex];\n  if (tNode && tNode.localNames) {\n    const result = {};\n    let localIndex = tNode.index + 1;\n    for (let i = 0; i < tNode.localNames.length; i += 2) {\n      result[tNode.localNames[i]] = lView[localIndex];\n      localIndex++;\n    }\n    return result;\n  }\n  return null;\n}\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n  return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n  if (_icuContainerIterate === undefined) {\n    // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n    // can be inlined into call-site.\n    _icuContainerIterate = loader();\n  }\n}\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n  ngDevMode && assertLView(lView);\n  const parent = lView[PARENT];\n  return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n  ngDevMode && assertDefined(componentOrLView, 'component');\n  let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n  while (lView && !(lView[FLAGS] & 256 /* LViewFlags.IsRoot */)) {\n    lView = getLViewParent(lView);\n  }\n  ngDevMode && assertLView(lView);\n  return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n  const rootView = getRootView(viewOrComponent);\n  ngDevMode && assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n  return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n  return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n  return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n  while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n    viewOrContainer = viewOrContainer[NEXT];\n  }\n  return viewOrContainer;\n}\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n  // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n  // won't be created until i18nApply() in the update block, so this node should be skipped.\n  // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n  // in `i18n_spec.ts`.\n  if (lNodeToHandle != null) {\n    let lContainer;\n    let isComponent = false;\n    // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n    // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n    // it has LContainer so that we can process all of those cases appropriately.\n    if (isLContainer(lNodeToHandle)) {\n      lContainer = lNodeToHandle;\n    } else if (isLView(lNodeToHandle)) {\n      isComponent = true;\n      ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n      lNodeToHandle = lNodeToHandle[HOST];\n    }\n    const rNode = unwrapRNode(lNodeToHandle);\n    if (action === 0 /* WalkTNodeTreeAction.Create */ && parent !== null) {\n      if (beforeNode == null) {\n        nativeAppendChild(renderer, parent, rNode);\n      } else {\n        nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n      }\n    } else if (action === 1 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n      nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n    } else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n      nativeRemoveNode(renderer, rNode, isComponent);\n    } else if (action === 3 /* WalkTNodeTreeAction.Destroy */) {\n      ngDevMode && ngDevMode.rendererDestroyNode++;\n      renderer.destroyNode(rNode);\n    }\n    if (lContainer != null) {\n      applyContainer(renderer, action, lContainer, parent, beforeNode);\n    }\n  }\n}\nfunction createTextNode(renderer, value) {\n  ngDevMode && ngDevMode.rendererCreateTextNode++;\n  ngDevMode && ngDevMode.rendererSetText++;\n  return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n  ngDevMode && ngDevMode.rendererSetText++;\n  renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n  ngDevMode && ngDevMode.rendererCreateComment++;\n  return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n  ngDevMode && ngDevMode.rendererCreateElement++;\n  return renderer.createElement(name, namespace);\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromContainer(tView, lView) {\n  const renderer = lView[RENDERER];\n  applyView(tView, lView, renderer, 2 /* WalkTNodeTreeAction.Detach */, null, null);\n  lView[HOST] = null;\n  lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n  lView[HOST] = parentNativeNode;\n  lView[T_HOST] = parentTNode;\n  applyView(tView, lView, renderer, 1 /* WalkTNodeTreeAction.Insert */, parentNativeNode, beforeNode);\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction renderDetachView(tView, lView) {\n  applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n *  - Because it's used for onDestroy calls, it needs to be bottom-up.\n *  - Must process containers instead of their views to avoid splicing\n *  when views are destroyed and re-added.\n *  - Using a while loop because it's faster than recursion\n *  - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n *  @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n  // If the view has no children, we can clean it up and return early.\n  let lViewOrLContainer = rootView[CHILD_HEAD];\n  if (!lViewOrLContainer) {\n    return cleanUpView(rootView[TVIEW], rootView);\n  }\n  while (lViewOrLContainer) {\n    let next = null;\n    if (isLView(lViewOrLContainer)) {\n      // If LView, traverse down to child.\n      next = lViewOrLContainer[CHILD_HEAD];\n    } else {\n      ngDevMode && assertLContainer(lViewOrLContainer);\n      // If container, traverse down to its first LView.\n      const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n      if (firstView) next = firstView;\n    }\n    if (!next) {\n      // Only clean up view when moving to the side or up, as destroy hooks\n      // should be called in order from the bottom up.\n      while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n        if (isLView(lViewOrLContainer)) {\n          cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n        }\n        lViewOrLContainer = lViewOrLContainer[PARENT];\n      }\n      if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n      if (isLView(lViewOrLContainer)) {\n        cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n      }\n      next = lViewOrLContainer && lViewOrLContainer[NEXT];\n    }\n    lViewOrLContainer = next;\n  }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n  ngDevMode && assertLView(lView);\n  ngDevMode && assertLContainer(lContainer);\n  const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n  const containerLength = lContainer.length;\n  if (index > 0) {\n    // This is a new view, we need to add it to the children.\n    lContainer[indexInContainer - 1][NEXT] = lView;\n  }\n  if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n    lView[NEXT] = lContainer[indexInContainer];\n    addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n  } else {\n    lContainer.push(lView);\n    lView[NEXT] = null;\n  }\n  lView[PARENT] = lContainer;\n  // track views where declaration and insertion points are different\n  const declarationLContainer = lView[DECLARATION_LCONTAINER];\n  if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n    trackMovedView(declarationLContainer, lView);\n  }\n  // notify query that a new view has been added\n  const lQueries = lView[QUERIES];\n  if (lQueries !== null) {\n    lQueries.insertView(tView);\n  }\n  // Sets the attached flag\n  lView[FLAGS] |= 64 /* LViewFlags.Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n  ngDevMode && assertDefined(lView, 'LView required');\n  ngDevMode && assertLContainer(declarationContainer);\n  const movedViews = declarationContainer[MOVED_VIEWS];\n  const insertedLContainer = lView[PARENT];\n  ngDevMode && assertLContainer(insertedLContainer);\n  const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n  ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n  const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n  ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n  if (declaredComponentLView !== insertedComponentLView) {\n    // At this point the declaration-component is not same as insertion-component; this means that\n    // this is a transplanted view. Mark the declared lView as having transplanted views so that\n    // those views can participate in CD.\n    declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n  }\n  if (movedViews === null) {\n    declarationContainer[MOVED_VIEWS] = [lView];\n  } else {\n    movedViews.push(lView);\n  }\n}\nfunction detachMovedView(declarationContainer, lView) {\n  ngDevMode && assertLContainer(declarationContainer);\n  ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n  const movedViews = declarationContainer[MOVED_VIEWS];\n  const declarationViewIndex = movedViews.indexOf(lView);\n  const insertionLContainer = lView[PARENT];\n  ngDevMode && assertLContainer(insertionLContainer);\n  // If the view was marked for refresh but then detached before it was checked (where the flag\n  // would be cleared and the counter decremented), we need to decrement the view counter here\n  // instead.\n  if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n    lView[FLAGS] &= ~512 /* LViewFlags.RefreshTransplantedView */;\n    updateTransplantedViewCount(insertionLContainer, -1);\n  }\n  movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n  if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n  const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n  const viewToDetach = lContainer[indexInContainer];\n  if (viewToDetach) {\n    const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n    if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n      detachMovedView(declarationLContainer, viewToDetach);\n    }\n    if (removeIndex > 0) {\n      lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n    }\n    const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n    removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n    // notify query that a view has been removed\n    const lQueries = removedLView[QUERIES];\n    if (lQueries !== null) {\n      lQueries.detachView(removedLView[TVIEW]);\n    }\n    viewToDetach[PARENT] = null;\n    viewToDetach[NEXT] = null;\n    // Unsets the attached flag\n    viewToDetach[FLAGS] &= ~64 /* LViewFlags.Attached */;\n  }\n\n  return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n  if (!(lView[FLAGS] & 128 /* LViewFlags.Destroyed */)) {\n    const renderer = lView[RENDERER];\n    if (renderer.destroyNode) {\n      applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.Destroy */, null, null);\n    }\n    destroyViewTree(lView);\n  }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n  if (!(lView[FLAGS] & 128 /* LViewFlags.Destroyed */)) {\n    // Usually the Attached flag is removed when the view is detached from its parent, however\n    // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n    lView[FLAGS] &= ~64 /* LViewFlags.Attached */;\n    // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n    // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n    // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n    // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n    // really more of an \"afterDestroy\" hook if you think about it.\n    lView[FLAGS] |= 128 /* LViewFlags.Destroyed */;\n    executeOnDestroys(tView, lView);\n    processCleanups(tView, lView);\n    // For component views only, the local renderer is destroyed at clean up time.\n    if (lView[TVIEW].type === 1 /* TViewType.Component */) {\n      ngDevMode && ngDevMode.rendererDestroy++;\n      lView[RENDERER].destroy();\n    }\n    const declarationContainer = lView[DECLARATION_LCONTAINER];\n    // we are dealing with an embedded view that is still inserted into a container\n    if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n      // and this is a projected view\n      if (declarationContainer !== lView[PARENT]) {\n        detachMovedView(declarationContainer, lView);\n      }\n      // For embedded views still attached to a container: remove query result from this view.\n      const lQueries = lView[QUERIES];\n      if (lQueries !== null) {\n        lQueries.detachView(tView);\n      }\n    }\n    // Unregister the view once everything else has been cleaned up.\n    unregisterLView(lView);\n  }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n  const tCleanup = tView.cleanup;\n  const lCleanup = lView[CLEANUP];\n  // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n  // information appended at the end. We need to know where the end of the `TCleanup` information\n  // is, and we track this with `lastLCleanupIndex`.\n  let lastLCleanupIndex = -1;\n  if (tCleanup !== null) {\n    for (let i = 0; i < tCleanup.length - 1; i += 2) {\n      if (typeof tCleanup[i] === 'string') {\n        // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n        // 2 at the end of this block).\n        const targetIdx = tCleanup[i + 3];\n        ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n        if (targetIdx >= 0) {\n          // unregister\n          lCleanup[lastLCleanupIndex = targetIdx]();\n        } else {\n          // Subscription\n          lCleanup[lastLCleanupIndex = -targetIdx].unsubscribe();\n        }\n        i += 2;\n      } else {\n        // This is a cleanup function that is grouped with the index of its context\n        const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n        tCleanup[i].call(context);\n      }\n    }\n  }\n  if (lCleanup !== null) {\n    for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n      const instanceCleanupFn = lCleanup[i];\n      ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n      instanceCleanupFn();\n    }\n    lView[CLEANUP] = null;\n  }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n  let destroyHooks;\n  if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n    for (let i = 0; i < destroyHooks.length; i += 2) {\n      const context = lView[destroyHooks[i]];\n      // Only call the destroy hook if the context has been requested.\n      if (!(context instanceof NodeInjectorFactory)) {\n        const toCall = destroyHooks[i + 1];\n        if (Array.isArray(toCall)) {\n          for (let j = 0; j < toCall.length; j += 2) {\n            const callContext = context[toCall[j]];\n            const hook = toCall[j + 1];\n            profiler(4 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n            try {\n              hook.call(callContext);\n            } finally {\n              profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n            }\n          }\n        } else {\n          profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n          try {\n            toCall.call(context);\n          } finally {\n            profiler(5 /* ProfilerEvent.LifecycleHookEnd */, context, toCall);\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n *   insertion because the content of a component will be projected.\n *   `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n *   parent container, which itself is disconnected. For example the parent container is part\n *   of a View which has not be inserted or is made for projection but has not been inserted\n *   into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n  return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n *   - return `null` if projection\n *   - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n *     needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n  let parentTNode = tNode;\n  // Skip over element and ICU containers as those are represented by a comment node and\n  // can't be used as a render parent.\n  while (parentTNode !== null && parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n    tNode = parentTNode;\n    parentTNode = tNode.parent;\n  }\n  // If the parent tNode is null, then we are inserting across views: either into an embedded view\n  // or a component view.\n  if (parentTNode === null) {\n    // We are inserting a root element of the component view into the component host element and\n    // it should always be eager.\n    return lView[HOST];\n  } else {\n    ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n    const {\n      componentOffset\n    } = parentTNode;\n    if (componentOffset > -1) {\n      ngDevMode && assertTNodeForLView(parentTNode, lView);\n      const {\n        encapsulation\n      } = tView.data[parentTNode.directiveStart + componentOffset];\n      // We've got a parent which is an element in the current view. We just need to verify if the\n      // parent element is not a component. Component's content nodes are not inserted immediately\n      // because they will be projected, and so doing insert at this point would be wasteful.\n      // Since the projection would then move it to its final destination. Note that we can't\n      // make this assumption when using the Shadow DOM, because the native projection placeholders\n      // (<content> or <slot>) have to be in place as elements are being inserted.\n      if (encapsulation === ViewEncapsulation$1.None || encapsulation === ViewEncapsulation$1.Emulated) {\n        return null;\n      }\n    }\n    return getNativeByTNode(parentTNode, lView);\n  }\n}\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n  ngDevMode && ngDevMode.rendererInsertBefore++;\n  renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n  ngDevMode && ngDevMode.rendererAppendChild++;\n  ngDevMode && assertDefined(parent, 'parent node must be defined');\n  renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n  if (beforeNode !== null) {\n    nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n  } else {\n    nativeAppendChild(renderer, parent, child);\n  }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n  renderer.removeChild(parent, child, isHostElement);\n}\n/** Checks if an element is a `<template>` node. */\nfunction isTemplateNode(node) {\n  return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n  return renderer.parentNode(node);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n  return renderer.nextSibling(node);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n  return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n  if (parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n    return getNativeByTNode(parentTNode, lView);\n  }\n  return null;\n}\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore;\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n  _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n  _processI18nInsertBefore = processI18nInsertBefore;\n}\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nfunction appendChild(tView, lView, childRNode, childTNode) {\n  const parentRNode = getParentRElement(tView, childTNode, lView);\n  const renderer = lView[RENDERER];\n  const parentTNode = childTNode.parent || lView[T_HOST];\n  const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n  if (parentRNode != null) {\n    if (Array.isArray(childRNode)) {\n      for (let i = 0; i < childRNode.length; i++) {\n        nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n      }\n    } else {\n      nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n    }\n  }\n  _processI18nInsertBefore !== undefined && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView, tNode) {\n  if (tNode !== null) {\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */ | 16 /* TNodeType.Projection */);\n    const tNodeType = tNode.type;\n    if (tNodeType & 3 /* TNodeType.AnyRNode */) {\n      return getNativeByTNode(tNode, lView);\n    } else if (tNodeType & 4 /* TNodeType.Container */) {\n      return getBeforeNodeForView(-1, lView[tNode.index]);\n    } else if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n      const elIcuContainerChild = tNode.child;\n      if (elIcuContainerChild !== null) {\n        return getFirstNativeNode(lView, elIcuContainerChild);\n      } else {\n        const rNodeOrLContainer = lView[tNode.index];\n        if (isLContainer(rNodeOrLContainer)) {\n          return getBeforeNodeForView(-1, rNodeOrLContainer);\n        } else {\n          return unwrapRNode(rNodeOrLContainer);\n        }\n      }\n    } else if (tNodeType & 32 /* TNodeType.Icu */) {\n      let nextRNode = icuContainerIterate(tNode, lView);\n      let rNode = nextRNode();\n      // If the ICU container has no nodes, than we use the ICU anchor as the node.\n      return rNode || unwrapRNode(lView[tNode.index]);\n    } else {\n      const projectionNodes = getProjectionNodes(lView, tNode);\n      if (projectionNodes !== null) {\n        if (Array.isArray(projectionNodes)) {\n          return projectionNodes[0];\n        }\n        const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n        ngDevMode && assertParentView(parentView);\n        return getFirstNativeNode(parentView, projectionNodes);\n      } else {\n        return getFirstNativeNode(lView, tNode.next);\n      }\n    }\n  }\n  return null;\n}\nfunction getProjectionNodes(lView, tNode) {\n  if (tNode !== null) {\n    const componentView = lView[DECLARATION_COMPONENT_VIEW];\n    const componentHost = componentView[T_HOST];\n    const slotIdx = tNode.projection;\n    ngDevMode && assertProjectionSlots(lView);\n    return componentHost.projection[slotIdx];\n  }\n  return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n  const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n  if (nextViewIndex < lContainer.length) {\n    const lView = lContainer[nextViewIndex];\n    const firstTNodeOfView = lView[TVIEW].firstChild;\n    if (firstTNodeOfView !== null) {\n      return getFirstNativeNode(lView, firstTNodeOfView);\n    }\n  }\n  return lContainer[NATIVE];\n}\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n  ngDevMode && ngDevMode.rendererRemoveNode++;\n  const nativeParent = nativeParentNode(renderer, rNode);\n  if (nativeParent) {\n    nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n  }\n}\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n  while (tNode != null) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n    const rawSlotValue = lView[tNode.index];\n    const tNodeType = tNode.type;\n    if (isProjection) {\n      if (action === 0 /* WalkTNodeTreeAction.Create */) {\n        rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n        tNode.flags |= 2 /* TNodeFlags.isProjected */;\n      }\n    }\n\n    if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n      if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n        applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      } else if (tNodeType & 32 /* TNodeType.Icu */) {\n        const nextRNode = icuContainerIterate(tNode, lView);\n        let rNode;\n        while (rNode = nextRNode()) {\n          applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n        }\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      } else if (tNodeType & 16 /* TNodeType.Projection */) {\n        applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n      } else {\n        ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      }\n    }\n    tNode = isProjection ? tNode.projectionNext : tNode.next;\n  }\n}\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n  applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nfunction applyProjection(tView, lView, tProjectionNode) {\n  const renderer = lView[RENDERER];\n  const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n  const parentTNode = tProjectionNode.parent || lView[T_HOST];\n  let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n  applyProjectionRecursive(renderer, 0 /* WalkTNodeTreeAction.Create */, lView, tProjectionNode, parentRNode, beforeNode);\n}\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n  const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n  const componentNode = componentLView[T_HOST];\n  ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n  const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n  if (Array.isArray(nodeToProjectOrRNodes)) {\n    // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n    // need to support passing projectable nodes, so we cheat and put them in the TNode\n    // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n    // because we know that that TView is not shared and therefore it will not be a problem.\n    // This should be refactored and cleaned up.\n    for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n      const rNode = nodeToProjectOrRNodes[i];\n      applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n    }\n  } else {\n    let nodeToProject = nodeToProjectOrRNodes;\n    const projectedComponentLView = componentLView[PARENT];\n    applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n  }\n}\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n  ngDevMode && assertLContainer(lContainer);\n  const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n  const native = unwrapRNode(lContainer);\n  // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n  // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n  // node (comment in the DOM) that will be different from the LContainer's host node. In this\n  // particular case we need to execute action on 2 nodes:\n  // - container's host node (this is done in the executeActionOnElementOrContainer)\n  // - container's host node (this is done here)\n  if (anchor !== native) {\n    // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n    // don't see a reason why they should be different, but they are.\n    //\n    // If they are we need to process the second anchor as well.\n    applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n  }\n  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    const lView = lContainer[i];\n    applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n  }\n}\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n *        otherwise).\n */\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n  if (isClassBased) {\n    // We actually want JS true/false here because any truthy value should add the class\n    if (!value) {\n      ngDevMode && ngDevMode.rendererRemoveClass++;\n      renderer.removeClass(rNode, prop);\n    } else {\n      ngDevMode && ngDevMode.rendererAddClass++;\n      renderer.addClass(rNode, prop);\n    }\n  } else {\n    let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n    if (value == null /** || value === undefined */) {\n      ngDevMode && ngDevMode.rendererRemoveStyle++;\n      renderer.removeStyle(rNode, prop, flags);\n    } else {\n      // A value is important if it ends with `!important`. The style\n      // parser strips any semicolons at the end of the value.\n      const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n      if (isImportant) {\n        // !important has to be stripped from the value for it to be valid.\n        value = value.slice(0, -10);\n        flags |= RendererStyleFlags2.Important;\n      }\n      ngDevMode && ngDevMode.rendererSetStyle++;\n      renderer.setStyle(rNode, prop, value, flags);\n    }\n  }\n}\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer, element, newValue) {\n  ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n  renderer.setAttribute(element, 'style', newValue);\n  ngDevMode && ngDevMode.rendererSetStyle++;\n}\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer, element, newValue) {\n  ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n  if (newValue === '') {\n    // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n    renderer.removeAttribute(element, 'class');\n  } else {\n    renderer.setAttribute(element, 'class', newValue);\n  }\n  ngDevMode && ngDevMode.rendererSetClassName++;\n}\n/** Sets up the static DOM attributes on an `RNode`. */\nfunction setupStaticAttributes(renderer, element, tNode) {\n  const {\n    mergedAttrs,\n    classes,\n    styles\n  } = tNode;\n  if (mergedAttrs !== null) {\n    setUpAttributes(renderer, element, mergedAttrs);\n  }\n  if (classes !== null) {\n    writeDirectClass(renderer, element, classes);\n  }\n  if (styles !== null) {\n    writeDirectStyle(renderer, element, styles);\n  }\n}\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy$1;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy$1() {\n  if (policy$1 === undefined) {\n    policy$1 = null;\n    if (_global.trustedTypes) {\n      try {\n        policy$1 = _global.trustedTypes.createPolicy('angular', {\n          createHTML: s => s,\n          createScript: s => s,\n          createScriptURL: s => s\n        });\n      } catch {\n        // trustedTypes.createPolicy throws if called with a name that is\n        // already registered, even in report-only mode. Until the API changes,\n        // catch the error not to break the applications functionally. In such\n        // cases, the code will fall back to using strings.\n      }\n    }\n  }\n  return policy$1;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nfunction trustedHTMLFromString(html) {\n  return getPolicy$1()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n  return getPolicy$1()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nfunction trustedScriptURLFromString(url) {\n  return getPolicy$1()?.createScriptURL(url) || url;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nfunction newTrustedFunctionForDev(...args) {\n  if (typeof ngDevMode === 'undefined') {\n    throw new Error('newTrustedFunctionForDev should never be called in production');\n  }\n  if (!_global.trustedTypes) {\n    // In environments that don't support Trusted Types, fall back to the most\n    // straightforward implementation:\n    return new Function(...args);\n  }\n  // Chrome currently does not support passing TrustedScript to the Function\n  // constructor. The following implements the workaround proposed on the page\n  // below, where the Chromium bug is also referenced:\n  // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n  const fnArgs = args.slice(0, -1).join(',');\n  const fnBody = args[args.length - 1];\n  const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n  // Using eval directly confuses the compiler and prevents this module from\n  // being stripped out of JS binaries even if not used. The global['eval']\n  // indirection fixes that.\n  const fn = _global['eval'](trustedScriptFromString(body));\n  if (fn.bind === undefined) {\n    // Workaround for a browser bug that only exists in Chrome 83, where passing\n    // a TrustedScript to eval just returns the TrustedScript back without\n    // evaluating it. In that case, fall back to the most straightforward\n    // implementation:\n    return new Function(...args);\n  }\n  // To completely mimic the behavior of calling \"new Function\", two more\n  // things need to happen:\n  // 1. Stringifying the resulting function should return its source code\n  fn.toString = () => body;\n  // 2. When calling the resulting function, `this` should refer to `global`\n  return fn.bind(_global);\n  // When Trusted Types support in Function constructors is widely available,\n  // the implementation of this function can be simplified to:\n  // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an <iframe>.\n * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the\n * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list\n * of such attributes.\n *\n * @codeGenApi\n */\nfunction ɵɵvalidateIframeAttribute(attrValue, tagName, attrName) {\n  const lView = getLView();\n  const tNode = getSelectedTNode();\n  const element = getNativeByTNode(tNode, lView);\n  // Restrict any dynamic bindings of security-sensitive attributes/properties\n  // on an <iframe> for security reasons.\n  if (tNode.type === 2 /* TNodeType.Element */ && tagName.toLowerCase() === 'iframe') {\n    const iframe = element;\n    // Unset previously applied `src` and `srcdoc` if we come across a situation when\n    // a security-sensitive attribute is set later via an attribute/property binding.\n    iframe.src = '';\n    iframe.srcdoc = trustedHTMLFromString('');\n    // Also remove the <iframe> from the document.\n    nativeRemoveNode(lView[RENDERER], iframe);\n    const errorMessage = ngDevMode && `Angular has detected that the \\`${attrName}\\` was applied ` + `as a binding to an <iframe>${getTemplateLocationDetails(lView)}. ` + `For security reasons, the \\`${attrName}\\` can be set on an <iframe> ` + `as a static attribute only. \\n` + `To fix this, switch the \\`${attrName}\\` binding to a static attribute ` + `in a template or in host bindings section.`;\n    throw new RuntimeError(-910 /* RuntimeErrorCode.UNSAFE_IFRAME_ATTRS */, errorMessage);\n  }\n  return attrValue;\n}\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n  DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n  if (DOCUMENT !== undefined) {\n    return DOCUMENT;\n  } else if (typeof document !== 'undefined') {\n    return document;\n  }\n  // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n  // the current platform is not a browser. Since this is not a supported scenario at the moment\n  // this should not happen in Angular apps.\n  // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n  // public API. Meanwhile we just return `undefined` and let the application fail.\n  return undefined;\n}\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n  if (policy === undefined) {\n    policy = null;\n    if (_global.trustedTypes) {\n      try {\n        policy = _global.trustedTypes.createPolicy('angular#unsafe-bypass', {\n          createHTML: s => s,\n          createScript: s => s,\n          createScriptURL: s => s\n        });\n      } catch {\n        // trustedTypes.createPolicy throws if called with a name that is\n        // already registered, even in report-only mode. Until the API changes,\n        // catch the error not to break the applications functionally. In such\n        // cases, the code will fall back to using strings.\n      }\n    }\n  }\n  return policy;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedHTMLFromStringBypass(html) {\n  return getPolicy()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptFromStringBypass(script) {\n  return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptURLFromStringBypass(url) {\n  return getPolicy()?.createScriptURL(url) || url;\n}\nclass SafeValueImpl {\n  constructor(changingThisBreaksApplicationSecurity) {\n    this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n  }\n  toString() {\n    return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` + ` (see ${XSS_SECURITY_URL})`;\n  }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n  getTypeName() {\n    return \"HTML\" /* BypassType.Html */;\n  }\n}\n\nclass SafeStyleImpl extends SafeValueImpl {\n  getTypeName() {\n    return \"Style\" /* BypassType.Style */;\n  }\n}\n\nclass SafeScriptImpl extends SafeValueImpl {\n  getTypeName() {\n    return \"Script\" /* BypassType.Script */;\n  }\n}\n\nclass SafeUrlImpl extends SafeValueImpl {\n  getTypeName() {\n    return \"URL\" /* BypassType.Url */;\n  }\n}\n\nclass SafeResourceUrlImpl extends SafeValueImpl {\n  getTypeName() {\n    return \"ResourceURL\" /* BypassType.ResourceUrl */;\n  }\n}\n\nfunction unwrapSafeValue(value) {\n  return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n  const actualType = getSanitizationBypassType(value);\n  if (actualType != null && actualType !== type) {\n    // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n    if (actualType === \"ResourceURL\" /* BypassType.ResourceUrl */ && type === \"URL\" /* BypassType.Url */) return true;\n    throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n  }\n  return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n  return value instanceof SafeValueImpl && value.getTypeName() || null;\n}\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n  return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n  return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n  return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url`  which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n  return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n  return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nfunction getInertBodyHelper(defaultDoc) {\n  const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n  return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper {\n  constructor(inertDocumentHelper) {\n    this.inertDocumentHelper = inertDocumentHelper;\n  }\n  getInertBodyElement(html) {\n    // We add these extra elements to ensure that the rest of the content is parsed as expected\n    // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n    // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n    // in `html` from consuming the otherwise explicit `</body>` tag.\n    html = '<body><remove></remove>' + html;\n    try {\n      const body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), 'text/html').body;\n      if (body === null) {\n        // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n        // becomes available in the following tick of the JS engine. In that case we fall back to\n        // the `inertDocumentHelper` instead.\n        return this.inertDocumentHelper.getInertBodyElement(html);\n      }\n      body.removeChild(body.firstChild);\n      return body;\n    } catch {\n      return null;\n    }\n  }\n}\n/**\n * Use an HTML5 `template` element to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n  constructor(defaultDoc) {\n    this.defaultDoc = defaultDoc;\n    this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n  }\n  getInertBodyElement(html) {\n    const templateEl = this.inertDocument.createElement('template');\n    templateEl.innerHTML = trustedHTMLFromString(html);\n    return templateEl;\n  }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n  try {\n    return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n  } catch {\n    return false;\n  }\n}\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol.  A protocol must be followed by a colon. The below\n *     allows that by allowing colons only after one of the characters [/?#].\n *     A colon after a hash (#) must be in the fragment.\n *     Otherwise, a colon after a (?) must be in a query.\n *     Otherwise, a colon after a single solidus (/) must be in a path.\n *     Otherwise, a colon after a double solidus (//) must be in the authority\n *     (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\nfunction _sanitizeUrl(url) {\n  url = String(url);\n  if (url.match(SAFE_URL_PATTERN)) return url;\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n  }\n  return 'unsafe:' + url;\n}\nfunction tagSet(tags) {\n  const res = {};\n  for (const t of tags.split(',')) res[t] = true;\n  return res;\n}\nfunction merge(...sets) {\n  const res = {};\n  for (const s of sets) {\n    for (const v in s) {\n      if (s.hasOwnProperty(v)) res[v] = true;\n    }\n  }\n  return res;\n}\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = /*#__PURE__*/tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = /*#__PURE__*/tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = /*#__PURE__*/tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = /*#__PURE__*/merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = /*#__PURE__*/merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, /*#__PURE__*/tagSet('address,article,' + 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' + 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = /*#__PURE__*/merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, /*#__PURE__*/tagSet('a,abbr,acronym,audio,b,' + 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' + 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nconst VALID_ELEMENTS = /*#__PURE__*/merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nconst URI_ATTRS = /*#__PURE__*/tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\nconst HTML_ATTRS = /*#__PURE__*/tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' + 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' + 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' + 'scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,' + 'valign,value,vspace,width');\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = /*#__PURE__*/tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' + 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' + 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' + 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' + 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' + 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' + 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nconst VALID_ATTRS = /*#__PURE__*/merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = /*#__PURE__*/tagSet('script,style,template');\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n  constructor() {\n    // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n    // because characters were re-encoded.\n    this.sanitizedSomething = false;\n    this.buf = [];\n  }\n  sanitizeChildren(el) {\n    // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n    // However this code never accesses properties off of `document` before deleting its contents\n    // again, so it shouldn't be vulnerable to DOM clobbering.\n    let current = el.firstChild;\n    let traverseContent = true;\n    while (current) {\n      if (current.nodeType === Node.ELEMENT_NODE) {\n        traverseContent = this.startElement(current);\n      } else if (current.nodeType === Node.TEXT_NODE) {\n        this.chars(current.nodeValue);\n      } else {\n        // Strip non-element, non-text nodes.\n        this.sanitizedSomething = true;\n      }\n      if (traverseContent && current.firstChild) {\n        current = current.firstChild;\n        continue;\n      }\n      while (current) {\n        // Leaving the element. Walk up and to the right, closing tags as we go.\n        if (current.nodeType === Node.ELEMENT_NODE) {\n          this.endElement(current);\n        }\n        let next = this.checkClobberedElement(current, current.nextSibling);\n        if (next) {\n          current = next;\n          break;\n        }\n        current = this.checkClobberedElement(current, current.parentNode);\n      }\n    }\n    return this.buf.join('');\n  }\n  /**\n   * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n   * be traversed. Element content must always be traversed (even if the element itself is not\n   * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n   *\n   * @param element The element to sanitize.\n   * @return True if the element's contents should be traversed.\n   */\n  startElement(element) {\n    const tagName = element.nodeName.toLowerCase();\n    if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n      this.sanitizedSomething = true;\n      return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n    }\n    this.buf.push('<');\n    this.buf.push(tagName);\n    const elAttrs = element.attributes;\n    for (let i = 0; i < elAttrs.length; i++) {\n      const elAttr = elAttrs.item(i);\n      const attrName = elAttr.name;\n      const lower = attrName.toLowerCase();\n      if (!VALID_ATTRS.hasOwnProperty(lower)) {\n        this.sanitizedSomething = true;\n        continue;\n      }\n      let value = elAttr.value;\n      // TODO(martinprobst): Special case image URIs for data:image/...\n      if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n      this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n    }\n    this.buf.push('>');\n    return true;\n  }\n  endElement(current) {\n    const tagName = current.nodeName.toLowerCase();\n    if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n      this.buf.push('</');\n      this.buf.push(tagName);\n      this.buf.push('>');\n    }\n  }\n  chars(chars) {\n    this.buf.push(encodeEntities(chars));\n  }\n  checkClobberedElement(node, nextNode) {\n    if (nextNode && (node.compareDocumentPosition(nextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n      throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n    }\n    return nextNode;\n  }\n}\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n  return value.replace(/&/g, '&amp;').replace(SURROGATE_PAIR_REGEXP, function (match) {\n    const hi = match.charCodeAt(0);\n    const low = match.charCodeAt(1);\n    return '&#' + ((hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000) + ';';\n  }).replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n    return '&#' + match.charCodeAt(0) + ';';\n  }).replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\nlet inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n  let inertBodyElement = null;\n  try {\n    inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n    // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n    let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n    inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n    // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n    // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n    let mXSSAttempts = 5;\n    let parsedHtml = unsafeHtml;\n    do {\n      if (mXSSAttempts === 0) {\n        throw new Error('Failed to sanitize html because the input is unstable');\n      }\n      mXSSAttempts--;\n      unsafeHtml = parsedHtml;\n      parsedHtml = inertBodyElement.innerHTML;\n      inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n    } while (unsafeHtml !== parsedHtml);\n    const sanitizer = new SanitizingHtmlSerializer();\n    const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n      console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n    }\n    return trustedHTMLFromString(safeHtml);\n  } finally {\n    // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n    if (inertBodyElement) {\n      const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n      while (parent.firstChild) {\n        parent.removeChild(parent.firstChild);\n      }\n    }\n  }\n}\nfunction getTemplateContent(el) {\n  return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ? el.content : null;\n}\nfunction isTemplateElement(el) {\n  return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nvar SecurityContext = /*#__PURE__*/(() => {\n  SecurityContext = SecurityContext || {};\n  SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n  SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n  SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n  SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n  SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n  SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n  return SecurityContext;\n})();\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n  }\n  if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* BypassType.Html */)) {\n    return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n  }\n  return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n  }\n  if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* BypassType.Style */)) {\n    return unwrapSafeValue(unsafeStyle);\n  }\n  return renderStringify(unsafeStyle);\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n  }\n  if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* BypassType.Url */)) {\n    return unwrapSafeValue(unsafeUrl);\n  }\n  return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n  }\n  if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n    return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n  }\n  throw new RuntimeError(904 /* RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL */, ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeScript(unsafeScript) {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n  }\n  if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* BypassType.Script */)) {\n    return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n  }\n  throw new RuntimeError(905 /* RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT */, ngDevMode && 'unsafe value used in a script context');\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantHtml(html) {\n  // The following runtime check ensures that the function was called as a\n  // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n  // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n  // is an array with a `raw` property that is also an array. The associated\n  // template literal has no interpolation if and only if the length of the\n  // TemplateStringsArray is 1.\n  if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n    throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n  }\n  return trustedHTMLFromString(html[0]);\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantResourceUrl(url) {\n  // The following runtime check ensures that the function was called as a\n  // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n  // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n  // TemplateStringsArray is an array with a `raw` property that is also an\n  // array. The associated template literal has no interpolation if and only if\n  // the length of the TemplateStringsArray is 1.\n  if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n    throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n  }\n  return trustedScriptURLFromString(url[0]);\n}\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nfunction getUrlSanitizer(tag, prop) {\n  if (prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script') || prop === 'href' && (tag === 'base' || tag === 'link')) {\n    return ɵɵsanitizeResourceUrl;\n  }\n  return ɵɵsanitizeUrl;\n}\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n  return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\nfunction validateAgainstEventProperties(name) {\n  if (name.toLowerCase().startsWith('on')) {\n    const errorMessage = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + `\\nIf '${name}' is a directive input, make sure the directive is imported by the` + ` current module.`;\n    throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n  }\n}\nfunction validateAgainstEventAttributes(name) {\n  if (name.toLowerCase().startsWith('on')) {\n    const errorMessage = `Binding to event attribute '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...`;\n    throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n  }\n}\nfunction getSanitizer() {\n  const lView = getLView();\n  return lView && lView[SANITIZER];\n}\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = /*#__PURE__*/new InjectionToken('ENVIRONMENT_INITIALIZER');\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR = /*#__PURE__*/new InjectionToken('INJECTOR',\n// Disable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* InjectorMarkers.Injector */);\n\nconst INJECTOR_DEF_TYPES = /*#__PURE__*/new InjectionToken('INJECTOR_DEF_TYPES');\nclass NullInjector {\n  get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n    if (notFoundValue === THROW_IF_NOT_FOUND) {\n      const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n      error.name = 'NullInjectorError';\n      throw error;\n    }\n    return notFoundValue;\n  }\n}\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n  return {\n    ɵproviders: providers\n  };\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     importProvidersFrom(NgModuleOne, NgModuleTwo)\n *   ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n *   {\n *     path: 'foo',\n *     providers: [\n *       importProvidersFrom(NgModuleOne, NgModuleTwo)\n *     ],\n *     component: YourStandaloneComponent\n *   }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n  return {\n    ɵproviders: internalImportProvidersFrom(true, sources),\n    ɵfromNgModule: true\n  };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n  const providersOut = [];\n  const dedup = new Set(); // already seen types\n  let injectorTypesWithProviders;\n  deepForEach(sources, source => {\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n      const cmpDef = getComponentDef(source);\n      if (cmpDef?.standalone) {\n        throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n      }\n    }\n    // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n    const internalSource = source;\n    if (walkProviderTree(internalSource, providersOut, [], dedup)) {\n      injectorTypesWithProviders || (injectorTypesWithProviders = []);\n      injectorTypesWithProviders.push(internalSource);\n    }\n  });\n  // Collect all providers from `ModuleWithProviders` types.\n  if (injectorTypesWithProviders !== undefined) {\n    processInjectorTypesWithProviders(injectorTypesWithProviders, providersOut);\n  }\n  return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, providersOut) {\n  for (let i = 0; i < typesWithProviders.length; i++) {\n    const {\n      ngModule,\n      providers\n    } = typesWithProviders[i];\n    deepForEachProvider(providers, provider => {\n      ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n      providersOut.push(provider);\n    });\n  }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nfunction walkProviderTree(container, providersOut, parents, dedup) {\n  container = resolveForwardRef(container);\n  if (!container) return false;\n  // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n  // from `InjectorTypeWithProviders`.\n  let defType = null;\n  let injDef = getInjectorDef(container);\n  const cmpDef = !injDef && getComponentDef(container);\n  if (!injDef && !cmpDef) {\n    // `container` is not an injector type or a component type. It might be:\n    //  * An `InjectorTypeWithProviders` that wraps an injector type.\n    //  * A standalone directive or pipe that got pulled in from a standalone component's\n    //    dependencies.\n    // Try to unwrap it as an `InjectorTypeWithProviders` first.\n    const ngModule = container.ngModule;\n    injDef = getInjectorDef(ngModule);\n    if (injDef) {\n      defType = ngModule;\n    } else {\n      // Not a component or injector type, so ignore it.\n      return false;\n    }\n  } else if (cmpDef && !cmpDef.standalone) {\n    return false;\n  } else {\n    defType = container;\n  }\n  // Check for circular dependencies.\n  if (ngDevMode && parents.indexOf(defType) !== -1) {\n    const defName = stringify(defType);\n    const path = parents.map(stringify);\n    throwCyclicDependencyError(defName, path);\n  }\n  // Check for multiple imports of the same module\n  const isDuplicate = dedup.has(defType);\n  if (cmpDef) {\n    if (isDuplicate) {\n      // This component definition has already been processed.\n      return false;\n    }\n    dedup.add(defType);\n    if (cmpDef.dependencies) {\n      const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n      for (const dep of deps) {\n        walkProviderTree(dep, providersOut, parents, dedup);\n      }\n    }\n  } else if (injDef) {\n    // First, include providers from any imports.\n    if (injDef.imports != null && !isDuplicate) {\n      // Before processing defType's imports, add it to the set of parents. This way, if it ends\n      // up deeply importing itself, this can be detected.\n      ngDevMode && parents.push(defType);\n      // Add it to the set of dedups. This way we can detect multiple imports of the same module\n      dedup.add(defType);\n      let importTypesWithProviders;\n      try {\n        deepForEach(injDef.imports, imported => {\n          if (walkProviderTree(imported, providersOut, parents, dedup)) {\n            importTypesWithProviders || (importTypesWithProviders = []);\n            // If the processed import is an injector type with providers, we store it in the\n            // list of import types with providers, so that we can process those afterwards.\n            importTypesWithProviders.push(imported);\n          }\n        });\n      } finally {\n        // Remove it from the parents set when finished.\n        ngDevMode && parents.pop();\n      }\n      // Imports which are declared with providers (TypeWithProviders) need to be processed\n      // after all imported modules are processed. This is similar to how View Engine\n      // processes/merges module imports in the metadata resolver. See: FW-1349.\n      if (importTypesWithProviders !== undefined) {\n        processInjectorTypesWithProviders(importTypesWithProviders, providersOut);\n      }\n    }\n    if (!isDuplicate) {\n      // Track the InjectorType and add a provider for it.\n      // It's important that this is done after the def's imports.\n      const factory = getFactoryDef(defType) || (() => new defType());\n      // Append extra providers to make more info available for consumers (to retrieve an injector\n      // type), as well as internally (to calculate an injection scope correctly and eagerly\n      // instantiate a `defType` when an injector is created).\n      providersOut.push(\n      // Provider to create `defType` using its factory.\n      {\n        provide: defType,\n        useFactory: factory,\n        deps: EMPTY_ARRAY\n      },\n      // Make this `defType` available to an internal logic that calculates injector scope.\n      {\n        provide: INJECTOR_DEF_TYPES,\n        useValue: defType,\n        multi: true\n      },\n      // Provider to eagerly instantiate `defType` via `ENVIRONMENT_INITIALIZER`.\n      {\n        provide: ENVIRONMENT_INITIALIZER,\n        useValue: () => ɵɵinject(defType),\n        multi: true\n      } //\n      );\n    }\n    // Next, include providers listed on the definition itself.\n    const defProviders = injDef.providers;\n    if (defProviders != null && !isDuplicate) {\n      const injectorType = container;\n      deepForEachProvider(defProviders, provider => {\n        ngDevMode && validateProvider(provider, defProviders, injectorType);\n        providersOut.push(provider);\n      });\n    }\n  } else {\n    // Should not happen, but just in case.\n    return false;\n  }\n  return defType !== container && container.providers !== undefined;\n}\nfunction validateProvider(provider, providers, containerType) {\n  if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) {\n    return;\n  }\n  // Here we expect the provider to be a `useClass` provider (by elimination).\n  const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n  if (!classRef) {\n    throwInvalidProviderError(containerType, providers, provider);\n  }\n}\nfunction deepForEachProvider(providers, fn) {\n  for (let provider of providers) {\n    if (isEnvironmentProviders(provider)) {\n      provider = provider.ɵproviders;\n    }\n    if (Array.isArray(provider)) {\n      deepForEachProvider(provider, fn);\n    } else {\n      fn(provider);\n    }\n  }\n}\nconst USE_VALUE$1 = /*#__PURE__*/getClosureSafeProperty({\n  provide: String,\n  useValue: getClosureSafeProperty\n});\nfunction isValueProvider(value) {\n  return value !== null && typeof value == 'object' && USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n  return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n  return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n  return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n  return !!value.useClass;\n}\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = /*#__PURE__*/new InjectionToken('Set Injector scope.');\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR$1 = undefined;\nfunction getNullInjector() {\n  if (NULL_INJECTOR$1 === undefined) {\n    NULL_INJECTOR$1 = new NullInjector();\n  }\n  return NULL_INJECTOR$1;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {}\nclass R3Injector extends EnvironmentInjector {\n  /**\n   * Flag indicating that this injector was previously destroyed.\n   */\n  get destroyed() {\n    return this._destroyed;\n  }\n  constructor(providers, parent, source, scopes) {\n    super();\n    this.parent = parent;\n    this.source = source;\n    this.scopes = scopes;\n    /**\n     * Map of tokens to records which contain the instances of those tokens.\n     * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n     * to prevent further searches.\n     */\n    this.records = new Map();\n    /**\n     * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n     */\n    this._ngOnDestroyHooks = new Set();\n    this._onDestroyHooks = [];\n    this._destroyed = false;\n    // Start off by creating Records for every provider.\n    forEachSingleProvider(providers, provider => this.processProvider(provider));\n    // Make sure the INJECTOR token provides this injector.\n    this.records.set(INJECTOR, makeRecord(undefined, this));\n    // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n    if (scopes.has('environment')) {\n      this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n    }\n    // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n    // any injectable scoped to APP_ROOT_SCOPE.\n    const record = this.records.get(INJECTOR_SCOPE);\n    if (record != null && typeof record.value === 'string') {\n      this.scopes.add(record.value);\n    }\n    this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));\n  }\n  /**\n   * Destroy the injector and release references to every instance or provider associated with it.\n   *\n   * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n   * hook was found.\n   */\n  destroy() {\n    this.assertNotDestroyed();\n    // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n    this._destroyed = true;\n    try {\n      // Call all the lifecycle hooks.\n      for (const service of this._ngOnDestroyHooks) {\n        service.ngOnDestroy();\n      }\n      for (const hook of this._onDestroyHooks) {\n        hook();\n      }\n    } finally {\n      // Release all references.\n      this.records.clear();\n      this._ngOnDestroyHooks.clear();\n      this.injectorDefTypes.clear();\n      this._onDestroyHooks.length = 0;\n    }\n  }\n  onDestroy(callback) {\n    this._onDestroyHooks.push(callback);\n  }\n  runInContext(fn) {\n    this.assertNotDestroyed();\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      return fn();\n    } finally {\n      setCurrentInjector(previousInjector);\n      setInjectImplementation(previousInjectImplementation);\n    }\n  }\n  get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n    this.assertNotDestroyed();\n    flags = convertToBitFlags(flags);\n    // Set the injection context.\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      // Check for the SkipSelf flag.\n      if (!(flags & InjectFlags.SkipSelf)) {\n        // SkipSelf isn't set, check if the record belongs to this injector.\n        let record = this.records.get(token);\n        if (record === undefined) {\n          // No record, but maybe the token is scoped to this injector. Look for an injectable\n          // def with a scope matching this injector.\n          const def = couldBeInjectableType(token) && getInjectableDef(token);\n          if (def && this.injectableDefInScope(def)) {\n            // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n            // all along.\n            record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n          } else {\n            record = null;\n          }\n          this.records.set(token, record);\n        }\n        // If a record was found, get the instance for it and return it.\n        if (record != null /* NOT null || undefined */) {\n          return this.hydrate(token, record);\n        }\n      }\n      // Select the next injector based on the Self flag - if self is set, the next injector is\n      // the NullInjector, otherwise it's the parent.\n      const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n      // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n      // is undefined, the value is null, otherwise it's the notFoundValue.\n      notFoundValue = flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n      return nextInjector.get(token, notFoundValue);\n    } catch (e) {\n      if (e.name === 'NullInjectorError') {\n        const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n        path.unshift(stringify(token));\n        if (previousInjector) {\n          // We still have a parent injector, keep throwing\n          throw e;\n        } else {\n          // Format & throw the final error message when we don't have any previous injector\n          return catchInjectorError(e, token, 'R3InjectorError', this.source);\n        }\n      } else {\n        throw e;\n      }\n    } finally {\n      // Lastly, restore the previous injection context.\n      setInjectImplementation(previousInjectImplementation);\n      setCurrentInjector(previousInjector);\n    }\n  }\n  /** @internal */\n  resolveInjectorInitializers() {\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);\n      if (ngDevMode && !Array.isArray(initializers)) {\n        throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' + `(expected an array, but got ${typeof initializers}). ` + 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' + '`multi: true` provider.');\n      }\n      for (const initializer of initializers) {\n        initializer();\n      }\n    } finally {\n      setCurrentInjector(previousInjector);\n      setInjectImplementation(previousInjectImplementation);\n    }\n  }\n  toString() {\n    const tokens = [];\n    const records = this.records;\n    for (const token of records.keys()) {\n      tokens.push(stringify(token));\n    }\n    return `R3Injector[${tokens.join(', ')}]`;\n  }\n  assertNotDestroyed() {\n    if (this._destroyed) {\n      throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n    }\n  }\n  /**\n   * Process a `SingleProvider` and add it.\n   */\n  processProvider(provider) {\n    // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n    // property.\n    provider = resolveForwardRef(provider);\n    let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n    // Construct a `Record` for the provider.\n    const record = providerToRecord(provider);\n    if (!isTypeProvider(provider) && provider.multi === true) {\n      // If the provider indicates that it's a multi-provider, process it specially.\n      // First check whether it's been defined already.\n      let multiRecord = this.records.get(token);\n      if (multiRecord) {\n        // It has. Throw a nice error if\n        if (ngDevMode && multiRecord.multi === undefined) {\n          throwMixedMultiProviderError();\n        }\n      } else {\n        multiRecord = makeRecord(undefined, NOT_YET, true);\n        multiRecord.factory = () => injectArgs(multiRecord.multi);\n        this.records.set(token, multiRecord);\n      }\n      token = provider;\n      multiRecord.multi.push(provider);\n    } else {\n      const existing = this.records.get(token);\n      if (ngDevMode && existing && existing.multi !== undefined) {\n        throwMixedMultiProviderError();\n      }\n    }\n    this.records.set(token, record);\n  }\n  hydrate(token, record) {\n    if (ngDevMode && record.value === CIRCULAR) {\n      throwCyclicDependencyError(stringify(token));\n    } else if (record.value === NOT_YET) {\n      record.value = CIRCULAR;\n      record.value = record.factory();\n    }\n    if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n      this._ngOnDestroyHooks.add(record.value);\n    }\n    return record.value;\n  }\n  injectableDefInScope(def) {\n    if (!def.providedIn) {\n      return false;\n    }\n    const providedIn = resolveForwardRef(def.providedIn);\n    if (typeof providedIn === 'string') {\n      return providedIn === 'any' || this.scopes.has(providedIn);\n    } else {\n      return this.injectorDefTypes.has(providedIn);\n    }\n  }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n  // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n  const injectableDef = getInjectableDef(token);\n  const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n  if (factory !== null) {\n    return factory;\n  }\n  // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n  // If it's missing that, it's an error.\n  if (token instanceof InjectionToken) {\n    throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);\n  }\n  // Undecorated types can sometimes be created if they have no constructor arguments.\n  if (token instanceof Function) {\n    return getUndecoratedInjectableFactory(token);\n  }\n  // There was no way to resolve a factory for this token.\n  throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n  // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n  const paramLength = token.length;\n  if (paramLength > 0) {\n    const args = newArray(paramLength, '?');\n    throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n  }\n  // The constructor function appears to have no parameters.\n  // This might be because it inherits from a super-class. In which case, use an injectable\n  // def from an ancestor if there is one.\n  // Otherwise this really is a simple class with no dependencies, so return a factory that\n  // just instantiates the zero-arg constructor.\n  const inheritedInjectableDef = getInheritedInjectableDef(token);\n  if (inheritedInjectableDef !== null) {\n    return () => inheritedInjectableDef.factory(token);\n  } else {\n    return () => new token();\n  }\n}\nfunction providerToRecord(provider) {\n  if (isValueProvider(provider)) {\n    return makeRecord(undefined, provider.useValue);\n  } else {\n    const factory = providerToFactory(provider);\n    return makeRecord(factory, NOT_YET);\n  }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n  let factory = undefined;\n  if (ngDevMode && isEnvironmentProviders(provider)) {\n    throwInvalidProviderError(undefined, providers, provider);\n  }\n  if (isTypeProvider(provider)) {\n    const unwrappedProvider = resolveForwardRef(provider);\n    return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n  } else {\n    if (isValueProvider(provider)) {\n      factory = () => resolveForwardRef(provider.useValue);\n    } else if (isFactoryProvider(provider)) {\n      factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n    } else if (isExistingProvider(provider)) {\n      factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n    } else {\n      const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n      if (ngDevMode && !classRef) {\n        throwInvalidProviderError(ngModuleType, providers, provider);\n      }\n      if (hasDeps(provider)) {\n        factory = () => new classRef(...injectArgs(provider.deps));\n      } else {\n        return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n      }\n    }\n  }\n  return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n  return {\n    factory: factory,\n    value: value,\n    multi: multi ? [] : undefined\n  };\n}\nfunction hasDeps(value) {\n  return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n  return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n  return typeof value === 'function' || typeof value === 'object' && value instanceof InjectionToken;\n}\nfunction forEachSingleProvider(providers, fn) {\n  for (const provider of providers) {\n    if (Array.isArray(provider)) {\n      forEachSingleProvider(provider, fn);\n    } else if (provider && isEnvironmentProviders(provider)) {\n      forEachSingleProvider(provider.ɵproviders, fn);\n    } else {\n      fn(provider);\n    }\n  }\n}\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nclass ComponentRef$1 {}\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n *     Component class can be used directly.\n */\nclass ComponentFactory$1 {}\nfunction noComponentFactoryError(component) {\n  const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n  error[ERROR_COMPONENT] = component;\n  return error;\n}\nconst ERROR_COMPONENT = 'ngComponent';\nfunction getComponent$1(error) {\n  return error[ERROR_COMPONENT];\n}\nclass _NullComponentFactoryResolver {\n  resolveComponentFactory(component) {\n    throw noComponentFactoryError(component);\n  }\n}\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n *     Component class can be used directly.\n */\nlet ComponentFactoryResolver$1 = /*#__PURE__*/(() => {\n  class ComponentFactoryResolver$1 {}\n  ComponentFactoryResolver$1.NULL = /* @__PURE__ */new _NullComponentFactoryResolver();\n\n  /**\n   * Creates an ElementRef from the most recent node.\n   *\n   * @returns The ElementRef instance to use\n   */\n  return ComponentFactoryResolver$1;\n})();\nfunction injectElementRef() {\n  return createElementRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nfunction createElementRef(tNode, lView) {\n  return new ElementRef(getNativeByTNode(tNode, lView));\n}\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nlet ElementRef = /*#__PURE__*/(() => {\n  class ElementRef {\n    constructor(nativeElement) {\n      this.nativeElement = nativeElement;\n    }\n  }\n  /**\n   * @internal\n   * @nocollapse\n   */\n  ElementRef.__NG_ELEMENT_ID__ = injectElementRef;\n  /**\n   * Unwraps `ElementRef` and return the `nativeElement`.\n   *\n   * @param value value to unwrap\n   * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n   */\n  return ElementRef;\n})();\nfunction unwrapElementRef(value) {\n  return value instanceof ElementRef ? value.nativeElement : value;\n}\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nclass RendererFactory2 {}\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nlet Renderer2 = /*#__PURE__*/(() => {\n  class Renderer2 {}\n  /**\n   * @internal\n   * @nocollapse\n   */\n  Renderer2.__NG_ELEMENT_ID__ = () => injectRenderer2();\n  /** Injects a Renderer2 for the current component. */\n  return Renderer2;\n})();\nfunction injectRenderer2() {\n  // We need the Renderer to be based on the component that it's being injected into, however since\n  // DI happens before we've entered its view, `getLView` will return the parent view instead.\n  const lView = getLView();\n  const tNode = getCurrentTNode();\n  const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n  return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];\n}\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nlet Sanitizer = /*#__PURE__*/(() => {\n  class Sanitizer {}\n  /** @nocollapse */\n  Sanitizer.ɵprov = ɵɵdefineInjectable({\n    token: Sanitizer,\n    providedIn: 'root',\n    factory: () => null\n  });\n\n  /**\n   * @description Represents the version of Angular\n   *\n   * @publicApi\n   */\n  return Sanitizer;\n})();\nclass Version {\n  constructor(full) {\n    this.full = full;\n    this.major = full.split('.')[0];\n    this.minor = full.split('.')[1];\n    this.patch = full.split('.').slice(2).join('.');\n  }\n}\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('15.2.3');\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n//          mod1\n//         /\n//       el1   mod2\n//         \\  /\n//         el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nconst ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nfunction wrappedError(message, originalError) {\n  const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`;\n  const error = Error(msg);\n  error[ERROR_ORIGINAL_ERROR] = originalError;\n  return error;\n}\nfunction getOriginalError(error) {\n  return error[ERROR_ORIGINAL_ERROR];\n}\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nclass ErrorHandler {\n  constructor() {\n    /**\n     * @internal\n     */\n    this._console = console;\n  }\n  handleError(error) {\n    const originalError = this._findOriginalError(error);\n    this._console.error('ERROR', error);\n    if (originalError) {\n      this._console.error('ORIGINAL ERROR', originalError);\n    }\n  }\n  /** @internal */\n  _findOriginalError(error) {\n    let e = error && getOriginalError(error);\n    while (e && getOriginalError(e)) {\n      e = getOriginalError(e);\n    }\n    return e || null;\n  }\n}\nfunction normalizeDebugBindingName(name) {\n  // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n  name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n  return `ng-reflect-${name}`;\n}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n  return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction normalizeDebugBindingValue(value) {\n  try {\n    // Limit the size of the value as otherwise the DOM just gets polluted.\n    return value != null ? value.toString().slice(0, 30) : value;\n  } catch (e) {\n    return '[ERROR] Exception while trying to serialize the value';\n  }\n}\n\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n  return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n  return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n  return element.ownerDocument.body;\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n  if (value instanceof Function) {\n    return value();\n  } else {\n    return value;\n  }\n}\n\n/** Verifies that a given type is a Standalone Component. */\nfunction assertStandaloneComponentType(type) {\n  assertComponentDef(type);\n  const componentDef = getComponentDef(type);\n  if (!componentDef.standalone) {\n    throw new RuntimeError(907 /* RuntimeErrorCode.TYPE_IS_NOT_STANDALONE */, `The ${stringifyForError(type)} component is not marked as standalone, ` + `but Angular expects to have a standalone component here. ` + `Please make sure the ${stringifyForError(type)} component has ` + `the \\`standalone: true\\` flag in the decorator.`);\n  }\n}\n/** Verifies whether a given type is a component */\nfunction assertComponentDef(type) {\n  if (!getComponentDef(type)) {\n    throw new RuntimeError(906 /* RuntimeErrorCode.MISSING_GENERATED_DEF */, `The ${stringifyForError(type)} is not an Angular component, ` + `make sure it has the \\`@Component\\` decorator.`);\n  }\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode, first, second) {\n  throw new RuntimeError(-300 /* RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` + `${stringifyForError(first)} and ` + `${stringifyForError(second)}`);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n  const field = propName ? ` for '${propName}'` : '';\n  let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;\n  if (creationMode) {\n    msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook?`;\n  }\n  throw new RuntimeError(-100 /* RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED */, msg);\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n  const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n  let oldValue = prefix,\n    newValue = prefix;\n  for (let i = 0; i < chunks.length; i++) {\n    const slotIdx = rootIndex + i;\n    oldValue += `${lView[slotIdx]}${chunks[i]}`;\n    newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n  }\n  return {\n    propName,\n    oldValue,\n    newValue\n  };\n}\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n  const tData = lView[TVIEW].data;\n  const metadata = tData[bindingIndex];\n  if (typeof metadata === 'string') {\n    // metadata for property interpolation\n    if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n      return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n    }\n    // metadata for property binding\n    return {\n      propName: metadata,\n      oldValue,\n      newValue\n    };\n  }\n  // metadata is not available for this expression, check if this expression is a part of the\n  // property interpolation by going from the current binding index left and look for a string that\n  // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n  // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n  if (metadata === null) {\n    let idx = bindingIndex - 1;\n    while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n      idx--;\n    }\n    const meta = tData[idx];\n    if (typeof meta === 'string') {\n      const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n      // first interpolation delimiter separates property name from interpolation parts (in case of\n      // property interpolations), so we subtract one from total number of found delimiters\n      if (matches && matches.length - 1 > bindingIndex - idx) {\n        return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n      }\n    }\n  }\n  return {\n    propName: undefined,\n    oldValue,\n    newValue\n  };\n}\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n  ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n  let end = className.length;\n  while (true) {\n    const foundIndex = className.indexOf(classToSearch, startingIndex);\n    if (foundIndex === -1) return foundIndex;\n    if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n      // Ensure that it has leading whitespace\n      const length = classToSearch.length;\n      if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32 /* CharCode.SPACE */) {\n        // Ensure that it has trailing whitespace\n        return foundIndex;\n      }\n    }\n    // False positive, keep searching from where we left off.\n    startingIndex = foundIndex + 1;\n  }\n}\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n *    addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n  // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n  // It is strange to me that sometimes the class information comes in form of `class` attribute\n  // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n  // if that is the right behavior.\n  ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n  let i = 0;\n  while (i < attrs.length) {\n    let item = attrs[i++];\n    if (isProjectionMode && item === 'class') {\n      item = attrs[i];\n      if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n        return true;\n      }\n    } else if (item === 1 /* AttributeMarker.Classes */) {\n      // We found the classes section. Start searching for the class.\n      while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n        // while we have strings\n        if (item.toLowerCase() === cssClassToMatch) return true;\n      }\n      return false;\n    }\n  }\n  return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n  return tNode.type === 4 /* TNodeType.Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n  const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n  return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n  ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n  let mode = 4 /* SelectorFlags.ELEMENT */;\n  const nodeAttrs = tNode.attrs || [];\n  // Find the index of first attribute that has no value, only a name.\n  const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n  // When processing \":not\" selectors, we skip to the next \":not\" if the\n  // current one doesn't match\n  let skipToNextSelector = false;\n  for (let i = 0; i < selector.length; i++) {\n    const current = selector[i];\n    if (typeof current === 'number') {\n      // If we finish processing a :not selector and it hasn't failed, return false\n      if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n        return false;\n      }\n      // If we are skipping to the next :not() and this mode flag is positive,\n      // it's a part of the current :not() selector, and we should keep skipping\n      if (skipToNextSelector && isPositive(current)) continue;\n      skipToNextSelector = false;\n      mode = current | mode & 1 /* SelectorFlags.NOT */;\n      continue;\n    }\n    if (skipToNextSelector) continue;\n    if (mode & 4 /* SelectorFlags.ELEMENT */) {\n      mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.NOT */;\n      if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {\n        if (isPositive(mode)) return false;\n        skipToNextSelector = true;\n      }\n    } else {\n      const selectorAttrValue = mode & 8 /* SelectorFlags.CLASS */ ? current : selector[++i];\n      // special case for matching against classes when a tNode has been instantiated with\n      // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n      if (mode & 8 /* SelectorFlags.CLASS */ && tNode.attrs !== null) {\n        if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n          if (isPositive(mode)) return false;\n          skipToNextSelector = true;\n        }\n        continue;\n      }\n      const attrName = mode & 8 /* SelectorFlags.CLASS */ ? 'class' : current;\n      const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n      if (attrIndexInNode === -1) {\n        if (isPositive(mode)) return false;\n        skipToNextSelector = true;\n        continue;\n      }\n      if (selectorAttrValue !== '') {\n        let nodeAttrValue;\n        if (attrIndexInNode > nameOnlyMarkerIdx) {\n          nodeAttrValue = '';\n        } else {\n          ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.NamespaceURI */, 'We do not match directives on namespaced attributes');\n          // we lowercase the attribute value to be able to match\n          // selectors without case-sensitivity\n          // (selectors are already in lowercase when generated)\n          nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n        }\n        const compareAgainstClassName = mode & 8 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n        if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n          if (isPositive(mode)) return false;\n          skipToNextSelector = true;\n        }\n      }\n    }\n  }\n  return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n  return (mode & 1 /* SelectorFlags.NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes                   | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection     | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive      | NO                | NO                  | YES                 | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive  | YES               | YES                 | NO                  | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n  if (attrs === null) return -1;\n  let i = 0;\n  if (isProjectionMode || !isInlineTemplate) {\n    let bindingsMode = false;\n    while (i < attrs.length) {\n      const maybeAttrName = attrs[i];\n      if (maybeAttrName === name) {\n        return i;\n      } else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n        bindingsMode = true;\n      } else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n        let value = attrs[++i];\n        // We should skip classes here because we have a separate mechanism for\n        // matching classes in projection mode.\n        while (typeof value === 'string') {\n          value = attrs[++i];\n        }\n        continue;\n      } else if (maybeAttrName === 4 /* AttributeMarker.Template */) {\n        // We do not care about Template attributes in this scenario.\n        break;\n      } else if (maybeAttrName === 0 /* AttributeMarker.NamespaceURI */) {\n        // Skip the whole namespaced attribute and value. This is by design.\n        i += 4;\n        continue;\n      }\n      // In binding mode there are only names, rather than name-value pairs.\n      i += bindingsMode ? 1 : 2;\n    }\n    // We did not match the attribute\n    return -1;\n  } else {\n    return matchTemplateAttribute(attrs, name);\n  }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n  for (let i = 0; i < selector.length; i++) {\n    if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n  const nodeAttrs = tNode.attrs;\n  if (nodeAttrs != null) {\n    const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.ProjectAs */);\n    // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n    // (attribute names are stored at even indexes)\n    if ((ngProjectAsAttrIdx & 1) === 0) {\n      return nodeAttrs[ngProjectAsAttrIdx + 1];\n    }\n  }\n  return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n  for (let i = 0; i < nodeAttrs.length; i++) {\n    const nodeAttr = nodeAttrs[i];\n    if (isNameOnlyAttributeMarker(nodeAttr)) {\n      return i;\n    }\n  }\n  return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n  let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n  if (i > -1) {\n    i++;\n    while (i < attrs.length) {\n      const attr = attrs[i];\n      // Return in case we checked all template attrs and are switching to the next section in the\n      // attrs array (that starts with a number that represents an attribute marker).\n      if (typeof attr === 'number') return -1;\n      if (attr === name) return i;\n      i++;\n    }\n  }\n  return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n  selectorListLoop: for (let i = 0; i < list.length; i++) {\n    const currentSelectorInList = list[i];\n    if (selector.length !== currentSelectorInList.length) {\n      continue;\n    }\n    for (let j = 0; j < selector.length; j++) {\n      if (selector[j] !== currentSelectorInList[j]) {\n        continue selectorListLoop;\n      }\n    }\n    return true;\n  }\n  return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n  return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n  let result = selector[0];\n  let i = 1;\n  let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n  let currentChunk = '';\n  let isNegativeMode = false;\n  while (i < selector.length) {\n    let valueOrMarker = selector[i];\n    if (typeof valueOrMarker === 'string') {\n      if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n        const attrValue = selector[++i];\n        currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n      } else if (mode & 8 /* SelectorFlags.CLASS */) {\n        currentChunk += '.' + valueOrMarker;\n      } else if (mode & 4 /* SelectorFlags.ELEMENT */) {\n        currentChunk += ' ' + valueOrMarker;\n      }\n    } else {\n      //\n      // Append current chunk to the final result in case we come across SelectorFlag, which\n      // indicates that the previous section of a selector is over. We need to accumulate content\n      // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n      // ```\n      //  ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n      // ```\n      // should be transformed to `.classA :not(.classB .classC)`.\n      //\n      // Note: for negative selector part, we accumulate content between flags until we find the\n      // next negative flag. This is needed to support a case where `:not()` rule contains more than\n      // one chunk, e.g. the following selector:\n      // ```\n      //  ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n      // ```\n      // should be stringified to `:not(p.foo) :not(.bar)`\n      //\n      if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n        result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n        currentChunk = '';\n      }\n      mode = valueOrMarker;\n      // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n      // mode is maintained for remaining chunks of a selector.\n      isNegativeMode = isNegativeMode || !isPositive(mode);\n    }\n    i++;\n  }\n  if (currentChunk !== '') {\n    result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n  }\n  return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n  return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n  const attrs = [];\n  const classes = [];\n  let i = 1;\n  let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n  while (i < selector.length) {\n    let valueOrMarker = selector[i];\n    if (typeof valueOrMarker === 'string') {\n      if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n        if (valueOrMarker !== '') {\n          attrs.push(valueOrMarker, selector[++i]);\n        }\n      } else if (mode === 8 /* SelectorFlags.CLASS */) {\n        classes.push(valueOrMarker);\n      }\n    } else {\n      // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n      // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n      // extracted only for \"positive\" part of the selector, we can stop here.\n      if (!isPositive(mode)) break;\n      mode = valueOrMarker;\n    }\n    i++;\n  }\n  return {\n    attrs,\n    classes\n  };\n}\n\n/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? {\n  __brand__: 'NO_CHANGE'\n} : {};\n\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n *   if (rf & 1) {\n *     text(0, 'Hello');\n *     text(1, 'Goodbye')\n *     element(2, 'div');\n *   }\n *   if (rf & 2) {\n *     advance(2); // Advance twice to the <div>.\n *     property('title', 'test');\n *   }\n *  }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nfunction ɵɵadvance(delta) {\n  ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n  selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n  ngDevMode && assertIndexInDeclRange(lView, index);\n  // Flush the initial hooks for elements in the view that have been added up to this point.\n  // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n  if (!checkNoChangesMode) {\n    const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n    if (hooksInitPhaseCompleted) {\n      const preOrderCheckHooks = tView.preOrderCheckHooks;\n      if (preOrderCheckHooks !== null) {\n        executeCheckHooks(lView, preOrderCheckHooks, index);\n      }\n    } else {\n      const preOrderHooks = tView.preOrderHooks;\n      if (preOrderHooks !== null) {\n        executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, index);\n      }\n    }\n  }\n  // We must set the selected index *after* running the hooks, because hooks may have side-effects\n  // that cause other template functions to run, thus updating the selected index, which is global\n  // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n  // will be altered by the time we leave the `ɵɵadvance` instruction.\n  setSelectedIndex(index);\n}\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n  'ɵɵdefineInjectable': ɵɵdefineInjectable,\n  'ɵɵdefineInjector': ɵɵdefineInjector,\n  'ɵɵinject': ɵɵinject,\n  'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n  'resolveForwardRef': resolveForwardRef\n};\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, meta) {\n  let ngInjectableDef = null;\n  let ngFactoryDef = null;\n  // if NG_PROV_DEF is already defined on this class then don't overwrite it\n  if (!type.hasOwnProperty(NG_PROV_DEF)) {\n    Object.defineProperty(type, NG_PROV_DEF, {\n      get: () => {\n        if (ngInjectableDef === null) {\n          const compiler = getCompilerFacade({\n            usage: 0 /* JitCompilerUsage.Decorator */,\n            kind: 'injectable',\n            type\n          });\n          ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n        }\n        return ngInjectableDef;\n      }\n    });\n  }\n  // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n  if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n      get: () => {\n        if (ngFactoryDef === null) {\n          const compiler = getCompilerFacade({\n            usage: 0 /* JitCompilerUsage.Decorator */,\n            kind: 'injectable',\n            type\n          });\n          ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n            name: type.name,\n            type,\n            typeArgumentCount: 0,\n            deps: reflectDependencies(type),\n            target: compiler.FactoryTarget.Injectable\n          });\n        }\n        return ngFactoryDef;\n      },\n      // Leave this configurable so that the factories from directives or pipes can take precedence.\n      configurable: true\n    });\n  }\n}\nconst USE_VALUE = /*#__PURE__*/getClosureSafeProperty({\n  provide: String,\n  useValue: getClosureSafeProperty\n});\nfunction isUseClassProvider(meta) {\n  return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n  return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n  return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n  return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n  // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n  const meta = srcMeta || {\n    providedIn: null\n  };\n  const compilerMeta = {\n    name: type.name,\n    type: type,\n    typeArgumentCount: 0,\n    providedIn: meta.providedIn\n  };\n  if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n    compilerMeta.deps = convertDependencies(meta.deps);\n  }\n  // Check to see if the user explicitly provided a `useXxxx` property.\n  if (isUseClassProvider(meta)) {\n    compilerMeta.useClass = meta.useClass;\n  } else if (isUseValueProvider(meta)) {\n    compilerMeta.useValue = meta.useValue;\n  } else if (isUseFactoryProvider(meta)) {\n    compilerMeta.useFactory = meta.useFactory;\n  } else if (isUseExistingProvider(meta)) {\n    compilerMeta.useExisting = meta.useExisting;\n  }\n  return compilerMeta;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = /*#__PURE__*/makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n  const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n  injector.resolveInjectorInitializers();\n  return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n  const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n  name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n  return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n *  The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nlet Injector = /*#__PURE__*/(() => {\n  class Injector {\n    static create(options, parent) {\n      if (Array.isArray(options)) {\n        return createInjector({\n          name: ''\n        }, parent, options, '');\n      } else {\n        const name = options.name ?? '';\n        return createInjector({\n          name\n        }, options.parent, options.providers, name);\n      }\n    }\n  }\n  Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n  Injector.NULL = /* @__PURE__ */new NullInjector();\n  /** @nocollapse */\n  Injector.ɵprov = ɵɵdefineInjectable({\n    token: Injector,\n    providedIn: 'any',\n    factory: () => ɵɵinject(INJECTOR)\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n  Injector.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.Injector */;\n  return Injector;\n})();\nfunction findFirstClosedCycle(keys) {\n  const res = [];\n  for (let i = 0; i < keys.length; ++i) {\n    if (res.indexOf(keys[i]) > -1) {\n      res.push(keys[i]);\n      return res;\n    }\n    res.push(keys[i]);\n  }\n  return res;\n}\nfunction constructResolvingPath(keys) {\n  if (keys.length > 1) {\n    const reversed = findFirstClosedCycle(keys.slice().reverse());\n    const tokenStrs = reversed.map(k => stringify(k.token));\n    return ' (' + tokenStrs.join(' -> ') + ')';\n  }\n  return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n  const keys = [key];\n  const errMsg = constructResolvingMessage(keys);\n  const error = originalError ? wrappedError(errMsg, originalError) : Error(errMsg);\n  error.addKey = addKey;\n  error.keys = keys;\n  error.injectors = [injector];\n  error.constructResolvingMessage = constructResolvingMessage;\n  error[ERROR_ORIGINAL_ERROR] = originalError;\n  return error;\n}\nfunction addKey(injector, key) {\n  this.injectors.push(injector);\n  this.keys.push(key);\n  // Note: This updated message won't be reflected in the `.stack` property\n  this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n  return injectionError(injector, key, function (keys) {\n    const first = stringify(keys[0].token);\n    return `No provider for ${first}!${constructResolvingPath(keys)}`;\n  });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n *   {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n *   {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n  return injectionError(injector, key, function (keys) {\n    return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n  });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor() {\n *     throw new Error('message');\n *   }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n *   injector.get(A);\n * } catch (e) {\n *   expect(e instanceof InstantiationError).toBe(true);\n *   expect(e.originalException.message).toEqual(\"message\");\n *   expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n  return injectionError(injector, key, function (keys) {\n    const first = stringify(keys[0].token);\n    return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n  }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n  return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n  const signature = [];\n  for (let i = 0, ii = params.length; i < ii; i++) {\n    const parameter = params[i];\n    if (!parameter || parameter.length == 0) {\n      signature.push('?');\n    } else {\n      signature.push(parameter.map(stringify).join(' '));\n    }\n  }\n  return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' + signature.join(', ') + '). ' + 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' + stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n  return Error(`Index ${index} is out-of-bounds.`);\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n *   { provide: \"Strings\", useValue: \"string1\", multi: true},\n *   { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n  return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nclass ReflectiveKey {\n  /**\n   * Private\n   */\n  constructor(token, id) {\n    this.token = token;\n    this.id = id;\n    if (!token) {\n      throw new RuntimeError(208 /* RuntimeErrorCode.MISSING_INJECTION_TOKEN */, ngDevMode && 'Token must be defined!');\n    }\n    this.displayName = stringify(this.token);\n  }\n  /**\n   * Retrieves a `Key` for a token.\n   */\n  static get(token) {\n    return _globalKeyRegistry.get(resolveForwardRef(token));\n  }\n  /**\n   * @returns the number of keys registered in the system.\n   */\n  static get numberOfKeys() {\n    return _globalKeyRegistry.numberOfKeys;\n  }\n}\nclass KeyRegistry {\n  constructor() {\n    this._allKeys = new Map();\n  }\n  get(token) {\n    if (token instanceof ReflectiveKey) return token;\n    if (this._allKeys.has(token)) {\n      return this._allKeys.get(token);\n    }\n    const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n    this._allKeys.set(token, newKey);\n    return newKey;\n  }\n  get numberOfKeys() {\n    return this._allKeys.size;\n  }\n}\nconst _globalKeyRegistry = /*#__PURE__*/new KeyRegistry();\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nclass ReflectiveDependency {\n  constructor(key, optional, visibility) {\n    this.key = key;\n    this.optional = optional;\n    this.visibility = visibility;\n  }\n  static fromKey(key) {\n    return new ReflectiveDependency(key, false, null);\n  }\n}\nconst _EMPTY_LIST = [];\nclass ResolvedReflectiveProvider_ {\n  constructor(key, resolvedFactories, multiProvider) {\n    this.key = key;\n    this.resolvedFactories = resolvedFactories;\n    this.multiProvider = multiProvider;\n    this.resolvedFactory = this.resolvedFactories[0];\n  }\n}\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nclass ResolvedReflectiveFactory {\n  constructor(\n  /**\n   * Factory function which can return an instance of an object represented by a key.\n   */\n  factory,\n  /**\n   * Arguments (dependencies) to the `factory` function.\n   */\n  dependencies) {\n    this.factory = factory;\n    this.dependencies = dependencies;\n  }\n}\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n  let factoryFn;\n  let resolvedDeps;\n  if (provider.useClass) {\n    const useClass = resolveForwardRef(provider.useClass);\n    factoryFn = getReflect().factory(useClass);\n    resolvedDeps = _dependenciesFor(useClass);\n  } else if (provider.useExisting) {\n    factoryFn = aliasInstance => aliasInstance;\n    resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n  } else if (provider.useFactory) {\n    factoryFn = provider.useFactory;\n    resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n  } else {\n    factoryFn = () => provider.useValue;\n    resolvedDeps = _EMPTY_LIST;\n  }\n  return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n  return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n  const normalized = _normalizeProviders(providers, []);\n  const resolved = normalized.map(resolveReflectiveProvider);\n  const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n  return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n  for (let i = 0; i < providers.length; i++) {\n    const provider = providers[i];\n    const existing = normalizedProvidersMap.get(provider.key.id);\n    if (existing) {\n      if (provider.multiProvider !== existing.multiProvider) {\n        throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n      }\n      if (provider.multiProvider) {\n        for (let j = 0; j < provider.resolvedFactories.length; j++) {\n          existing.resolvedFactories.push(provider.resolvedFactories[j]);\n        }\n      } else {\n        normalizedProvidersMap.set(provider.key.id, provider);\n      }\n    } else {\n      let resolvedProvider;\n      if (provider.multiProvider) {\n        resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n      } else {\n        resolvedProvider = provider;\n      }\n      normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n    }\n  }\n  return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n  providers.forEach(b => {\n    if (b instanceof Type) {\n      res.push({\n        provide: b,\n        useClass: b\n      });\n    } else if (b && typeof b == 'object' && b.provide !== undefined) {\n      res.push(b);\n    } else if (Array.isArray(b)) {\n      _normalizeProviders(b, res);\n    } else {\n      throw invalidProviderError(b);\n    }\n  });\n  return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n  if (!dependencies) {\n    return _dependenciesFor(typeOrFunc);\n  } else {\n    const params = dependencies.map(t => [t]);\n    return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n  }\n}\nfunction _dependenciesFor(typeOrFunc) {\n  const params = getReflect().parameters(typeOrFunc);\n  if (!params) return [];\n  if (params.some(p => p == null)) {\n    throw noAnnotationError(typeOrFunc, params);\n  }\n  return params.map(p => _extractToken(typeOrFunc, p, params));\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n  let token = null;\n  let optional = false;\n  if (!Array.isArray(metadata)) {\n    if (metadata instanceof Inject) {\n      return _createDependency(metadata.token, optional, null);\n    } else {\n      return _createDependency(metadata, optional, null);\n    }\n  }\n  let visibility = null;\n  for (let i = 0; i < metadata.length; ++i) {\n    const paramMetadata = metadata[i];\n    if (paramMetadata instanceof Type) {\n      token = paramMetadata;\n    } else if (paramMetadata instanceof Inject) {\n      token = paramMetadata.token;\n    } else if (paramMetadata instanceof Optional) {\n      optional = true;\n    } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n      visibility = paramMetadata;\n    } else if (paramMetadata instanceof InjectionToken) {\n      token = paramMetadata;\n    }\n  }\n  token = resolveForwardRef(token);\n  if (token != null) {\n    return _createDependency(token, optional, visibility);\n  } else {\n    throw noAnnotationError(typeOrFunc, params);\n  }\n}\nfunction _createDependency(token, optional, visibility) {\n  return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n *   constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * TODO: delete in v14.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nclass ReflectiveInjector {\n  /**\n   * Turns an array of provider definitions into an array of resolved providers.\n   *\n   * A resolution is a process of flattening multiple nested arrays and converting individual\n   * providers into an array of `ResolvedReflectiveProvider`s.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n   *\n   * expect(providers.length).toEqual(2);\n   *\n   * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n   * expect(providers[0].key.displayName).toBe(\"Car\");\n   * expect(providers[0].dependencies.length).toEqual(1);\n   * expect(providers[0].factory).toBeDefined();\n   *\n   * expect(providers[1].key.displayName).toBe(\"Engine\");\n   * });\n   * ```\n   *\n   */\n  static resolve(providers) {\n    return resolveReflectiveProviders(providers);\n  }\n  /**\n   * Resolves an array of providers and creates an injector from those providers.\n   *\n   * The passed-in providers can be an array of `Type`, `Provider`,\n   * or a recursive array of more providers.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n   * expect(injector.get(Car) instanceof Car).toBe(true);\n   * ```\n   */\n  static resolveAndCreate(providers, parent) {\n    const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n    return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n  }\n  /**\n   * Creates an injector from previously resolved providers.\n   *\n   * This API is the recommended way to construct injectors in performance-sensitive parts.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var providers = ReflectiveInjector.resolve([Car, Engine]);\n   * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n   * expect(injector.get(Car) instanceof Car).toBe(true);\n   * ```\n   */\n  static fromResolvedProviders(providers, parent) {\n    return new ReflectiveInjector_(providers, parent);\n  }\n}\nlet ReflectiveInjector_ = /*#__PURE__*/(() => {\n  class ReflectiveInjector_ {\n    /**\n     * Private\n     */\n    constructor(_providers, _parent) {\n      /** @internal */\n      this._constructionCounter = 0;\n      this._providers = _providers;\n      this.parent = _parent || null;\n      const len = _providers.length;\n      this.keyIds = [];\n      this.objs = [];\n      for (let i = 0; i < len; i++) {\n        this.keyIds[i] = _providers[i].key.id;\n        this.objs[i] = UNDEFINED;\n      }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n      return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n    }\n    resolveAndCreateChild(providers) {\n      const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n      return this.createChildFromResolved(ResolvedReflectiveProviders);\n    }\n    createChildFromResolved(providers) {\n      const inj = new ReflectiveInjector_(providers);\n      inj.parent = this;\n      return inj;\n    }\n    resolveAndInstantiate(provider) {\n      return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n    }\n    instantiateResolved(provider) {\n      return this._instantiateProvider(provider);\n    }\n    getProviderAtIndex(index) {\n      if (index < 0 || index >= this._providers.length) {\n        throw outOfBoundsError(index);\n      }\n      return this._providers[index];\n    }\n    /** @internal */\n    _new(provider) {\n      if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n        throw cyclicDependencyError(this, provider.key);\n      }\n      return this._instantiateProvider(provider);\n    }\n    _getMaxNumberOfObjects() {\n      return this.objs.length;\n    }\n    _instantiateProvider(provider) {\n      if (provider.multiProvider) {\n        const res = [];\n        for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n          res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n        }\n        return res;\n      } else {\n        return this._instantiate(provider, provider.resolvedFactories[0]);\n      }\n    }\n    _instantiate(provider, ResolvedReflectiveFactory) {\n      const factory = ResolvedReflectiveFactory.factory;\n      let deps;\n      try {\n        deps = ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n      } catch (e) {\n        if (e.addKey) {\n          e.addKey(this, provider.key);\n        }\n        throw e;\n      }\n      let obj;\n      try {\n        obj = factory(...deps);\n      } catch (e) {\n        throw instantiationError(this, e, e.stack, provider.key);\n      }\n      return obj;\n    }\n    _getByReflectiveDependency(dep) {\n      return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n    }\n    _getByKey(key, visibility, notFoundValue) {\n      if (key === ReflectiveInjector_.INJECTOR_KEY) {\n        return this;\n      }\n      if (visibility instanceof Self) {\n        return this._getByKeySelf(key, notFoundValue);\n      } else {\n        return this._getByKeyDefault(key, notFoundValue, visibility);\n      }\n    }\n    _getObjByKeyId(keyId) {\n      for (let i = 0; i < this.keyIds.length; i++) {\n        if (this.keyIds[i] === keyId) {\n          if (this.objs[i] === UNDEFINED) {\n            this.objs[i] = this._new(this._providers[i]);\n          }\n          return this.objs[i];\n        }\n      }\n      return UNDEFINED;\n    }\n    /** @internal */\n    _throwOrNull(key, notFoundValue) {\n      if (notFoundValue !== THROW_IF_NOT_FOUND) {\n        return notFoundValue;\n      } else {\n        throw noProviderError(this, key);\n      }\n    }\n    /** @internal */\n    _getByKeySelf(key, notFoundValue) {\n      const obj = this._getObjByKeyId(key.id);\n      return obj !== UNDEFINED ? obj : this._throwOrNull(key, notFoundValue);\n    }\n    /** @internal */\n    _getByKeyDefault(key, notFoundValue, visibility) {\n      let inj;\n      if (visibility instanceof SkipSelf) {\n        inj = this.parent;\n      } else {\n        inj = this;\n      }\n      while (inj instanceof ReflectiveInjector_) {\n        const inj_ = inj;\n        const obj = inj_._getObjByKeyId(key.id);\n        if (obj !== UNDEFINED) return obj;\n        inj = inj_.parent;\n      }\n      if (inj !== null) {\n        return inj.get(key.token, notFoundValue);\n      } else {\n        return this._throwOrNull(key, notFoundValue);\n      }\n    }\n    get displayName() {\n      const providers = _mapProviders(this, b => ' \"' + b.key.displayName + '\" ').join(', ');\n      return `ReflectiveInjector(providers: [${providers}])`;\n    }\n    toString() {\n      return this.displayName;\n    }\n  }\n  ReflectiveInjector_.INJECTOR_KEY = /* @__PURE__ */ReflectiveKey.get(Injector);\n  return ReflectiveInjector_;\n})();\nfunction _mapProviders(injector, fn) {\n  const res = [];\n  for (let i = 0; i < injector._providers.length; ++i) {\n    res[i] = fn(injector.getProviderAtIndex(i));\n  }\n  return res;\n}\n\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n *  - //packages/animations/browser/test:test_web_chromium-local\n *  - //packages/compiler-cli/test:extract_i18n\n *  - //packages/compiler-cli/test:ngc\n *  - //packages/compiler-cli/test:perform_watch\n *  - //packages/compiler-cli/test/diagnostics:check_types\n *  - //packages/compiler-cli/test/transformers:test\n *  - //packages/compiler/test:test\n *  - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nfunction ɵɵdirectiveInject(token, flags = InjectFlags.Default) {\n  const lView = getLView();\n  // Fall back to inject() if view hasn't been created. This situation can happen in tests\n  // if inject utilities are used before bootstrapping.\n  if (lView === null) {\n    // Verify that we will not get into infinite loop.\n    ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n    return ɵɵinject(token, flags);\n  }\n  const tNode = getCurrentTNode();\n  return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactory() {\n  const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n  throw new Error(msg);\n}\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nfunction processHostBindingOpCodes(tView, lView) {\n  const hostBindingOpCodes = tView.hostBindingOpCodes;\n  if (hostBindingOpCodes === null) return;\n  try {\n    for (let i = 0; i < hostBindingOpCodes.length; i++) {\n      const opCode = hostBindingOpCodes[i];\n      if (opCode < 0) {\n        // Negative numbers are element indexes.\n        setSelectedIndex(~opCode);\n      } else {\n        // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n        const directiveIdx = opCode;\n        const bindingRootIndx = hostBindingOpCodes[++i];\n        const hostBindingFn = hostBindingOpCodes[++i];\n        setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n        const context = lView[directiveIdx];\n        hostBindingFn(2 /* RenderFlags.Update */, context);\n      }\n    }\n  } finally {\n    setSelectedIndex(-1);\n  }\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n  const contentQueries = tView.contentQueries;\n  if (contentQueries !== null) {\n    for (let i = 0; i < contentQueries.length; i += 2) {\n      const queryStartIdx = contentQueries[i];\n      const directiveDefIdx = contentQueries[i + 1];\n      if (directiveDefIdx !== -1) {\n        const directiveDef = tView.data[directiveDefIdx];\n        ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n        ngDevMode && assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n        setCurrentQueryIndex(queryStartIdx);\n        directiveDef.contentQueries(2 /* RenderFlags.Update */, lView[directiveDefIdx], directiveDefIdx);\n      }\n    }\n  }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView, components) {\n  for (let i = 0; i < components.length; i++) {\n    refreshComponent(hostLView, components[i]);\n  }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n  for (let i = 0; i < components.length; i++) {\n    renderComponent(hostLView, components[i]);\n  }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {\n  const lView = tView.blueprint.slice();\n  lView[HOST] = host;\n  lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;\n  if (embeddedViewInjector !== null || parentLView && parentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) {\n    lView[FLAGS] |= 1024 /* LViewFlags.HasEmbeddedViewInjector */;\n  }\n\n  resetPreOrderHookFlags(lView);\n  ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n  lView[CONTEXT] = context;\n  lView[RENDERER_FACTORY] = rendererFactory || parentLView && parentLView[RENDERER_FACTORY];\n  ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n  lView[RENDERER] = renderer || parentLView && parentLView[RENDERER];\n  ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n  lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n  lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;\n  lView[T_HOST] = tHostNode;\n  lView[ID] = getUniqueLViewId();\n  lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;\n  ngDevMode && assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n  lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n  return lView;\n}\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\n  ngDevMode && index !== 0 &&\n  // 0 are bogus nodes and they are OK. See `createContainerRef` in\n  // `view_engine_compatibility` for additional context.\n  assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n  // Keep this function short, so that the VM will inline it.\n  ngDevMode && assertPureTNodeType(type);\n  let tNode = tView.data[index];\n  if (tNode === null) {\n    tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n    if (isInI18nBlock()) {\n      // If we are in i18n block then all elements should be pre declared through `Placeholder`\n      // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n      // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n      // removed, so we mark it as detached.\n      tNode.flags |= 32 /* TNodeFlags.isDetached */;\n    }\n  } else if (tNode.type & 64 /* TNodeType.Placeholder */) {\n    tNode.type = type;\n    tNode.value = name;\n    tNode.attrs = attrs;\n    const parent = getCurrentParentTNode();\n    tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n    ngDevMode && assertTNodeForTView(tNode, tView);\n    ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n  }\n  setCurrentTNode(tNode, true);\n  return tNode;\n}\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n  const currentTNode = getCurrentTNodePlaceholderOk();\n  const isParent = isCurrentTNodeParent();\n  const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n  // Parents cannot cross component boundaries because components will be used in multiple places.\n  const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs);\n  // Assign a pointer to the first child node of a given view. The first node is not always the one\n  // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n  // the index 1 or more, so we can't just check node index.\n  if (tView.firstChild === null) {\n    tView.firstChild = tNode;\n  }\n  if (currentTNode !== null) {\n    if (isParent) {\n      // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n      if (currentTNode.child == null && tNode.parent !== null) {\n        // We are in the same view, which means we are adding content node to the parent view.\n        currentTNode.child = tNode;\n      }\n    } else {\n      if (currentTNode.next === null) {\n        // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n        // to break the links which i18n created.\n        currentTNode.next = tNode;\n        tNode.prev = currentTNode;\n      }\n    }\n  }\n  return tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n  if (numSlotsToAlloc === 0) return -1;\n  if (ngDevMode) {\n    assertFirstCreatePass(tView);\n    assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n    assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n    assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n    assertFirstUpdatePass(tView);\n  }\n  const allocIdx = lView.length;\n  for (let i = 0; i < numSlotsToAlloc; i++) {\n    lView.push(initialValue);\n    tView.blueprint.push(initialValue);\n    tView.data.push(null);\n  }\n  return allocIdx;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n  ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n  enterView(lView);\n  try {\n    const viewQuery = tView.viewQuery;\n    if (viewQuery !== null) {\n      executeViewQueryFn(1 /* RenderFlags.Create */, viewQuery, context);\n    }\n    // Execute a template associated with this view, if it exists. A template function might not be\n    // defined for the root component views.\n    const templateFn = tView.template;\n    if (templateFn !== null) {\n      executeTemplate(tView, lView, templateFn, 1 /* RenderFlags.Create */, context);\n    }\n    // This needs to be set before children are processed to support recursive components.\n    // This must be set to false immediately after the first creation run because in an\n    // ngFor loop, all the views will be created together before update mode runs and turns\n    // off firstCreatePass. If we don't set it here, instances will perform directive\n    // matching, etc again and again.\n    if (tView.firstCreatePass) {\n      tView.firstCreatePass = false;\n    }\n    // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n    // content queries are resolved during change detection (i.e. update mode), after embedded\n    // views are refreshed (see block above).\n    if (tView.staticContentQueries) {\n      refreshContentQueries(tView, lView);\n    }\n    // We must materialize query results before child components are processed\n    // in case a child component has projected a container. The LContainer needs\n    // to exist so the embedded views are properly attached by the container.\n    if (tView.staticViewQueries) {\n      executeViewQueryFn(2 /* RenderFlags.Update */, tView.viewQuery, context);\n    }\n    // Render child component views.\n    const components = tView.components;\n    if (components !== null) {\n      renderChildComponents(lView, components);\n    }\n  } catch (error) {\n    // If we didn't manage to get past the first template pass due to\n    // an error, mark the view as corrupted so we can try to recover.\n    if (tView.firstCreatePass) {\n      tView.incompleteFirstPass = true;\n      tView.firstCreatePass = false;\n    }\n    throw error;\n  } finally {\n    lView[FLAGS] &= ~4 /* LViewFlags.CreationMode */;\n    leaveView();\n  }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n  ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n  const flags = lView[FLAGS];\n  if ((flags & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.Destroyed */) return;\n  enterView(lView);\n  // Check no changes mode is a dev only mode used to verify that bindings have not changed\n  // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n  const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n  try {\n    resetPreOrderHookFlags(lView);\n    setBindingIndex(tView.bindingStartIndex);\n    if (templateFn !== null) {\n      executeTemplate(tView, lView, templateFn, 2 /* RenderFlags.Update */, context);\n    }\n    const hooksInitPhaseCompleted = (flags & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n    // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        const preOrderCheckHooks = tView.preOrderCheckHooks;\n        if (preOrderCheckHooks !== null) {\n          executeCheckHooks(lView, preOrderCheckHooks, null);\n        }\n      } else {\n        const preOrderHooks = tView.preOrderHooks;\n        if (preOrderHooks !== null) {\n          executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, null);\n        }\n        incrementInitPhaseFlags(lView, 0 /* InitPhaseState.OnInitHooksToBeRun */);\n      }\n    }\n    // First mark transplanted views that are declared in this lView as needing a refresh at their\n    // insertion points. This is needed to avoid the situation where the template is defined in this\n    // `LView` but its declaration appears after the insertion component.\n    markTransplantedViewsForRefresh(lView);\n    refreshEmbeddedViews(lView);\n    // Content query results must be refreshed before content hooks are called.\n    if (tView.contentQueries !== null) {\n      refreshContentQueries(tView, lView);\n    }\n    // execute content hooks (AfterContentInit, AfterContentChecked)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        const contentCheckHooks = tView.contentCheckHooks;\n        if (contentCheckHooks !== null) {\n          executeCheckHooks(lView, contentCheckHooks);\n        }\n      } else {\n        const contentHooks = tView.contentHooks;\n        if (contentHooks !== null) {\n          executeInitAndCheckHooks(lView, contentHooks, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n        }\n\n        incrementInitPhaseFlags(lView, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n      }\n    }\n\n    processHostBindingOpCodes(tView, lView);\n    // Refresh child component views.\n    const components = tView.components;\n    if (components !== null) {\n      refreshChildComponents(lView, components);\n    }\n    // View queries must execute after refreshing child components because a template in this view\n    // could be inserted in a child component. If the view query executes before child component\n    // refresh, the template might not yet be inserted.\n    const viewQuery = tView.viewQuery;\n    if (viewQuery !== null) {\n      executeViewQueryFn(2 /* RenderFlags.Update */, viewQuery, context);\n    }\n    // execute view hooks (AfterViewInit, AfterViewChecked)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        const viewCheckHooks = tView.viewCheckHooks;\n        if (viewCheckHooks !== null) {\n          executeCheckHooks(lView, viewCheckHooks);\n        }\n      } else {\n        const viewHooks = tView.viewHooks;\n        if (viewHooks !== null) {\n          executeInitAndCheckHooks(lView, viewHooks, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n        }\n\n        incrementInitPhaseFlags(lView, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n      }\n    }\n\n    if (tView.firstUpdatePass === true) {\n      // We need to make sure that we only flip the flag on successful `refreshView` only\n      // Don't do this in `finally` block.\n      // If we did this in `finally` block then an exception could block the execution of styling\n      // instructions which in turn would be unable to insert themselves into the styling linked\n      // list. The result of this would be that if the exception would not be throw on subsequent CD\n      // the styling would be unable to process it data and reflect to the DOM.\n      tView.firstUpdatePass = false;\n    }\n    // Do not reset the dirty state when running in check no changes mode. We don't want components\n    // to behave differently depending on whether check no changes is enabled or not. For example:\n    // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n    // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n    // no changes cycle, the component would be not be dirty for the next update pass. This would\n    // be different in production mode where the component dirty state is not reset.\n    if (!isInCheckNoChangesPass) {\n      lView[FLAGS] &= ~(32 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);\n    }\n\n    if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n      lView[FLAGS] &= ~512 /* LViewFlags.RefreshTransplantedView */;\n      updateTransplantedViewCount(lView[PARENT], -1);\n    }\n  } finally {\n    leaveView();\n  }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n  const prevSelectedIndex = getSelectedIndex();\n  const isUpdatePhase = rf & 2 /* RenderFlags.Update */;\n  try {\n    setSelectedIndex(-1);\n    if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n      // When we're updating, inherently select 0 so we don't\n      // have to generate that instruction for most update blocks.\n      selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n    }\n    const preHookType = isUpdatePhase ? 2 /* ProfilerEvent.TemplateUpdateStart */ : 0 /* ProfilerEvent.TemplateCreateStart */;\n    profiler(preHookType, context);\n    templateFn(rf, context);\n  } finally {\n    setSelectedIndex(prevSelectedIndex);\n    const postHookType = isUpdatePhase ? 3 /* ProfilerEvent.TemplateUpdateEnd */ : 1 /* ProfilerEvent.TemplateCreateEnd */;\n    profiler(postHookType, context);\n  }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n  if (isContentQueryHost(tNode)) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n      const def = tView.data[directiveIndex];\n      if (def.contentQueries) {\n        def.contentQueries(1 /* RenderFlags.Create */, lView[directiveIndex], directiveIndex);\n      }\n    }\n  }\n}\n/**\n * Creates directive instances.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n  if (!getBindingsEnabled()) return;\n  instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n  if ((tNode.flags & 64 /* TNodeFlags.hasHostBindings */) === 64 /* TNodeFlags.hasHostBindings */) {\n    invokeDirectivesHostBindings(tView, lView, tNode);\n  }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n  const localNames = tNode.localNames;\n  if (localNames !== null) {\n    let localIndex = tNode.index + 1;\n    for (let i = 0; i < localNames.length; i += 2) {\n      const index = localNames[i + 1];\n      const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];\n      viewData[localIndex++] = value;\n    }\n  }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nfunction getOrCreateComponentTView(def) {\n  const tView = def.tView;\n  // Create a TView if there isn't one, or recreate it if the first create pass didn't\n  // complete successfully since we can't know for sure whether it's in a usable shape.\n  if (tView === null || tView.incompleteFirstPass) {\n    // Declaration node here is null since this function is called when we dynamically create a\n    // component and hence there is no declaration.\n    const declTNode = null;\n    return def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n  }\n  return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n  ngDevMode && ngDevMode.tView++;\n  const bindingStartIndex = HEADER_OFFSET + decls;\n  // This length does not yet contain host bindings from child directives because at this point,\n  // we don't know which directives are active on this template. As soon as a directive is matched\n  // that has a host binding, we will update the blueprint with that def's hostVars count.\n  const initialViewLength = bindingStartIndex + vars;\n  const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n  const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n  const tView = blueprint[TVIEW] = {\n    type: type,\n    blueprint: blueprint,\n    template: templateFn,\n    queries: null,\n    viewQuery: viewQuery,\n    declTNode: declTNode,\n    data: blueprint.slice().fill(null, bindingStartIndex),\n    bindingStartIndex: bindingStartIndex,\n    expandoStartIndex: initialViewLength,\n    hostBindingOpCodes: null,\n    firstCreatePass: true,\n    firstUpdatePass: true,\n    staticViewQueries: false,\n    staticContentQueries: false,\n    preOrderHooks: null,\n    preOrderCheckHooks: null,\n    contentHooks: null,\n    contentCheckHooks: null,\n    viewHooks: null,\n    viewCheckHooks: null,\n    destroyHooks: null,\n    cleanup: null,\n    contentQueries: null,\n    components: null,\n    directiveRegistry: typeof directives === 'function' ? directives() : directives,\n    pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n    firstChild: null,\n    schemas: schemas,\n    consts: consts,\n    incompleteFirstPass: false\n  };\n  if (ngDevMode) {\n    // For performance reasons it is important that the tView retains the same shape during runtime.\n    // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n    // prevent class transitions.\n    Object.seal(tView);\n  }\n  return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n  const blueprint = [];\n  for (let i = 0; i < initialViewLength; i++) {\n    blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n  }\n  return blueprint;\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n  // When using native Shadow DOM, do not clear host element to allow native slot projection\n  const preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n  return renderer.selectRootElement(elementOrSelector, preserveContent);\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n  const lCleanup = getOrCreateLViewCleanup(lView);\n  if (context === null) {\n    // If context is null that this is instance specific callback. These callbacks can only be\n    // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n    if (ngDevMode) {\n      Object.freeze(getOrCreateTViewCleanup(tView));\n    }\n    lCleanup.push(cleanupFn);\n  } else {\n    lCleanup.push(context);\n    if (tView.firstCreatePass) {\n      getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n    }\n  }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n  ngDevMode && index !== 0 &&\n  // 0 are bogus nodes and they are OK. See `createContainerRef` in\n  // `view_engine_compatibility` for additional context.\n  assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n  ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n  ngDevMode && ngDevMode.tNode++;\n  ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n  let injectorIndex = tParent ? tParent.injectorIndex : -1;\n  const tNode = {\n    type,\n    index,\n    insertBeforeIndex: null,\n    injectorIndex,\n    directiveStart: -1,\n    directiveEnd: -1,\n    directiveStylingLast: -1,\n    componentOffset: -1,\n    propertyBindings: null,\n    flags: 0,\n    providerIndexes: 0,\n    value: value,\n    attrs: attrs,\n    mergedAttrs: null,\n    localNames: null,\n    initialInputs: undefined,\n    inputs: null,\n    outputs: null,\n    tView: null,\n    next: null,\n    prev: null,\n    projectionNext: null,\n    child: null,\n    parent: tParent,\n    projection: null,\n    styles: null,\n    stylesWithoutHost: null,\n    residualStyles: undefined,\n    classes: null,\n    classesWithoutHost: null,\n    residualClasses: undefined,\n    classBindings: 0,\n    styleBindings: 0\n  };\n  if (ngDevMode) {\n    // For performance reasons it is important that the tNode retains the same shape during runtime.\n    // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n    // prevent class transitions.\n    Object.seal(tNode);\n  }\n  return tNode;\n}\n/**\n * Generates the `PropertyAliases` data structure from the provided input/output mapping.\n * @param aliasMap Input/output mapping from the directive definition.\n * @param directiveIndex Index of the directive.\n * @param propertyAliases Object in which to store the results.\n * @param hostDirectiveAliasMap Object used to alias or filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction generatePropertyAliases(aliasMap, directiveIndex, propertyAliases, hostDirectiveAliasMap) {\n  for (let publicName in aliasMap) {\n    if (aliasMap.hasOwnProperty(publicName)) {\n      propertyAliases = propertyAliases === null ? {} : propertyAliases;\n      const internalName = aliasMap[publicName];\n      // If there are no host directive mappings, we want to remap using the alias map from the\n      // definition itself. If there is an alias map, it has two functions:\n      // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n      // ones inside the host directive map will be exposed on the host.\n      // 2. The public name of the property is aliased using the host directive alias map, rather\n      // than the alias map from the definition.\n      if (hostDirectiveAliasMap === null) {\n        addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName);\n      } else if (hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n        addPropertyAlias(propertyAliases, directiveIndex, hostDirectiveAliasMap[publicName], internalName);\n      }\n    }\n  }\n  return propertyAliases;\n}\nfunction addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName) {\n  if (propertyAliases.hasOwnProperty(publicName)) {\n    propertyAliases[publicName].push(directiveIndex, internalName);\n  } else {\n    propertyAliases[publicName] = [directiveIndex, internalName];\n  }\n}\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMap) {\n  ngDevMode && assertFirstCreatePass(tView);\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n  const tViewData = tView.data;\n  const tNodeAttrs = tNode.attrs;\n  const inputsFromAttrs = [];\n  let inputsStore = null;\n  let outputsStore = null;\n  for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n    const directiveDef = tViewData[directiveIndex];\n    const aliasData = hostDirectiveDefinitionMap ? hostDirectiveDefinitionMap.get(directiveDef) : null;\n    const aliasedInputs = aliasData ? aliasData.inputs : null;\n    const aliasedOutputs = aliasData ? aliasData.outputs : null;\n    inputsStore = generatePropertyAliases(directiveDef.inputs, directiveIndex, inputsStore, aliasedInputs);\n    outputsStore = generatePropertyAliases(directiveDef.outputs, directiveIndex, outputsStore, aliasedOutputs);\n    // Do not use unbound attributes as inputs to structural directives, since structural\n    // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n    // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n    // should be set for inline templates.\n    const initialInputs = inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode) ? generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs) : null;\n    inputsFromAttrs.push(initialInputs);\n  }\n  if (inputsStore !== null) {\n    if (inputsStore.hasOwnProperty('class')) {\n      tNode.flags |= 8 /* TNodeFlags.hasClassInput */;\n    }\n\n    if (inputsStore.hasOwnProperty('style')) {\n      tNode.flags |= 16 /* TNodeFlags.hasStyleInput */;\n    }\n  }\n\n  tNode.initialInputs = inputsFromAttrs;\n  tNode.inputs = inputsStore;\n  tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name) {\n  if (name === 'class') return 'className';\n  if (name === 'for') return 'htmlFor';\n  if (name === 'formaction') return 'formAction';\n  if (name === 'innerHtml') return 'innerHTML';\n  if (name === 'readonly') return 'readOnly';\n  if (name === 'tabindex') return 'tabIndex';\n  return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n  const element = getNativeByTNode(tNode, lView);\n  let inputData = tNode.inputs;\n  let dataValue;\n  if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n    setInputsForProperty(tView, lView, dataValue, propName, value);\n    if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n    if (ngDevMode) {\n      setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n    }\n  } else if (tNode.type & 3 /* TNodeType.AnyRNode */) {\n    propName = mapPropName(propName);\n    if (ngDevMode) {\n      validateAgainstEventProperties(propName);\n      if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n        handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n      }\n      ngDevMode.rendererSetProperty++;\n    }\n    // It is assumed that the sanitizer is only added when the compiler determines that the\n    // property is risky, so sanitization can be done without further checks.\n    value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n    renderer.setProperty(element, propName, value);\n  } else if (tNode.type & 12 /* TNodeType.AnyContainer */) {\n    // If the node is a container and the property didn't\n    // match any of the inputs or schemas we should throw.\n    if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {\n      handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n    }\n  }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n  ngDevMode && assertLView(lView);\n  const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n  if (!(childComponentLView[FLAGS] & 16 /* LViewFlags.CheckAlways */)) {\n    childComponentLView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n  }\n}\n\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n  const renderer = lView[RENDERER];\n  attrName = normalizeDebugBindingName(attrName);\n  const debugValue = normalizeDebugBindingValue(value);\n  if (type & 3 /* TNodeType.AnyRNode */) {\n    if (value == null) {\n      renderer.removeAttribute(element, attrName);\n    } else {\n      renderer.setAttribute(element, attrName, debugValue);\n    }\n  } else {\n    const textContent = escapeCommentText(`bindings=${JSON.stringify({\n      [attrName]: debugValue\n    }, null, 2)}`);\n    renderer.setValue(element, textContent);\n  }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n  if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */)) {\n    /**\n     * dataValue is an array containing runtime input or output names for the directives:\n     * i+0: directive instance index\n     * i+1: privateName\n     *\n     * e.g. [0, 'change', 'change-minified']\n     * we want to set the reflected property with the privateName: dataValue[i+1]\n     */\n    for (let i = 0; i < dataValue.length; i += 2) {\n      setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n    }\n  }\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n  // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n  // tsickle.\n  ngDevMode && assertFirstCreatePass(tView);\n  if (getBindingsEnabled()) {\n    const exportsMap = localRefs === null ? null : {\n      '': -1\n    };\n    const matchResult = findDirectiveDefMatches(tView, tNode);\n    let directiveDefs;\n    let hostDirectiveDefs;\n    if (matchResult === null) {\n      directiveDefs = hostDirectiveDefs = null;\n    } else {\n      [directiveDefs, hostDirectiveDefs] = matchResult;\n    }\n    if (directiveDefs !== null) {\n      initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\n    }\n    if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n  }\n  // Merge the template attrs last so that they have the highest priority.\n  tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n}\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nfunction initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {\n  ngDevMode && assertFirstCreatePass(tView);\n  // Publishes the directive types to DI so they can be injected. Needs to\n  // happen in a separate pass before the TNode flags have been initialized.\n  for (let i = 0; i < directives.length; i++) {\n    diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n  }\n  initTNodeFlags(tNode, tView.data.length, directives.length);\n  // When the same token is provided by several directives on the same node, some rules apply in\n  // the viewEngine:\n  // - viewProviders have priority over providers\n  // - the last directive in NgModule.declarations has priority over the previous one\n  // So to match these rules, the order in which providers are added in the arrays is very\n  // important.\n  for (let i = 0; i < directives.length; i++) {\n    const def = directives[i];\n    if (def.providersResolver) def.providersResolver(def);\n  }\n  let preOrderHooksFound = false;\n  let preOrderCheckHooksFound = false;\n  let directiveIdx = allocExpando(tView, lView, directives.length, null);\n  ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n  for (let i = 0; i < directives.length; i++) {\n    const def = directives[i];\n    // Merge the attrs in the order of matches. This assumes that the first directive is the\n    // component itself, so that the component has the least priority.\n    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n    configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n    saveNameToExportMap(directiveIdx, def, exportsMap);\n    if (def.contentQueries !== null) tNode.flags |= 4 /* TNodeFlags.hasContentQuery */;\n    if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0) tNode.flags |= 64 /* TNodeFlags.hasHostBindings */;\n    const lifeCycleHooks = def.type.prototype;\n    // Only push a node index into the preOrderHooks array if this is the first\n    // pre-order hook found on this node.\n    if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n      // We will push the actual hook function into this array later during dir instantiation.\n      // We cannot do it now because we must ensure hooks are registered in the same\n      // order that directives are created (i.e. injection order).\n      (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n      preOrderHooksFound = true;\n    }\n    if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n      (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n      preOrderCheckHooksFound = true;\n    }\n    directiveIdx++;\n  }\n  initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {\n  ngDevMode && assertFirstCreatePass(tView);\n  const hostBindings = def.hostBindings;\n  if (hostBindings) {\n    let hostBindingOpCodes = tView.hostBindingOpCodes;\n    if (hostBindingOpCodes === null) {\n      hostBindingOpCodes = tView.hostBindingOpCodes = [];\n    }\n    const elementIndx = ~tNode.index;\n    if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n      // Conditionally add select element so that we are more efficient in execution.\n      // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n      // (We could just always add it.)\n      hostBindingOpCodes.push(elementIndx);\n    }\n    hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n  }\n}\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n  let i = hostBindingOpCodes.length;\n  while (i > 0) {\n    const value = hostBindingOpCodes[--i];\n    if (typeof value === 'number' && value < 0) {\n      return value;\n    }\n  }\n  return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n  // The component view needs to be created before creating the node injector\n  // since it is used to inject some special symbols like `ChangeDetectorRef`.\n  if (isComponentHost(tNode)) {\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n    addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);\n  }\n  if (!tView.firstCreatePass) {\n    getOrCreateNodeInjectorForNode(tNode, lView);\n  }\n  attachPatchData(native, lView);\n  const initialInputs = tNode.initialInputs;\n  for (let i = start; i < end; i++) {\n    const def = tView.data[i];\n    const directive = getNodeInjectable(lView, tView, i, tNode);\n    attachPatchData(directive, lView);\n    if (initialInputs !== null) {\n      setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n    }\n    if (isComponentDef(def)) {\n      const componentView = getComponentLViewByIndex(tNode.index, lView);\n      componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n    }\n  }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n  const elementIndex = tNode.index;\n  const currentDirectiveIndex = getCurrentDirectiveIndex();\n  try {\n    setSelectedIndex(elementIndex);\n    for (let dirIndex = start; dirIndex < end; dirIndex++) {\n      const def = tView.data[dirIndex];\n      const directive = lView[dirIndex];\n      setCurrentDirectiveIndex(dirIndex);\n      if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n        invokeHostBindingsInCreationMode(def, directive);\n      }\n    }\n  } finally {\n    setSelectedIndex(-1);\n    setCurrentDirectiveIndex(currentDirectiveIndex);\n  }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n  if (def.hostBindings !== null) {\n    def.hostBindings(1 /* RenderFlags.Create */, directive);\n  }\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, tNode) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n  const registry = tView.directiveRegistry;\n  let matches = null;\n  let hostDirectiveDefs = null;\n  if (registry) {\n    for (let i = 0; i < registry.length; i++) {\n      const def = registry[i];\n      if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */false)) {\n        matches || (matches = []);\n        if (isComponentDef(def)) {\n          if (ngDevMode) {\n            assertTNodeType(tNode, 2 /* TNodeType.Element */, `\"${tNode.value}\" tags cannot be used as component hosts. ` + `Please use a different tag to activate the ${stringify(def.type)} component.`);\n            if (isComponentHost(tNode)) {\n              throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);\n            }\n          }\n          // Components are inserted at the front of the matches array so that their lifecycle\n          // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n          // compatibility. This logic doesn't make sense with host directives, because it\n          // would allow the host directives to undo any overrides the host may have made.\n          // To handle this case, the host directives of components are inserted at the beginning\n          // of the array, followed by the component. As such, the insertion order is as follows:\n          // 1. Host directives belonging to the selector-matched component.\n          // 2. Selector-matched component.\n          // 3. Host directives belonging to selector-matched directives.\n          // 4. Selector-matched directives.\n          if (def.findHostDirectiveDefs !== null) {\n            const hostDirectiveMatches = [];\n            hostDirectiveDefs = hostDirectiveDefs || new Map();\n            def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n            // Add all host directives declared on this component, followed by the component itself.\n            // Host directives should execute first so the host has a chance to override changes\n            // to the DOM made by them.\n            matches.unshift(...hostDirectiveMatches, def);\n            // Component is offset starting from the beginning of the host directives array.\n            const componentOffset = hostDirectiveMatches.length;\n            markAsComponentHost(tView, tNode, componentOffset);\n          } else {\n            // No host directives on this component, just add the\n            // component def to the beginning of the matches.\n            matches.unshift(def);\n            markAsComponentHost(tView, tNode, 0);\n          }\n        } else {\n          // Append any host directives to the matches first.\n          hostDirectiveDefs = hostDirectiveDefs || new Map();\n          def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n          matches.push(def);\n        }\n      }\n    }\n  }\n  return matches === null ? null : [matches, hostDirectiveDefs];\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode, componentOffset) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n  hostTNode.componentOffset = componentOffset;\n  (tView.components || (tView.components = [])).push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n  if (localRefs) {\n    const localNames = tNode.localNames = [];\n    // Local names must be stored in tNode in the same order that localRefs are defined\n    // in the template to ensure the data is loaded in the same slots as their refs\n    // in the template (for template queries).\n    for (let i = 0; i < localRefs.length; i += 2) {\n      const index = exportsMap[localRefs[i + 1]];\n      if (index == null) throw new RuntimeError(-301 /* RuntimeErrorCode.EXPORT_NOT_FOUND */, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);\n      localNames.push(localRefs[i], index);\n    }\n  }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n  if (exportsMap) {\n    if (def.exportAs) {\n      for (let i = 0; i < def.exportAs.length; i++) {\n        exportsMap[def.exportAs[i]] = directiveIdx;\n      }\n    }\n    if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n  }\n}\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n  ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n  tNode.flags |= 1 /* TNodeFlags.isDirectiveHost */;\n  // When the first directive is created on a node, save the index\n  tNode.directiveStart = index;\n  tNode.directiveEnd = index + numberOfDirectives;\n  tNode.providerIndexes = index;\n}\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n  ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n  tView.data[directiveIndex] = def;\n  const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n  // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n  // we also want to support `inject()` directly from the directive constructor context so we set\n  // `ɵɵdirectiveInject` as the inject implementation here too.\n  const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\n  tView.blueprint[directiveIndex] = nodeInjectorFactory;\n  lView[directiveIndex] = nodeInjectorFactory;\n  registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n  const native = getNativeByTNode(hostTNode, lView);\n  const tView = getOrCreateComponentTView(def);\n  // Only component views should be added to the view tree directly. Embedded views are\n  // accessed through their containers because they may be removed / re-added later.\n  const rendererFactory = lView[RENDERER_FACTORY];\n  const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));\n  // Component view will always be created before any injected LContainers,\n  // so this is a regular element, wrap it with the component view\n  lView[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n  if (ngDevMode) {\n    assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    validateAgainstEventAttributes(name);\n    assertTNodeType(tNode, 2 /* TNodeType.Element */, `Attempted to set attribute \\`${name}\\` on a container node. ` + `Host bindings are not valid on ng-container or ng-template.`);\n  }\n  const element = getNativeByTNode(tNode, lView);\n  setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n  if (value == null) {\n    ngDevMode && ngDevMode.rendererRemoveAttribute++;\n    renderer.removeAttribute(element, name, namespace);\n  } else {\n    ngDevMode && ngDevMode.rendererSetAttribute++;\n    const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n    renderer.setAttribute(element, name, strValue, namespace);\n  }\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n  const initialInputs = initialInputData[directiveIndex];\n  if (initialInputs !== null) {\n    const setInput = def.setInput;\n    for (let i = 0; i < initialInputs.length;) {\n      const publicName = initialInputs[i++];\n      const privateName = initialInputs[i++];\n      const value = initialInputs[i++];\n      if (setInput !== null) {\n        def.setInput(instance, value, publicName, privateName);\n      } else {\n        instance[privateName] = value;\n      }\n      if (ngDevMode) {\n        const nativeElement = getNativeByTNode(tNode, lView);\n        setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n      }\n    }\n  }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(inputs, directiveIndex, attrs) {\n  let inputsToStore = null;\n  let i = 0;\n  while (i < attrs.length) {\n    const attrName = attrs[i];\n    if (attrName === 0 /* AttributeMarker.NamespaceURI */) {\n      // We do not allow inputs on namespaced attributes.\n      i += 4;\n      continue;\n    } else if (attrName === 5 /* AttributeMarker.ProjectAs */) {\n      // Skip over the `ngProjectAs` value.\n      i += 2;\n      continue;\n    }\n    // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n    if (typeof attrName === 'number') break;\n    if (inputs.hasOwnProperty(attrName)) {\n      if (inputsToStore === null) inputsToStore = [];\n      // Find the input's public name from the input store. Note that we can be found easier\n      // through the directive def, but we want to do it using the inputs store so that it can\n      // account for host directive aliases.\n      const inputConfig = inputs[attrName];\n      for (let j = 0; j < inputConfig.length; j += 2) {\n        if (inputConfig[j] === directiveIndex) {\n          inputsToStore.push(attrName, inputConfig[j + 1], attrs[i + 1]);\n          // A directive can't have multiple inputs with the same name so we can break here.\n          break;\n        }\n      }\n    }\n    i += 2;\n  }\n  return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n  ngDevMode && assertLView(currentView);\n  const lContainer = [hostNative, true, false, currentView, null, 0, tNode, native, null, null // moved views\n  ];\n\n  ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n  return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n  for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n      const embeddedLView = lContainer[i];\n      const embeddedTView = embeddedLView[TVIEW];\n      ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n      if (viewAttachedToChangeDetector(embeddedLView)) {\n        refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n      }\n    }\n  }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n  for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;\n    const movedViews = lContainer[MOVED_VIEWS];\n    ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n    for (let i = 0; i < movedViews.length; i++) {\n      const movedLView = movedViews[i];\n      const insertionLContainer = movedLView[PARENT];\n      ngDevMode && assertLContainer(insertionLContainer);\n      // We don't want to increment the counter if the moved LView was already marked for\n      // refresh.\n      if ((movedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) === 0) {\n        updateTransplantedViewCount(insertionLContainer, 1);\n      }\n      // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n      // those that aren't (declaration component === insertion component). In the latter case,\n      // it's fine to add the flag, as we will clear it immediately in\n      // `refreshEmbeddedViews` for the view currently being refreshed.\n      movedLView[FLAGS] |= 512 /* LViewFlags.RefreshTransplantedView */;\n    }\n  }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx  Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n  ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n  const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n  // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n  if (viewAttachedToChangeDetector(componentView)) {\n    const tView = componentView[TVIEW];\n    if (componentView[FLAGS] & (16 /* LViewFlags.CheckAlways */ | 32 /* LViewFlags.Dirty */)) {\n      refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n    } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n      // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n      refreshContainsDirtyView(componentView);\n    }\n  }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n  for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n      const embeddedLView = lContainer[i];\n      if (viewAttachedToChangeDetector(embeddedLView)) {\n        if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n          const embeddedTView = embeddedLView[TVIEW];\n          ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n          refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n        } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n          refreshContainsDirtyView(embeddedLView);\n        }\n      }\n    }\n  }\n  const tView = lView[TVIEW];\n  // Refresh child component views.\n  const components = tView.components;\n  if (components !== null) {\n    for (let i = 0; i < components.length; i++) {\n      const componentView = getComponentLViewByIndex(components[i], lView);\n      // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n      if (viewAttachedToChangeDetector(componentView) && componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n        refreshContainsDirtyView(componentView);\n      }\n    }\n  }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n  ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n  const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n  const componentTView = componentView[TVIEW];\n  syncViewWithBlueprint(componentTView, componentView);\n  renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n  for (let i = lView.length; i < tView.blueprint.length; i++) {\n    lView.push(tView.blueprint[i]);\n  }\n}\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(lView, lViewOrLContainer) {\n  // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n  // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n  // of order, the change detection will run out of order, as the act of retrieving the the\n  // LContainer from the RNode is what adds it to the queue.\n  if (lView[CHILD_HEAD]) {\n    lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n  } else {\n    lView[CHILD_HEAD] = lViewOrLContainer;\n  }\n  lView[CHILD_TAIL] = lViewOrLContainer;\n  return lViewOrLContainer;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nfunction markViewDirty(lView) {\n  while (lView) {\n    lView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n    const parent = getLViewParent(lView);\n    // Stop traversing up as soon as you find a root view that wasn't attached to any container\n    if (isRootView(lView) && !parent) {\n      return lView;\n    }\n    // continue otherwise\n    lView = parent;\n  }\n  return null;\n}\nfunction detectChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n  const rendererFactory = lView[RENDERER_FACTORY];\n  // Check no changes mode is a dev only mode used to verify that bindings have not changed\n  // since they were assigned. We do not want to invoke renderer factory functions in that mode\n  // to avoid any possible side-effects.\n  const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n  if (!checkNoChangesMode && rendererFactory.begin) rendererFactory.begin();\n  try {\n    refreshView(tView, lView, tView.template, context);\n  } catch (error) {\n    if (notifyErrorHandler) {\n      handleError(lView, error);\n    }\n    throw error;\n  } finally {\n    if (!checkNoChangesMode && rendererFactory.end) rendererFactory.end();\n  }\n}\nfunction checkNoChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n  setIsInCheckNoChangesMode(true);\n  try {\n    detectChangesInternal(tView, lView, context, notifyErrorHandler);\n  } finally {\n    setIsInCheckNoChangesMode(false);\n  }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n  ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n  setCurrentQueryIndex(0);\n  viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n  // Binding meta-data are stored only the first time a given property instruction is processed.\n  // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n  // binding meta-data to decide if one should be stored (or if was stored already).\n  if (tData[bindingIndex] === null) {\n    if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n      const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n      propBindingIdxs.push(bindingIndex);\n      let bindingMetadata = propertyName;\n      if (interpolationParts.length > 0) {\n        bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n      }\n      tData[bindingIndex] = bindingMetadata;\n    }\n  }\n}\nfunction getOrCreateLViewCleanup(view) {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return view[CLEANUP] || (view[CLEANUP] = []);\n}\nfunction getOrCreateTViewCleanup(tView) {\n  return tView.cleanup || (tView.cleanup = []);\n}\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n  // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n  // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n  // of creating inner components, when current directive index is available in the state. In order\n  // to avoid relying on current def being `null` (thus special-casing root component creation), the\n  // process of creating root component should be unified with the process of creating inner\n  // components.\n  if (currentDef === null || isComponentDef(currentDef)) {\n    lView = unwrapLView(lView[tNode.index]);\n  }\n  return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction handleError(lView, error) {\n  const injector = lView[INJECTOR$1];\n  const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n  errorHandler && errorHandler.handleError(error);\n}\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n *        possibly minified, property names to write to.\n * @param value Value to set.\n */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n  for (let i = 0; i < inputs.length;) {\n    const index = inputs[i++];\n    const privateName = inputs[i++];\n    const instance = lView[index];\n    ngDevMode && assertIndexInRange(lView, index);\n    const def = tView.data[index];\n    if (def.setInput !== null) {\n      def.setInput(instance, value, publicName, privateName);\n    } else {\n      instance[privateName] = value;\n    }\n  }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n  ngDevMode && assertString(value, 'Value should be a string');\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n  ngDevMode && assertIndexInRange(lView, index);\n  const element = getNativeByIndex(index, lView);\n  ngDevMode && assertDefined(element, 'native element should exist');\n  updateTextNode(lView[RENDERER], element, value);\n}\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n *   - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n *   - `true` Write to `TNode.styles` / `TNode.classes`\n */\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n  ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n  let styles = writeToHost ? tNode.styles : null;\n  let classes = writeToHost ? tNode.classes : null;\n  let mode = 0;\n  if (attrs !== null) {\n    for (let i = 0; i < attrs.length; i++) {\n      const value = attrs[i];\n      if (typeof value === 'number') {\n        mode = value;\n      } else if (mode == 1 /* AttributeMarker.Classes */) {\n        classes = concatStringsWithSpace(classes, value);\n      } else if (mode == 2 /* AttributeMarker.Styles */) {\n        const style = value;\n        const styleValue = attrs[++i];\n        styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n      }\n    }\n  }\n  writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n  writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n  while (tNode !== null) {\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n    const lNode = lView[tNode.index];\n    if (lNode !== null) {\n      result.push(unwrapRNode(lNode));\n    }\n    // A given lNode can represent either a native node or a LContainer (when it is a host of a\n    // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n    // from the views in this container.\n    if (isLContainer(lNode)) {\n      for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n        const lViewInAContainer = lNode[i];\n        const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n        if (lViewFirstChildTNode !== null) {\n          collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n        }\n      }\n    }\n    const tNodeType = tNode.type;\n    if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n      collectNativeNodes(tView, lView, tNode.child, result);\n    } else if (tNodeType & 32 /* TNodeType.Icu */) {\n      const nextRNode = icuContainerIterate(tNode, lView);\n      let rNode;\n      while (rNode = nextRNode()) {\n        result.push(rNode);\n      }\n    } else if (tNodeType & 16 /* TNodeType.Projection */) {\n      const nodesInSlot = getProjectionNodes(lView, tNode);\n      if (Array.isArray(nodesInSlot)) {\n        result.push(...nodesInSlot);\n      } else {\n        const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n        ngDevMode && assertParentView(parentView);\n        collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n      }\n    }\n    tNode = isProjection ? tNode.projectionNext : tNode.next;\n  }\n  return result;\n}\nclass ViewRef$1 {\n  get rootNodes() {\n    const lView = this._lView;\n    const tView = lView[TVIEW];\n    return collectNativeNodes(tView, lView, tView.firstChild, []);\n  }\n  constructor(\n  /**\n   * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n   *\n   * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n   * component.\n   *\n   * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n   * view.\n   *\n   * @internal\n   */\n  _lView,\n  /**\n   * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n   * requested.\n   *\n   * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n   */\n  _cdRefInjectingView) {\n    this._lView = _lView;\n    this._cdRefInjectingView = _cdRefInjectingView;\n    this._appRef = null;\n    this._attachedToViewContainer = false;\n  }\n  get context() {\n    return this._lView[CONTEXT];\n  }\n  set context(value) {\n    this._lView[CONTEXT] = value;\n  }\n  get destroyed() {\n    return (this._lView[FLAGS] & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.Destroyed */;\n  }\n\n  destroy() {\n    if (this._appRef) {\n      this._appRef.detachView(this);\n    } else if (this._attachedToViewContainer) {\n      const parent = this._lView[PARENT];\n      if (isLContainer(parent)) {\n        const viewRefs = parent[VIEW_REFS];\n        const index = viewRefs ? viewRefs.indexOf(this) : -1;\n        if (index > -1) {\n          ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n          detachView(parent, index);\n          removeFromArray(viewRefs, index);\n        }\n      }\n      this._attachedToViewContainer = false;\n    }\n    destroyLView(this._lView[TVIEW], this._lView);\n  }\n  onDestroy(callback) {\n    storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n  }\n  /**\n   * Marks a view and all of its ancestors dirty.\n   *\n   * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n   * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n   * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n   *\n   * <!-- TODO: Add a link to a chapter on OnPush components -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Component({\n   *   selector: 'app-root',\n   *   template: `Number of ticks: {{numberOfTicks}}`\n   *   changeDetection: ChangeDetectionStrategy.OnPush,\n   * })\n   * class AppComponent {\n   *   numberOfTicks = 0;\n   *\n   *   constructor(private ref: ChangeDetectorRef) {\n   *     setInterval(() => {\n   *       this.numberOfTicks++;\n   *       // the following is required, otherwise the view will not be updated\n   *       this.ref.markForCheck();\n   *     }, 1000);\n   *   }\n   * }\n   * ```\n   */\n  markForCheck() {\n    markViewDirty(this._cdRefInjectingView || this._lView);\n  }\n  /**\n   * Detaches the view from the change detection tree.\n   *\n   * Detached views will not be checked during change detection runs until they are\n   * re-attached, even if they are dirty. `detach` can be used in combination with\n   * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n   * detection checks.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example defines a component with a large list of readonly data.\n   * Imagine the data changes constantly, many times per second. For performance reasons,\n   * we want to check and update the list every five seconds. We can do that by detaching\n   * the component's change detector and doing a local check every five seconds.\n   *\n   * ```typescript\n   * class DataProvider {\n   *   // in a real application the returned data will be different every time\n   *   get data() {\n   *     return [1,2,3,4,5];\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'giant-list',\n   *   template: `\n   *     <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n   *   `,\n   * })\n   * class GiantList {\n   *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n   *     ref.detach();\n   *     setInterval(() => {\n   *       this.ref.detectChanges();\n   *     }, 5000);\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'app',\n   *   providers: [DataProvider],\n   *   template: `\n   *     <giant-list><giant-list>\n   *   `,\n   * })\n   * class App {\n   * }\n   * ```\n   */\n  detach() {\n    this._lView[FLAGS] &= ~64 /* LViewFlags.Attached */;\n  }\n  /**\n   * Re-attaches a view to the change detection tree.\n   *\n   * This can be used to re-attach views that were previously detached from the tree\n   * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example creates a component displaying `live` data. The component will detach\n   * its change detector from the main change detector tree when the component's live property\n   * is set to false.\n   *\n   * ```typescript\n   * class DataProvider {\n   *   data = 1;\n   *\n   *   constructor() {\n   *     setInterval(() => {\n   *       this.data = this.data * 2;\n   *     }, 500);\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'live-data',\n   *   inputs: ['live'],\n   *   template: 'Data: {{dataProvider.data}}'\n   * })\n   * class LiveData {\n   *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n   *\n   *   set live(value) {\n   *     if (value) {\n   *       this.ref.reattach();\n   *     } else {\n   *       this.ref.detach();\n   *     }\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'app-root',\n   *   providers: [DataProvider],\n   *   template: `\n   *     Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n   *     <live-data [live]=\"live\"><live-data>\n   *   `,\n   * })\n   * class AppComponent {\n   *   live = true;\n   * }\n   * ```\n   */\n  reattach() {\n    this._lView[FLAGS] |= 64 /* LViewFlags.Attached */;\n  }\n  /**\n   * Checks the view and its children.\n   *\n   * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n   * local change detection checks.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example defines a component with a large list of readonly data.\n   * Imagine, the data changes constantly, many times per second. For performance reasons,\n   * we want to check and update the list every five seconds.\n   *\n   * We can do that by detaching the component's change detector and doing a local change detection\n   * check every five seconds.\n   *\n   * See {@link ChangeDetectorRef#detach detach} for more information.\n   */\n  detectChanges() {\n    detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n  }\n  /**\n   * Checks the change detector and its children, and throws if any changes are detected.\n   *\n   * This is used in development mode to verify that running change detection doesn't\n   * introduce other changes.\n   */\n  checkNoChanges() {\n    if (ngDevMode) {\n      checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n  }\n  attachToViewContainerRef() {\n    if (this._appRef) {\n      throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached directly to the ApplicationRef!');\n    }\n    this._attachedToViewContainer = true;\n  }\n  detachFromAppRef() {\n    this._appRef = null;\n    renderDetachView(this._lView[TVIEW], this._lView);\n  }\n  attachToAppRef(appRef) {\n    if (this._attachedToViewContainer) {\n      throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached to a ViewContainer!');\n    }\n    this._appRef = appRef;\n  }\n}\n/** @internal */\nclass RootViewRef extends ViewRef$1 {\n  constructor(_view) {\n    super(_view);\n    this._view = _view;\n  }\n  detectChanges() {\n    const lView = this._view;\n    const tView = lView[TVIEW];\n    const context = lView[CONTEXT];\n    detectChangesInternal(tView, lView, context, false);\n  }\n  checkNoChanges() {\n    if (ngDevMode) {\n      const lView = this._view;\n      const tView = lView[TVIEW];\n      const context = lView[CONTEXT];\n      checkNoChangesInternal(tView, lView, context, false);\n    }\n  }\n  get context() {\n    return null;\n  }\n}\nclass ComponentFactoryResolver extends ComponentFactoryResolver$1 {\n  /**\n   * @param ngModule The NgModuleRef to which all resolved factories are bound.\n   */\n  constructor(ngModule) {\n    super();\n    this.ngModule = ngModule;\n  }\n  resolveComponentFactory(component) {\n    ngDevMode && assertComponentType(component);\n    const componentDef = getComponentDef(component);\n    return new ComponentFactory(componentDef, this.ngModule);\n  }\n}\nfunction toRefArray(map) {\n  const array = [];\n  for (let nonMinified in map) {\n    if (map.hasOwnProperty(nonMinified)) {\n      const minified = map[nonMinified];\n      array.push({\n        propName: minified,\n        templateName: nonMinified\n      });\n    }\n  }\n  return array;\n}\nfunction getNamespace(elementName) {\n  const name = elementName.toLowerCase();\n  return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;\n}\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nclass ChainedInjector {\n  constructor(injector, parentInjector) {\n    this.injector = injector;\n    this.parentInjector = parentInjector;\n  }\n  get(token, notFoundValue, flags) {\n    flags = convertToBitFlags(flags);\n    const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n    if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n      // Return the value from the root element injector when\n      // - it provides it\n      //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n      // - the module injector should not be checked\n      //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n      return value;\n    }\n    return this.parentInjector.get(token, notFoundValue, flags);\n  }\n}\n/**\n * ComponentFactory interface implementation.\n */\nclass ComponentFactory extends ComponentFactory$1 {\n  get inputs() {\n    return toRefArray(this.componentDef.inputs);\n  }\n  get outputs() {\n    return toRefArray(this.componentDef.outputs);\n  }\n  /**\n   * @param componentDef The component definition.\n   * @param ngModule The NgModuleRef to which the factory is bound.\n   */\n  constructor(componentDef, ngModule) {\n    super();\n    this.componentDef = componentDef;\n    this.ngModule = ngModule;\n    this.componentType = componentDef.type;\n    this.selector = stringifyCSSSelectorList(componentDef.selectors);\n    this.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n    this.isBoundToModule = !!ngModule;\n  }\n  create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {\n    environmentInjector = environmentInjector || this.ngModule;\n    let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ? environmentInjector : environmentInjector?.injector;\n    if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n      realEnvironmentInjector = this.componentDef.getStandaloneInjector(realEnvironmentInjector) || realEnvironmentInjector;\n    }\n    const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;\n    const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n    if (rendererFactory === null) {\n      throw new RuntimeError(407 /* RuntimeErrorCode.RENDERER_NOT_FOUND */, ngDevMode && 'Angular was not able to inject a renderer (RendererFactory2). ' + 'Likely this is due to a broken DI hierarchy. ' + 'Make sure that any injector used to create this component has a correct parent.');\n    }\n    const sanitizer = rootViewInjector.get(Sanitizer, null);\n    const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n    // Determine a tag name used for creating host elements when this component is created\n    // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n    const elementName = this.componentDef.selectors[0][0] || 'div';\n    const hostRNode = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) : createElementNode(hostRenderer, elementName, getNamespace(elementName));\n    const rootFlags = this.componentDef.onPush ? 32 /* LViewFlags.Dirty */ | 256 /* LViewFlags.IsRoot */ : 16 /* LViewFlags.CheckAlways */ | 256 /* LViewFlags.IsRoot */;\n    // Create the root view. Uses empty TView and ContentTemplate.\n    const rootTView = createTView(0 /* TViewType.Root */, null, null, 1, 0, null, null, null, null, null);\n    const rootLView = createLView(null, rootTView, null, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);\n    // rootView is the parent when bootstrapping\n    // TODO(misko): it looks like we are entering view here but we don't really need to as\n    // `renderView` does that. However as the code is written it is needed because\n    // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n    // issues would allow us to drop this.\n    enterView(rootLView);\n    let component;\n    let tElementNode;\n    try {\n      const rootComponentDef = this.componentDef;\n      let rootDirectives;\n      let hostDirectiveDefs = null;\n      if (rootComponentDef.findHostDirectiveDefs) {\n        rootDirectives = [];\n        hostDirectiveDefs = new Map();\n        rootComponentDef.findHostDirectiveDefs(rootComponentDef, rootDirectives, hostDirectiveDefs);\n        rootDirectives.push(rootComponentDef);\n      } else {\n        rootDirectives = [rootComponentDef];\n      }\n      const hostTNode = createRootComponentTNode(rootLView, hostRNode);\n      const componentView = createRootComponentView(hostTNode, hostRNode, rootComponentDef, rootDirectives, rootLView, rendererFactory, hostRenderer);\n      tElementNode = getTNode(rootTView, HEADER_OFFSET);\n      // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some tests\n      // where the renderer is mocked out and `undefined` is returned. We should update the tests so\n      // that this check can be removed.\n      if (hostRNode) {\n        setRootNodeAttributes(hostRenderer, rootComponentDef, hostRNode, rootSelectorOrNode);\n      }\n      if (projectableNodes !== undefined) {\n        projectNodes(tElementNode, this.ngContentSelectors, projectableNodes);\n      }\n      // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n      // executed here?\n      // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n      component = createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, [LifecycleHooksFeature]);\n      renderView(rootTView, rootLView, null);\n    } finally {\n      leaveView();\n    }\n    return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n  }\n}\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nclass ComponentRef extends ComponentRef$1 {\n  constructor(componentType, instance, location, _rootLView, _tNode) {\n    super();\n    this.location = location;\n    this._rootLView = _rootLView;\n    this._tNode = _tNode;\n    this.instance = instance;\n    this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView);\n    this.componentType = componentType;\n  }\n  setInput(name, value) {\n    const inputData = this._tNode.inputs;\n    let dataValue;\n    if (inputData !== null && (dataValue = inputData[name])) {\n      const lView = this._rootLView;\n      setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n      markDirtyIfOnPush(lView, this._tNode.index);\n    } else {\n      if (ngDevMode) {\n        const cmpNameForError = stringifyForError(this.componentType);\n        let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n        message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n        reportUnknownPropertyError(message);\n      }\n    }\n  }\n  get injector() {\n    return new NodeInjector(this._tNode, this._rootLView);\n  }\n  destroy() {\n    this.hostView.destroy();\n  }\n  onDestroy(callback) {\n    this.hostView.onDestroy(callback);\n  }\n}\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR = {\n  get: (token, notFoundValue) => {\n    throwProviderNotFoundError(token, 'NullInjector');\n  }\n};\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView, rNode) {\n  const tView = lView[TVIEW];\n  const index = HEADER_OFFSET;\n  ngDevMode && assertIndexInRange(lView, index);\n  lView[index] = rNode;\n  // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n  // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n  // representing a host element.\n  return getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, '#host', null);\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(tNode, rNode, rootComponentDef, rootDirectives, rootView, rendererFactory, hostRenderer, sanitizer) {\n  const tView = rootView[TVIEW];\n  applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer);\n  const viewRenderer = rendererFactory.createRenderer(rNode, rootComponentDef);\n  const componentView = createLView(rootView, getOrCreateComponentTView(rootComponentDef), null, rootComponentDef.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, rootView[tNode.index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);\n  if (tView.firstCreatePass) {\n    markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n  }\n  addToViewTree(rootView, componentView);\n  // Store component view at node index, with node as the HOST\n  return rootView[tNode.index] = componentView;\n}\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer) {\n  for (const def of rootDirectives) {\n    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n  }\n  if (tNode.mergedAttrs !== null) {\n    computeStaticStyling(tNode, tNode.mergedAttrs, true);\n    if (rNode !== null) {\n      setupStaticAttributes(hostRenderer, rNode, tNode);\n    }\n  }\n}\n/**\n * Creates a root component and sets it up with features and host bindings.Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, hostFeatures) {\n  const rootTNode = getCurrentTNode();\n  ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n  const tView = rootLView[TVIEW];\n  const native = getNativeByTNode(rootTNode, rootLView);\n  initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n  for (let i = 0; i < rootDirectives.length; i++) {\n    const directiveIndex = rootTNode.directiveStart + i;\n    const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n    attachPatchData(directiveInstance, rootLView);\n  }\n  invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n  if (native) {\n    attachPatchData(native, rootLView);\n  }\n  // We're guaranteed for the `componentOffset` to be positive here\n  // since a root component always matches a component def.\n  ngDevMode && assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n  const component = getNodeInjectable(rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);\n  componentView[CONTEXT] = rootLView[CONTEXT] = component;\n  if (hostFeatures !== null) {\n    for (const feature of hostFeatures) {\n      feature(component, rootComponentDef);\n    }\n  }\n  // We want to generate an empty QueryList for root content queries for backwards\n  // compatibility with ViewEngine.\n  executeContentQueries(tView, rootTNode, componentView);\n  return component;\n}\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {\n  if (rootSelectorOrNode) {\n    setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n  } else {\n    // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n    // is not defined), also apply attributes and classes extracted from component selector.\n    // Extract attributes and classes from the first selector only to match VE behavior.\n    const {\n      attrs,\n      classes\n    } = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\n    if (attrs) {\n      setUpAttributes(hostRenderer, hostRNode, attrs);\n    }\n    if (classes && classes.length > 0) {\n      writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n    }\n  }\n}\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(tNode, ngContentSelectors, projectableNodes) {\n  const projection = tNode.projection = [];\n  for (let i = 0; i < ngContentSelectors.length; i++) {\n    const nodesforSlot = projectableNodes[i];\n    // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n    // case). Here we do normalize passed data structure to be an array of arrays to avoid\n    // complex checks down the line.\n    // We also normalize the length of the passed in projectable nodes (to match the number of\n    // <ng-container> slots defined by a component).\n    projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n  }\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature() {\n  const tNode = getCurrentTNode();\n  ngDevMode && assertDefined(tNode, 'TNode is required');\n  registerPostOrderHooks(getLView()[TVIEW], tNode);\n}\nfunction getSuperType(type) {\n  return Object.getPrototypeOf(type.prototype).constructor;\n}\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nfunction ɵɵInheritDefinitionFeature(definition) {\n  let superType = getSuperType(definition.type);\n  let shouldInheritFields = true;\n  const inheritanceChain = [definition];\n  while (superType) {\n    let superDef = undefined;\n    if (isComponentDef(definition)) {\n      // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n      superDef = superType.ɵcmp || superType.ɵdir;\n    } else {\n      if (superType.ɵcmp) {\n        throw new RuntimeError(903 /* RuntimeErrorCode.INVALID_INHERITANCE */, ngDevMode && `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}`);\n      }\n      // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n      superDef = superType.ɵdir;\n    }\n    if (superDef) {\n      if (shouldInheritFields) {\n        inheritanceChain.push(superDef);\n        // Some fields in the definition may be empty, if there were no values to put in them that\n        // would've justified object creation. Unwrap them if necessary.\n        const writeableDef = definition;\n        writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n        writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n        writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n        // Merge hostBindings\n        const superHostBindings = superDef.hostBindings;\n        superHostBindings && inheritHostBindings(definition, superHostBindings);\n        // Merge queries\n        const superViewQuery = superDef.viewQuery;\n        const superContentQueries = superDef.contentQueries;\n        superViewQuery && inheritViewQuery(definition, superViewQuery);\n        superContentQueries && inheritContentQueries(definition, superContentQueries);\n        // Merge inputs and outputs\n        fillProperties(definition.inputs, superDef.inputs);\n        fillProperties(definition.declaredInputs, superDef.declaredInputs);\n        fillProperties(definition.outputs, superDef.outputs);\n        // Merge animations metadata.\n        // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n        if (isComponentDef(superDef) && superDef.data.animation) {\n          // If super def is a Component, the `definition` is also a Component, since Directives can\n          // not inherit Components (we throw an error above and cannot reach this code).\n          const defData = definition.data;\n          defData.animation = (defData.animation || []).concat(superDef.data.animation);\n        }\n      }\n      // Run parent features\n      const features = superDef.features;\n      if (features) {\n        for (let i = 0; i < features.length; i++) {\n          const feature = features[i];\n          if (feature && feature.ngInherit) {\n            feature(definition);\n          }\n          // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n          // def already has all the necessary information inherited from its super class(es), so we\n          // can stop merging fields from super classes. However we need to iterate through the\n          // prototype chain to look for classes that might contain other \"features\" (like\n          // NgOnChanges), which we should invoke for the original `definition`. We set the\n          // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n          // logic and only invoking functions from the \"features\" list.\n          if (feature === ɵɵInheritDefinitionFeature) {\n            shouldInheritFields = false;\n          }\n        }\n      }\n    }\n    superType = Object.getPrototypeOf(superType);\n  }\n  mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n  let hostVars = 0;\n  let hostAttrs = null;\n  // We process the inheritance order from the base to the leaves here.\n  for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n    const def = inheritanceChain[i];\n    // For each `hostVars`, we need to add the superclass amount.\n    def.hostVars = hostVars += def.hostVars;\n    // for each `hostAttrs` we need to merge it with superclass.\n    def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n  }\n}\nfunction maybeUnwrapEmpty(value) {\n  if (value === EMPTY_OBJ) {\n    return {};\n  } else if (value === EMPTY_ARRAY) {\n    return [];\n  } else {\n    return value;\n  }\n}\nfunction inheritViewQuery(definition, superViewQuery) {\n  const prevViewQuery = definition.viewQuery;\n  if (prevViewQuery) {\n    definition.viewQuery = (rf, ctx) => {\n      superViewQuery(rf, ctx);\n      prevViewQuery(rf, ctx);\n    };\n  } else {\n    definition.viewQuery = superViewQuery;\n  }\n}\nfunction inheritContentQueries(definition, superContentQueries) {\n  const prevContentQueries = definition.contentQueries;\n  if (prevContentQueries) {\n    definition.contentQueries = (rf, ctx, directiveIndex) => {\n      superContentQueries(rf, ctx, directiveIndex);\n      prevContentQueries(rf, ctx, directiveIndex);\n    };\n  } else {\n    definition.contentQueries = superContentQueries;\n  }\n}\nfunction inheritHostBindings(definition, superHostBindings) {\n  const prevHostBindings = definition.hostBindings;\n  if (prevHostBindings) {\n    definition.hostBindings = (rf, ctx) => {\n      superHostBindings(rf, ctx);\n      prevHostBindings(rf, ctx);\n    };\n  } else {\n    definition.hostBindings = superHostBindings;\n  }\n}\n\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS = [\n// The child class should use the providers of its parent.\n'providersResolver'\n// Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n// as inputs, outputs, and host binding functions.\n];\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS = [\n// The child class should use the template function of its parent, including all template\n// semantics.\n'template', 'decls', 'consts', 'vars', 'onPush', 'ngContentSelectors',\n// The child class should use the CSS styles of its parent, including all styling semantics.\n'styles', 'encapsulation',\n// The child class should be checked by the runtime in the same way as its parent.\n'schemas'];\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nfunction ɵɵCopyDefinitionFeature(definition) {\n  let superType = getSuperType(definition.type);\n  let superDef = undefined;\n  if (isComponentDef(definition)) {\n    // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n    superDef = superType.ɵcmp;\n  } else {\n    // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n    superDef = superType.ɵdir;\n  }\n  // Needed because `definition` fields are readonly.\n  const defAny = definition;\n  // Copy over any fields that apply to either directives or components.\n  for (const field of COPY_DIRECTIVE_FIELDS) {\n    defAny[field] = superDef[field];\n  }\n  if (isComponentDef(superDef)) {\n    // Copy over any component-specific fields.\n    for (const field of COPY_COMPONENT_FIELDS) {\n      defAny[field] = superDef[field];\n    }\n  }\n}\n\n/**\n * This feature adds the host directives behavior to a directive definition by patching a\n * function onto it. The expectation is that the runtime will invoke the function during\n * directive matching.\n *\n * For example:\n * ```ts\n * class ComponentWithHostDirective {\n *   static ɵcmp = defineComponent({\n *    type: ComponentWithHostDirective,\n *    features: [ɵɵHostDirectivesFeature([\n *      SimpleHostDirective,\n *      {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},\n *    ])]\n *  });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵHostDirectivesFeature(rawHostDirectives) {\n  return definition => {\n    definition.findHostDirectiveDefs = findHostDirectiveDefs;\n    definition.hostDirectives = (Array.isArray(rawHostDirectives) ? rawHostDirectives : rawHostDirectives()).map(dir => {\n      return typeof dir === 'function' ? {\n        directive: resolveForwardRef(dir),\n        inputs: EMPTY_OBJ,\n        outputs: EMPTY_OBJ\n      } : {\n        directive: resolveForwardRef(dir.directive),\n        inputs: bindingArrayToMap(dir.inputs),\n        outputs: bindingArrayToMap(dir.outputs)\n      };\n    });\n  };\n}\nfunction findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {\n  if (currentDef.hostDirectives !== null) {\n    for (const hostDirectiveConfig of currentDef.hostDirectives) {\n      const hostDirectiveDef = getDirectiveDef(hostDirectiveConfig.directive);\n      if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        validateHostDirective(hostDirectiveConfig, hostDirectiveDef, matchedDefs);\n      }\n      // We need to patch the `declaredInputs` so that\n      // `ngOnChanges` can map the properties correctly.\n      patchDeclaredInputs(hostDirectiveDef.declaredInputs, hostDirectiveConfig.inputs);\n      // Host directives execute before the host so that its host bindings can be overwritten.\n      findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);\n      hostDirectiveDefs.set(hostDirectiveDef, hostDirectiveConfig);\n      matchedDefs.push(hostDirectiveDef);\n    }\n  }\n}\n/**\n * Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into\n * a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.\n */\nfunction bindingArrayToMap(bindings) {\n  if (bindings === undefined || bindings.length === 0) {\n    return EMPTY_OBJ;\n  }\n  const result = {};\n  for (let i = 0; i < bindings.length; i += 2) {\n    result[bindings[i]] = bindings[i + 1];\n  }\n  return result;\n}\n/**\n * `ngOnChanges` has some leftover legacy ViewEngine behavior where the keys inside the\n * `SimpleChanges` event refer to the *declared* name of the input, not its public name or its\n * minified name. E.g. in `@Input('alias') foo: string`, the name in the `SimpleChanges` object\n * will always be `foo`, and not `alias` or the minified name of `foo` in apps using property\n * minification.\n *\n * This is achieved through the `DirectiveDef.declaredInputs` map that is constructed when the\n * definition is declared. When a property is written to the directive instance, the\n * `NgOnChangesFeature` will try to remap the property name being written to using the\n * `declaredInputs`.\n *\n * Since the host directive input remapping happens during directive matching, `declaredInputs`\n * won't contain the new alias that the input is available under. This function addresses the\n * issue by patching the host directive aliases to the `declaredInputs`. There is *not* a risk of\n * this patching accidentally introducing new inputs to the host directive, because `declaredInputs`\n * is used *only* by the `NgOnChangesFeature` when determining what name is used in the\n * `SimpleChanges` object which won't be reached if an input doesn't exist.\n */\nfunction patchDeclaredInputs(declaredInputs, exposedInputs) {\n  for (const publicName in exposedInputs) {\n    if (exposedInputs.hasOwnProperty(publicName)) {\n      const remappedPublicName = exposedInputs[publicName];\n      const privateName = declaredInputs[publicName];\n      // We *technically* shouldn't be able to hit this case because we can't have multiple\n      // inputs on the same property and we have validations against conflicting aliases in\n      // `validateMappings`. If we somehow did, it would lead to `ngOnChanges` being invoked\n      // with the wrong name so we have a non-user-friendly assertion here just in case.\n      if ((typeof ngDevMode === 'undefined' || ngDevMode) && declaredInputs.hasOwnProperty(remappedPublicName)) {\n        assertEqual(declaredInputs[remappedPublicName], declaredInputs[publicName], `Conflicting host directive input alias ${publicName}.`);\n      }\n      declaredInputs[remappedPublicName] = privateName;\n    }\n  }\n}\n/**\n * Verifies that the host directive has been configured correctly.\n * @param hostDirectiveConfig Host directive configuration object.\n * @param directiveDef Directive definition of the host directive.\n * @param matchedDefs Directives that have been matched so far.\n */\nfunction validateHostDirective(hostDirectiveConfig, directiveDef, matchedDefs) {\n  const type = hostDirectiveConfig.directive;\n  if (directiveDef === null) {\n    if (getComponentDef(type) !== null) {\n      throw new RuntimeError(310 /* RuntimeErrorCode.HOST_DIRECTIVE_COMPONENT */, `Host directive ${type.name} cannot be a component.`);\n    }\n    throw new RuntimeError(307 /* RuntimeErrorCode.HOST_DIRECTIVE_UNRESOLVABLE */, `Could not resolve metadata for host directive ${type.name}. ` + `Make sure that the ${type.name} class is annotated with an @Directive decorator.`);\n  }\n  if (!directiveDef.standalone) {\n    throw new RuntimeError(308 /* RuntimeErrorCode.HOST_DIRECTIVE_NOT_STANDALONE */, `Host directive ${directiveDef.type.name} must be standalone.`);\n  }\n  if (matchedDefs.indexOf(directiveDef) > -1) {\n    throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTITVE */, `Directive ${directiveDef.type.name} matches multiple times on the same element. ` + `Directives can only match an element once.`);\n  }\n  validateMappings('input', directiveDef, hostDirectiveConfig.inputs);\n  validateMappings('output', directiveDef, hostDirectiveConfig.outputs);\n}\n/**\n * Checks that the host directive inputs/outputs configuration is valid.\n * @param bindingType Kind of binding that is being validated. Used in the error message.\n * @param def Definition of the host directive that is being validated against.\n * @param hostDirectiveBindings Host directive mapping object that shold be validated.\n */\nfunction validateMappings(bindingType, def, hostDirectiveBindings) {\n  const className = def.type.name;\n  const bindings = bindingType === 'input' ? def.inputs : def.outputs;\n  for (const publicName in hostDirectiveBindings) {\n    if (hostDirectiveBindings.hasOwnProperty(publicName)) {\n      if (!bindings.hasOwnProperty(publicName)) {\n        throw new RuntimeError(311 /* RuntimeErrorCode.HOST_DIRECTIVE_UNDEFINED_BINDING */, `Directive ${className} does not have an ${bindingType} with a public name of ${publicName}.`);\n      }\n      const remappedPublicName = hostDirectiveBindings[publicName];\n      if (bindings.hasOwnProperty(remappedPublicName) && bindings[remappedPublicName] !== publicName) {\n        throw new RuntimeError(312 /* RuntimeErrorCode.HOST_DIRECTIVE_CONFLICTING_ALIAS */, `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${remappedPublicName}, because it already has a different ${bindingType} with the same public name.`);\n      }\n    }\n  }\n}\nfunction isIterable(obj) {\n  return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;\n}\nfunction isListLikeIterable(obj) {\n  if (!isJsObject(obj)) return false;\n  return Array.isArray(obj) || !(obj instanceof Map) &&\n  // JS Map are iterables but return entries as [k, v]\n  Symbol.iterator in obj; // JS Iterable have a Symbol.iterator prop\n}\n\nfunction areIterablesEqual(a, b, comparator) {\n  const iterator1 = a[Symbol.iterator]();\n  const iterator2 = b[Symbol.iterator]();\n  while (true) {\n    const item1 = iterator1.next();\n    const item2 = iterator2.next();\n    if (item1.done && item2.done) return true;\n    if (item1.done || item2.done) return false;\n    if (!comparator(item1.value, item2.value)) return false;\n  }\n}\nfunction iterateListLike(obj, fn) {\n  if (Array.isArray(obj)) {\n    for (let i = 0; i < obj.length; i++) {\n      fn(obj[i]);\n    }\n  } else {\n    const iterator = obj[Symbol.iterator]();\n    let item;\n    while (!(item = iterator.next()).done) {\n      fn(item.value);\n    }\n  }\n}\nfunction isJsObject(o) {\n  return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\nfunction devModeEqual(a, b) {\n  const isListLikeIterableA = isListLikeIterable(a);\n  const isListLikeIterableB = isListLikeIterable(b);\n  if (isListLikeIterableA && isListLikeIterableB) {\n    return areIterablesEqual(a, b, devModeEqual);\n  } else {\n    const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n    const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n    if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n      return true;\n    } else {\n      return Object.is(a, b);\n    }\n  }\n}\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nfunction updateBinding(lView, bindingIndex, value) {\n  return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\nfunction getBinding(lView, bindingIndex) {\n  ngDevMode && assertIndexInRange(lView, bindingIndex);\n  ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n  return lView[bindingIndex];\n}\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n *          `CheckNoChangesMode`)\n */\nfunction bindingUpdated(lView, bindingIndex, value) {\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n  ngDevMode && assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n  const oldValue = lView[bindingIndex];\n  if (Object.is(oldValue, value)) {\n    return false;\n  } else {\n    if (ngDevMode && isInCheckNoChangesMode()) {\n      // View engine didn't report undefined values as changed on the first checkNoChanges pass\n      // (before the change detection was run).\n      const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n      if (!devModeEqual(oldValueToCompare, value)) {\n        const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n        throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n      }\n      // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n      // For this reason we exit as if no change. The early exit is needed to prevent the changed\n      // value to be written into `LView` (If we would write the new value that we would not see it\n      // as change on next CD.)\n      return false;\n    }\n    lView[bindingIndex] = value;\n    return true;\n  }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n  const different = bindingUpdated(lView, bindingIndex, exp1);\n  return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n  return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n  return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n *                  Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n  const lView = getLView();\n  const bindingIndex = nextBindingIndex();\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n  }\n  return ɵɵattribute;\n}\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(lView, values) {\n  ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n  ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n  let isBindingUpdated = false;\n  let bindingIndex = getBindingIndex();\n  for (let i = 1; i < values.length; i += 2) {\n    // Check if bindings (odd indexes) have changed\n    isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n  }\n  setBindingIndex(bindingIndex);\n  if (!isBindingUpdated) {\n    return NO_CHANGE;\n  }\n  // Build the updated content\n  let content = values[0];\n  for (let i = 1; i < values.length; i += 2) {\n    content += renderStringify(values[i]) + values[i + 1];\n  }\n  return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(lView, prefix, v0, suffix) {\n  const different = bindingUpdated(lView, nextBindingIndex(), v0);\n  return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n  const bindingIndex = getBindingIndex();\n  const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n  incrementBindingIndex(2);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n  const bindingIndex = getBindingIndex();\n  const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n  incrementBindingIndex(3);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE;\n}\n/**\n * Create an interpolation binding with 4 expressions.\n */\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  const bindingIndex = getBindingIndex();\n  const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  incrementBindingIndex(4);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  const bindingIndex = getBindingIndex();\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n  incrementBindingIndex(5);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  const bindingIndex = getBindingIndex();\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n  incrementBindingIndex(6);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  const bindingIndex = getBindingIndex();\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n  incrementBindingIndex(7);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  const bindingIndex = getBindingIndex();\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n  incrementBindingIndex(8);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix : NO_CHANGE;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n  }\n  return ɵɵattributeInterpolate1;\n}\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n  }\n  return ɵɵattributeInterpolate2;\n}\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n  }\n  return ɵɵattributeInterpolate3;\n}\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n  }\n  return ɵɵattributeInterpolate4;\n}\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n  }\n  return ɵɵattributeInterpolate5;\n}\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n  }\n  return ɵɵattributeInterpolate6;\n}\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n  }\n  return ɵɵattributeInterpolate7;\n}\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n  }\n  return ɵɵattributeInterpolate8;\n}\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n  const lView = getLView();\n  const interpolated = interpolationV(lView, values);\n  if (interpolated !== NO_CHANGE) {\n    const tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n    if (ngDevMode) {\n      const interpolationInBetween = [values[0]]; // prefix\n      for (let i = 2; i < values.length; i += 2) {\n        interpolationInBetween.push(values[i]);\n      }\n      storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n    }\n  }\n  return ɵɵattributeInterpolateV;\n}\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n  const view = getComponentViewByInstance(component);\n  detectChangesInternal(view[TVIEW], view, component);\n}\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && ngDevMode.firstCreatePass++;\n  const tViewConsts = tView.consts;\n  // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n  const tNode = getOrCreateTNode(tView, index, 4 /* TNodeType.Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n  resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n  registerPostOrderHooks(tView, tNode);\n  const embeddedTView = tNode.tView = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n  if (tView.queries !== null) {\n    tView.queries.template(tView, tNode);\n    embeddedTView.queries = tView.queries.embeddedTView(tNode);\n  }\n  return tNode;\n}\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n *    <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n *        Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n  const lView = getLView();\n  const tView = getTView();\n  const adjustedIndex = index + HEADER_OFFSET;\n  const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  setCurrentTNode(tNode, false);\n  const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n  appendChild(tView, lView, comment, tNode);\n  attachPatchData(comment, lView);\n  addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n  if (isDirectiveHost(tNode)) {\n    createDirectivesInstances(tView, lView, tNode);\n  }\n  if (localRefsIndex != null) {\n    saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n  }\n}\n\n/** Store a value in the `data` at a given `index`. */\nfunction store(tView, lView, index, value) {\n  // We don't store any static data for local variables, so the first time\n  // we see the template, we should store as null to avoid a sparse array\n  if (index >= tView.data.length) {\n    tView.data[index] = null;\n    tView.blueprint[index] = null;\n  }\n  lView[index] = value;\n}\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nfunction ɵɵreference(index) {\n  const contextLView = getContextLView();\n  return load(contextLView, HEADER_OFFSET + index);\n}\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵproperty(propName, value, sanitizer) {\n  const lView = getLView();\n  const bindingIndex = nextBindingIndex();\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n  }\n  return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n  const inputs = tNode.inputs;\n  const property = isClassBased ? 'class' : 'style';\n  // We support both 'class' and `className` hence the fallback.\n  setInputsForProperty(tView, lView, inputs[property], property, value);\n}\nfunction elementStartFirstCreatePass(index, tView, lView, name, attrsIndex, localRefsIndex) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && ngDevMode.firstCreatePass++;\n  const tViewConsts = tView.consts;\n  const attrs = getConstant(tViewConsts, attrsIndex);\n  const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);\n  resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n  if (tNode.attrs !== null) {\n    computeStaticStyling(tNode, tNode.attrs, false);\n  }\n  if (tNode.mergedAttrs !== null) {\n    computeStaticStyling(tNode, tNode.mergedAttrs, true);\n  }\n  if (tView.queries !== null) {\n    tView.queries.elementStart(tView, tNode);\n  }\n  return tNode;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n  const lView = getLView();\n  const tView = getTView();\n  const adjustedIndex = HEADER_OFFSET + index;\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  const renderer = lView[RENDERER];\n  const tNode = tView.firstCreatePass ? elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());\n  const hasDirectives = isDirectiveHost(tNode);\n  if (ngDevMode && tView.firstCreatePass) {\n    validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n  }\n  setCurrentTNode(tNode, true);\n  setupStaticAttributes(renderer, native, tNode);\n  if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n    // In the i18n case, the translation may have removed this element, so only add it if it is not\n    // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n    appendChild(tView, lView, native, tNode);\n  }\n  // any immediate children of a component or template container must be pre-emptively\n  // monkey-patched with the component view data so that the element can be inspected\n  // later on using any element discovery utility methods (see `element_discovery.ts`)\n  if (getElementDepthCount() === 0) {\n    attachPatchData(native, lView);\n  }\n  increaseElementDepthCount();\n  if (hasDirectives) {\n    createDirectivesInstances(tView, lView, tNode);\n    executeContentQueries(tView, tNode, lView);\n  }\n  if (localRefsIndex !== null) {\n    saveResolvedLocalsInData(lView, tNode);\n  }\n  return ɵɵelementStart;\n}\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n  let currentTNode = getCurrentTNode();\n  ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n  if (isCurrentTNodeParent()) {\n    setCurrentTNodeAsNotParent();\n  } else {\n    ngDevMode && assertHasParent(getCurrentTNode());\n    currentTNode = currentTNode.parent;\n    setCurrentTNode(currentTNode, false);\n  }\n  const tNode = currentTNode;\n  ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n  decreaseElementDepthCount();\n  const tView = getTView();\n  if (tView.firstCreatePass) {\n    registerPostOrderHooks(tView, currentTNode);\n    if (isContentQueryHost(currentTNode)) {\n      tView.queries.elementEnd(currentTNode);\n    }\n  }\n  if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n    setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n  }\n  if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n    setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n  }\n  return ɵɵelementEnd;\n}\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n  ɵɵelementEnd();\n  return ɵɵelement;\n}\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n  ngDevMode && ngDevMode.firstCreatePass++;\n  const tViewConsts = tView.consts;\n  const attrs = getConstant(tViewConsts, attrsIndex);\n  const tNode = getOrCreateTNode(tView, index, 8 /* TNodeType.ElementContainer */, 'ng-container', attrs);\n  // While ng-container doesn't necessarily support styling, we use the style context to identify\n  // and execute directives on the ng-container.\n  if (attrs !== null) {\n    computeStaticStyling(tNode, attrs, true);\n  }\n  const localRefs = getConstant(tViewConsts, localRefsIndex);\n  resolveDirectives(tView, lView, tNode, localRefs);\n  if (tView.queries !== null) {\n    tView.queries.elementStart(tView, tNode);\n  }\n  return tNode;\n}\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n  const lView = getLView();\n  const tView = getTView();\n  const adjustedIndex = index + HEADER_OFFSET;\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n  const tNode = tView.firstCreatePass ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  setCurrentTNode(tNode, true);\n  ngDevMode && ngDevMode.rendererCreateComment++;\n  const native = lView[adjustedIndex] = lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n  appendChild(tView, lView, native, tNode);\n  attachPatchData(native, lView);\n  if (isDirectiveHost(tNode)) {\n    createDirectivesInstances(tView, lView, tNode);\n    executeContentQueries(tView, tNode, lView);\n  }\n  if (localRefsIndex != null) {\n    saveResolvedLocalsInData(lView, tNode);\n  }\n  return ɵɵelementContainerStart;\n}\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n  let currentTNode = getCurrentTNode();\n  const tView = getTView();\n  if (isCurrentTNodeParent()) {\n    setCurrentTNodeAsNotParent();\n  } else {\n    ngDevMode && assertHasParent(currentTNode);\n    currentTNode = currentTNode.parent;\n    setCurrentTNode(currentTNode, false);\n  }\n  ngDevMode && assertTNodeType(currentTNode, 8 /* TNodeType.ElementContainer */);\n  if (tView.firstCreatePass) {\n    registerPostOrderHooks(tView, currentTNode);\n    if (isContentQueryHost(currentTNode)) {\n      tView.queries.elementEnd(currentTNode);\n    }\n  }\n  return ɵɵelementContainerEnd;\n}\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n  ɵɵelementContainerEnd();\n  return ɵɵelementContainer;\n}\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nfunction ɵɵgetCurrentView() {\n  return getLView();\n}\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n  // allow any Promise/A+ compliant thenable.\n  // It's up to the caller to ensure that obj.then conforms to the spec\n  return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is a Subscribable\n */\nfunction isSubscribable(obj) {\n  return !!obj && typeof obj.subscribe === 'function';\n}\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nconst isObservable = isSubscribable;\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener - this argument is a reminder\n *     from the Renderer3 infrastructure and should be removed from the instruction arguments\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n  const lView = getLView();\n  const tView = getTView();\n  const tNode = getCurrentTNode();\n  listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, eventTargetResolver);\n  return ɵɵlistener;\n}\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostListener(eventName, listenerFn) {\n  const tNode = getCurrentTNode();\n  const lView = getLView();\n  const tView = getTView();\n  const currentDef = getCurrentDirectiveDef(tView.data);\n  const renderer = loadComponentRenderer(currentDef, tNode, lView);\n  listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n  return ɵɵsyntheticHostListener;\n}\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\n  const tCleanup = tView.cleanup;\n  if (tCleanup != null) {\n    for (let i = 0; i < tCleanup.length - 1; i += 2) {\n      const cleanupEventName = tCleanup[i];\n      if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n        // We have found a matching event name on the same node but it might not have been\n        // registered yet, so we must explicitly verify entries in the LView cleanup data\n        // structures.\n        const lCleanup = lView[CLEANUP];\n        const listenerIdxInLCleanup = tCleanup[i + 2];\n        return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n      }\n      // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n      // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n      // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n      // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n      // documentation of TView.cleanup for more details of this data structure layout.\n      if (typeof cleanupEventName === 'string') {\n        i += 2;\n      }\n    }\n  }\n  return null;\n}\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, eventTargetResolver) {\n  const isTNodeDirectiveHost = isDirectiveHost(tNode);\n  const firstCreatePass = tView.firstCreatePass;\n  const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n  const context = lView[CONTEXT];\n  // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n  // native listener or a directive output on this element. As such we we know that we will have to\n  // register a listener and store its cleanup function on LView.\n  const lCleanup = getOrCreateLViewCleanup(lView);\n  ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n  let processOutputs = true;\n  // Adding a native event listener is applicable when:\n  // - The corresponding TNode represents a DOM element.\n  // - The event target has a resolver (usually resulting in a global object,\n  //   such as `window` or `document`).\n  if (tNode.type & 3 /* TNodeType.AnyRNode */ || eventTargetResolver) {\n    const native = getNativeByTNode(tNode, lView);\n    const target = eventTargetResolver ? eventTargetResolver(native) : native;\n    const lCleanupIndex = lCleanup.length;\n    const idxOrTargetGetter = eventTargetResolver ? _lView => eventTargetResolver(unwrapRNode(_lView[tNode.index])) : tNode.index;\n    // In order to match current behavior, native DOM event listeners must be added for all\n    // events (including outputs).\n    // There might be cases where multiple directives on the same element try to register an event\n    // handler function for the same event. In this situation we want to avoid registration of\n    // several native listeners as each registration would be intercepted by NgZone and\n    // trigger change detection. This would mean that a single user action would result in several\n    // change detections being invoked. To avoid this situation we want to have only one call to\n    // native handler registration (for the same element and same type of event).\n    //\n    // In order to have just one native event handler in presence of multiple handler functions,\n    // we just register a first handler function as a native event listener and then chain\n    // (coalesce) other handler functions on top of the first native handler function.\n    let existingListener = null;\n    // Please note that the coalescing described here doesn't happen for events specifying an\n    // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n    // view engine.\n    // Also, we don't have to search for existing listeners is there are no directives\n    // matching on a given node as we can't register multiple event handlers for the same event in\n    // a template (this would mean having duplicate attributes).\n    if (!eventTargetResolver && isTNodeDirectiveHost) {\n      existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n    }\n    if (existingListener !== null) {\n      // Attach a new listener to coalesced listeners list, maintaining the order in which\n      // listeners are registered. For performance reasons, we keep a reference to the last\n      // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n      // the entire set each time we need to add a new listener.\n      const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n      lastListenerFn.__ngNextListenerFn__ = listenerFn;\n      existingListener.__ngLastListenerFn__ = listenerFn;\n      processOutputs = false;\n    } else {\n      listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n      const cleanupFn = renderer.listen(target, eventName, listenerFn);\n      ngDevMode && ngDevMode.rendererAddEventListener++;\n      lCleanup.push(listenerFn, cleanupFn);\n      tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n    }\n  } else {\n    // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n    // ancestors are marked dirty when an event occurs.\n    listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n  }\n  // subscribe to directive outputs\n  const outputs = tNode.outputs;\n  let props;\n  if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n    const propsLength = props.length;\n    if (propsLength) {\n      for (let i = 0; i < propsLength; i += 2) {\n        const index = props[i];\n        ngDevMode && assertIndexInRange(lView, index);\n        const minifiedName = props[i + 1];\n        const directiveInstance = lView[index];\n        const output = directiveInstance[minifiedName];\n        if (ngDevMode && !isObservable(output)) {\n          throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n        }\n        const subscription = output.subscribe(listenerFn);\n        const idx = lCleanup.length;\n        lCleanup.push(listenerFn, subscription);\n        tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n      }\n    }\n  }\n}\nfunction executeListenerWithErrorHandling(lView, context, listenerFn, e) {\n  try {\n    profiler(6 /* ProfilerEvent.OutputStart */, context, listenerFn);\n    // Only explicitly returning false from a listener should preventDefault\n    return listenerFn(e) !== false;\n  } catch (error) {\n    handleError(lView, error);\n    return false;\n  } finally {\n    profiler(7 /* ProfilerEvent.OutputEnd */, context, listenerFn);\n  }\n}\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) {\n  // Note: we are performing most of the work in the listener function itself\n  // to optimize listener registration.\n  return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n    // Ivy uses `Function` as a special token that allows us to unwrap the function\n    // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n    if (e === Function) {\n      return listenerFn;\n    }\n    // In order to be backwards compatible with View Engine, events on component host nodes\n    // must also mark the component view itself dirty (i.e. the view that it owns).\n    const startView = tNode.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;\n    markViewDirty(startView);\n    let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n    // A just-invoked listener function might have coalesced listeners so we need to check for\n    // their presence and invoke as needed.\n    let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n    while (nextListenerFn) {\n      // We should prevent default if any of the listeners explicitly return false\n      result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n      nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n    }\n    if (wrapWithPreventDefault && result === false) {\n      e.preventDefault();\n      // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n      e.returnValue = false;\n    }\n    return result;\n  };\n}\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nfunction ɵɵnextContext(level = 1) {\n  return nextContextImpl(level);\n}\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n  let wildcardNgContentIndex = null;\n  const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n  for (let i = 0; i < projectionSlots.length; i++) {\n    const slotValue = projectionSlots[i];\n    // The last wildcard projection slot should match all nodes which aren't matching\n    // any selector. This is necessary to be backwards compatible with view engine.\n    if (slotValue === '*') {\n      wildcardNgContentIndex = i;\n      continue;\n    }\n    // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n    // to the list of selectors, otherwise we fall back to matching against the node.\n    if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */true) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n      return i; // first matching selector \"captures\" a given node\n    }\n  }\n\n  return wildcardNgContentIndex;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n *        on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n *        all nodes which do not match any selector. If not specified, a single wildcard\n *        selector projection slot will be defined.\n *\n * @codeGenApi\n */\nfunction ɵɵprojectionDef(projectionSlots) {\n  const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\n  if (!componentNode.projection) {\n    // If no explicit projection slots are defined, fall back to a single\n    // projection slot with the wildcard selector.\n    const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n    const projectionHeads = componentNode.projection = newArray(numProjectionSlots, null);\n    const tails = projectionHeads.slice();\n    let componentChild = componentNode.child;\n    while (componentChild !== null) {\n      const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n      if (slotIndex !== null) {\n        if (tails[slotIndex]) {\n          tails[slotIndex].projectionNext = componentChild;\n        } else {\n          projectionHeads[slotIndex] = componentChild;\n        }\n        tails[slotIndex] = componentChild;\n      }\n      componentChild = componentChild.next;\n    }\n  }\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n *        - 0 when the selector is `*` (or unspecified as this is the default value),\n *        - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nfunction ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) {\n  const lView = getLView();\n  const tView = getTView();\n  const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* TNodeType.Projection */, null, attrs || null);\n  // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n  if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n  // `<ng-content>` has no content\n  setCurrentTNodeAsNotParent();\n  if ((tProjectionNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n    // re-distribution of projectable nodes is stored on a component's view level\n    applyProjection(tView, lView, tProjectionNode);\n  }\n}\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n  ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n  return ɵɵpropertyInterpolate;\n}\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n  }\n  return ɵɵpropertyInterpolate1;\n}\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n  }\n  return ɵɵpropertyInterpolate2;\n}\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n  }\n  return ɵɵpropertyInterpolate3;\n}\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n  }\n  return ɵɵpropertyInterpolate4;\n}\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n  }\n  return ɵɵpropertyInterpolate5;\n}\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n  }\n  return ɵɵpropertyInterpolate6;\n}\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n  }\n  return ɵɵpropertyInterpolate7;\n}\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n  }\n  return ɵɵpropertyInterpolate8;\n}\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings in between those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  if (interpolatedValue !== NO_CHANGE) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    if (ngDevMode) {\n      const interpolationInBetween = [values[0]]; // prefix\n      for (let i = 2; i < values.length; i += 2) {\n        interpolationInBetween.push(values[i]);\n      }\n      storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n    }\n  }\n  return ɵɵpropertyInterpolateV;\n}\nfunction toTStylingRange(prev, next) {\n  ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n  ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n  return prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */;\n}\n\nfunction getTStylingRangePrev(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange >> 17 /* StylingRange.PREV_SHIFT */ & 32767 /* StylingRange.UNSIGNED_MASK */;\n}\n\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) == 2 /* StylingRange.PREV_DUPLICATE */;\n}\n\nfunction setTStylingRangePrev(tStylingRange, previous) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n  return tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */ | previous << 17 /* StylingRange.PREV_SHIFT */;\n}\n\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */;\n}\n\nfunction getTStylingRangeNext(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;\n}\n\nfunction setTStylingRangeNext(tStylingRange, next) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n  return tStylingRange & ~131068 /* StylingRange.NEXT_MASK */ |\n  //\n  next << 2 /* StylingRange.NEXT_SHIFT */;\n}\n\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) === 1 /* StylingRange.NEXT_DUPLICATE */;\n}\n\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */;\n}\n\nfunction getTStylingRangeTail(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  const next = getTStylingRangeNext(tStylingRange);\n  return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n *   template: `\n *     <my-cmp [style]=\" {color: '#001'} \"\n *             [style.color]=\" #002 \"\n *             dir-style-color-1\n *             dir-style-color-2> `\n * })\n * class ExampleComponent {\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#001'});\n *     ɵɵstyleProp('color', '#002');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n *   @HostBinding('style') style = {color: '#005'};\n *   @HostBinding('style.color') color = '#006';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#005'});\n *     ɵɵstyleProp('color', '#006');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n *   @HostBinding('style') style = {color: '#007'};\n *   @HostBinding('style.color') color = '#008';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#007'});\n *     ɵɵstyleProp('color', '#008');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `my-cmp',\n * })\n * class MyComponent {\n *   @HostBinding('style') style = {color: '#003'};\n *   @HostBinding('style.color') color = '#004';\n *\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#003'});\n *     ɵɵstyleProp('color', '#004');\n *     ...\n *   }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView`          | Notes\n * |---|------------|-----------------|--------------\n * |...|            |                 |\n * |10 |`null`      |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12`   | ...             |\n * |12 |`color`     |`'#002'`         | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0`    | ...             |\n * |...|            |                 |\n * |20 |`null`      |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22`    | ...             |\n * |22 |`color`     |`'#004'`         | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24`   | ...             |\n * |24 |`null`      |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26`   | ...             |\n * |26 |`color`     |`'#006'`         | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28`   | ...             |\n * |28 |`null`      |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30`   | ...             |\n * |30 |`color`     |`'#008'`         | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10`   | ...             |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n *  - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n *  - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n *               template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n  ngDevMode && assertFirstUpdatePass(getTView());\n  let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n  let tmplHead = getTStylingRangePrev(tBindings);\n  let tmplTail = getTStylingRangeNext(tBindings);\n  tData[index] = tStylingKeyWithStatic;\n  let isKeyDuplicateOfStatic = false;\n  let tStylingKey;\n  if (Array.isArray(tStylingKeyWithStatic)) {\n    // We are case when the `TStylingKey` contains static fields as well.\n    const staticKeyValueArray = tStylingKeyWithStatic;\n    tStylingKey = staticKeyValueArray[1]; // unwrap.\n    // We need to check if our key is present in the static so that we can mark it as duplicate.\n    if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n      // tStylingKey is present in the statics, need to mark it as duplicate.\n      isKeyDuplicateOfStatic = true;\n    }\n  } else {\n    tStylingKey = tStylingKeyWithStatic;\n  }\n  if (isHostBinding) {\n    // We are inserting host bindings\n    // If we don't have template bindings then `tail` is 0.\n    const hasTemplateBindings = tmplTail !== 0;\n    // This is important to know because that means that the `head` can't point to the first\n    // template bindings (there are none.) Instead the head points to the tail of the template.\n    if (hasTemplateBindings) {\n      // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n      const previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n      tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n      // if a host binding has already been registered, we need to update the next of that host\n      // binding to point to this one\n      if (previousNode !== 0) {\n        // We need to update the template-tail value to point to us.\n        tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index);\n      }\n      // The \"previous\" of the template binding head should point to this host binding\n      tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n    } else {\n      tData[index + 1] = toTStylingRange(tmplHead, 0);\n      // if a host binding has already been registered, we need to update the next of that host\n      // binding to point to this one\n      if (tmplHead !== 0) {\n        // We need to update the template-tail value to point to us.\n        tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n      }\n      // if we don't have template, the head points to template-tail, and needs to be advanced.\n      tmplHead = index;\n    }\n  } else {\n    // We are inserting in template section.\n    // We need to set this binding's \"previous\" to the current template tail\n    tData[index + 1] = toTStylingRange(tmplTail, 0);\n    ngDevMode && assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n    if (tmplHead === 0) {\n      tmplHead = index;\n    } else {\n      // We need to update the previous value \"next\" to point to this binding\n      tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n    }\n    tmplTail = index;\n  }\n  // Now we need to update / compute the duplicates.\n  // Starting with our location search towards head (least priority)\n  if (isKeyDuplicateOfStatic) {\n    tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n  }\n  markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n  markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n  markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n  tBindings = toTStylingRange(tmplHead, tmplTail);\n  if (isClassBinding) {\n    tNode.classBindings = tBindings;\n  } else {\n    tNode.styleBindings = tBindings;\n  }\n}\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n  const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n  if (residual != null /* or undefined */ && typeof tStylingKey == 'string' && keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n    // We have duplicate in the residual so mark ourselves as duplicate.\n    tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n  }\n}\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n *   [style.color]\n *   [style.width.px] <<- index\n *   [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n *   [style.color]\n *   [style.width.em]\n *   [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n *   [style.width.px]\n *   [style.color]\n *   [style]  <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n *   [style]\n *   [style.width.px]\n *   [style.color]  <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n *        the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n *        - `true` for previous (lower priority);\n *        - `false` for next (higher priority).\n */\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n  const tStylingAtIndex = tData[index + 1];\n  const isMap = tStylingKey === null;\n  let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n  let foundDuplicate = false;\n  // We keep iterating as long as we have a cursor\n  // AND either:\n  // - we found what we are looking for, OR\n  // - we are a map in which case we have to continue searching even after we find what we were\n  //   looking for since we are a wild card and everything needs to be flipped to duplicate.\n  while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n    ngDevMode && assertIndexInRange(tData, cursor);\n    const tStylingValueAtCursor = tData[cursor];\n    const tStyleRangeAtCursor = tData[cursor + 1];\n    if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n      foundDuplicate = true;\n      tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n    }\n    cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor);\n  }\n  if (foundDuplicate) {\n    // if we found a duplicate, than mark ourselves.\n    tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex);\n  }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n *    - `color`    // Match another color\n *    - `null`     // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n *    - `['', 'color', 'other', true]` // wrapped `color` so match\n *    - `['', null, 'other', true]`       // wrapped `null` so match\n *    - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null`       // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n  ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n  if (tStylingKeyCursor === null ||\n  // If the cursor is `null` it means that we have map at that\n  // location so we must assume that we have a match.\n  tStylingKey == null ||\n  // If `tStylingKey` is `null` then it is a map therefor assume that it\n  // contains a match.\n  (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match.\n  ) {\n    return true;\n  } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n    // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n    // statics and we need to check those as well.\n    return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key\n  }\n\n  return false;\n}\n\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState = {\n  textEnd: 0,\n  key: 0,\n  keyEnd: 0,\n  value: 0,\n  valueEnd: 0\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedKey(text) {\n  return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedValue(text) {\n  return text.substring(parserState.value, parserState.valueEnd);\n}\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassName(text) {\n  resetParserState(text);\n  return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassNameNext(text, index) {\n  const end = parserState.textEnd;\n  if (end === index) {\n    return -1;\n  }\n  index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n  return consumeWhitespace(text, index, end);\n}\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyle(text) {\n  resetParserState(text);\n  return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyleNext(text, startIndex) {\n  const end = parserState.textEnd;\n  let index = parserState.key = consumeWhitespace(text, startIndex, end);\n  if (end === index) {\n    // we reached an end so just quit\n    return -1;\n  }\n  index = parserState.keyEnd = consumeStyleKey(text, index, end);\n  index = consumeSeparator(text, index, end, 58 /* CharCode.COLON */);\n  index = parserState.value = consumeWhitespace(text, index, end);\n  index = parserState.valueEnd = consumeStyleValue(text, index, end);\n  return consumeSeparator(text, index, end, 59 /* CharCode.SEMI_COLON */);\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nfunction resetParserState(text) {\n  parserState.key = 0;\n  parserState.keyEnd = 0;\n  parserState.value = 0;\n  parserState.valueEnd = 0;\n  parserState.textEnd = text.length;\n}\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n *          that location.)\n */\nfunction consumeWhitespace(text, startIndex, endIndex) {\n  while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* CharCode.SPACE */) {\n    startIndex++;\n  }\n  return startIndex;\n}\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nfunction consumeClassToken(text, startIndex, endIndex) {\n  while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* CharCode.SPACE */) {\n    startIndex++;\n  }\n  return startIndex;\n}\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nfunction consumeStyleKey(text, startIndex, endIndex) {\n  let ch;\n  while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45 /* CharCode.DASH */ || ch === 95 /* CharCode.UNDERSCORE */ || (ch & -33 /* CharCode.UPPER_CASE */) >= 65 /* CharCode.A */ && (ch & -33 /* CharCode.UPPER_CASE */) <= 90 /* CharCode.Z */ || ch >= 48 /* CharCode.ZERO */ && ch <= 57 /* CharCode.NINE */)) {\n    startIndex++;\n  }\n  return startIndex;\n}\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n  startIndex = consumeWhitespace(text, startIndex, endIndex);\n  if (startIndex < endIndex) {\n    if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n      malformedStyleError(text, String.fromCharCode(separator), startIndex);\n    }\n    startIndex++;\n  }\n  return startIndex;\n}\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nfunction consumeStyleValue(text, startIndex, endIndex) {\n  let ch1 = -1; // 1st previous character\n  let ch2 = -1; // 2nd previous character\n  let ch3 = -1; // 3rd previous character\n  let i = startIndex;\n  let lastChIndex = i;\n  while (i < endIndex) {\n    const ch = text.charCodeAt(i++);\n    if (ch === 59 /* CharCode.SEMI_COLON */) {\n      return lastChIndex;\n    } else if (ch === 34 /* CharCode.DOUBLE_QUOTE */ || ch === 39 /* CharCode.SINGLE_QUOTE */) {\n      lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n    } else if (startIndex === i - 4 &&\n    // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n    ch3 === 85 /* CharCode.U */ && ch2 === 82 /* CharCode.R */ && ch1 === 76 /* CharCode.L */ && ch === 40 /* CharCode.OPEN_PAREN */) {\n      lastChIndex = i = consumeQuotedText(text, 41 /* CharCode.CLOSE_PAREN */, i, endIndex);\n    } else if (ch > 32 /* CharCode.SPACE */) {\n      // if we have a non-whitespace character then capture its location\n      lastChIndex = i;\n    }\n    ch3 = ch2;\n    ch2 = ch1;\n    ch1 = ch & -33 /* CharCode.UPPER_CASE */;\n  }\n\n  return lastChIndex;\n}\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n  let ch1 = -1; // 1st previous character\n  let index = startIndex;\n  while (index < endIndex) {\n    const ch = text.charCodeAt(index++);\n    if (ch == quoteCharCode && ch1 !== 92 /* CharCode.BACK_SLASH */) {\n      return index;\n    }\n    if (ch == 92 /* CharCode.BACK_SLASH */ && ch1 === 92 /* CharCode.BACK_SLASH */) {\n      // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n      // quotation. (It should not assume that the last `\"` is escaped.)\n      ch1 = 0;\n    } else {\n      ch1 = ch;\n    }\n  }\n  throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error();\n}\nfunction malformedStyleError(text, expecting, index) {\n  ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n  throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' + text.substring(index, index + 1) + '<<]' + text.slice(index + 1) + `'. Expecting '${expecting}'.`);\n}\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleProp(prop, value, suffix) {\n  checkStylingProperty(prop, value, suffix, false);\n  return ɵɵstyleProp;\n}\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵclassProp(className, value) {\n  checkStylingProperty(className, value, null, true);\n  return ɵɵclassProp;\n}\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n *        Any missing styles (that have already been applied to the element beforehand) will be\n *        removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleMap(styles) {\n  checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction styleStringParser(keyValueArray, text) {\n  for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n    styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n  }\n}\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n *        given element. Any missing classes (that have already been applied to the element\n *        beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nfunction ɵɵclassMap(classes) {\n  checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n  for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n    keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n  }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n  const lView = getLView();\n  const tView = getTView();\n  // Styling instructions use 2 slots per binding.\n  // 1. one for the value / TStylingKey\n  // 2. one for the intermittent-value / TStylingRange\n  const bindingIndex = incrementBindingIndex(2);\n  if (tView.firstUpdatePass) {\n    stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n  }\n  if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n    const tNode = tView.data[getSelectedIndex()];\n    updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n  }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n *        have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n  const tView = getTView();\n  const bindingIndex = incrementBindingIndex(2);\n  if (tView.firstUpdatePass) {\n    stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n  }\n  const lView = getLView();\n  if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n    // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n    // if so as not to read unnecessarily.\n    const tNode = tView.data[getSelectedIndex()];\n    if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n      if (ngDevMode) {\n        // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n        // processing this binding in styling resolution.\n        const tStylingKey = tView.data[bindingIndex];\n        assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n      }\n      // VE does not concatenate the static portion like we are doing here.\n      // Instead VE just ignores the static completely if dynamic binding is present.\n      // Because of locality we have already set the static portion because we don't know if there\n      // is a dynamic portion until later. If we would ignore the static portion it would look like\n      // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n      // thing as it would think that the static portion was removed. For this reason we\n      // concatenate it so that `[ngStyle]`/`[ngClass]`  can continue to work on changed.\n      let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n      ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n      if (staticPrefix !== null) {\n        // We want to make sure that falsy values of `value` become empty strings.\n        value = concatStringsWithSpace(staticPrefix, value ? value : '');\n      }\n      // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n      // This takes over the `[style]` binding. (Same for `[class]`)\n      setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n    } else {\n      updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n    }\n  }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n  // All host bindings are placed after the expando section.\n  return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n  ngDevMode && assertFirstUpdatePass(tView);\n  const tData = tView.data;\n  if (tData[bindingIndex + 1] === null) {\n    // The above check is necessary because we don't clear first update pass until first successful\n    // (no exception) template execution. This prevents the styling instruction from double adding\n    // itself to the list.\n    // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n    // if so as not to read unnecessarily.\n    const tNode = tData[getSelectedIndex()];\n    ngDevMode && assertDefined(tNode, 'TNode expected');\n    const isHostBindings = isInHostBindings(tView, bindingIndex);\n    if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n      // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n      // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n      // we need to neutralize this binding since that directive is shadowing it.\n      // We turn this into a noop by setting the key to `false`\n      tStylingKey = false;\n    }\n    tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n    insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n  }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n  const hostDirectiveDef = getCurrentDirectiveDef(tData);\n  let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n  if (hostDirectiveDef === null) {\n    // We are in template node.\n    // If template node already had styling instruction then it has already collected the static\n    // styling and there is no need to collect them again. We know that we are the first styling\n    // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n    const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n    if (isFirstStylingInstructionInTemplate) {\n      // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n      // they are already merged and it would not be possible to figure which property belongs where\n      // in the priority.\n      stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n      stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n      // We know that if we have styling binding in template we can't have residual.\n      residual = null;\n    }\n  } else {\n    // We are in host binding node and there was no binding instruction in template node.\n    // This means that we need to compute the residual.\n    const directiveStylingLast = tNode.directiveStylingLast;\n    const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n    if (isFirstStylingInstructionInHostBinding) {\n      stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n      if (residual === null) {\n        // - If `null` than either:\n        //    - Template styling instruction already ran and it has consumed the static\n        //      styling into its `TStylingKey` and so there is no need to update residual. Instead\n        //      we need to update the `TStylingKey` associated with the first template node\n        //      instruction. OR\n        //    - Some other styling instruction ran and determined that there are no residuals\n        let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n        if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n          // Only recompute if `templateStylingKey` had static values. (If no static value found\n          // then there is nothing to do since this operation can only produce less static keys, not\n          // more.)\n          templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n          templateStylingKey = collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n          setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n        }\n      } else {\n        // We only need to recompute residual if it is not `null`.\n        // - If existing residual (implies there was no template styling). This means that some of\n        //   the statics may have moved from the residual to the `stylingKey` and so we have to\n        //   recompute.\n        // - If `undefined` this is the first time we are running.\n        residual = collectResidual(tData, tNode, isClassBased);\n      }\n    }\n  }\n  if (residual !== undefined) {\n    isClassBased ? tNode.residualClasses = residual : tNode.residualStyles = residual;\n  }\n  return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n  const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n  if (getTStylingRangeNext(bindings) === 0) {\n    // There does not seem to be a styling instruction in the `template`.\n    return undefined;\n  }\n  return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n *   host: {\n *     'style': 'width: 100px',\n *     '[style.color]': 'dirExp',\n *   }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n *  ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n *  ['', 'color', 'width', '100px'],  // newly inserted\n *  ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n *  ['', 'color', 'width', '100px'],\n *  ['', 'color', 'color', 'red'],    // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n  const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n  ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n  tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n  let residual = undefined;\n  const directiveEnd = tNode.directiveEnd;\n  ngDevMode && assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n  // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n  // collecting things after the last `hostBindings` directive which had a styling instruction.)\n  for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n    const attrs = tData[i].hostAttrs;\n    residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n  }\n  return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n *        styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n  // We need to loop because there can be directives which have `hostAttrs` but don't have\n  // `hostBindings` so this loop catches up to the current directive..\n  let currentDirective = null;\n  const directiveEnd = tNode.directiveEnd;\n  let directiveStylingLast = tNode.directiveStylingLast;\n  if (directiveStylingLast === -1) {\n    directiveStylingLast = tNode.directiveStart;\n  } else {\n    directiveStylingLast++;\n  }\n  while (directiveStylingLast < directiveEnd) {\n    currentDirective = tData[directiveStylingLast];\n    ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n    stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n    if (currentDirective === hostDirectiveDef) break;\n    directiveStylingLast++;\n  }\n  if (hostDirectiveDef !== null) {\n    // we only advance the styling cursor if we are collecting data from host bindings.\n    // Template executes before host bindings and so if we would update the index,\n    // host bindings would not get their statics.\n    tNode.directiveStylingLast = directiveStylingLast;\n  }\n  return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n  const desiredMarker = isClassBased ? 1 /* AttributeMarker.Classes */ : 2 /* AttributeMarker.Styles */;\n  let currentMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n  if (attrs !== null) {\n    for (let i = 0; i < attrs.length; i++) {\n      const item = attrs[i];\n      if (typeof item === 'number') {\n        currentMarker = item;\n      } else {\n        if (currentMarker === desiredMarker) {\n          if (!Array.isArray(stylingKey)) {\n            stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n          }\n          keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n        }\n      }\n    }\n  }\n  return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done\n *        for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n *        `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n  if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY;\n  const styleKeyValueArray = [];\n  const unwrappedValue = unwrapSafeValue(value);\n  if (Array.isArray(unwrappedValue)) {\n    for (let i = 0; i < unwrappedValue.length; i++) {\n      keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n    }\n  } else if (typeof unwrappedValue === 'object') {\n    for (const key in unwrappedValue) {\n      if (unwrappedValue.hasOwnProperty(key)) {\n        keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n      }\n    }\n  } else if (typeof unwrappedValue === 'string') {\n    stringParser(styleKeyValueArray, unwrappedValue);\n  } else {\n    ngDevMode && throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n  }\n  return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n  keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n  if (oldKeyValueArray === NO_CHANGE) {\n    // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n    oldKeyValueArray = EMPTY_ARRAY;\n  }\n  let oldIndex = 0;\n  let newIndex = 0;\n  let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n  let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n  while (oldKey !== null || newKey !== null) {\n    ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n    ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n    const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n    const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n    let setKey = null;\n    let setValue = undefined;\n    if (oldKey === newKey) {\n      // UPDATE: Keys are equal => new value is overwriting old value.\n      oldIndex += 2;\n      newIndex += 2;\n      if (oldValue !== newValue) {\n        setKey = newKey;\n        setValue = newValue;\n      }\n    } else if (newKey === null || oldKey !== null && oldKey < newKey) {\n      // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n      // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n      // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n      // new array.\n      oldIndex += 2;\n      setKey = oldKey;\n    } else {\n      // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n      // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n      // old array.\n      ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n      newIndex += 2;\n      setKey = newKey;\n      setValue = newValue;\n    }\n    if (setKey !== null) {\n      updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n    }\n    oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n    newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n  }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n  if (!(tNode.type & 3 /* TNodeType.AnyRNode */)) {\n    // It is possible to have styling on non-elements (such as ng-container).\n    // This is rare, but it does happen. In such a case, just ignore the binding.\n    return;\n  }\n  const tData = tView.data;\n  const tRange = tData[bindingIndex + 1];\n  const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : undefined;\n  if (!isStylingValuePresent(higherPriorityValue)) {\n    // We don't have a next duplicate, or we did not find a duplicate value.\n    if (!isStylingValuePresent(value)) {\n      // We should delete current value or restore to lower priority value.\n      if (getTStylingRangePrevDuplicate(tRange)) {\n        // We have a possible prev duplicate, let's retrieve it.\n        value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n      }\n    }\n    const rNode = getNativeByIndex(getSelectedIndex(), lView);\n    applyStyling(renderer, isClassBased, rNode, prop, value);\n  }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n *   requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n *   `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n *    is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n *   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n *      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n *   - `null` search prev and go all the way to end. Return last value where\n *     `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n  // `TNode` to use for resolving static styling. Also controls search direction.\n  //   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n  //      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n  //   - `null` search prev and go all the way to end. Return last value where\n  //     `isStylingValuePresent(value)` is true.\n  const isPrevDirection = tNode === null;\n  let value = undefined;\n  while (index > 0) {\n    const rawKey = tData[index];\n    const containsStatics = Array.isArray(rawKey);\n    // Unwrap the key if we contain static values.\n    const key = containsStatics ? rawKey[1] : rawKey;\n    const isStylingMap = key === null;\n    let valueAtLViewIndex = lView[index + 1];\n    if (valueAtLViewIndex === NO_CHANGE) {\n      // In firstUpdatePass the styling instructions create a linked list of styling.\n      // On subsequent passes it is possible for a styling instruction to try to read a binding\n      // which\n      // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n      // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n      // allows the resolution to apply the value (which may later be overwritten when the\n      // binding actually executes.)\n      valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n    }\n    let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : undefined;\n    if (containsStatics && !isStylingValuePresent(currentValue)) {\n      currentValue = keyValueArrayGet(rawKey, prop);\n    }\n    if (isStylingValuePresent(currentValue)) {\n      value = currentValue;\n      if (isPrevDirection) {\n        return value;\n      }\n    }\n    const tRange = tData[index + 1];\n    index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n  }\n  if (tNode !== null) {\n    // in case where we are going in next direction AND we did not find anything, we need to\n    // consult residual styling\n    let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n    if (residual != null /** OR residual !=== undefined */) {\n      value = keyValueArrayGet(residual, prop);\n    }\n  }\n  return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n  // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n  // have an opinion as to what this binding should be and you should consult other bindings by\n  // priority to determine the valid value.\n  // This is extracted into a single function so that we have a single place to control this.\n  return value !== undefined;\n}\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n  if (value == null /** || value === undefined */) {\n    // do nothing\n  } else if (typeof suffix === 'string') {\n    value = value + suffix;\n  } else if (typeof value === 'object') {\n    value = stringify(unwrapSafeValue(value));\n  }\n  return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n  return (tNode.flags & (isClassBased ? 8 /* TNodeFlags.hasClassInput */ : 16 /* TNodeFlags.hasStyleInput */)) !== 0;\n}\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nfunction ɵɵtext(index, value = '') {\n  const lView = getLView();\n  const tView = getTView();\n  const adjustedIndex = index + HEADER_OFFSET;\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  const tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1 /* TNodeType.Text */, value, null) : tView.data[adjustedIndex];\n  const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n  appendChild(tView, lView, textNative, tNode);\n  // Text nodes are self closing.\n  setCurrentTNode(tNode, false);\n}\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate(v0) {\n  ɵɵtextInterpolate1('', v0, '');\n  return ɵɵtextInterpolate;\n}\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation1(lView, prefix, v0, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate1;\n}\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate2;\n}\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate3;\n}\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate4;\n}\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate5;\n}\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate6;\n}\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate7;\n}\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  const lView = getLView();\n  const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolate8;\n}\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵtextInterpolateV(values) {\n  const lView = getLView();\n  const interpolated = interpolationV(lView, values);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n  return ɵɵtextInterpolateV;\n}\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolateV(values) {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n *             key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  ɵɵstyleMap(interpolatedValue);\n}\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *         key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n *    ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *     '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolateV(values) {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate1;\n}\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate2;\n}\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate3;\n}\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate4;\n}\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate5;\n}\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate6;\n}\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n *    0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate7;\n}\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate8;\n}\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n *  0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolateV;\n}\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n  const lView = getLView();\n  const bindingIndex = nextBindingIndex();\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n  }\n  return ɵɵhostProperty;\n}\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n  const lView = getLView();\n  const bindingIndex = nextBindingIndex();\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    const tView = getTView();\n    const tNode = getSelectedTNode();\n    const currentDef = getCurrentDirectiveDef(tView.data);\n    const renderer = loadComponentRenderer(currentDef, tNode, lView);\n    elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n  }\n  return ɵɵsyntheticHostProperty;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n  // These property accesses can be ignored because ngI18nClosureMode will be set to false\n  // when optimizing code and the whole if statement will be dropped.\n  // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n  // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n  /*#__PURE__*/(function () {\n    // tslint:disable-next-line:no-toplevel-property-access\n    _global['ngI18nClosureMode'] =\n    // TODO(FW-1250): validate that this actually, you know, works.\n    // tslint:disable-next-line:no-toplevel-property-access\n    typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n  })();\n}\n\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n  const n = val,\n    i = Math.floor(Math.abs(val)),\n    v = val.toString().replace(/^[^.]*\\.?/, '').length;\n  if (i === 1 && v === 0) return 1;\n  return 5;\n}\nvar localeEn = [\"en\", [[\"a\", \"p\"], [\"AM\", \"PM\"], u], [[\"AM\", \"PM\"], u, u], [[\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"], [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]], u, [[\"B\", \"A\"], [\"BC\", \"AD\"], [\"Before Christ\", \"Anno Domini\"]], 0, [6, 0], [\"M/d/yy\", \"MMM d, y\", \"MMMM d, y\", \"EEEE, MMMM d, y\"], [\"h:mm a\", \"h:mm:ss a\", \"h:mm:ss a z\", \"h:mm:ss a zzzz\"], [\"{1}, {0}\", u, \"{1} 'at' {0}\", u], [\".\", \",\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"¤#,##0.00\", \"#E0\"], \"USD\", \"$\", \"US Dollar\", {}, \"ltr\", plural];\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nfunction registerLocaleData(data, localeId, extraData) {\n  if (typeof localeId !== 'string') {\n    extraData = localeId;\n    localeId = data[LocaleDataIndex.LocaleId];\n  }\n  localeId = localeId.toLowerCase().replace(/_/g, '-');\n  LOCALE_DATA[localeId] = data;\n  if (extraData) {\n    LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n  }\n}\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction findLocaleData(locale) {\n  const normalizedLocale = normalizeLocale(locale);\n  let match = getLocaleData(normalizedLocale);\n  if (match) {\n    return match;\n  }\n  // let's try to find a parent locale\n  const parentLocale = normalizedLocale.split('-')[0];\n  match = getLocaleData(parentLocale);\n  if (match) {\n    return match;\n  }\n  if (parentLocale === 'en') {\n    return localeEn;\n  }\n  throw new RuntimeError(701 /* RuntimeErrorCode.MISSING_LOCALE_DATA */, ngDevMode && `Missing locale data for the locale \"${locale}\".`);\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nfunction getLocaleCurrencyCode(locale) {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.CurrencyCode] || null;\n}\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocalePluralCase(locale) {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nfunction getLocaleData(normalizedLocale) {\n  if (!(normalizedLocale in LOCALE_DATA)) {\n    LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale];\n  }\n  return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nfunction unregisterAllLocaleData() {\n  LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\nvar LocaleDataIndex = /*#__PURE__*/(() => {\n  LocaleDataIndex = LocaleDataIndex || {};\n  LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n  LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n  LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n  LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n  LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n  LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n  LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n  LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n  LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n  LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n  return LocaleDataIndex;\n})();\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale) {\n  return locale.toLowerCase().replace(/_/g, '-');\n}\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n  const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n  const result = pluralMapping[plural];\n  return result !== undefined ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nconst DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nconst USD_CURRENCY_CODE = 'USD';\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ELEMENT_MARKER = {\n  marker: 'element'\n};\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ICU_MARKER = {\n  marker: 'ICU'\n};\n/**\n * See `I18nCreateOpCodes`\n */\nvar I18nCreateOpCode = /*#__PURE__*/(() => {\n  I18nCreateOpCode = I18nCreateOpCode || {};\n  /**\n   * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n   * `COMMENT`.\n   */\n  I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n  /**\n   * Should the node be appended to parent immediately after creation.\n   */\n  I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n  /**\n   * If set the node should be comment (rather than a text) node.\n   */\n  I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n  return I18nCreateOpCode;\n})();\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd = 1;\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID$1 = DEFAULT_LOCALE_ID;\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nfunction setLocaleId(localeId) {\n  assertDefined(localeId, `Expected localeId to be defined`);\n  if (typeof localeId === 'string') {\n    LOCALE_ID$1 = localeId.toLowerCase().replace(/_/g, '-');\n  }\n}\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nfunction getLocaleId() {\n  return LOCALE_ID$1;\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n  const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n  const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n  if (insertBeforeIndex === null) {\n    return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n  } else {\n    ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n    return unwrapRNode(lView[insertBeforeIndex]);\n  }\n}\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n  const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n  if (Array.isArray(tNodeInsertBeforeIndex)) {\n    // An array indicates that there are i18n nodes that need to be added as children of this\n    // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n    // only now can be added. The first element of the array is the normal index where we should\n    // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n    // `childRNode`.\n    ngDevMode && assertDomNode(childRNode);\n    let i18nParent = childRNode;\n    let anchorRNode = null;\n    if (!(childTNode.type & 3 /* TNodeType.AnyRNode */)) {\n      anchorRNode = i18nParent;\n      i18nParent = parentRElement;\n    }\n    if (i18nParent !== null && childTNode.componentOffset === -1) {\n      for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n        // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n        // see `assertDomNode` below.\n        const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n        nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n      }\n    }\n  }\n}\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n *    `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n *    `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n *    smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n *        know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n *        `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n *        previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n *     reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n  // Start with Rule1\n  ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n  previousTNodes.push(newTNode);\n  if (previousTNodes.length > 1) {\n    for (let i = previousTNodes.length - 2; i >= 0; i--) {\n      const existingTNode = previousTNodes[i];\n      // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n      // It is safe to ignore them.\n      if (!isI18nText(existingTNode)) {\n        if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) {\n          // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n          // then add the `insertBeforeIndex`.\n          setInsertBeforeIndex(existingTNode, newTNode.index);\n        }\n      }\n    }\n  }\n}\nfunction isI18nText(tNode) {\n  return !(tNode.type & 64 /* TNodeType.Placeholder */);\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n  return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\nfunction getInsertBeforeIndex(tNode) {\n  const index = tNode.insertBeforeIndex;\n  return Array.isArray(index) ? index[0] : index;\n}\nfunction setInsertBeforeIndex(tNode, value) {\n  const index = tNode.insertBeforeIndex;\n  if (Array.isArray(index)) {\n    // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n    index[0] = value;\n  } else {\n    setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n    tNode.insertBeforeIndex = value;\n  }\n}\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nfunction getTIcu(tView, index) {\n  const value = tView.data[index];\n  if (value === null || typeof value === 'string') return null;\n  if (ngDevMode && !(value.hasOwnProperty('tView') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n    throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n  }\n  // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n  // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n  // will be just two cases which fits into the browser inline cache (inline cache can take up to\n  // 4)\n  const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value : value.value;\n  ngDevMode && assertTIcu(tIcu);\n  return tIcu;\n}\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nfunction setTIcu(tView, index, tIcu) {\n  const tNode = tView.data[index];\n  ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty('tView'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n  if (tNode === null) {\n    tView.data[index] = tIcu;\n  } else {\n    ngDevMode && assertTNodeType(tNode, 32 /* TNodeType.Icu */);\n    tNode.value = tIcu;\n  }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n  ngDevMode && assertTNode(tNode);\n  let insertBeforeIndex = tNode.insertBeforeIndex;\n  if (insertBeforeIndex === null) {\n    setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n    insertBeforeIndex = tNode.insertBeforeIndex = [null /* may be updated to number later */, index];\n  } else {\n    assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n    insertBeforeIndex.push(index);\n  }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n  const tNode = createTNodeAtIndex(tView, index, 64 /* TNodeType.Placeholder */, null, null);\n  addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n  return tNode;\n}\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n  const currentCase = lView[tIcu.currentCaseLViewIndex];\n  return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n  return mergedCode >>> 17 /* IcuCreateOpCode.SHIFT_PARENT */;\n}\n\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n  return (mergedCode & 131070 /* IcuCreateOpCode.MASK_REF */) >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\n\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n  return mergedCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */;\n}\n\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n  ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n  ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n  return opCode | parentIdx << 17 /* IcuCreateOpCode.SHIFT_PARENT */ | refIdx << 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nfunction setMaskBit(hasChange) {\n  if (hasChange) {\n    changeMask = changeMask | 1 << Math.min(changeMaskCounter, 31);\n  }\n  changeMaskCounter++;\n}\nfunction applyI18n(tView, lView, index) {\n  if (changeMaskCounter > 0) {\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const tI18n = tView.data[index];\n    // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n    const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;\n    const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n    applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n  }\n  // Reset changeMask & maskBit to default for the next update cycle\n  changeMask = 0b0;\n  changeMaskCounter = 0;\n}\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n *     a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nfunction applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n  const renderer = lView[RENDERER];\n  for (let i = 0; i < createOpCodes.length; i++) {\n    const opCode = createOpCodes[i++];\n    const text = createOpCodes[i];\n    const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n    const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n    const index = opCode >>> I18nCreateOpCode.SHIFT;\n    let rNode = lView[index];\n    if (rNode === null) {\n      // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n      // case which was already instantiated, no need to create new DOM nodes.\n      rNode = lView[index] = isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n    }\n    if (appendNow && parentRNode !== null) {\n      nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n    }\n  }\n}\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nfunction applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n  ngDevMode && assertDomNode(anchorRNode);\n  const renderer = lView[RENDERER];\n  // `rootIdx` represents the node into which all inserts happen.\n  let rootIdx = null;\n  // `rootRNode` represents the real node into which we insert. This can be different from\n  // `lView[rootIdx]` if we have projection.\n  //  - null we don't have a parent (as can be the case in when we are inserting into a root of\n  //    LView which has no parent.)\n  //  - `RElement` The element representing the root after taking projection into account.\n  let rootRNode;\n  for (let i = 0; i < mutableOpCodes.length; i++) {\n    const opCode = mutableOpCodes[i];\n    if (typeof opCode == 'string') {\n      const textNodeIndex = mutableOpCodes[++i];\n      if (lView[textNodeIndex] === null) {\n        ngDevMode && ngDevMode.rendererCreateTextNode++;\n        ngDevMode && assertIndexInRange(lView, textNodeIndex);\n        lView[textNodeIndex] = createTextNode(renderer, opCode);\n      }\n    } else if (typeof opCode == 'number') {\n      switch (opCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */) {\n        case 0 /* IcuCreateOpCode.AppendChild */:\n          const parentIdx = getParentFromIcuCreateOpCode(opCode);\n          if (rootIdx === null) {\n            // The first operation should save the `rootIdx` because the first operation\n            // must insert into the root. (Only subsequent operations can insert into a dynamic\n            // parent)\n            rootIdx = parentIdx;\n            rootRNode = nativeParentNode(renderer, anchorRNode);\n          }\n          let insertInFrontOf;\n          let parentRNode;\n          if (parentIdx === rootIdx) {\n            insertInFrontOf = anchorRNode;\n            parentRNode = rootRNode;\n          } else {\n            insertInFrontOf = null;\n            parentRNode = unwrapRNode(lView[parentIdx]);\n          }\n          // FIXME(misko): Refactor with `processI18nText`\n          if (parentRNode !== null) {\n            // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n            // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n            // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n            // get picked up and added.\n            ngDevMode && assertDomNode(parentRNode);\n            const refIdx = getRefFromIcuCreateOpCode(opCode);\n            ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n            // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n            // which can't have components.\n            const child = lView[refIdx];\n            ngDevMode && assertDomNode(child);\n            nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n            const tIcu = getTIcu(tView, refIdx);\n            if (tIcu !== null && typeof tIcu === 'object') {\n              // If we just added a comment node which has ICU then that ICU may have already been\n              // rendered and therefore we need to re-add it here.\n              ngDevMode && assertTIcu(tIcu);\n              const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n              if (caseIndex !== null) {\n                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n              }\n            }\n          }\n          break;\n        case 1 /* IcuCreateOpCode.Attr */:\n          const elementNodeIndex = opCode >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n          const attrName = mutableOpCodes[++i];\n          const attrValue = mutableOpCodes[++i];\n          // This code is used for ICU expressions only, since we don't support\n          // directives/components in ICUs, we don't need to worry about inputs here\n          setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n          break;\n        default:\n          if (ngDevMode) {\n            throw new RuntimeError(700 /* RuntimeErrorCode.INVALID_I18N_STRUCTURE */, `Unable to determine the type of mutate operation for \"${opCode}\"`);\n          }\n      }\n    } else {\n      switch (opCode) {\n        case ICU_MARKER:\n          const commentValue = mutableOpCodes[++i];\n          const commentNodeIndex = mutableOpCodes[++i];\n          if (lView[commentNodeIndex] === null) {\n            ngDevMode && assertEqual(typeof commentValue, 'string', `Expected \"${commentValue}\" to be a comment node value`);\n            ngDevMode && ngDevMode.rendererCreateComment++;\n            ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n            const commentRNode = lView[commentNodeIndex] = createCommentNode(renderer, commentValue);\n            // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n            attachPatchData(commentRNode, lView);\n          }\n          break;\n        case ELEMENT_MARKER:\n          const tagName = mutableOpCodes[++i];\n          const elementNodeIndex = mutableOpCodes[++i];\n          if (lView[elementNodeIndex] === null) {\n            ngDevMode && assertEqual(typeof tagName, 'string', `Expected \"${tagName}\" to be an element node tag name`);\n            ngDevMode && ngDevMode.rendererCreateElement++;\n            ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n            const elementRNode = lView[elementNodeIndex] = createElementNode(renderer, tagName, null);\n            // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n            attachPatchData(elementRNode, lView);\n          }\n          break;\n        default:\n          ngDevMode && throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n      }\n    }\n  }\n}\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n *     `bindingsStartIndex`)\n */\nfunction applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n  for (let i = 0; i < updateOpCodes.length; i++) {\n    // bit code to check if we should apply the next update\n    const checkBit = updateOpCodes[i];\n    // Number of opCodes to skip until next set of update codes\n    const skipCodes = updateOpCodes[++i];\n    if (checkBit & changeMask) {\n      // The value has been updated since last checked\n      let value = '';\n      for (let j = i + 1; j <= i + skipCodes; j++) {\n        const opCode = updateOpCodes[j];\n        if (typeof opCode == 'string') {\n          value += opCode;\n        } else if (typeof opCode == 'number') {\n          if (opCode < 0) {\n            // Negative opCode represent `i18nExp` values offset.\n            value += renderStringify(lView[bindingsStartIndex - opCode]);\n          } else {\n            const nodeIndex = opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n            switch (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) {\n              case 1 /* I18nUpdateOpCode.Attr */:\n                const propName = updateOpCodes[++j];\n                const sanitizeFn = updateOpCodes[++j];\n                const tNodeOrTagName = tView.data[nodeIndex];\n                ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n                if (typeof tNodeOrTagName === 'string') {\n                  // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n                  // not have TNode), in which case we know that there are no directives, and hence\n                  // we use attribute setting.\n                  setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n                } else {\n                  elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n                }\n                break;\n              case 0 /* I18nUpdateOpCode.Text */:\n                const rText = lView[nodeIndex];\n                rText !== null && updateTextNode(lView[RENDERER], rText, value);\n                break;\n              case 2 /* I18nUpdateOpCode.IcuSwitch */:\n                applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n                break;\n              case 3 /* I18nUpdateOpCode.IcuUpdate */:\n                applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n                break;\n            }\n          }\n        }\n      }\n    } else {\n      const opCode = updateOpCodes[i + 1];\n      if (opCode > 0 && (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) === 3 /* I18nUpdateOpCode.IcuUpdate */) {\n        // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n        // we still need to execute `icuUpdateCase` because the case has changed recently due to\n        // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n        // pairs.)\n        const nodeIndex = opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n        const tIcu = getTIcu(tView, nodeIndex);\n        const currentIndex = lView[tIcu.currentCaseLViewIndex];\n        if (currentIndex < 0) {\n          applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n        }\n      }\n    }\n    i += skipCodes;\n  }\n}\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n  ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n  let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n  if (activeCaseIndex !== null) {\n    let mask = changeMask;\n    if (activeCaseIndex < 0) {\n      // Clear the flag.\n      // Negative number means that the ICU was freshly created and we need to force the update.\n      activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n      // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n      mask = -1;\n    }\n    applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n  }\n}\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView, tIcu, lView, value) {\n  // Rebuild a new case for this ICU\n  const caseIndex = getCaseIndex(tIcu, value);\n  let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n  if (activeCaseIndex !== caseIndex) {\n    applyIcuSwitchCaseRemove(tView, tIcu, lView);\n    lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n    if (caseIndex !== null) {\n      // Add the nodes for the new case\n      const anchorRNode = lView[tIcu.anchorIdx];\n      if (anchorRNode) {\n        ngDevMode && assertDomNode(anchorRNode);\n        applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n      }\n    }\n  }\n}\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n  let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n  if (activeCaseIndex !== null) {\n    const removeCodes = tIcu.remove[activeCaseIndex];\n    for (let i = 0; i < removeCodes.length; i++) {\n      const nodeOrIcuIndex = removeCodes[i];\n      if (nodeOrIcuIndex > 0) {\n        // Positive numbers are `RNode`s.\n        const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n        rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n      } else {\n        // Negative numbers are ICUs\n        applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);\n      }\n    }\n  }\n}\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression, bindingValue) {\n  let index = icuExpression.cases.indexOf(bindingValue);\n  if (index === -1) {\n    switch (icuExpression.type) {\n      case 1 /* IcuType.plural */:\n        {\n          const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n          index = icuExpression.cases.indexOf(resolvedCase);\n          if (index === -1 && resolvedCase !== 'other') {\n            index = icuExpression.cases.indexOf('other');\n          }\n          break;\n        }\n      case 0 /* IcuType.select */:\n        {\n          index = icuExpression.cases.indexOf('other');\n          break;\n        }\n    }\n  }\n  return index === -1 ? null : index;\n}\nfunction loadIcuContainerVisitor() {\n  const _stack = [];\n  let _index = -1;\n  let _lView;\n  let _removes;\n  /**\n   * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n   * to determine which root belong to the ICU.\n   *\n   * Example of usage.\n   * ```\n   * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n   * let rNode: RNode|null;\n   * while(rNode = nextRNode()) {\n   *   console.log(rNode);\n   * }\n   * ```\n   *\n   * @param tIcuContainerNode Current `TIcuContainerNode`\n   * @param lView `LView` where the `RNode`s should be looked up.\n   */\n  function icuContainerIteratorStart(tIcuContainerNode, lView) {\n    _lView = lView;\n    while (_stack.length) _stack.pop();\n    ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n    enterIcu(tIcuContainerNode.value, lView);\n    return icuContainerIteratorNext;\n  }\n  function enterIcu(tIcu, lView) {\n    _index = 0;\n    const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n    if (currentCase !== null) {\n      ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n      _removes = tIcu.remove[currentCase];\n    } else {\n      _removes = EMPTY_ARRAY;\n    }\n  }\n  function icuContainerIteratorNext() {\n    if (_index < _removes.length) {\n      const removeOpCode = _removes[_index++];\n      ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n      if (removeOpCode > 0) {\n        const rNode = _lView[removeOpCode];\n        ngDevMode && assertDomNode(rNode);\n        return rNode;\n      } else {\n        _stack.push(_index, _removes);\n        // ICUs are represented by negative indices\n        const tIcuIndex = ~removeOpCode;\n        const tIcu = _lView[TVIEW].data[tIcuIndex];\n        ngDevMode && assertTIcu(tIcu);\n        enterIcu(tIcu, _lView);\n        return icuContainerIteratorNext();\n      }\n    } else {\n      if (_stack.length === 0) {\n        return null;\n      } else {\n        _removes = _stack.pop();\n        _index = _stack.pop();\n        return icuContainerIteratorNext();\n      }\n    }\n  }\n  return icuContainerIteratorStart;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction i18nCreateOpCodesToString(opcodes) {\n  const createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n  let lines = [];\n  for (let i = 0; i < createOpCodes.length; i++) {\n    const opCode = createOpCodes[i++];\n    const text = createOpCodes[i];\n    const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n    const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n    const index = opCode >>> I18nCreateOpCode.SHIFT;\n    lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`);\n    if (appendNow) {\n      lines.push(`parent.appendChild(lView[${index}]);`);\n    }\n  }\n  return lines;\n}\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nfunction i18nUpdateOpCodesToString(opcodes) {\n  const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n  let lines = [];\n  function consumeOpCode(value) {\n    const ref = value >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n    const opCode = value & 3 /* I18nUpdateOpCode.MASK_OPCODE */;\n    switch (opCode) {\n      case 0 /* I18nUpdateOpCode.Text */:\n        return `(lView[${ref}] as Text).textContent = $$$`;\n      case 1 /* I18nUpdateOpCode.Attr */:\n        const attrName = parser.consumeString();\n        const sanitizationFn = parser.consumeFunction();\n        const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n        return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n      case 2 /* I18nUpdateOpCode.IcuSwitch */:\n        return `icuSwitchCase(${ref}, $$$)`;\n      case 3 /* I18nUpdateOpCode.IcuUpdate */:\n        return `icuUpdateCase(${ref})`;\n    }\n    throw new Error('unexpected OpCode');\n  }\n  while (parser.hasMore()) {\n    let mask = parser.consumeNumber();\n    let size = parser.consumeNumber();\n    const end = parser.i + size;\n    const statements = [];\n    let statement = '';\n    while (parser.i < end) {\n      let value = parser.consumeNumberOrString();\n      if (typeof value === 'string') {\n        statement += value;\n      } else if (value < 0) {\n        // Negative numbers are ref indexes\n        // Here `i` refers to current binding index. It is to signify that the value is relative,\n        // rather than absolute.\n        statement += '${lView[i' + value + ']}';\n      } else {\n        // Positive numbers are operations.\n        const opCodeText = consumeOpCode(value);\n        statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n        statement = '';\n      }\n    }\n    lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n  }\n  return lines;\n}\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction icuCreateOpCodesToString(opcodes) {\n  const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n  let lines = [];\n  function consumeOpCode(opCode) {\n    const parent = getParentFromIcuCreateOpCode(opCode);\n    const ref = getRefFromIcuCreateOpCode(opCode);\n    switch (getInstructionFromIcuCreateOpCode(opCode)) {\n      case 0 /* IcuCreateOpCode.AppendChild */:\n        return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n      case 1 /* IcuCreateOpCode.Attr */:\n        return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n    }\n    throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n  }\n  let lastRef = -1;\n  while (parser.hasMore()) {\n    let value = parser.consumeNumberStringOrMarker();\n    if (value === ICU_MARKER) {\n      const text = parser.consumeString();\n      lastRef = parser.consumeNumber();\n      lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n    } else if (value === ELEMENT_MARKER) {\n      const text = parser.consumeString();\n      lastRef = parser.consumeNumber();\n      lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n    } else if (typeof value === 'string') {\n      lastRef = parser.consumeNumber();\n      lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n    } else if (typeof value === 'number') {\n      const line = consumeOpCode(value);\n      line && lines.push(line);\n    } else {\n      throw new Error('Unexpected value');\n    }\n  }\n  return lines;\n}\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nfunction i18nRemoveOpCodesToString(opcodes) {\n  const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n  let lines = [];\n  for (let i = 0; i < removeCodes.length; i++) {\n    const nodeOrIcuIndex = removeCodes[i];\n    if (nodeOrIcuIndex > 0) {\n      // Positive numbers are `RNode`s.\n      lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n    } else {\n      // Negative numbers are ICUs\n      lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n    }\n  }\n  return lines;\n}\nclass OpCodeParser {\n  constructor(codes) {\n    this.i = 0;\n    this.codes = codes;\n  }\n  hasMore() {\n    return this.i < this.codes.length;\n  }\n  consumeNumber() {\n    let value = this.codes[this.i++];\n    assertNumber(value, 'expecting number in OpCode');\n    return value;\n  }\n  consumeString() {\n    let value = this.codes[this.i++];\n    assertString(value, 'expecting string in OpCode');\n    return value;\n  }\n  consumeFunction() {\n    let value = this.codes[this.i++];\n    if (value === null || typeof value === 'function') {\n      return value;\n    }\n    throw new Error('expecting function in OpCode');\n  }\n  consumeNumberOrString() {\n    let value = this.codes[this.i++];\n    if (typeof value === 'string') {\n      return value;\n    }\n    assertNumber(value, 'expecting number or string in OpCode');\n    return value;\n  }\n  consumeNumberStringOrMarker() {\n    let value = this.codes[this.i++];\n    if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER || value == ELEMENT_MARKER) {\n      return value;\n    }\n    assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n    return value;\n  }\n}\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n  return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter(obj, debugGetter) {\n  if (ngDevMode) {\n    Object.defineProperty(obj, 'debug', {\n      get: debugGetter,\n      enumerable: false\n    });\n  } else {\n    throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n  }\n}\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n *     `ngIf`) (-1 otherwise)\n */\nfunction i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n  const rootTNode = getCurrentParentTNode();\n  const createOpCodes = [];\n  const updateOpCodes = [];\n  const existingTNodeStack = [[]];\n  if (ngDevMode) {\n    attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n  message = getTranslationForTemplate(message, subTemplateIndex);\n  const msgParts = replaceNgsp(message).split(PH_REGEXP);\n  for (let i = 0; i < msgParts.length; i++) {\n    let value = msgParts[i];\n    if ((i & 1) === 0) {\n      // Even indexes are text (including bindings & ICU expressions)\n      const parts = i18nParseTextIntoPartsAndICU(value);\n      for (let j = 0; j < parts.length; j++) {\n        let part = parts[j];\n        if ((j & 1) === 0) {\n          // `j` is odd therefore `part` is string\n          const text = part;\n          ngDevMode && assertString(text, 'Parsed ICU part should be string');\n          if (text !== '') {\n            i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n          }\n        } else {\n          // `j` is Even therefor `part` is an `ICUExpression`\n          const icuExpression = part;\n          // Verify that ICU expression has the right shape. Translations might contain invalid\n          // constructions (while original messages were correct), so ICU parsing at runtime may\n          // not succeed (thus `icuExpression` remains a string).\n          // Note: we intentionally retain the error here by not using `ngDevMode`, because\n          // the value can change based on the locale and users aren't guaranteed to hit\n          // an invalid string while they're developing.\n          if (typeof icuExpression !== 'object') {\n            throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n          }\n          const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n          const icuNodeIndex = icuContainerTNode.index;\n          ngDevMode && assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n          icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n        }\n      }\n    } else {\n      // Odd indexes are placeholders (elements and sub-templates)\n      // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n      const isClosing = value.charCodeAt(0) === 47 /* CharCode.SLASH */;\n      const type = value.charCodeAt(isClosing ? 1 : 0);\n      ngDevMode && assertOneOf(type, 42 /* CharCode.STAR */, 35 /* CharCode.HASH */);\n      const index = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));\n      if (isClosing) {\n        existingTNodeStack.shift();\n        setCurrentTNode(getCurrentParentTNode(), false);\n      } else {\n        const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n        existingTNodeStack.unshift([]);\n        setCurrentTNode(tNode, true);\n      }\n    }\n  }\n  tView.data[index] = {\n    create: createOpCodes,\n    update: updateOpCodes\n  };\n}\n/**\n * Allocate space in i18n Range add create OpCode instruction to create a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n *     added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n  const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n  let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n  let parentTNode = getCurrentParentTNode();\n  if (rootTNode === parentTNode) {\n    // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n    // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n    // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n    parentTNode = null;\n  }\n  if (parentTNode === null) {\n    // If we don't have a parent that means that we can eagerly add nodes.\n    // If we have a parent than these nodes can't be added now (as the parent has not been created\n    // yet) and instead the `parentTNode` is responsible for adding it. See\n    // `TNode.insertBeforeIndex`\n    opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n  }\n  if (isICU) {\n    opCode |= I18nCreateOpCode.COMMENT;\n    ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n  }\n  createOpCodes.push(opCode, text === null ? '' : text);\n  // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n  // bindings are.\n  const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* TNodeType.Icu */ : 1 /* TNodeType.Text */, text === null ? ngDevMode ? '{{?}}' : '' : text, null);\n  addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n  const tNodeIdx = tNode.index;\n  setCurrentTNode(tNode, false /* Text nodes are self closing */);\n  if (parentTNode !== null && rootTNode !== parentTNode) {\n    // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n    // We have to make sure to add ourselves to the parent.\n    setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n  }\n  return tNode;\n}\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n *    - bindings => allocate space in i18n range of `LView` to store the binding value.\n *    - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n *     be added as part of the `i18nStart` instruction or as part of the\n *     `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n  const hasBinding = text.match(BINDING_REGEXP);\n  const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n  if (hasBinding) {\n    generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n  }\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView, index, values) {\n  const previousElement = getCurrentTNode();\n  const previousElementIndex = previousElement.index;\n  const updateOpCodes = [];\n  if (ngDevMode) {\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n  if (tView.firstCreatePass && tView.data[index] === null) {\n    for (let i = 0; i < values.length; i += 2) {\n      const attrName = values[i];\n      const message = values[i + 1];\n      if (message !== '') {\n        // Check if attribute value contains an ICU and throw an error if that's the case.\n        // ICUs in element attributes are not supported.\n        // Note: we intentionally retain the error here by not using `ngDevMode`, because\n        // the `value` can change based on the locale and users aren't guaranteed to hit\n        // an invalid string while they're developing.\n        if (ICU_REGEXP.test(message)) {\n          throw new Error(`ICU expressions are not supported in attributes. Message: \"${message}\".`);\n        }\n        // i18n attributes that hit this code path are guaranteed to have bindings, because\n        // the compiler treats static i18n attributes as regular attribute bindings.\n        // Since this may not be the first i18n attribute on this element we need to pass in how\n        // many previous bindings there have already been.\n        generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n      }\n    }\n    tView.data[index] = updateOpCodes;\n  }\n}\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n  ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n  const maskIndex = updateOpCodes.length; // Location of mask\n  const sizeIndex = maskIndex + 1; // location of size for skipping\n  updateOpCodes.push(null, null); // Alloc space for mask and size\n  const startIndex = maskIndex + 2; // location of first allocation.\n  if (ngDevMode) {\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n  const textParts = str.split(BINDING_REGEXP);\n  let mask = 0;\n  for (let j = 0; j < textParts.length; j++) {\n    const textValue = textParts[j];\n    if (j & 1) {\n      // Odd indexes are bindings\n      const bindingIndex = bindingStart + parseInt(textValue, 10);\n      updateOpCodes.push(-1 - bindingIndex);\n      mask = mask | toMaskBit(bindingIndex);\n    } else if (textValue !== '') {\n      // Even indexes are text\n      updateOpCodes.push(textValue);\n    }\n  }\n  updateOpCodes.push(destinationNode << 2 /* I18nUpdateOpCode.SHIFT_REF */ | (attrName ? 1 /* I18nUpdateOpCode.Attr */ : 0 /* I18nUpdateOpCode.Text */));\n  if (attrName) {\n    updateOpCodes.push(attrName, sanitizeFn);\n  }\n  updateOpCodes[maskIndex] = mask;\n  updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n  return mask;\n}\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes) {\n  let count = 0;\n  for (let i = 0; i < opCodes.length; i++) {\n    const opCode = opCodes[i];\n    // Bindings are negative numbers.\n    if (typeof opCode === 'number' && opCode < 0) {\n      count++;\n    }\n  }\n  return count;\n}\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex) {\n  return 1 << Math.min(bindingIndex, 31);\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n  return subTemplateIndex === -1;\n}\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message) {\n  let match;\n  let res = '';\n  let index = 0;\n  let inTemplate = false;\n  let tagMatched;\n  while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n    if (!inTemplate) {\n      res += message.substring(index, match.index + match[0].length);\n      tagMatched = match[1];\n      inTemplate = true;\n    } else {\n      if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n        index = match.index;\n        inTemplate = false;\n      }\n    }\n  }\n  ngDevMode && assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n  res += message.slice(index);\n  return res;\n}\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nfunction getTranslationForTemplate(message, subTemplateIndex) {\n  if (isRootTemplateMessage(subTemplateIndex)) {\n    // We want the root template message, ignore all sub-templates\n    return removeInnerTemplateTranslation(message);\n  } else {\n    // We want a specific sub-template\n    const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n    const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n    return removeInnerTemplateTranslation(message.substring(start, end));\n  }\n}\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n *   - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n *   - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nfunction icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n  ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n  let bindingMask = 0;\n  const tIcu = {\n    type: icuExpression.type,\n    currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n    anchorIdx,\n    cases: [],\n    create: [],\n    remove: [],\n    update: []\n  };\n  addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n  setTIcu(tView, anchorIdx, tIcu);\n  const values = icuExpression.values;\n  for (let i = 0; i < values.length; i++) {\n    // Each value is an array of strings & other ICU expressions\n    const valueArr = values[i];\n    const nestedIcus = [];\n    for (let j = 0; j < valueArr.length; j++) {\n      const value = valueArr[j];\n      if (typeof value !== 'string') {\n        // It is an nested ICU expression\n        const icuIndex = nestedIcus.push(value) - 1;\n        // Replace nested ICU expression by a comment node\n        valueArr[j] = `<!--�${icuIndex}�-->`;\n      }\n    }\n    bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask;\n  }\n  if (bindingMask) {\n    addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n  }\n}\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern) {\n  const cases = [];\n  const values = [];\n  let icuType = 1 /* IcuType.plural */;\n  let mainBinding = 0;\n  pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n    if (type === 'select') {\n      icuType = 0 /* IcuType.select */;\n    } else {\n      icuType = 1 /* IcuType.plural */;\n    }\n\n    mainBinding = parseInt(binding.slice(1), 10);\n    return '';\n  });\n  const parts = i18nParseTextIntoPartsAndICU(pattern);\n  // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n  for (let pos = 0; pos < parts.length;) {\n    let key = parts[pos++].trim();\n    if (icuType === 1 /* IcuType.plural */) {\n      // Key can be \"=x\", we just want \"x\"\n      key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n    }\n    if (key.length) {\n      cases.push(key);\n    }\n    const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);\n    if (cases.length > values.length) {\n      values.push(blocks);\n    }\n  }\n  // TODO(ocombe): support ICU expressions in attributes, see #21615\n  return {\n    type: icuType,\n    mainBinding: mainBinding,\n    cases,\n    values\n  };\n}\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n *   - odd positions: `string` => text between ICU expressions\n *   - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nfunction i18nParseTextIntoPartsAndICU(pattern) {\n  if (!pattern) {\n    return [];\n  }\n  let prevPos = 0;\n  const braceStack = [];\n  const results = [];\n  const braces = /[{}]/g;\n  // lastIndex doesn't get set to 0 so we have to.\n  braces.lastIndex = 0;\n  let match;\n  while (match = braces.exec(pattern)) {\n    const pos = match.index;\n    if (match[0] == '}') {\n      braceStack.pop();\n      if (braceStack.length == 0) {\n        // End of the block.\n        const block = pattern.substring(prevPos, pos);\n        if (ICU_BLOCK_REGEXP.test(block)) {\n          results.push(parseICUBlock(block));\n        } else {\n          results.push(block);\n        }\n        prevPos = pos + 1;\n      }\n    } else {\n      if (braceStack.length == 0) {\n        const substring = pattern.substring(prevPos, pos);\n        results.push(substring);\n        prevPos = pos + 1;\n      }\n      braceStack.push('{');\n    }\n  }\n  const substring = pattern.substring(prevPos);\n  results.push(substring);\n  return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nfunction parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n  const create = [];\n  const remove = [];\n  const update = [];\n  if (ngDevMode) {\n    attachDebugGetter(create, icuCreateOpCodesToString);\n    attachDebugGetter(remove, i18nRemoveOpCodesToString);\n    attachDebugGetter(update, i18nUpdateOpCodesToString);\n  }\n  tIcu.cases.push(caseName);\n  tIcu.create.push(create);\n  tIcu.remove.push(remove);\n  tIcu.update.push(update);\n  const inertBodyHelper = getInertBodyHelper(getDocument());\n  const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n  ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n  const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n  if (inertRootNode) {\n    return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n  } else {\n    return 0;\n  }\n}\nfunction walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n  let bindingMask = 0;\n  let currentNode = parentNode.firstChild;\n  while (currentNode) {\n    const newIndex = allocExpando(tView, lView, 1, null);\n    switch (currentNode.nodeType) {\n      case Node.ELEMENT_NODE:\n        const element = currentNode;\n        const tagName = element.tagName.toLowerCase();\n        if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n          addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n          tView.data[newIndex] = tagName;\n          const elAttrs = element.attributes;\n          for (let i = 0; i < elAttrs.length; i++) {\n            const attr = elAttrs.item(i);\n            const lowerAttrName = attr.name.toLowerCase();\n            const hasBinding = !!attr.value.match(BINDING_REGEXP);\n            // we assume the input string is safe, unless it's using a binding\n            if (hasBinding) {\n              if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                if (URI_ATTRS[lowerAttrName]) {\n                  generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n                } else {\n                  generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n                }\n              } else {\n                ngDevMode && console.warn(`WARNING: ignoring unsafe attribute value ` + `${lowerAttrName} on element ${tagName} ` + `(see ${XSS_SECURITY_URL})`);\n              }\n            } else {\n              addCreateAttribute(create, newIndex, attr);\n            }\n          }\n          // Parse the children of this node (if any)\n          bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask;\n          addRemoveNode(remove, newIndex, depth);\n        }\n        break;\n      case Node.TEXT_NODE:\n        const value = currentNode.textContent || '';\n        const hasBinding = value.match(BINDING_REGEXP);\n        addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n        addRemoveNode(remove, newIndex, depth);\n        if (hasBinding) {\n          bindingMask = generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n        }\n        break;\n      case Node.COMMENT_NODE:\n        // Check if the comment node is a placeholder for a nested ICU\n        const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n        if (isNestedIcu) {\n          const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n          const icuExpression = nestedIcus[nestedIcuIndex];\n          // Create the comment node that will anchor the ICU expression\n          addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex);\n          icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n          addRemoveNestedIcu(remove, newIndex, depth);\n        }\n        break;\n    }\n    currentNode = currentNode.nextSibling;\n  }\n  return bindingMask;\n}\nfunction addRemoveNode(remove, index, depth) {\n  if (depth === 0) {\n    remove.push(index);\n  }\n}\nfunction addRemoveNestedIcu(remove, index, depth) {\n  if (depth === 0) {\n    remove.push(~index); // remove ICU at `index`\n    remove.push(index); // remove ICU comment at `index`\n  }\n}\n\nfunction addUpdateIcuSwitch(update, icuExpression, index) {\n  update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* I18nUpdateOpCode.SHIFT_REF */ | 2 /* I18nUpdateOpCode.IcuSwitch */);\n}\n\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n  update.push(bindingMask, 1, index << 2 /* I18nUpdateOpCode.SHIFT_REF */ | 3 /* I18nUpdateOpCode.IcuUpdate */);\n}\n\nfunction addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n  if (marker !== null) {\n    create.push(marker);\n  }\n  create.push(text, createAtIdx, icuCreateOpCode(0 /* IcuCreateOpCode.AppendChild */, appendToParentIdx, createAtIdx));\n}\nfunction addCreateAttribute(create, newIndex, attr) {\n  create.push(newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */ | 1 /* IcuCreateOpCode.Attr */, attr.name, attr.value);\n}\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction i18nPostprocess(message, replacements = {}) {\n  /**\n   * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n   *\n   * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n   * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n   * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n   * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n   * front of �#6�. The post processing step restores the right order by keeping track of the\n   * template id stack and looks for placeholders that belong to the currently active template.\n   */\n  let result = message;\n  if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n    const matches = {};\n    const templateIdsStack = [ROOT_TEMPLATE_ID];\n    result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {\n      const content = phs || tmpl;\n      const placeholders = matches[content] || [];\n      if (!placeholders.length) {\n        content.split('|').forEach(placeholder => {\n          const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n          const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n          const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n          placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n        });\n        matches[content] = placeholders;\n      }\n      if (!placeholders.length) {\n        throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n      }\n      const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n      let idx = 0;\n      // find placeholder index that matches current template id\n      for (let i = 0; i < placeholders.length; i++) {\n        if (placeholders[i][0] === currentTemplateId) {\n          idx = i;\n          break;\n        }\n      }\n      // update template id stack based on the current tag extracted\n      const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n      if (isCloseTemplateTag) {\n        templateIdsStack.pop();\n      } else if (currentTemplateId !== templateId) {\n        templateIdsStack.push(templateId);\n      }\n      // remove processed tag from the list\n      placeholders.splice(idx, 1);\n      return placeholder;\n    });\n  }\n  // return current result if no replacements specified\n  if (!Object.keys(replacements).length) {\n    return result;\n  }\n  /**\n   * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n   */\n  result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => {\n    return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n  });\n  /**\n   * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n   */\n  result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => {\n    return replacements.hasOwnProperty(key) ? replacements[key] : match;\n  });\n  /**\n   * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n   * multiple ICUs have the same placeholder name\n   */\n  result = result.replace(PP_ICUS_REGEXP, (match, key) => {\n    if (replacements.hasOwnProperty(key)) {\n      const list = replacements[key];\n      if (!list.length) {\n        throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n      }\n      return list.shift();\n    }\n    return match;\n  });\n  return result;\n}\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) {\n  const tView = getTView();\n  const lView = getLView();\n  const adjustedIndex = HEADER_OFFSET + index;\n  ngDevMode && assertDefined(tView, `tView should be defined`);\n  const message = getConstant(tView.consts, messageIndex);\n  const parentTNode = getCurrentParentTNode();\n  if (tView.firstCreatePass) {\n    i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n  }\n  const tI18n = tView.data[adjustedIndex];\n  const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n  const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n  // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n  // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n  const insertInFrontOf = parentTNode && parentTNode.type & 8 /* TNodeType.ElementContainer */ ? lView[parentTNode.index] : null;\n  applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n  setInI18nBlock(true);\n}\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nEnd() {\n  setInI18nBlock(false);\n}\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n  ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n  ɵɵi18nEnd();\n}\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nfunction ɵɵi18nAttributes(index, attrsIndex) {\n  const tView = getTView();\n  ngDevMode && assertDefined(tView, `tView should be defined`);\n  const attrs = getConstant(tView.consts, attrsIndex);\n  i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵi18nExp(value) {\n  const lView = getLView();\n  setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n  return ɵɵi18nExp;\n}\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nApply(index) {\n  applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction ɵɵi18nPostprocess(message, replacements = {}) {\n  return i18nPostprocess(message, replacements);\n}\n\n/*\n * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nfunction providersResolver(def, providers, viewProviders) {\n  const tView = getTView();\n  if (tView.firstCreatePass) {\n    const isComponent = isComponentDef(def);\n    // The list of view providers is processed first, and the flags are updated\n    resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n    // Then, the list of providers is processed, and the flags are updated\n    resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n  }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n  provider = resolveForwardRef(provider);\n  if (Array.isArray(provider)) {\n    // Recursively call `resolveProvider`\n    // Recursion is OK in this case because this code will not be in hot-path once we implement\n    // cloning of the initial state.\n    for (let i = 0; i < provider.length; i++) {\n      resolveProvider(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n    }\n  } else {\n    const tView = getTView();\n    const lView = getLView();\n    let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n    let providerFactory = providerToFactory(provider);\n    const tNode = getCurrentTNode();\n    const beginIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n    const endIndex = tNode.directiveStart;\n    const cptViewProvidersCount = tNode.providerIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n    if (isTypeProvider(provider) || !provider.multi) {\n      // Single provider case: the factory is created and pushed immediately\n      const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n      const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n      if (existingFactoryIndex === -1) {\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n        registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n        if (isViewProvider) {\n          tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n        }\n\n        lInjectablesBlueprint.push(factory);\n        lView.push(factory);\n      } else {\n        lInjectablesBlueprint[existingFactoryIndex] = factory;\n        lView[existingFactoryIndex] = factory;\n      }\n    } else {\n      // Multi provider case:\n      // We create a multi factory which is going to aggregate all the values.\n      // Since the output of such a factory depends on content or view injection,\n      // we create two of them, which are linked together.\n      //\n      // The first one (for view providers) is always in the first block of the injectables array,\n      // and the second one (for providers) is always in the second block.\n      // This is important because view providers have higher priority. When a multi token\n      // is being looked up, the view providers should be found first.\n      // Note that it is not possible to have a multi factory in the third block (directive block).\n      //\n      // The algorithm to process multi providers is as follows:\n      // 1) If the multi provider comes from the `viewProviders` of the component:\n      //   a) If the special view providers factory doesn't exist, it is created and pushed.\n      //   b) Else, the multi provider is added to the existing multi factory.\n      // 2) If the multi provider comes from the `providers` of the component or of another\n      // directive:\n      //   a) If the multi factory doesn't exist, it is created and provider pushed into it.\n      //      It is also linked to the multi factory for view providers, if it exists.\n      //   b) Else, the multi provider is added to the existing multi factory.\n      const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n      const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n      const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n      const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n      if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n        // Cases 1.a and 2.a\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n        const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n        if (!isViewProvider && doesViewProvidersFactoryExist) {\n          lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n        }\n        registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n        if (isViewProvider) {\n          tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n        }\n\n        lInjectablesBlueprint.push(factory);\n        lView.push(factory);\n      } else {\n        // Cases 1.b and 2.b\n        const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n        registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n      }\n      if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n        lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n      }\n    }\n  }\n}\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n  const providerIsTypeProvider = isTypeProvider(provider);\n  const providerIsClassProvider = isClassProvider(provider);\n  if (providerIsTypeProvider || providerIsClassProvider) {\n    // Resolve forward references as `useClass` can hold a forward reference.\n    const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n    const prototype = classToken.prototype;\n    const ngOnDestroy = prototype.ngOnDestroy;\n    if (ngOnDestroy) {\n      const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n      if (!providerIsTypeProvider && provider.multi) {\n        ngDevMode && assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n        const existingCallbacksIndex = hooks.indexOf(contextIndex);\n        if (existingCallbacksIndex === -1) {\n          hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n        } else {\n          hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n        }\n      } else {\n        hooks.push(contextIndex, ngOnDestroy);\n      }\n    }\n  }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n  if (isComponentProvider) {\n    multiFactory.componentProviders++;\n  }\n  return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item, arr, begin, end) {\n  for (let i = begin; i < end; i++) {\n    if (arr[i] === item) return i;\n  }\n  return -1;\n}\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(_, tData, lData, tNode) {\n  return multiResolve(this.multi, []);\n}\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n  const factories = this.multi;\n  let result;\n  if (this.providerFactory) {\n    const componentCount = this.providerFactory.componentProviders;\n    const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n    // Copy the section of the array which contains `multi` `providers` from the component\n    result = multiProviders.slice(0, componentCount);\n    // Insert the `viewProvider` instances.\n    multiResolve(factories, result);\n    // Copy the section of the array which contains `multi` `providers` from other directives\n    for (let i = componentCount; i < multiProviders.length; i++) {\n      result.push(multiProviders[i]);\n    }\n  } else {\n    result = [];\n    // Insert the `viewProvider` instances.\n    multiResolve(factories, result);\n  }\n  return result;\n}\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories, result) {\n  for (let i = 0; i < factories.length; i++) {\n    const factory = factories[i];\n    result.push(factory());\n  }\n  return result;\n}\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n  const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n  factory.multi = [];\n  factory.index = index;\n  factory.componentProviders = 0;\n  multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n  return factory;\n}\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n *   constructor(private greeter: GreeterDE) {}\n *\n *   static ɵcmp = defineComponent({\n *     type: ComponentWithProviders,\n *     selectors: [['component-with-providers']],\n *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n *    decls: 1,\n *    vars: 1,\n *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n *      if (fs & RenderFlags.Create) {\n *        ɵɵtext(0);\n *      }\n *      if (fs & RenderFlags.Update) {\n *        ɵɵtextInterpolate(ctx.greeter.greet());\n *      }\n *    },\n *    features: [ɵɵProvidersFeature([GreeterDE])]\n *  });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nfunction ɵɵProvidersFeature(providers, viewProviders = []) {\n  return definition => {\n    definition.providersResolver = (def, processProvidersFn) => {\n      return providersResolver(def,\n      //\n      processProvidersFn ? processProvidersFn(providers) : providers,\n      //\n      viewProviders);\n    };\n  };\n}\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nclass NgModuleRef$1 {}\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)\n * for additional context. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nclass NgModuleFactory$1 {}\n\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n *     not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nfunction createNgModule(ngModule, parentInjector) {\n  return new NgModuleRef(ngModule, parentInjector ?? null);\n}\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nconst createNgModuleRef = createNgModule;\nclass NgModuleRef extends NgModuleRef$1 {\n  constructor(ngModuleType, _parent) {\n    super();\n    this._parent = _parent;\n    // tslint:disable-next-line:require-internal-with-underscore\n    this._bootstrapComponents = [];\n    this.destroyCbs = [];\n    // When bootstrapping a module we have a dependency graph that looks like this:\n    // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n    // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n    // circular dependency which will result in a runtime error, because the injector doesn't\n    // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n    // and providing it, rather than letting the injector resolve it.\n    this.componentFactoryResolver = new ComponentFactoryResolver(this);\n    const ngModuleDef = getNgModuleDef(ngModuleType);\n    ngDevMode && assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n    this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n    this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [{\n      provide: NgModuleRef$1,\n      useValue: this\n    }, {\n      provide: ComponentFactoryResolver$1,\n      useValue: this.componentFactoryResolver\n    }], stringify(ngModuleType), new Set(['environment']));\n    // We need to resolve the injector types separately from the injector creation, because\n    // the module might be trying to use this ref in its constructor for DI which will cause a\n    // circular error that will eventually error out, because the injector isn't created yet.\n    this._r3Injector.resolveInjectorInitializers();\n    this.instance = this._r3Injector.get(ngModuleType);\n  }\n  get injector() {\n    return this._r3Injector;\n  }\n  destroy() {\n    ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n    const injector = this._r3Injector;\n    !injector.destroyed && injector.destroy();\n    this.destroyCbs.forEach(fn => fn());\n    this.destroyCbs = null;\n  }\n  onDestroy(callback) {\n    ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n    this.destroyCbs.push(callback);\n  }\n}\nclass NgModuleFactory extends NgModuleFactory$1 {\n  constructor(moduleType) {\n    super();\n    this.moduleType = moduleType;\n  }\n  create(parentInjector) {\n    return new NgModuleRef(this.moduleType, parentInjector);\n  }\n}\nclass EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {\n  constructor(providers, parent, source) {\n    super();\n    this.componentFactoryResolver = new ComponentFactoryResolver(this);\n    this.instance = null;\n    const injector = new R3Injector([...providers, {\n      provide: NgModuleRef$1,\n      useValue: this\n    }, {\n      provide: ComponentFactoryResolver$1,\n      useValue: this.componentFactoryResolver\n    }], parent || getNullInjector(), source, new Set(['environment']));\n    this.injector = injector;\n    injector.resolveInjectorInitializers();\n  }\n  destroy() {\n    this.injector.destroy();\n  }\n  onDestroy(callback) {\n    this.injector.onDestroy(callback);\n  }\n}\n/**\n * Create a new environment injector.\n *\n * Learn more about environment injectors in\n * [this guide](guide/standalone-components#environment-injectors).\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n *     messages.\n *\n * @publicApi\n */\nfunction createEnvironmentInjector(providers, parent, debugName = null) {\n  const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);\n  return adapter.injector;\n}\n\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nlet StandaloneService = /*#__PURE__*/(() => {\n  class StandaloneService {\n    constructor(_injector) {\n      this._injector = _injector;\n      this.cachedInjectors = new Map();\n    }\n    getOrCreateStandaloneInjector(componentDef) {\n      if (!componentDef.standalone) {\n        return null;\n      }\n      if (!this.cachedInjectors.has(componentDef.id)) {\n        const providers = internalImportProvidersFrom(false, componentDef.type);\n        const standaloneInjector = providers.length > 0 ? createEnvironmentInjector([providers], this._injector, `Standalone[${componentDef.type.name}]`) : null;\n        this.cachedInjectors.set(componentDef.id, standaloneInjector);\n      }\n      return this.cachedInjectors.get(componentDef.id);\n    }\n    ngOnDestroy() {\n      try {\n        for (const injector of this.cachedInjectors.values()) {\n          if (injector !== null) {\n            injector.destroy();\n          }\n        }\n      } finally {\n        this.cachedInjectors.clear();\n      }\n    }\n  }\n  /** @nocollapse */\n  StandaloneService.ɵprov = ɵɵdefineInjectable({\n    token: StandaloneService,\n    providedIn: 'environment',\n    factory: () => new StandaloneService(ɵɵinject(EnvironmentInjector))\n  });\n  /**\n   * A feature that acts as a setup code for the {@link StandaloneService}.\n   *\n   * The most important responsibility of this feature is to expose the \"getStandaloneInjector\"\n   * function (an entry points to a standalone injector creation) on a component definition object. We\n   * go through the features infrastructure to make sure that the standalone injector creation logic\n   * is tree-shakable and not included in applications that don't use standalone components.\n   *\n   * @codeGenApi\n   */\n  return StandaloneService;\n})();\nfunction ɵɵStandaloneFeature(definition) {\n  definition.getStandaloneInjector = parentInjector => {\n    return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(definition);\n  };\n}\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <div>\n *     <child-comp></child-comp>\n *   </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n *    is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getComponent(element) {\n  ngDevMode && assertDomElement(element);\n  const context = getLContext(element);\n  if (context === null) return null;\n  if (context.component === undefined) {\n    const lView = context.lView;\n    if (lView === null) {\n      return null;\n    }\n    context.component = getComponentAtNodeIndex(context.nodeIndex, lView);\n  }\n  return context.component;\n}\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n *    inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getContext(element) {\n  assertDomElement(element);\n  const context = getLContext(element);\n  const lView = context ? context.lView : null;\n  return lView === null ? null : lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n *    part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getOwningComponent(elementOrDir) {\n  const context = getLContext(elementOrDir);\n  let lView = context ? context.lView : null;\n  if (lView === null) return null;\n  let parent;\n  while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {\n    lView = parent;\n  }\n  return lView[FLAGS] & 256 /* LViewFlags.IsRoot */ ? null : lView[CONTEXT];\n}\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getRootComponents(elementOrDir) {\n  const lView = readPatchedLView(elementOrDir);\n  return lView !== null ? [getRootContext(lView)] : [];\n}\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n *    retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getInjector(elementOrDir) {\n  const context = getLContext(elementOrDir);\n  const lView = context ? context.lView : null;\n  if (lView === null) return Injector.NULL;\n  const tNode = lView[TVIEW].data[context.nodeIndex];\n  return new NodeInjector(tNode, lView);\n}\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nfunction getInjectionTokens(element) {\n  const context = getLContext(element);\n  const lView = context ? context.lView : null;\n  if (lView === null) return [];\n  const tView = lView[TVIEW];\n  const tNode = tView.data[context.nodeIndex];\n  const providerTokens = [];\n  const startIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n  const endIndex = tNode.directiveEnd;\n  for (let i = startIndex; i < endIndex; i++) {\n    let value = tView.data[i];\n    if (isDirectiveDefHack(value)) {\n      // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n      // design flaw.  We should always store same type so that we can be monomorphic. The issue\n      // is that for Components/Directives we store the def instead the type. The correct behavior\n      // is that we should always be storing injectable type in this location.\n      value = value.type;\n    }\n    providerTokens.push(value);\n  }\n  return providerTokens;\n}\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <button my-button></button>\n *   <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectives(node) {\n  // Skip text nodes because we can't have directives associated with them.\n  if (node instanceof Text) {\n    return [];\n  }\n  const context = getLContext(node);\n  const lView = context ? context.lView : null;\n  if (lView === null) {\n    return [];\n  }\n  const tView = lView[TVIEW];\n  const nodeIndex = context.nodeIndex;\n  if (!tView?.data[nodeIndex]) {\n    return [];\n  }\n  if (context.directives === undefined) {\n    context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n  }\n  // The `directives` in this case are a named array called `LComponentView`. Clone the\n  // result so we don't expose an internal data structure in the user's console.\n  return context.directives === null ? [] : [...context.directives];\n}\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectiveMetadata$1(directiveOrComponentInstance) {\n  const {\n    constructor\n  } = directiveOrComponentInstance;\n  if (!constructor) {\n    throw new Error('Unable to find the instance constructor');\n  }\n  // In case a component inherits from a directive, we may have component and directive metadata\n  // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n  const componentDef = getComponentDef(constructor);\n  if (componentDef) {\n    return {\n      inputs: componentDef.inputs,\n      outputs: componentDef.outputs,\n      encapsulation: componentDef.encapsulation,\n      changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Default\n    };\n  }\n  const directiveDef = getDirectiveDef(constructor);\n  if (directiveDef) {\n    return {\n      inputs: directiveDef.inputs,\n      outputs: directiveDef.outputs\n    };\n  }\n  return null;\n}\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n *    the local references.\n */\nfunction getLocalRefs(target) {\n  const context = getLContext(target);\n  if (context === null) return {};\n  if (context.localRefs === undefined) {\n    const lView = context.lView;\n    if (lView === null) {\n      return {};\n    }\n    context.localRefs = discoverLocalRefs(lView, context.nodeIndex);\n  }\n  return context.localRefs || {};\n}\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n *     element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getHostElement(componentOrDirective) {\n  return getLContext(componentOrDirective).native;\n}\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nfunction getRenderedText(component) {\n  const hostElement = getHostElement(component);\n  return hostElement.textContent || '';\n}\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n *   name: 'click',\n *   element: <div>,\n *   callback: () => doSomething(),\n *   useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getListeners(element) {\n  ngDevMode && assertDomElement(element);\n  const lContext = getLContext(element);\n  const lView = lContext === null ? null : lContext.lView;\n  if (lView === null) return [];\n  const tView = lView[TVIEW];\n  const lCleanup = lView[CLEANUP];\n  const tCleanup = tView.cleanup;\n  const listeners = [];\n  if (tCleanup && lCleanup) {\n    for (let i = 0; i < tCleanup.length;) {\n      const firstParam = tCleanup[i++];\n      const secondParam = tCleanup[i++];\n      if (typeof firstParam === 'string') {\n        const name = firstParam;\n        const listenerElement = unwrapRNode(lView[secondParam]);\n        const callback = lCleanup[tCleanup[i++]];\n        const useCaptureOrIndx = tCleanup[i++];\n        // if useCaptureOrIndx is boolean then report it as is.\n        // if useCaptureOrIndx is positive number then it in unsubscribe method\n        // if useCaptureOrIndx is negative number then it is a Subscription\n        const type = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';\n        const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n        if (element == listenerElement) {\n          listeners.push({\n            element,\n            name,\n            callback,\n            useCapture,\n            type\n          });\n        }\n      }\n    }\n  }\n  listeners.sort(sortListeners);\n  return listeners;\n}\nfunction sortListeners(a, b) {\n  if (a.name == b.name) return 0;\n  return a.name < b.name ? -1 : 1;\n}\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj) {\n  return obj.type !== undefined && obj.declaredInputs !== undefined && obj.findHostDirectiveDefs !== undefined;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n *       Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n  const lContext = getLContext(target);\n  const nodeIndx = lContext.nodeIndex;\n  const lView = lContext.lView;\n  ngDevMode && assertLView(lView);\n  const componentLView = lView[nodeIndx];\n  ngDevMode && assertLView(componentLView);\n  return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n  if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n    throw new Error('Expecting instance of DOM Element');\n  }\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n  return noSideEffects(() => {\n    const clazz = type;\n    if (decorators !== null) {\n      if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n        clazz.decorators.push(...decorators);\n      } else {\n        clazz.decorators = decorators;\n      }\n    }\n    if (ctorParameters !== null) {\n      // Rather than merging, clobber the existing parameters. If other projects exist which\n      // use tsickle-style annotations and reflect over them in the same way, this could\n      // cause issues, but that is vanishingly unlikely.\n      clazz.ctorParameters = ctorParameters;\n    }\n    if (propDecorators !== null) {\n      // The property decorator objects are merged as it is possible different fields have\n      // different decorator types. Decorators on individual fields are not merged, as it's\n      // also incredibly unlikely that a field will be decorated both with an Angular\n      // decorator and a non-Angular decorator that's also been downleveled.\n      if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n        clazz.propDecorators = {\n          ...clazz.propDecorators,\n          ...propDecorators\n        };\n      } else {\n        clazz.propDecorators = propDecorators;\n      }\n    }\n  });\n}\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------|                 |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots  | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n *                    ^                      ^\n *      TView.bindingStartIndex      TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex);\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n  return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n  return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n  return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n  return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated(lView, bindingIndex + 4, exp5) || different ? updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) : pureFn(exp1, exp2, exp3, exp4, exp5)) : getBinding(lView, bindingIndex + 5);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ? updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) : getBinding(lView, bindingIndex + 6);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ? updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) : getBinding(lView, bindingIndex + 7);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ? updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) : getBinding(lView, bindingIndex + 8);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n  return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n  ngDevMode && assertIndexInRange(lView, returnValueIndex);\n  const lastReturnValue = lView[returnValueIndex];\n  return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n  const bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n  const bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n  const bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n  const bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ? updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) : getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n  let bindingIndex = bindingRoot + slotOffset;\n  let different = false;\n  for (let i = 0; i < exps.length; i++) {\n    bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n  }\n  return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getPureFunctionReturnValue(lView, bindingIndex);\n}\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵpipe(index, pipeName) {\n  const tView = getTView();\n  let pipeDef;\n  const adjustedIndex = index + HEADER_OFFSET;\n  if (tView.firstCreatePass) {\n    // The `getPipeDef` throws if a pipe with a given name is not found\n    // (so we use non-null assertion below).\n    pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n    tView.data[adjustedIndex] = pipeDef;\n    if (pipeDef.onDestroy) {\n      (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n    }\n  } else {\n    pipeDef = tView.data[adjustedIndex];\n  }\n  const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n  const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n  try {\n    // DI for pipes is supposed to behave like directives when placed on a component\n    // host node, which means that we have to disable access to `viewProviders`.\n    const previousIncludeViewProviders = setIncludeViewProviders(false);\n    const pipeInstance = pipeFactory();\n    setIncludeViewProviders(previousIncludeViewProviders);\n    store(tView, getLView(), adjustedIndex, pipeInstance);\n    return pipeInstance;\n  } finally {\n    // we have to restore the injector implementation in finally, just in case the creation of the\n    // pipe throws an error.\n    setInjectImplementation(previousInjectImplementation);\n  }\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name, registry) {\n  if (registry) {\n    for (let i = registry.length - 1; i >= 0; i--) {\n      const pipeDef = registry[i];\n      if (name === pipeDef.name) {\n        return pipeDef;\n      }\n    }\n  }\n  if (ngDevMode) {\n    throw new RuntimeError(-302 /* RuntimeErrorCode.PIPE_NOT_FOUND */, getPipeNotFoundErrorMessage(name));\n  }\n}\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name) {\n  const lView = getLView();\n  const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n  const context = declarationLView[CONTEXT];\n  const hostIsStandalone = isHostComponentStandalone(lView);\n  const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n  const verifyMessage = `Verify that it is ${hostIsStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'declared or imported in this module'}`;\n  const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n  return errorMessage;\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n  const adjustedIndex = index + HEADER_OFFSET;\n  const lView = getLView();\n  const pipeInstance = load(lView, adjustedIndex);\n  return isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1);\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n  const adjustedIndex = index + HEADER_OFFSET;\n  const lView = getLView();\n  const pipeInstance = load(lView, adjustedIndex);\n  return isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2);\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n  const adjustedIndex = index + HEADER_OFFSET;\n  const lView = getLView();\n  const pipeInstance = load(lView, adjustedIndex);\n  return isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3);\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n  const adjustedIndex = index + HEADER_OFFSET;\n  const lView = getLView();\n  const pipeInstance = load(lView, adjustedIndex);\n  return isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4);\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n  const adjustedIndex = index + HEADER_OFFSET;\n  const lView = getLView();\n  const pipeInstance = load(lView, adjustedIndex);\n  return isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(lView, index) {\n  return lView[TVIEW].data[index].pure;\n}\n\n/// <reference types=\"rxjs\" />\nclass EventEmitter_ extends Subject {\n  constructor(isAsync = false) {\n    super();\n    this.__isAsync = isAsync;\n  }\n  emit(value) {\n    super.next(value);\n  }\n  subscribe(observerOrNext, error, complete) {\n    let nextFn = observerOrNext;\n    let errorFn = error || (() => null);\n    let completeFn = complete;\n    if (observerOrNext && typeof observerOrNext === 'object') {\n      const observer = observerOrNext;\n      nextFn = observer.next?.bind(observer);\n      errorFn = observer.error?.bind(observer);\n      completeFn = observer.complete?.bind(observer);\n    }\n    if (this.__isAsync) {\n      errorFn = _wrapInTimeout(errorFn);\n      if (nextFn) {\n        nextFn = _wrapInTimeout(nextFn);\n      }\n      if (completeFn) {\n        completeFn = _wrapInTimeout(completeFn);\n      }\n    }\n    const sink = super.subscribe({\n      next: nextFn,\n      error: errorFn,\n      complete: completeFn\n    });\n    if (observerOrNext instanceof Subscription) {\n      observerOrNext.add(sink);\n    }\n    return sink;\n  }\n}\nfunction _wrapInTimeout(fn) {\n  return value => {\n    setTimeout(fn, undefined, value);\n  };\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\nfunction symbolIterator() {\n  // @ts-expect-error accessing a private member\n  return this._results[Symbol.iterator]();\n}\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n *   @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n  /**\n   * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n   */\n  get changes() {\n    return this._changes || (this._changes = new EventEmitter());\n  }\n  /**\n   * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n   *     has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n   *     the same result)\n   */\n  constructor(_emitDistinctChangesOnly = false) {\n    this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n    this.dirty = true;\n    this._results = [];\n    this._changesDetected = false;\n    this._changes = null;\n    this.length = 0;\n    this.first = undefined;\n    this.last = undefined;\n    // This function should be declared on the prototype, but doing so there will cause the class\n    // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n    // the constructor.\n    // [Symbol.iterator](): Iterator<T> { ... }\n    const proto = QueryList.prototype;\n    if (!proto[Symbol.iterator]) proto[Symbol.iterator] = symbolIterator;\n  }\n  /**\n   * Returns the QueryList entry at `index`.\n   */\n  get(index) {\n    return this._results[index];\n  }\n  /**\n   * See\n   * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n   */\n  map(fn) {\n    return this._results.map(fn);\n  }\n  /**\n   * See\n   * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n   */\n  filter(fn) {\n    return this._results.filter(fn);\n  }\n  /**\n   * See\n   * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n   */\n  find(fn) {\n    return this._results.find(fn);\n  }\n  /**\n   * See\n   * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n   */\n  reduce(fn, init) {\n    return this._results.reduce(fn, init);\n  }\n  /**\n   * See\n   * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n   */\n  forEach(fn) {\n    this._results.forEach(fn);\n  }\n  /**\n   * See\n   * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n   */\n  some(fn) {\n    return this._results.some(fn);\n  }\n  /**\n   * Returns a copy of the internal results list as an Array.\n   */\n  toArray() {\n    return this._results.slice();\n  }\n  toString() {\n    return this._results.toString();\n  }\n  /**\n   * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n   * on change detection, it will not notify of changes to the queries, unless a new change\n   * occurs.\n   *\n   * @param resultsTree The query results to store\n   * @param identityAccessor Optional function for extracting stable object identity from a value\n   *    in the array. This function is executed for each element of the query result list while\n   *    comparing current query list with the new one (provided as a first argument of the `reset`\n   *    function) to detect if the lists are different. If the function is not provided, elements\n   *    are compared as is (without any pre-processing).\n   */\n  reset(resultsTree, identityAccessor) {\n    // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n    // QueryList (but not for QueryList itself.)\n    const self = this;\n    self.dirty = false;\n    const newResultFlat = flatten(resultsTree);\n    if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n      self._results = newResultFlat;\n      self.length = newResultFlat.length;\n      self.last = newResultFlat[this.length - 1];\n      self.first = newResultFlat[0];\n    }\n  }\n  /**\n   * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n   */\n  notifyOnChanges() {\n    if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.emit(this);\n  }\n  /** internal */\n  setDirty() {\n    this.dirty = true;\n  }\n  /** internal */\n  destroy() {\n    this.changes.complete();\n    this.changes.unsubscribe();\n  }\n}\nSymbol.iterator;\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nlet TemplateRef = /*#__PURE__*/(() => {\n  class TemplateRef {}\n  /**\n   * @internal\n   * @nocollapse\n   */\n  TemplateRef.__NG_ELEMENT_ID__ = injectTemplateRef;\n  return TemplateRef;\n})();\nconst ViewEngineTemplateRef = TemplateRef;\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {\n  constructor(_declarationLView, _declarationTContainer, elementRef) {\n    super();\n    this._declarationLView = _declarationLView;\n    this._declarationTContainer = _declarationTContainer;\n    this.elementRef = elementRef;\n  }\n  createEmbeddedView(context, injector) {\n    const embeddedTView = this._declarationTContainer.tView;\n    const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* LViewFlags.CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);\n    const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n    ngDevMode && assertLContainer(declarationLContainer);\n    embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n    const declarationViewLQueries = this._declarationLView[QUERIES];\n    if (declarationViewLQueries !== null) {\n      embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n    }\n    renderView(embeddedTView, embeddedLView, context);\n    return new ViewRef$1(embeddedLView);\n  }\n};\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n  return createTemplateRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(hostTNode, hostLView) {\n  if (hostTNode.type & 4 /* TNodeType.Container */) {\n    ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');\n    return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n  }\n  return null;\n}\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nlet ViewContainerRef = /*#__PURE__*/(() => {\n  class ViewContainerRef {}\n  /**\n   * @internal\n   * @nocollapse\n   */\n  ViewContainerRef.__NG_ELEMENT_ID__ = injectViewContainerRef;\n  /**\n   * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n   * already exists, retrieves the existing ViewContainerRef.\n   *\n   * @returns The ViewContainerRef instance to use\n   */\n  return ViewContainerRef;\n})();\nfunction injectViewContainerRef() {\n  const previousTNode = getCurrentTNode();\n  return createContainerRef(previousTNode, getLView());\n}\nconst VE_ViewContainerRef = ViewContainerRef;\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n  constructor(_lContainer, _hostTNode, _hostLView) {\n    super();\n    this._lContainer = _lContainer;\n    this._hostTNode = _hostTNode;\n    this._hostLView = _hostLView;\n  }\n  get element() {\n    return createElementRef(this._hostTNode, this._hostLView);\n  }\n  get injector() {\n    return new NodeInjector(this._hostTNode, this._hostLView);\n  }\n  /** @deprecated No replacement */\n  get parentInjector() {\n    const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n    if (hasParentInjector(parentLocation)) {\n      const parentView = getParentInjectorView(parentLocation, this._hostLView);\n      const injectorIndex = getParentInjectorIndex(parentLocation);\n      ngDevMode && assertNodeInjector(parentView, injectorIndex);\n      const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n      return new NodeInjector(parentTNode, parentView);\n    } else {\n      return new NodeInjector(null, this._hostLView);\n    }\n  }\n  clear() {\n    while (this.length > 0) {\n      this.remove(this.length - 1);\n    }\n  }\n  get(index) {\n    const viewRefs = getViewRefs(this._lContainer);\n    return viewRefs !== null && viewRefs[index] || null;\n  }\n  get length() {\n    return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n  }\n  createEmbeddedView(templateRef, context, indexOrOptions) {\n    let index;\n    let injector;\n    if (typeof indexOrOptions === 'number') {\n      index = indexOrOptions;\n    } else if (indexOrOptions != null) {\n      index = indexOrOptions.index;\n      injector = indexOrOptions.injector;\n    }\n    const viewRef = templateRef.createEmbeddedView(context || {}, injector);\n    this.insert(viewRef, index);\n    return viewRef;\n  }\n  createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {\n    const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n    let index;\n    // This function supports 2 signatures and we need to handle options correctly for both:\n    //   1. When first argument is a Component type. This signature also requires extra\n    //      options to be provided as as object (more ergonomic option).\n    //   2. First argument is a Component factory. In this case extra options are represented as\n    //      positional arguments. This signature is less ergonomic and will be deprecated.\n    if (isComponentFactory) {\n      if (ngDevMode) {\n        assertEqual(typeof indexOrOptions !== 'object', true, 'It looks like Component factory was provided as the first argument ' + 'and an options object as the second argument. This combination of arguments ' + 'is incompatible. You can either change the first argument to provide Component ' + 'type or change the second argument to be a number (representing an index at ' + 'which to insert the new component\\'s host view into this container)');\n      }\n      index = indexOrOptions;\n    } else {\n      if (ngDevMode) {\n        assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. ` + `Please check whether provided class has @Component decorator.`);\n        assertEqual(typeof indexOrOptions !== 'number', true, 'It looks like Component type was provided as the first argument ' + 'and a number (representing an index at which to insert the new component\\'s ' + 'host view into this container as the second argument. This combination of arguments ' + 'is incompatible. Please use an object as the second argument instead.');\n      }\n      const options = indexOrOptions || {};\n      if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n        throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n      }\n      index = options.index;\n      injector = options.injector;\n      projectableNodes = options.projectableNodes;\n      environmentInjector = options.environmentInjector || options.ngModuleRef;\n    }\n    const componentFactory = isComponentFactory ? componentFactoryOrType : new ComponentFactory(getComponentDef(componentFactoryOrType));\n    const contextInjector = injector || this.parentInjector;\n    // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n    if (!environmentInjector && componentFactory.ngModule == null) {\n      // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n      // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n      // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n      // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n      // using a provided injector first, then fall back to the parent injector of this\n      // `ViewContainerRef` instance.\n      //\n      // For the factory-less case, it's critical to establish a connection with the module\n      // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n      // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n      // rely on the provided injector, since it might be detached from the DI tree (for example, if\n      // it was created via `Injector.create` without specifying a parent injector, or if an\n      // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n      // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n      // injector, which is normally connected to the DI tree, which includes module injector\n      // subtree.\n      const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n      // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n      // undefined` expression which seems to cause internal google apps to fail. This is documented\n      // in the following internal bug issue: go/b/142967802\n      const result = _injector.get(EnvironmentInjector, null);\n      if (result) {\n        environmentInjector = result;\n      }\n    }\n    const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);\n    this.insert(componentRef.hostView, index);\n    return componentRef;\n  }\n  insert(viewRef, index) {\n    const lView = viewRef._lView;\n    const tView = lView[TVIEW];\n    if (ngDevMode && viewRef.destroyed) {\n      throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n    }\n    if (viewAttachedToContainer(lView)) {\n      // If view is already attached, detach it first so we clean up references appropriately.\n      const prevIdx = this.indexOf(viewRef);\n      // A view might be attached either to this or a different container. The `prevIdx` for\n      // those cases will be:\n      // equal to -1 for views attached to this ViewContainerRef\n      // >= 0 for views attached to a different ViewContainerRef\n      if (prevIdx !== -1) {\n        this.detach(prevIdx);\n      } else {\n        const prevLContainer = lView[PARENT];\n        ngDevMode && assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n        // We need to re-create a R3ViewContainerRef instance since those are not stored on\n        // LView (nor anywhere else).\n        const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n        prevVCRef.detach(prevVCRef.indexOf(viewRef));\n      }\n    }\n    // Logical operation of adding `LView` to `LContainer`\n    const adjustedIdx = this._adjustIndex(index);\n    const lContainer = this._lContainer;\n    insertView(tView, lView, lContainer, adjustedIdx);\n    // Physical operation of adding the DOM nodes.\n    const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n    const renderer = lView[RENDERER];\n    const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n    if (parentRNode !== null) {\n      addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n    }\n    viewRef.attachToViewContainerRef();\n    addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n    return viewRef;\n  }\n  move(viewRef, newIndex) {\n    if (ngDevMode && viewRef.destroyed) {\n      throw new Error('Cannot move a destroyed View in a ViewContainer!');\n    }\n    return this.insert(viewRef, newIndex);\n  }\n  indexOf(viewRef) {\n    const viewRefsArr = getViewRefs(this._lContainer);\n    return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n  }\n  remove(index) {\n    const adjustedIdx = this._adjustIndex(index, -1);\n    const detachedView = detachView(this._lContainer, adjustedIdx);\n    if (detachedView) {\n      // Before destroying the view, remove it from the container's array of `ViewRef`s.\n      // This ensures the view container length is updated before calling\n      // `destroyLView`, which could recursively call view container methods that\n      // rely on an accurate container length.\n      // (e.g. a method on this view container being called by a child directive's OnDestroy\n      // lifecycle hook)\n      removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n      destroyLView(detachedView[TVIEW], detachedView);\n    }\n  }\n  detach(index) {\n    const adjustedIdx = this._adjustIndex(index, -1);\n    const view = detachView(this._lContainer, adjustedIdx);\n    const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n    return wasDetached ? new ViewRef$1(view) : null;\n  }\n  _adjustIndex(index, shift = 0) {\n    if (index == null) {\n      return this.length + shift;\n    }\n    if (ngDevMode) {\n      assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n      // +1 because it's legal to insert at the end.\n      assertLessThan(index, this.length + 1 + shift, 'index');\n    }\n    return index;\n  }\n};\nfunction getViewRefs(lContainer) {\n  return lContainer[VIEW_REFS];\n}\nfunction getOrCreateViewRefs(lContainer) {\n  return lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []);\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(hostTNode, hostLView) {\n  ngDevMode && assertTNodeType(hostTNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n  let lContainer;\n  const slotValue = hostLView[hostTNode.index];\n  if (isLContainer(slotValue)) {\n    // If the host is a container, we don't need to create a new LContainer\n    lContainer = slotValue;\n  } else {\n    let commentNode;\n    // If the host is an element container, the native host element is guaranteed to be a\n    // comment and we can reuse that comment as anchor element for the new LContainer.\n    // The comment node in question is already part of the DOM structure so we don't need to append\n    // it again.\n    if (hostTNode.type & 8 /* TNodeType.ElementContainer */) {\n      commentNode = unwrapRNode(slotValue);\n    } else {\n      // If the host is a regular element, we have to insert a comment node manually which will\n      // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n      // manipulation to insert it.\n      const renderer = hostLView[RENDERER];\n      ngDevMode && ngDevMode.rendererCreateComment++;\n      commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n      const hostNative = getNativeByTNode(hostTNode, hostLView);\n      const parentOfHostNative = nativeParentNode(renderer, hostNative);\n      nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n    }\n    hostLView[hostTNode.index] = lContainer = createLContainer(slotValue, hostLView, commentNode, hostTNode);\n    addToViewTree(hostLView, lContainer);\n  }\n  return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\nclass LQuery_ {\n  constructor(queryList) {\n    this.queryList = queryList;\n    this.matches = null;\n  }\n  clone() {\n    return new LQuery_(this.queryList);\n  }\n  setDirty() {\n    this.queryList.setDirty();\n  }\n}\nclass LQueries_ {\n  constructor(queries = []) {\n    this.queries = queries;\n  }\n  createEmbeddedView(tView) {\n    const tQueries = tView.queries;\n    if (tQueries !== null) {\n      const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n      const viewLQueries = [];\n      // An embedded view has queries propagated from a declaration view at the beginning of the\n      // TQueries collection and up until a first content query declared in the embedded view. Only\n      // propagated LQueries are created at this point (LQuery corresponding to declared content\n      // queries will be instantiated from the content query instructions for each directive).\n      for (let i = 0; i < noOfInheritedQueries; i++) {\n        const tQuery = tQueries.getByIndex(i);\n        const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n        viewLQueries.push(parentLQuery.clone());\n      }\n      return new LQueries_(viewLQueries);\n    }\n    return null;\n  }\n  insertView(tView) {\n    this.dirtyQueriesWithMatches(tView);\n  }\n  detachView(tView) {\n    this.dirtyQueriesWithMatches(tView);\n  }\n  dirtyQueriesWithMatches(tView) {\n    for (let i = 0; i < this.queries.length; i++) {\n      if (getTQuery(tView, i).matches !== null) {\n        this.queries[i].setDirty();\n      }\n    }\n  }\n}\nclass TQueryMetadata_ {\n  constructor(predicate, flags, read = null) {\n    this.predicate = predicate;\n    this.flags = flags;\n    this.read = read;\n  }\n}\nclass TQueries_ {\n  constructor(queries = []) {\n    this.queries = queries;\n  }\n  elementStart(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n    for (let i = 0; i < this.queries.length; i++) {\n      this.queries[i].elementStart(tView, tNode);\n    }\n  }\n  elementEnd(tNode) {\n    for (let i = 0; i < this.queries.length; i++) {\n      this.queries[i].elementEnd(tNode);\n    }\n  }\n  embeddedTView(tNode) {\n    let queriesForTemplateRef = null;\n    for (let i = 0; i < this.length; i++) {\n      const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n      const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n      if (tqueryClone) {\n        tqueryClone.indexInDeclarationView = i;\n        if (queriesForTemplateRef !== null) {\n          queriesForTemplateRef.push(tqueryClone);\n        } else {\n          queriesForTemplateRef = [tqueryClone];\n        }\n      }\n    }\n    return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n  }\n  template(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n    for (let i = 0; i < this.queries.length; i++) {\n      this.queries[i].template(tView, tNode);\n    }\n  }\n  getByIndex(index) {\n    ngDevMode && assertIndexInRange(this.queries, index);\n    return this.queries[index];\n  }\n  get length() {\n    return this.queries.length;\n  }\n  track(tquery) {\n    this.queries.push(tquery);\n  }\n}\nclass TQuery_ {\n  constructor(metadata, nodeIndex = -1) {\n    this.metadata = metadata;\n    this.matches = null;\n    this.indexInDeclarationView = -1;\n    this.crossesNgTemplate = false;\n    /**\n     * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n     * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n     * elements in a template.\n     */\n    this._appliesToNextNode = true;\n    this._declarationNodeIndex = nodeIndex;\n  }\n  elementStart(tView, tNode) {\n    if (this.isApplyingToNode(tNode)) {\n      this.matchTNode(tView, tNode);\n    }\n  }\n  elementEnd(tNode) {\n    if (this._declarationNodeIndex === tNode.index) {\n      this._appliesToNextNode = false;\n    }\n  }\n  template(tView, tNode) {\n    this.elementStart(tView, tNode);\n  }\n  embeddedTView(tNode, childQueryIndex) {\n    if (this.isApplyingToNode(tNode)) {\n      this.crossesNgTemplate = true;\n      // A marker indicating a `<ng-template>` element (a placeholder for query results from\n      // embedded views created based on this `<ng-template>`).\n      this.addMatch(-tNode.index, childQueryIndex);\n      return new TQuery_(this.metadata);\n    }\n    return null;\n  }\n  isApplyingToNode(tNode) {\n    if (this._appliesToNextNode && (this.metadata.flags & 1 /* QueryFlags.descendants */) !== 1 /* QueryFlags.descendants */) {\n      const declarationNodeIdx = this._declarationNodeIndex;\n      let parent = tNode.parent;\n      // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n      // declared (only direct children of query's host node can match with the descendants: false\n      // option). There are 3 main use-case / conditions to consider here:\n      // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n      // host node;\n      // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n      // here <i #target> parent node is null;\n      // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n      // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n      // up past the query's host node!).\n      while (parent !== null && parent.type & 8 /* TNodeType.ElementContainer */ && parent.index !== declarationNodeIdx) {\n        parent = parent.parent;\n      }\n      return declarationNodeIdx === (parent !== null ? parent.index : -1);\n    }\n    return this._appliesToNextNode;\n  }\n  matchTNode(tView, tNode) {\n    const predicate = this.metadata.predicate;\n    if (Array.isArray(predicate)) {\n      for (let i = 0; i < predicate.length; i++) {\n        const name = predicate[i];\n        this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n        // Also try matching the name to a provider since strings can be used as DI tokens too.\n        this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n      }\n    } else {\n      if (predicate === TemplateRef) {\n        if (tNode.type & 4 /* TNodeType.Container */) {\n          this.matchTNodeWithReadOption(tView, tNode, -1);\n        }\n      } else {\n        this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n      }\n    }\n  }\n  matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n    if (nodeMatchIdx !== null) {\n      const read = this.metadata.read;\n      if (read !== null) {\n        if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type & 4 /* TNodeType.Container */) {\n          this.addMatch(tNode.index, -2);\n        } else {\n          const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n          if (directiveOrProviderIdx !== null) {\n            this.addMatch(tNode.index, directiveOrProviderIdx);\n          }\n        }\n      } else {\n        this.addMatch(tNode.index, nodeMatchIdx);\n      }\n    }\n  }\n  addMatch(tNodeIdx, matchIdx) {\n    if (this.matches === null) {\n      this.matches = [tNodeIdx, matchIdx];\n    } else {\n      this.matches.push(tNodeIdx, matchIdx);\n    }\n  }\n}\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n  const localNames = tNode.localNames;\n  if (localNames !== null) {\n    for (let i = 0; i < localNames.length; i += 2) {\n      if (localNames[i] === selector) {\n        return localNames[i + 1];\n      }\n    }\n  }\n  return null;\n}\nfunction createResultByTNodeType(tNode, currentView) {\n  if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n    return createElementRef(tNode, currentView);\n  } else if (tNode.type & 4 /* TNodeType.Container */) {\n    return createTemplateRef(tNode, currentView);\n  }\n  return null;\n}\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\n  if (matchingIdx === -1) {\n    // if read token and / or strategy is not specified, detect it using appropriate tNode type\n    return createResultByTNodeType(tNode, lView);\n  } else if (matchingIdx === -2) {\n    // read a special token from a node injector\n    return createSpecialToken(lView, tNode, read);\n  } else {\n    // read a token\n    return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n  }\n}\nfunction createSpecialToken(lView, tNode, read) {\n  if (read === ElementRef) {\n    return createElementRef(tNode, lView);\n  } else if (read === TemplateRef) {\n    return createTemplateRef(tNode, lView);\n  } else if (read === ViewContainerRef) {\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n    return createContainerRef(tNode, lView);\n  } else {\n    ngDevMode && throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);\n  }\n}\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n  const lQuery = lView[QUERIES].queries[queryIndex];\n  if (lQuery.matches === null) {\n    const tViewData = tView.data;\n    const tQueryMatches = tQuery.matches;\n    const result = [];\n    for (let i = 0; i < tQueryMatches.length; i += 2) {\n      const matchedNodeIdx = tQueryMatches[i];\n      if (matchedNodeIdx < 0) {\n        // we at the <ng-template> marker which might have results in views created based on this\n        // <ng-template> - those results will be in separate views though, so here we just leave\n        // null as a placeholder\n        result.push(null);\n      } else {\n        ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n        const tNode = tViewData[matchedNodeIdx];\n        result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n      }\n    }\n    lQuery.matches = result;\n  }\n  return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n  const tQuery = tView.queries.getByIndex(queryIndex);\n  const tQueryMatches = tQuery.matches;\n  if (tQueryMatches !== null) {\n    const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n    for (let i = 0; i < tQueryMatches.length; i += 2) {\n      const tNodeIdx = tQueryMatches[i];\n      if (tNodeIdx > 0) {\n        result.push(lViewResults[i / 2]);\n      } else {\n        const childQueryIndex = tQueryMatches[i + 1];\n        const declarationLContainer = lView[-tNodeIdx];\n        ngDevMode && assertLContainer(declarationLContainer);\n        // collect matches for views inserted in this container\n        for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n          const embeddedLView = declarationLContainer[i];\n          if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n            collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n          }\n        }\n        // collect matches for views created from this declaration container and inserted into\n        // different containers\n        if (declarationLContainer[MOVED_VIEWS] !== null) {\n          const embeddedLViews = declarationLContainer[MOVED_VIEWS];\n          for (let i = 0; i < embeddedLViews.length; i++) {\n            const embeddedLView = embeddedLViews[i];\n            collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nfunction ɵɵqueryRefresh(queryList) {\n  const lView = getLView();\n  const tView = getTView();\n  const queryIndex = getCurrentQueryIndex();\n  setCurrentQueryIndex(queryIndex + 1);\n  const tQuery = getTQuery(tView, queryIndex);\n  if (queryList.dirty && isCreationMode(lView) === ((tQuery.metadata.flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */)) {\n    if (tQuery.matches === null) {\n      queryList.reset([]);\n    } else {\n      const result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);\n      queryList.reset(result, unwrapElementRef);\n      queryList.notifyOnChanges();\n    }\n    return true;\n  }\n  return false;\n}\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, flags, read) {\n  ngDevMode && assertNumber(flags, 'Expecting flags');\n  const tView = getTView();\n  if (tView.firstCreatePass) {\n    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n    if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n      tView.staticViewQueries = true;\n    }\n  }\n  createLQuery(tView, getLView(), flags);\n}\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n  ngDevMode && assertNumber(flags, 'Expecting flags');\n  const tView = getTView();\n  if (tView.firstCreatePass) {\n    const tNode = getCurrentTNode();\n    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n    saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n    if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n      tView.staticContentQueries = true;\n    }\n  }\n  createLQuery(tView, getLView(), flags);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nfunction ɵɵloadQuery() {\n  return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\nfunction loadQueryInternal(lView, queryIndex) {\n  ngDevMode && assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n  ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n  return lView[QUERIES].queries[queryIndex].queryList;\n}\nfunction createLQuery(tView, lView, flags) {\n  const queryList = new QueryList((flags & 4 /* QueryFlags.emitDistinctChangesOnly */) === 4 /* QueryFlags.emitDistinctChangesOnly */);\n  storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n  if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n  lView[QUERIES].queries.push(new LQuery_(queryList));\n}\nfunction createTQuery(tView, metadata, nodeIndex) {\n  if (tView.queries === null) tView.queries = new TQueries_();\n  tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n  const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n  const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n  if (directiveIndex !== lastSavedDirectiveIndex) {\n    tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n  }\n}\nfunction getTQuery(tView, index) {\n  ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n  return tView.queries.getByIndex(index);\n}\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplateRefExtractor(tNode, lView) {\n  return createTemplateRef(tNode, lView);\n}\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreEnv = /*#__PURE__*/(() => ({\n  'ɵɵattribute': ɵɵattribute,\n  'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n  'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n  'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n  'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n  'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n  'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n  'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n  'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n  'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n  'ɵɵdefineComponent': ɵɵdefineComponent,\n  'ɵɵdefineDirective': ɵɵdefineDirective,\n  'ɵɵdefineInjectable': ɵɵdefineInjectable,\n  'ɵɵdefineInjector': ɵɵdefineInjector,\n  'ɵɵdefineNgModule': ɵɵdefineNgModule,\n  'ɵɵdefinePipe': ɵɵdefinePipe,\n  'ɵɵdirectiveInject': ɵɵdirectiveInject,\n  'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n  'ɵɵinject': ɵɵinject,\n  'ɵɵinjectAttribute': ɵɵinjectAttribute,\n  'ɵɵinvalidFactory': ɵɵinvalidFactory,\n  'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n  'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n  'ɵɵresetView': ɵɵresetView,\n  'ɵɵHostDirectivesFeature': ɵɵHostDirectivesFeature,\n  'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n  'ɵɵProvidersFeature': ɵɵProvidersFeature,\n  'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n  'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n  'ɵɵStandaloneFeature': ɵɵStandaloneFeature,\n  'ɵɵnextContext': ɵɵnextContext,\n  'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n  'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n  'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n  'ɵɵenableBindings': ɵɵenableBindings,\n  'ɵɵdisableBindings': ɵɵdisableBindings,\n  'ɵɵelementStart': ɵɵelementStart,\n  'ɵɵelementEnd': ɵɵelementEnd,\n  'ɵɵelement': ɵɵelement,\n  'ɵɵelementContainerStart': ɵɵelementContainerStart,\n  'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n  'ɵɵelementContainer': ɵɵelementContainer,\n  'ɵɵpureFunction0': ɵɵpureFunction0,\n  'ɵɵpureFunction1': ɵɵpureFunction1,\n  'ɵɵpureFunction2': ɵɵpureFunction2,\n  'ɵɵpureFunction3': ɵɵpureFunction3,\n  'ɵɵpureFunction4': ɵɵpureFunction4,\n  'ɵɵpureFunction5': ɵɵpureFunction5,\n  'ɵɵpureFunction6': ɵɵpureFunction6,\n  'ɵɵpureFunction7': ɵɵpureFunction7,\n  'ɵɵpureFunction8': ɵɵpureFunction8,\n  'ɵɵpureFunctionV': ɵɵpureFunctionV,\n  'ɵɵgetCurrentView': ɵɵgetCurrentView,\n  'ɵɵrestoreView': ɵɵrestoreView,\n  'ɵɵlistener': ɵɵlistener,\n  'ɵɵprojection': ɵɵprojection,\n  'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n  'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n  'ɵɵpipeBind1': ɵɵpipeBind1,\n  'ɵɵpipeBind2': ɵɵpipeBind2,\n  'ɵɵpipeBind3': ɵɵpipeBind3,\n  'ɵɵpipeBind4': ɵɵpipeBind4,\n  'ɵɵpipeBindV': ɵɵpipeBindV,\n  'ɵɵprojectionDef': ɵɵprojectionDef,\n  'ɵɵhostProperty': ɵɵhostProperty,\n  'ɵɵproperty': ɵɵproperty,\n  'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n  'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n  'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n  'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n  'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n  'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n  'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n  'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n  'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n  'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n  'ɵɵpipe': ɵɵpipe,\n  'ɵɵqueryRefresh': ɵɵqueryRefresh,\n  'ɵɵviewQuery': ɵɵviewQuery,\n  'ɵɵloadQuery': ɵɵloadQuery,\n  'ɵɵcontentQuery': ɵɵcontentQuery,\n  'ɵɵreference': ɵɵreference,\n  'ɵɵclassMap': ɵɵclassMap,\n  'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n  'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n  'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n  'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n  'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n  'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n  'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n  'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n  'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n  'ɵɵstyleMap': ɵɵstyleMap,\n  'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n  'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n  'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n  'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n  'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n  'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n  'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n  'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n  'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n  'ɵɵstyleProp': ɵɵstyleProp,\n  'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n  'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n  'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n  'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n  'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n  'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n  'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n  'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n  'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n  'ɵɵclassProp': ɵɵclassProp,\n  'ɵɵadvance': ɵɵadvance,\n  'ɵɵtemplate': ɵɵtemplate,\n  'ɵɵtext': ɵɵtext,\n  'ɵɵtextInterpolate': ɵɵtextInterpolate,\n  'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n  'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n  'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n  'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n  'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n  'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n  'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n  'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n  'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n  'ɵɵi18n': ɵɵi18n,\n  'ɵɵi18nAttributes': ɵɵi18nAttributes,\n  'ɵɵi18nExp': ɵɵi18nExp,\n  'ɵɵi18nStart': ɵɵi18nStart,\n  'ɵɵi18nEnd': ɵɵi18nEnd,\n  'ɵɵi18nApply': ɵɵi18nApply,\n  'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n  'ɵɵresolveWindow': ɵɵresolveWindow,\n  'ɵɵresolveDocument': ɵɵresolveDocument,\n  'ɵɵresolveBody': ɵɵresolveBody,\n  'ɵɵsetComponentScope': ɵɵsetComponentScope,\n  'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n  'ɵɵregisterNgModuleType': registerNgModuleType,\n  'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n  'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n  'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n  'ɵɵsanitizeScript': ɵɵsanitizeScript,\n  'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n  'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n  'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n  'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n  'ɵɵvalidateIframeAttribute': ɵɵvalidateIframeAttribute,\n  'forwardRef': forwardRef,\n  'resolveForwardRef': resolveForwardRef\n}))();\nlet jitOptions = null;\nfunction setJitOptions(options) {\n  if (jitOptions !== null) {\n    if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n      ngDevMode && console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n      return;\n    }\n    if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n      ngDevMode && console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n      return;\n    }\n  }\n  jitOptions = options;\n}\nfunction getJitOptions() {\n  return jitOptions;\n}\nfunction resetJitOptions() {\n  jitOptions = null;\n}\nfunction patchModuleCompilation() {\n  // Does nothing, but exists as a target for patching.\n}\nfunction isModuleWithProviders(value) {\n  return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n  return !!getNgModuleDef(value);\n}\nconst moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n  moduleQueue.push({\n    moduleType,\n    ngModule\n  });\n}\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nfunction flushModuleScopingQueueAsMuchAsPossible() {\n  if (!flushingModuleQueue) {\n    flushingModuleQueue = true;\n    try {\n      for (let i = moduleQueue.length - 1; i >= 0; i--) {\n        const {\n          moduleType,\n          ngModule\n        } = moduleQueue[i];\n        if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n          // dequeue\n          moduleQueue.splice(i, 1);\n          setScopeOnDeclaredComponents(moduleType, ngModule);\n        }\n      }\n    } finally {\n      flushingModuleQueue = false;\n    }\n  }\n}\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration) {\n  if (Array.isArray(declaration)) {\n    return declaration.every(isResolvedDeclaration);\n  }\n  return !!resolveForwardRef(declaration);\n}\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nfunction compileNgModule(moduleType, ngModule = {}) {\n  patchModuleCompilation();\n  compileNgModuleDefs(moduleType, ngModule);\n  if (ngModule.id !== undefined) {\n    registerNgModuleType(moduleType, ngModule.id);\n  }\n  // Because we don't know if all declarations have resolved yet at the moment the\n  // NgModule decorator is executing, we're enqueueing the setting of module scope\n  // on its declarations to be run at a later time when all declarations for the module,\n  // including forward refs, have resolved.\n  enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nfunction compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) {\n  ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n  ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n  const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n  let ngModuleDef = null;\n  Object.defineProperty(moduleType, NG_MOD_DEF, {\n    configurable: true,\n    get: () => {\n      if (ngModuleDef === null) {\n        if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n          // We need to assert this immediately, because allowing it to continue will cause it to\n          // go into an infinite loop before we've reached the point where we throw all the errors.\n          throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n        }\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n          type: moduleType,\n          bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n          declarations: declarations.map(resolveForwardRef),\n          imports: flatten(ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef).map(expandModuleWithProviders),\n          exports: flatten(ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef).map(expandModuleWithProviders),\n          schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n          id: ngModule.id || null\n        });\n        // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n        // should verify that there are no unknown elements in a template. In AOT mode, that check\n        // happens at compile time and `schemas` information is not present on Component and Module\n        // defs after compilation (so the check doesn't happen the second time at runtime).\n        if (!ngModuleDef.schemas) {\n          ngModuleDef.schemas = [];\n        }\n      }\n      return ngModuleDef;\n    }\n  });\n  let ngFactoryDef = null;\n  Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n    get: () => {\n      if (ngFactoryDef === null) {\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n          name: moduleType.name,\n          type: moduleType,\n          deps: reflectDependencies(moduleType),\n          target: compiler.FactoryTarget.NgModule,\n          typeArgumentCount: 0\n        });\n      }\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n  let ngInjectorDef = null;\n  Object.defineProperty(moduleType, NG_INJ_DEF, {\n    get: () => {\n      if (ngInjectorDef === null) {\n        ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n        const meta = {\n          name: moduleType.name,\n          type: moduleType,\n          providers: ngModule.providers || EMPTY_ARRAY,\n          imports: [(ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef)]\n        };\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngInjectorDef = compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n      }\n      return ngInjectorDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\nfunction generateStandaloneInDeclarationsError(type, location) {\n  const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n  const suffix = `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` + 'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n  return `${prefix} ${location}, ${suffix}`;\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n  if (verifiedNgModule.get(moduleType)) return;\n  // skip verifications of standalone components, directives, and pipes\n  if (isStandalone(moduleType)) return;\n  verifiedNgModule.set(moduleType, true);\n  moduleType = resolveForwardRef(moduleType);\n  let ngModuleDef;\n  if (importingModule) {\n    ngModuleDef = getNgModuleDef(moduleType);\n    if (!ngModuleDef) {\n      throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n  } else {\n    ngModuleDef = getNgModuleDef(moduleType, true);\n  }\n  const errors = [];\n  const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n  const imports = maybeUnwrapFn(ngModuleDef.imports);\n  flatten(imports).map(unwrapModuleWithProvidersImports).forEach(modOrStandaloneCmpt => {\n    verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n    verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n  });\n  const exports = maybeUnwrapFn(ngModuleDef.exports);\n  declarations.forEach(verifyDeclarationsHaveDefinitions);\n  declarations.forEach(verifyDirectivesHaveSelector);\n  declarations.forEach(declarationType => verifyNotStandalone(declarationType, moduleType));\n  const combinedDeclarations = [...declarations.map(resolveForwardRef), ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)];\n  exports.forEach(verifyExportsAreDeclaredOrReExported);\n  declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n  declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n  const ngModule = getAnnotation(moduleType, 'NgModule');\n  if (ngModule) {\n    ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n      verifySemanticsOfNgModuleImport(mod, moduleType);\n      verifySemanticsOfNgModuleDef(mod, false, moduleType);\n    });\n    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n    ngModule.entryComponents && deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n  }\n  // Throw Error if any errors were detected.\n  if (errors.length) {\n    throw new Error(errors.join('\\n'));\n  }\n  ////////////////////////////////////////////////////////////////////////////////////////////////\n  function verifyDeclarationsHaveDefinitions(type) {\n    type = resolveForwardRef(type);\n    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n    if (!def) {\n      errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n    }\n  }\n  function verifyDirectivesHaveSelector(type) {\n    type = resolveForwardRef(type);\n    const def = getDirectiveDef(type);\n    if (!getComponentDef(type) && def && def.selectors.length == 0) {\n      errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n    }\n  }\n  function verifyNotStandalone(type, moduleType) {\n    type = resolveForwardRef(type);\n    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n    if (def?.standalone) {\n      const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n      errors.push(generateStandaloneInDeclarationsError(type, location));\n    }\n  }\n  function verifyExportsAreDeclaredOrReExported(type) {\n    type = resolveForwardRef(type);\n    const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' || getPipeDef$1(type) && 'pipe';\n    if (kind) {\n      // only checked if we are declared as Component, Directive, or Pipe\n      // Modules don't need to be declared or imported.\n      if (combinedDeclarations.lastIndexOf(type) === -1) {\n        // We are exporting something which we don't explicitly declare or import.\n        errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n      }\n    }\n  }\n  function verifyDeclarationIsUnique(type, suppressErrors) {\n    type = resolveForwardRef(type);\n    const existingModule = ownerNgModule.get(type);\n    if (existingModule && existingModule !== moduleType) {\n      if (!suppressErrors) {\n        const modules = [existingModule, moduleType].map(stringifyForError).sort();\n        errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` + `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` + `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n      }\n    } else {\n      // Mark type as having owner.\n      ownerNgModule.set(type, moduleType);\n    }\n  }\n  function verifyComponentIsPartOfNgModule(type) {\n    type = resolveForwardRef(type);\n    const existingModule = ownerNgModule.get(type);\n    if (!existingModule && !isStandalone(type)) {\n      errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n    }\n  }\n  function verifyCorrectBootstrapType(type) {\n    type = resolveForwardRef(type);\n    if (!getComponentDef(type)) {\n      errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n    }\n    if (isStandalone(type)) {\n      // Note: this error should be the same as the\n      // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n      errors.push(`The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` + `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` + `function for bootstrap instead.`);\n    }\n  }\n  function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n    type = resolveForwardRef(type);\n    if (getComponentDef(type)) {\n      // We know we are component\n      const component = getAnnotation(type, 'Component');\n      if (component && component.entryComponents) {\n        deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n      }\n    }\n  }\n  function verifySemanticsOfNgModuleImport(type, importingModule) {\n    type = resolveForwardRef(type);\n    const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n    if (directiveDef !== null && !directiveDef.standalone) {\n      throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n    const pipeDef = getPipeDef$1(type);\n    if (pipeDef !== null && !pipeDef.standalone) {\n      throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n  }\n}\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n  typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n  return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\nfunction getAnnotation(type, name) {\n  let annotation = null;\n  collect(type.__annotations__);\n  collect(type.decorators);\n  return annotation;\n  function collect(annotations) {\n    if (annotations) {\n      annotations.forEach(readAnnotation);\n    }\n  }\n  function readAnnotation(decorator) {\n    if (!annotation) {\n      const proto = Object.getPrototypeOf(decorator);\n      if (proto.ngMetadataName == name) {\n        annotation = decorator;\n      } else if (decorator.type) {\n        const proto = Object.getPrototypeOf(decorator.type);\n        if (proto.ngMetadataName == name) {\n          annotation = decorator.args[0];\n        }\n      }\n    }\n  }\n}\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = /*#__PURE__*/new WeakMap();\nlet verifiedNgModule = /*#__PURE__*/new WeakMap();\nfunction resetCompiledComponents() {\n  ownerNgModule = new WeakMap();\n  verifiedNgModule = new WeakMap();\n  moduleQueue.length = 0;\n}\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type) {\n  type = resolveForwardRef(type);\n  const ngModuleDef = getNgModuleDef(type);\n  // a standalone component, directive or pipe\n  if (ngModuleDef === null) {\n    return [type];\n  }\n  return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map(type => {\n    const ngModuleDef = getNgModuleDef(type);\n    if (ngModuleDef) {\n      verifySemanticsOfNgModuleDef(type, false);\n      return computeCombinedExports(type);\n    } else {\n      return type;\n    }\n  }))];\n}\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n  const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n  const transitiveScopes = transitiveScopesFor(moduleType);\n  declarations.forEach(declaration => {\n    declaration = resolveForwardRef(declaration);\n    if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n      // A `ɵcmp` field exists - go ahead and patch the component directly.\n      const component = declaration;\n      const componentDef = getComponentDef(component);\n      patchComponentDefWithScope(componentDef, transitiveScopes);\n    } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n      // Set `ngSelectorScope` for future reference when the component compilation finishes.\n      declaration.ngSelectorScope = moduleType;\n    }\n  });\n}\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n  componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives).map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir)).filter(def => !!def);\n  componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef$1(pipe));\n  componentDef.schemas = transitiveScopes.schemas;\n  // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n  // may face a problem where previously compiled defs available to a given Component/Directive\n  // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n  // order to avoid this problem, we force fresh TView to be created.\n  componentDef.tView = null;\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nfunction transitiveScopesFor(type) {\n  if (isNgModule(type)) {\n    return transitiveScopesForNgModule(type);\n  } else if (isStandalone(type)) {\n    const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n    if (directiveDef !== null) {\n      return {\n        schemas: null,\n        compilation: {\n          directives: new Set(),\n          pipes: new Set()\n        },\n        exported: {\n          directives: new Set([type]),\n          pipes: new Set()\n        }\n      };\n    }\n    const pipeDef = getPipeDef$1(type);\n    if (pipeDef !== null) {\n      return {\n        schemas: null,\n        compilation: {\n          directives: new Set(),\n          pipes: new Set()\n        },\n        exported: {\n          directives: new Set(),\n          pipes: new Set([type])\n        }\n      };\n    }\n  }\n  // TODO: change the error message to be more user-facing and take standalone into account\n  throw new Error(`${type.name} does not have a module def (ɵmod property)`);\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nfunction transitiveScopesForNgModule(moduleType) {\n  const def = getNgModuleDef(moduleType, true);\n  if (def.transitiveCompileScopes !== null) {\n    return def.transitiveCompileScopes;\n  }\n  const scopes = {\n    schemas: def.schemas || null,\n    compilation: {\n      directives: new Set(),\n      pipes: new Set()\n    },\n    exported: {\n      directives: new Set(),\n      pipes: new Set()\n    }\n  };\n  maybeUnwrapFn(def.imports).forEach(imported => {\n    // When this module imports another, the imported module's exported directives and pipes are\n    // added to the compilation scope of this module.\n    const importedScope = transitiveScopesFor(imported);\n    importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n    importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n  });\n  maybeUnwrapFn(def.declarations).forEach(declared => {\n    const declaredWithDefs = declared;\n    if (getPipeDef$1(declaredWithDefs)) {\n      scopes.compilation.pipes.add(declared);\n    } else {\n      // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n      // had its template compiled yet. In either case, it gets added to the compilation's\n      // directives.\n      scopes.compilation.directives.add(declared);\n    }\n  });\n  maybeUnwrapFn(def.exports).forEach(exported => {\n    const exportedType = exported;\n    // Either the type is a module, a pipe, or a component/directive (which may not have a\n    // ɵcmp as it might be compiled asynchronously).\n    if (isNgModule(exportedType)) {\n      // When this module exports another, the exported module's exported directives and pipes are\n      // added to both the compilation and exported scopes of this module.\n      const exportedScope = transitiveScopesFor(exportedType);\n      exportedScope.exported.directives.forEach(entry => {\n        scopes.compilation.directives.add(entry);\n        scopes.exported.directives.add(entry);\n      });\n      exportedScope.exported.pipes.forEach(entry => {\n        scopes.compilation.pipes.add(entry);\n        scopes.exported.pipes.add(entry);\n      });\n    } else if (getPipeDef$1(exportedType)) {\n      scopes.exported.pipes.add(exportedType);\n    } else {\n      scopes.exported.directives.add(exportedType);\n    }\n  });\n  def.transitiveCompileScopes = scopes;\n  return scopes;\n}\nfunction expandModuleWithProviders(value) {\n  if (isModuleWithProviders(value)) {\n    return value.ngModule;\n  }\n  return value;\n}\n\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nfunction compileComponent(type, metadata) {\n  // Initialize ngDevMode. This must be the first statement in compileComponent.\n  // See the `initNgDevMode` docstring for more information.\n  (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n  let ngComponentDef = null;\n  // Metadata may have resources which need to be resolved.\n  maybeQueueResolutionOfComponentResources(type, metadata);\n  // Note that we're using the same function as `Directive`, because that's only subset of metadata\n  // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n  // because we'd have to resolve the asynchronous templates.\n  addDirectiveFactoryDef(type, metadata);\n  Object.defineProperty(type, NG_COMP_DEF, {\n    get: () => {\n      if (ngComponentDef === null) {\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'component',\n          type: type\n        });\n        if (componentNeedsResolution(metadata)) {\n          const error = [`Component '${type.name}' is not resolved:`];\n          if (metadata.templateUrl) {\n            error.push(` - templateUrl: ${metadata.templateUrl}`);\n          }\n          if (metadata.styleUrls && metadata.styleUrls.length) {\n            error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n          }\n          error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n          throw new Error(error.join('\\n'));\n        }\n        // This const was called `jitOptions` previously but had to be renamed to `options` because\n        // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n        // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n        // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n        const options = getJitOptions();\n        let preserveWhitespaces = metadata.preserveWhitespaces;\n        if (preserveWhitespaces === undefined) {\n          if (options !== null && options.preserveWhitespaces !== undefined) {\n            preserveWhitespaces = options.preserveWhitespaces;\n          } else {\n            preserveWhitespaces = false;\n          }\n        }\n        let encapsulation = metadata.encapsulation;\n        if (encapsulation === undefined) {\n          if (options !== null && options.defaultEncapsulation !== undefined) {\n            encapsulation = options.defaultEncapsulation;\n          } else {\n            encapsulation = ViewEncapsulation$1.Emulated;\n          }\n        }\n        const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n        const meta = {\n          ...directiveMetadata(type, metadata),\n          typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n          template: metadata.template || '',\n          preserveWhitespaces,\n          styles: metadata.styles || EMPTY_ARRAY,\n          animations: metadata.animations,\n          // JIT components are always compiled against an empty set of `declarations`. Instead, the\n          // `directiveDefs` and `pipeDefs` are updated at a later point:\n          //  * for NgModule-based components, they're set when the NgModule which declares the\n          //    component resolves in the module scoping queue\n          //  * for standalone components, they're set just below, after `compileComponent`.\n          declarations: [],\n          changeDetection: metadata.changeDetection,\n          encapsulation,\n          interpolation: metadata.interpolation,\n          viewProviders: metadata.viewProviders || null\n        };\n        compilationDepth++;\n        try {\n          if (meta.usesInheritance) {\n            addDirectiveDefToUndecoratedParents(type);\n          }\n          ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n          if (metadata.standalone) {\n            // Patch the component definition for standalone components with `directiveDefs` and\n            // `pipeDefs` functions which lazily compute the directives/pipes available in the\n            // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n            const imports = flatten(metadata.imports || EMPTY_ARRAY);\n            const {\n              directiveDefs,\n              pipeDefs\n            } = getStandaloneDefFunctions(type, imports);\n            ngComponentDef.directiveDefs = directiveDefs;\n            ngComponentDef.pipeDefs = pipeDefs;\n            ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n          }\n        } finally {\n          // Ensure that the compilation depth is decremented even when the compilation failed.\n          compilationDepth--;\n        }\n        if (compilationDepth === 0) {\n          // When NgModule decorator executed, we enqueued the module definition such that\n          // it would only dequeue and add itself as module scope to all of its declarations,\n          // but only if  if all of its declarations had resolved. This call runs the check\n          // to see if any modules that are in the queue can be dequeued and add scope to\n          // their declarations.\n          flushModuleScopingQueueAsMuchAsPossible();\n        }\n        // If component compilation is async, then the @NgModule annotation which declares the\n        // component may execute and set an ngSelectorScope property on the component type. This\n        // allows the component to patch itself with directiveDefs from the module after it\n        // finishes compiling.\n        if (hasSelectorScope(type)) {\n          const scopes = transitiveScopesFor(type.ngSelectorScope);\n          patchComponentDefWithScope(ngComponentDef, scopes);\n        }\n        if (metadata.schemas) {\n          if (metadata.standalone) {\n            ngComponentDef.schemas = metadata.schemas;\n          } else {\n            throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);\n          }\n        } else if (metadata.standalone) {\n          ngComponentDef.schemas = [];\n        }\n      }\n      return ngComponentDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\nfunction getDependencyTypeForError(type) {\n  if (getComponentDef(type)) return 'component';\n  if (getDirectiveDef(type)) return 'directive';\n  if (getPipeDef$1(type)) return 'pipe';\n  return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n  if (isForwardRef(depType)) {\n    depType = resolveForwardRef(depType);\n    if (!depType) {\n      throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n    }\n  }\n  if (getNgModuleDef(depType) == null) {\n    const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n    if (def != null) {\n      // if a component, directive or pipe is imported make sure that it is standalone\n      if (!def.standalone) {\n        throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n      }\n    } else {\n      // it can be either a module with provider or an unknown (not annotated) type\n      if (isModuleWithProviders(depType)) {\n        throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n      } else {\n        throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n      }\n    }\n  }\n}\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(type, imports) {\n  let cachedDirectiveDefs = null;\n  let cachedPipeDefs = null;\n  const directiveDefs = () => {\n    if (cachedDirectiveDefs === null) {\n      // Standalone components are always able to self-reference, so include the component's own\n      // definition in its `directiveDefs`.\n      cachedDirectiveDefs = [getComponentDef(type)];\n      const seen = new Set();\n      for (const rawDep of imports) {\n        ngDevMode && verifyStandaloneImport(rawDep, type);\n        const dep = resolveForwardRef(rawDep);\n        if (seen.has(dep)) {\n          continue;\n        }\n        seen.add(dep);\n        if (!!getNgModuleDef(dep)) {\n          const scope = transitiveScopesFor(dep);\n          for (const dir of scope.exported.directives) {\n            const def = getComponentDef(dir) || getDirectiveDef(dir);\n            if (def && !seen.has(dir)) {\n              seen.add(dir);\n              cachedDirectiveDefs.push(def);\n            }\n          }\n        } else {\n          const def = getComponentDef(dep) || getDirectiveDef(dep);\n          if (def) {\n            cachedDirectiveDefs.push(def);\n          }\n        }\n      }\n    }\n    return cachedDirectiveDefs;\n  };\n  const pipeDefs = () => {\n    if (cachedPipeDefs === null) {\n      cachedPipeDefs = [];\n      const seen = new Set();\n      for (const rawDep of imports) {\n        const dep = resolveForwardRef(rawDep);\n        if (seen.has(dep)) {\n          continue;\n        }\n        seen.add(dep);\n        if (!!getNgModuleDef(dep)) {\n          const scope = transitiveScopesFor(dep);\n          for (const pipe of scope.exported.pipes) {\n            const def = getPipeDef$1(pipe);\n            if (def && !seen.has(pipe)) {\n              seen.add(pipe);\n              cachedPipeDefs.push(def);\n            }\n          }\n        } else {\n          const def = getPipeDef$1(dep);\n          if (def) {\n            cachedPipeDefs.push(def);\n          }\n        }\n      }\n    }\n    return cachedPipeDefs;\n  };\n  return {\n    directiveDefs,\n    pipeDefs\n  };\n}\nfunction hasSelectorScope(component) {\n  return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nfunction compileDirective(type, directive) {\n  let ngDirectiveDef = null;\n  addDirectiveFactoryDef(type, directive || {});\n  Object.defineProperty(type, NG_DIR_DEF, {\n    get: () => {\n      if (ngDirectiveDef === null) {\n        // `directive` can be null in the case of abstract directives as a base class\n        // that use `@Directive()` with no selector. In that case, pass empty object to the\n        // `directiveMetadata` function instead of null.\n        const meta = getDirectiveMetadata(type, directive || {});\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'directive',\n          type\n        });\n        ngDirectiveDef = compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n      }\n      return ngDirectiveDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\nfunction getDirectiveMetadata(type, metadata) {\n  const name = type && type.name;\n  const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n  const compiler = getCompilerFacade({\n    usage: 0 /* JitCompilerUsage.Decorator */,\n    kind: 'directive',\n    type\n  });\n  const facade = directiveMetadata(type, metadata);\n  facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n  if (facade.usesInheritance) {\n    addDirectiveDefToUndecoratedParents(type);\n  }\n  return {\n    metadata: facade,\n    sourceMapUrl\n  };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n  let ngFactoryDef = null;\n  Object.defineProperty(type, NG_FACTORY_DEF, {\n    get: () => {\n      if (ngFactoryDef === null) {\n        const meta = getDirectiveMetadata(type, metadata);\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'directive',\n          type\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n          name: meta.metadata.name,\n          type: meta.metadata.type,\n          typeArgumentCount: 0,\n          deps: reflectDependencies(type),\n          target: compiler.FactoryTarget.Directive\n        });\n      }\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\nfunction extendsDirectlyFromObject(type) {\n  return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nfunction directiveMetadata(type, metadata) {\n  // Reflect inputs and outputs.\n  const reflect = getReflect();\n  const propMetadata = reflect.ownPropMetadata(type);\n  return {\n    name: type.name,\n    type: type,\n    selector: metadata.selector !== undefined ? metadata.selector : null,\n    host: metadata.host || EMPTY_OBJ,\n    propMetadata: propMetadata,\n    inputs: metadata.inputs || EMPTY_ARRAY,\n    outputs: metadata.outputs || EMPTY_ARRAY,\n    queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n    lifecycle: {\n      usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')\n    },\n    typeSourceSpan: null,\n    usesInheritance: !extendsDirectlyFromObject(type),\n    exportAs: extractExportAs(metadata.exportAs),\n    providers: metadata.providers || null,\n    viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n    isStandalone: !!metadata.standalone,\n    hostDirectives: metadata.hostDirectives?.map(directive => typeof directive === 'function' ? {\n      directive\n    } : directive) || null\n  };\n}\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n  const objPrototype = Object.prototype;\n  let parent = Object.getPrototypeOf(type.prototype).constructor;\n  // Go up the prototype until we hit `Object`.\n  while (parent && parent !== objPrototype) {\n    // Since inheritance works if the class was annotated already, we only need to add\n    // the def if there are no annotations and the def hasn't been created already.\n    if (!getDirectiveDef(parent) && !getComponentDef(parent) && shouldAddAbstractDirective(parent)) {\n      compileDirective(parent, null);\n    }\n    parent = Object.getPrototypeOf(parent);\n  }\n}\nfunction convertToR3QueryPredicate(selector) {\n  return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction convertToR3QueryMetadata(propertyName, ann) {\n  return {\n    propertyName: propertyName,\n    predicate: convertToR3QueryPredicate(ann.selector),\n    descendants: ann.descendants,\n    first: ann.first,\n    read: ann.read ? ann.read : null,\n    static: !!ann.static,\n    emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly\n  };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n  const queriesMeta = [];\n  for (const field in propMetadata) {\n    if (propMetadata.hasOwnProperty(field)) {\n      const annotations = propMetadata[field];\n      annotations.forEach(ann => {\n        if (isQueryAnn(ann)) {\n          if (!ann.selector) {\n            throw new Error(`Can't construct a query for the property \"${field}\" of ` + `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n          }\n          if (annotations.some(isInputAnnotation)) {\n            throw new Error(`Cannot combine @Input decorators with query decorators`);\n          }\n          queriesMeta.push(convertToR3QueryMetadata(field, ann));\n        }\n      });\n    }\n  }\n  return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n  return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n  const name = value.ngMetadataName;\n  return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n  const name = value.ngMetadataName;\n  return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n  return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n  return value.split(',').map(piece => piece.trim());\n}\nconst LIFECYCLE_HOOKS = ['ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked', 'ngAfterContentInit', 'ngAfterContentChecked'];\nfunction shouldAddAbstractDirective(type) {\n  const reflect = getReflect();\n  if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n    return true;\n  }\n  const propMetadata = reflect.propMetadata(type);\n  for (const field in propMetadata) {\n    const annotations = propMetadata[field];\n    for (let i = 0; i < annotations.length; i++) {\n      const current = annotations[i];\n      const metadataName = current.ngMetadataName;\n      if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === 'Output' || metadataName === 'HostBinding' || metadataName === 'HostListener') {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction compilePipe(type, meta) {\n  let ngPipeDef = null;\n  let ngFactoryDef = null;\n  Object.defineProperty(type, NG_FACTORY_DEF, {\n    get: () => {\n      if (ngFactoryDef === null) {\n        const metadata = getPipeMetadata(type, meta);\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'pipe',\n          type: metadata.type\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n          name: metadata.name,\n          type: metadata.type,\n          typeArgumentCount: 0,\n          deps: reflectDependencies(type),\n          target: compiler.FactoryTarget.Pipe\n        });\n      }\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n  Object.defineProperty(type, NG_PIPE_DEF, {\n    get: () => {\n      if (ngPipeDef === null) {\n        const metadata = getPipeMetadata(type, meta);\n        const compiler = getCompilerFacade({\n          usage: 0 /* JitCompilerUsage.Decorator */,\n          kind: 'pipe',\n          type: metadata.type\n        });\n        ngPipeDef = compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n      }\n      return ngPipeDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\nfunction getPipeMetadata(type, meta) {\n  return {\n    type: type,\n    name: type.name,\n    pipeName: meta.name,\n    pure: meta.pure !== undefined ? meta.pure : true,\n    isStandalone: !!meta.standalone\n  };\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = /*#__PURE__*/makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = /*#__PURE__*/makeDecorator('Component', (c = {}) => ({\n  changeDetection: ChangeDetectionStrategy.Default,\n  ...c\n}), Directive, undefined, (type, meta) => compileComponent(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = /*#__PURE__*/makeDecorator('Pipe', p => ({\n  pure: true,\n  ...p\n}), undefined, undefined, (type, meta) => compilePipe(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = /*#__PURE__*/makePropDecorator('Input', bindingPropertyName => ({\n  bindingPropertyName\n}));\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = /*#__PURE__*/makePropDecorator('Output', bindingPropertyName => ({\n  bindingPropertyName\n}));\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = /*#__PURE__*/makePropDecorator('HostBinding', hostPropertyName => ({\n  hostPropertyName\n}));\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n *   numberOfClicks = 0;\n *\n *   @HostListener('click', ['$event.target'])\n *   onClick(btn) {\n *     console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n *   }\n * }\n *\n * @Component({\n *   selector: 'app',\n *   template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for `Enter` key-press\n * events on the global `window`.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n *   selector: 'app',\n *   template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key\n * to increment the counter.\n *   <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n *   counter = 0;\n *   @HostListener('window:keydown.enter', ['$event'])\n *   handleKeyDown(event: KeyboardEvent) {\n *     this.counter++;\n *   }\n *   resetCounter() {\n *     this.counter = 0;\n *   }\n * }\n * ```\n * The list of valid key names for `keydown` and `keyup` events\n * can be found here:\n * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values\n *\n * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.\n *\n * The global target names that can be used to prefix an event name are\n * `document:`, `window:` and `body:`.\n *\n * @Annotation\n * @publicApi\n */\nconst HostListener = /*#__PURE__*/makePropDecorator('HostListener', (eventName, args) => ({\n  eventName,\n  args\n}));\n\n/**\n * @Annotation\n * @publicApi\n */\nconst NgModule = /*#__PURE__*/makeDecorator('NgModule', ngModule => ngModule, undefined, undefined,\n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n(type, meta) => compileNgModule(type, meta));\n\n/**\n * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\nfunction noop(...args) {\n  // Do nothing.\n}\n\n/*\n * This file exists to support compilation of @angular/core in Ivy mode.\n *\n * When the Angular compiler processes a compilation unit, it normally writes imports to\n * @angular/core. When compiling the core package itself this strategy isn't usable. Instead, the\n * compiler writes imports to this file.\n *\n * Only a subset of such imports are supported - core is not allowed to declare components or pipes.\n * A check in ngtsc's `R3SymbolsImportRewriter` validates this condition. The rewriter is only used\n * when compiling @angular/core and is responsible for translating an external name (prefixed with\n * ɵ) to the internal symbol name as exported below.\n *\n * The below symbols are used for @Injectable and @NgModule compilation.\n */\n/**\n * The existence of this constant (in this particular file) informs the Angular compiler that the\n * current program is actually @angular/core, which needs to be compiled specially.\n */\nconst ITS_JUST_ANGULAR = true;\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n *\n * ```\n *  function initializeApp(): Promise<any> {\n *    return new Promise((resolve, reject) => {\n *      // Do some asynchronous stuff\n *      resolve();\n *    });\n *  }\n *\n *  @NgModule({\n *   imports: [BrowserModule],\n *   declarations: [AppComponent],\n *   bootstrap: [AppComponent],\n *   providers: [{\n *     provide: APP_INITIALIZER,\n *     useFactory: () => initializeApp,\n *     multi: true\n *    }]\n *   })\n *  export class AppModule {}\n * ```\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ```\n *  function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n *   return () => httpClient.get(\"https://someUrl.com/api/user\")\n *     .pipe(\n *        tap(user => { ... })\n *     );\n *  }\n *\n *  @NgModule({\n *    imports: [BrowserModule, HttpClientModule],\n *    declarations: [AppComponent],\n *    bootstrap: [AppComponent],\n *    providers: [{\n *      provide: APP_INITIALIZER,\n *      useFactory: initializeAppFactory,\n *      deps: [HttpClient],\n *      multi: true\n *    }]\n *  })\n *  export class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_INITIALIZER = /*#__PURE__*/new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\nlet ApplicationInitStatus = /*#__PURE__*/(() => {\n  class ApplicationInitStatus {\n    constructor(appInits) {\n      this.appInits = appInits;\n      this.resolve = noop;\n      this.reject = noop;\n      this.initialized = false;\n      this.done = false;\n      // TODO: Throw RuntimeErrorCode.INVALID_MULTI_PROVIDER if appInits is not an array\n      this.donePromise = new Promise((res, rej) => {\n        this.resolve = res;\n        this.reject = rej;\n      });\n    }\n    /** @internal */\n    runInitializers() {\n      if (this.initialized) {\n        return;\n      }\n      const asyncInitPromises = [];\n      const complete = () => {\n        this.done = true;\n        this.resolve();\n      };\n      if (this.appInits) {\n        for (let i = 0; i < this.appInits.length; i++) {\n          const initResult = this.appInits[i]();\n          if (isPromise(initResult)) {\n            asyncInitPromises.push(initResult);\n          } else if (isObservable(initResult)) {\n            const observableAsPromise = new Promise((resolve, reject) => {\n              initResult.subscribe({\n                complete: resolve,\n                error: reject\n              });\n            });\n            asyncInitPromises.push(observableAsPromise);\n          }\n        }\n      }\n      Promise.all(asyncInitPromises).then(() => {\n        complete();\n      }).catch(e => {\n        this.reject(e);\n      });\n      if (asyncInitPromises.length === 0) {\n        complete();\n      }\n      this.initialized = true;\n    }\n  }\n  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) {\n    return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8));\n  };\n  ApplicationInitStatus.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: ApplicationInitStatus,\n    factory: ApplicationInitStatus.ɵfac,\n    providedIn: 'root'\n  });\n  return ApplicationInitStatus;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'root'\n    }]\n  }], function () {\n    return [{\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [APP_INITIALIZER]\n      }, {\n        type: Optional\n      }]\n    }];\n  }, null);\n})();\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nconst APP_ID = /*#__PURE__*/new InjectionToken('AppId', {\n  providedIn: 'root',\n  factory: _appIdRandomProviderFactory\n});\nfunction _appIdRandomProviderFactory() {\n  return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nconst APP_ID_RANDOM_PROVIDER = {\n  provide: APP_ID,\n  useFactory: _appIdRandomProviderFactory,\n  deps: []\n};\nfunction _randomChar() {\n  return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = /*#__PURE__*/new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = /*#__PURE__*/new InjectionToken('Platform ID', {\n  providedIn: 'platform',\n  factory: () => 'unknown' // set a default platform name, when none set explicitly\n});\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nconst PACKAGE_ROOT_URL = /*#__PURE__*/new InjectionToken('Application Packages Root URL');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = /*#__PURE__*/new InjectionToken('AnimationModuleType');\nlet Console = /*#__PURE__*/(() => {\n  class Console {\n    log(message) {\n      // tslint:disable-next-line:no-console\n      console.log(message);\n    }\n    // Note: for reporting errors use `DOM.logError()` as it is platform specific\n    warn(message) {\n      // tslint:disable-next-line:no-console\n      console.warn(message);\n    }\n  }\n  Console.ɵfac = function Console_Factory(t) {\n    return new (t || Console)();\n  };\n  Console.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: Console,\n    factory: Console.ɵfac,\n    providedIn: 'platform'\n  });\n  return Console;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'platform'\n    }]\n  }], null, null);\n})();\n\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n  if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n    // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n    // * In order to preserve backwards compatibility, we use Angular default value over\n    //   Closure Compiler's one.\n    return goog.LOCALE;\n  } else {\n    // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n    // COMPILE-TIME INLINER.\n    //\n    // * During compile time inlining of translations the expression will be replaced\n    //   with a string literal that is the current locale. Other forms of this expression are not\n    //   guaranteed to be replaced.\n    //\n    // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n    //   if required, or just to provide their own `LOCALE_ID` provider.\n    return typeof $localize !== 'undefined' && $localize.locale || DEFAULT_LOCALE_ID;\n  }\n}\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst LOCALE_ID = /*#__PURE__*/new InjectionToken('LocaleId', {\n  providedIn: 'root',\n  factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale()\n});\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst DEFAULT_CURRENCY_CODE = /*#__PURE__*/new InjectionToken('DefaultCurrencyCode', {\n  providedIn: 'root',\n  factory: () => USD_CURRENCY_CODE\n});\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS = /*#__PURE__*/new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS_FORMAT = /*#__PURE__*/new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nvar MissingTranslationStrategy = /*#__PURE__*/(() => {\n  MissingTranslationStrategy = MissingTranslationStrategy || {};\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n  return MissingTranslationStrategy;\n})();\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass ModuleWithComponentFactories {\n  constructor(ngModuleFactory, componentFactories) {\n    this.ngModuleFactory = ngModuleFactory;\n    this.componentFactories = componentFactories;\n  }\n}\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nlet Compiler = /*#__PURE__*/(() => {\n  class Compiler {\n    /**\n     * Compiles the given NgModule and all of its components. All templates of the components listed\n     * in `entryComponents` have to be inlined.\n     */\n    compileModuleSync(moduleType) {\n      return new NgModuleFactory(moduleType);\n    }\n    /**\n     * Compiles the given NgModule and all of its components\n     */\n    compileModuleAsync(moduleType) {\n      return Promise.resolve(this.compileModuleSync(moduleType));\n    }\n    /**\n     * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n     */\n    compileModuleAndAllComponentsSync(moduleType) {\n      const ngModuleFactory = this.compileModuleSync(moduleType);\n      const moduleDef = getNgModuleDef(moduleType);\n      const componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce((factories, declaration) => {\n        const componentDef = getComponentDef(declaration);\n        componentDef && factories.push(new ComponentFactory(componentDef));\n        return factories;\n      }, []);\n      return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n    }\n    /**\n     * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n     */\n    compileModuleAndAllComponentsAsync(moduleType) {\n      return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\n    }\n    /**\n     * Clears all caches.\n     */\n    clearCache() {}\n    /**\n     * Clears the cache for the given component/ngModule.\n     */\n    clearCacheFor(type) {}\n    /**\n     * Returns the id for a given NgModule, if one is defined and known to the compiler.\n     */\n    getModuleId(moduleType) {\n      return undefined;\n    }\n  }\n  Compiler.ɵfac = function Compiler_Factory(t) {\n    return new (t || Compiler)();\n  };\n  Compiler.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: Compiler,\n    factory: Compiler.ɵfac,\n    providedIn: 'root'\n  });\n  return Compiler;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'root'\n    }]\n  }], null, null);\n})();\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nconst COMPILER_OPTIONS = /*#__PURE__*/new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass CompilerFactory {}\n\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction applyChanges(component) {\n  ngDevMode && assertDefined(component, 'component');\n  markViewDirty(getComponentViewByInstance(component));\n  getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\n}\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n *   bazel run //packages/core/test/bundling/todo:devserver\n *\n *  Then load `localhost:5432` and start using the console tools.\n */\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nconst GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nfunction publishDefaultGlobalUtils$1() {\n  if (!_published) {\n    _published = true;\n    /**\n     * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n     * The contract of the function might be changed in any release and/or the function can be\n     * removed completely.\n     */\n    publishGlobalUtil('ɵsetProfiler', setProfiler);\n    publishGlobalUtil('getDirectiveMetadata', getDirectiveMetadata$1);\n    publishGlobalUtil('getComponent', getComponent);\n    publishGlobalUtil('getContext', getContext);\n    publishGlobalUtil('getListeners', getListeners);\n    publishGlobalUtil('getOwningComponent', getOwningComponent);\n    publishGlobalUtil('getHostElement', getHostElement);\n    publishGlobalUtil('getInjector', getInjector);\n    publishGlobalUtil('getRootComponents', getRootComponents);\n    publishGlobalUtil('getDirectives', getDirectives);\n    publishGlobalUtil('applyChanges', applyChanges);\n  }\n}\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nfunction publishGlobalUtil(name, fn) {\n  if (typeof COMPILED === 'undefined' || !COMPILED) {\n    // Note: we can't export `ng` when using closure enhanced optimization as:\n    // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n    // - we can't declare a closure extern as the namespace `ng` is already used within Google\n    //   for typings for AngularJS (via `goog.provide('ng....')`).\n    const w = _global;\n    ngDevMode && assertDefined(fn, 'function not defined');\n    if (w) {\n      let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n      if (!container) {\n        container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n      }\n      container[name] = fn;\n    }\n  }\n}\nconst promise = /*#__PURE__*/(() => Promise.resolve(0))();\nfunction scheduleMicroTask(fn) {\n  if (typeof Zone === 'undefined') {\n    // use promise to schedule microTask instead of use Zone\n    promise.then(() => {\n      fn && fn.apply(null, null);\n    });\n  } else {\n    Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n  }\n}\nfunction getNativeRequestAnimationFrame() {\n  let nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n  let nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n  if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n    // use unpatched version of requestAnimationFrame(native delegate) if possible\n    // to avoid another Change detection\n    const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n    if (unpatchedRequestAnimationFrame) {\n      nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n    }\n    const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n    if (unpatchedCancelAnimationFrame) {\n      nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n    }\n  }\n  return {\n    nativeRequestAnimationFrame,\n    nativeCancelAnimationFrame\n  };\n}\nclass AsyncStackTaggingZoneSpec {\n  constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {\n    this.name = 'asyncStackTagging for ' + namePrefix;\n    this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);\n  }\n  onScheduleTask(delegate, _current, target, task) {\n    task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);\n    return delegate.scheduleTask(target, task);\n  }\n  onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {\n    let ret;\n    if (task.consoleTask) {\n      ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));\n    } else {\n      ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);\n    }\n    return ret;\n  }\n}\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n *   - docs explaining zones and the use of zones in Angular and change-detection\n *   - link to runOutsideAngular/run (throughout this file!)\n *   -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n *   selector: 'ng-zone-demo',\n *   template: `\n *     <h2>Demo: NgZone</h2>\n *\n *     <p>Progress: {{progress}}%</p>\n *     <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n *     <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n *     <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n *   `,\n * })\n * export class NgZoneDemo {\n *   progress: number = 0;\n *   label: string;\n *\n *   constructor(private _ngZone: NgZone) {}\n *\n *   // Loop inside the Angular zone\n *   // so the UI DOES refresh after each setTimeout cycle\n *   processWithinAngularZone() {\n *     this.label = 'inside';\n *     this.progress = 0;\n *     this._increaseProgress(() => console.log('Inside Done!'));\n *   }\n *\n *   // Loop outside of the Angular zone\n *   // so the UI DOES NOT refresh after each setTimeout cycle\n *   processOutsideOfAngularZone() {\n *     this.label = 'outside';\n *     this.progress = 0;\n *     this._ngZone.runOutsideAngular(() => {\n *       this._increaseProgress(() => {\n *         // reenter the Angular zone and display done\n *         this._ngZone.run(() => { console.log('Outside Done!'); });\n *       });\n *     });\n *   }\n *\n *   _increaseProgress(doneCallback: () => void) {\n *     this.progress += 1;\n *     console.log(`Current progress: ${this.progress}%`);\n *\n *     if (this.progress < 100) {\n *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n *     } else {\n *       doneCallback();\n *     }\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass NgZone {\n  constructor({\n    enableLongStackTrace = false,\n    shouldCoalesceEventChangeDetection = false,\n    shouldCoalesceRunChangeDetection = false\n  }) {\n    this.hasPendingMacrotasks = false;\n    this.hasPendingMicrotasks = false;\n    /**\n     * Whether there are no outstanding microtasks or macrotasks.\n     */\n    this.isStable = true;\n    /**\n     * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n     */\n    this.onUnstable = new EventEmitter(false);\n    /**\n     * Notifies when there is no more microtasks enqueued in the current VM Turn.\n     * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n     * For this reason this event can fire multiple times per VM Turn.\n     */\n    this.onMicrotaskEmpty = new EventEmitter(false);\n    /**\n     * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n     * implies we are about to relinquish VM turn.\n     * This event gets called just once.\n     */\n    this.onStable = new EventEmitter(false);\n    /**\n     * Notifies that an error has been delivered.\n     */\n    this.onError = new EventEmitter(false);\n    if (typeof Zone == 'undefined') {\n      throw new RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `In this configuration Angular requires Zone.js`);\n    }\n    Zone.assertZonePatched();\n    const self = this;\n    self._nesting = 0;\n    self._outer = self._inner = Zone.current;\n    // AsyncStackTaggingZoneSpec provides `linked stack traces` to show\n    // where the async operation is scheduled. For more details, refer\n    // to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/\n    // And we only import this AsyncStackTaggingZoneSpec in development mode,\n    // in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.\n    if (ngDevMode) {\n      self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n    }\n    if (Zone['TaskTrackingZoneSpec']) {\n      self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());\n    }\n    if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n      self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n    }\n    // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n    // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n    self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n    self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n    self.lastRequestAnimationFrameId = -1;\n    self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n    forkInnerZoneWithAngularBehavior(self);\n  }\n  static isInAngularZone() {\n    // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n    return typeof Zone !== 'undefined' && Zone.current.get('isAngularZone') === true;\n  }\n  static assertInAngularZone() {\n    if (!NgZone.isInAngularZone()) {\n      throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');\n    }\n  }\n  static assertNotInAngularZone() {\n    if (NgZone.isInAngularZone()) {\n      throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to not be in Angular Zone, but it is!');\n    }\n  }\n  /**\n   * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n   * the function.\n   *\n   * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n   * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * within the Angular zone.\n   *\n   * If a synchronous error happens it will be rethrown and not reported via `onError`.\n   */\n  run(fn, applyThis, applyArgs) {\n    return this._inner.run(fn, applyThis, applyArgs);\n  }\n  /**\n   * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n   * returned by the function.\n   *\n   * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n   * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * within the Angular zone.\n   *\n   * If a synchronous error happens it will be rethrown and not reported via `onError`.\n   */\n  runTask(fn, applyThis, applyArgs, name) {\n    const zone = this._inner;\n    const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n    try {\n      return zone.runTask(task, applyThis, applyArgs);\n    } finally {\n      zone.cancelTask(task);\n    }\n  }\n  /**\n   * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n   * rethrown.\n   */\n  runGuarded(fn, applyThis, applyArgs) {\n    return this._inner.runGuarded(fn, applyThis, applyArgs);\n  }\n  /**\n   * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n   * the function.\n   *\n   * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n   * work that\n   * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * outside of the Angular zone.\n   *\n   * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n   */\n  runOutsideAngular(fn) {\n    return this._outer.run(fn);\n  }\n}\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n  // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n  // re-entry. The case is:\n  //\n  // @Component({...})\n  // export class AppComponent {\n  // constructor(private ngZone: NgZone) {\n  //   this.ngZone.onStable.subscribe(() => {\n  //     this.ngZone.run(() => console.log('stable'););\n  //   });\n  // }\n  //\n  // The onStable subscriber run another function inside ngZone\n  // which causes `checkStable()` re-entry.\n  // But this fix causes some issues in g3, so this fix will be\n  // launched in another PR.\n  if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n    try {\n      zone._nesting++;\n      zone.onMicrotaskEmpty.emit(null);\n    } finally {\n      zone._nesting--;\n      if (!zone.hasPendingMicrotasks) {\n        try {\n          zone.runOutsideAngular(() => zone.onStable.emit(null));\n        } finally {\n          zone.isStable = true;\n        }\n      }\n    }\n  }\n}\nfunction delayChangeDetectionForEvents(zone) {\n  /**\n   * We also need to check _nesting here\n   * Consider the following case with shouldCoalesceRunChangeDetection = true\n   *\n   * ngZone.run(() => {});\n   * ngZone.run(() => {});\n   *\n   * We want the two `ngZone.run()` only trigger one change detection\n   * when shouldCoalesceRunChangeDetection is true.\n   * And because in this case, change detection run in async way(requestAnimationFrame),\n   * so we also need to check the _nesting here to prevent multiple\n   * change detections.\n   */\n  if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n    return;\n  }\n  zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => {\n    // This is a work around for https://github.com/angular/angular/issues/36839.\n    // The core issue is that when event coalescing is enabled it is possible for microtasks\n    // to get flushed too early (As is the case with `Promise.then`) between the\n    // coalescing eventTasks.\n    //\n    // To workaround this we schedule a \"fake\" eventTask before we process the\n    // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n    //  will prevent the microtasks queue from getting drained in between the coalescing\n    // eventTask execution.\n    if (!zone.fakeTopEventTask) {\n      zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n        zone.lastRequestAnimationFrameId = -1;\n        updateMicroTaskStatus(zone);\n        zone.isCheckStableRunning = true;\n        checkStable(zone);\n        zone.isCheckStableRunning = false;\n      }, undefined, () => {}, () => {});\n    }\n    zone.fakeTopEventTask.invoke();\n  });\n  updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n  const delayChangeDetectionForEventsDelegate = () => {\n    delayChangeDetectionForEvents(zone);\n  };\n  zone._inner = zone._inner.fork({\n    name: 'angular',\n    properties: {\n      'isAngularZone': true\n    },\n    onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n      try {\n        onEnter(zone);\n        return delegate.invokeTask(target, task, applyThis, applyArgs);\n      } finally {\n        if (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask' || zone.shouldCoalesceRunChangeDetection) {\n          delayChangeDetectionForEventsDelegate();\n        }\n        onLeave(zone);\n      }\n    },\n    onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {\n      try {\n        onEnter(zone);\n        return delegate.invoke(target, callback, applyThis, applyArgs, source);\n      } finally {\n        if (zone.shouldCoalesceRunChangeDetection) {\n          delayChangeDetectionForEventsDelegate();\n        }\n        onLeave(zone);\n      }\n    },\n    onHasTask: (delegate, current, target, hasTaskState) => {\n      delegate.hasTask(target, hasTaskState);\n      if (current === target) {\n        // We are only interested in hasTask events which originate from our zone\n        // (A child hasTask event is not interesting to us)\n        if (hasTaskState.change == 'microTask') {\n          zone._hasPendingMicrotasks = hasTaskState.microTask;\n          updateMicroTaskStatus(zone);\n          checkStable(zone);\n        } else if (hasTaskState.change == 'macroTask') {\n          zone.hasPendingMacrotasks = hasTaskState.macroTask;\n        }\n      }\n    },\n    onHandleError: (delegate, current, target, error) => {\n      delegate.handleError(target, error);\n      zone.runOutsideAngular(() => zone.onError.emit(error));\n      return false;\n    }\n  });\n}\nfunction updateMicroTaskStatus(zone) {\n  if (zone._hasPendingMicrotasks || (zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.lastRequestAnimationFrameId !== -1) {\n    zone.hasPendingMicrotasks = true;\n  } else {\n    zone.hasPendingMicrotasks = false;\n  }\n}\nfunction onEnter(zone) {\n  zone._nesting++;\n  if (zone.isStable) {\n    zone.isStable = false;\n    zone.onUnstable.emit(null);\n  }\n}\nfunction onLeave(zone) {\n  zone._nesting--;\n  checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nclass NoopNgZone {\n  constructor() {\n    this.hasPendingMicrotasks = false;\n    this.hasPendingMacrotasks = false;\n    this.isStable = true;\n    this.onUnstable = new EventEmitter();\n    this.onMicrotaskEmpty = new EventEmitter();\n    this.onStable = new EventEmitter();\n    this.onError = new EventEmitter();\n  }\n  run(fn, applyThis, applyArgs) {\n    return fn.apply(applyThis, applyArgs);\n  }\n  runGuarded(fn, applyThis, applyArgs) {\n    return fn.apply(applyThis, applyArgs);\n  }\n  runOutsideAngular(fn) {\n    return fn();\n  }\n  runTask(fn, applyThis, applyArgs, name) {\n    return fn.apply(applyThis, applyArgs);\n  }\n}\n\n/**\n * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nconst TESTABILITY = /*#__PURE__*/new InjectionToken('');\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nconst TESTABILITY_GETTER = /*#__PURE__*/new InjectionToken('');\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\nlet Testability = /*#__PURE__*/(() => {\n  class Testability {\n    constructor(_ngZone, registry, testabilityGetter) {\n      this._ngZone = _ngZone;\n      this.registry = registry;\n      this._pendingCount = 0;\n      this._isZoneStable = true;\n      /**\n       * Whether any work was done since the last 'whenStable' callback. This is\n       * useful to detect if this could have potentially destabilized another\n       * component while it is stabilizing.\n       * @internal\n       */\n      this._didWork = false;\n      this._callbacks = [];\n      this.taskTrackingZone = null;\n      // If there was no Testability logic registered in the global scope\n      // before, register the current testability getter as a global one.\n      if (!_testabilityGetter) {\n        setTestabilityGetter(testabilityGetter);\n        testabilityGetter.addToWindow(registry);\n      }\n      this._watchAngularEvents();\n      _ngZone.run(() => {\n        this.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n      });\n    }\n    _watchAngularEvents() {\n      this._ngZone.onUnstable.subscribe({\n        next: () => {\n          this._didWork = true;\n          this._isZoneStable = false;\n        }\n      });\n      this._ngZone.runOutsideAngular(() => {\n        this._ngZone.onStable.subscribe({\n          next: () => {\n            NgZone.assertNotInAngularZone();\n            scheduleMicroTask(() => {\n              this._isZoneStable = true;\n              this._runCallbacksIfReady();\n            });\n          }\n        });\n      });\n    }\n    /**\n     * Increases the number of pending request\n     * @deprecated pending requests are now tracked with zones.\n     */\n    increasePendingRequestCount() {\n      this._pendingCount += 1;\n      this._didWork = true;\n      return this._pendingCount;\n    }\n    /**\n     * Decreases the number of pending request\n     * @deprecated pending requests are now tracked with zones\n     */\n    decreasePendingRequestCount() {\n      this._pendingCount -= 1;\n      if (this._pendingCount < 0) {\n        throw new Error('pending async requests below zero');\n      }\n      this._runCallbacksIfReady();\n      return this._pendingCount;\n    }\n    /**\n     * Whether an associated application is stable\n     */\n    isStable() {\n      return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n    }\n    _runCallbacksIfReady() {\n      if (this.isStable()) {\n        // Schedules the call backs in a new frame so that it is always async.\n        scheduleMicroTask(() => {\n          while (this._callbacks.length !== 0) {\n            let cb = this._callbacks.pop();\n            clearTimeout(cb.timeoutId);\n            cb.doneCb(this._didWork);\n          }\n          this._didWork = false;\n        });\n      } else {\n        // Still not stable, send updates.\n        let pending = this.getPendingTasks();\n        this._callbacks = this._callbacks.filter(cb => {\n          if (cb.updateCb && cb.updateCb(pending)) {\n            clearTimeout(cb.timeoutId);\n            return false;\n          }\n          return true;\n        });\n        this._didWork = true;\n      }\n    }\n    getPendingTasks() {\n      if (!this.taskTrackingZone) {\n        return [];\n      }\n      // Copy the tasks data so that we don't leak tasks.\n      return this.taskTrackingZone.macroTasks.map(t => {\n        return {\n          source: t.source,\n          // From TaskTrackingZone:\n          // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n          creationLocation: t.creationLocation,\n          data: t.data\n        };\n      });\n    }\n    addCallback(cb, timeout, updateCb) {\n      let timeoutId = -1;\n      if (timeout && timeout > 0) {\n        timeoutId = setTimeout(() => {\n          this._callbacks = this._callbacks.filter(cb => cb.timeoutId !== timeoutId);\n          cb(this._didWork, this.getPendingTasks());\n        }, timeout);\n      }\n      this._callbacks.push({\n        doneCb: cb,\n        timeoutId: timeoutId,\n        updateCb: updateCb\n      });\n    }\n    /**\n     * Wait for the application to be stable with a timeout. If the timeout is reached before that\n     * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n     *\n     * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n     *    whichever comes first.\n     * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n     *    specified, whenStable() will wait forever.\n     * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n     *    pending macrotasks changes. If this callback returns true doneCb will not be invoked\n     *    and no further updates will be issued.\n     */\n    whenStable(doneCb, timeout, updateCb) {\n      if (updateCb && !this.taskTrackingZone) {\n        throw new Error('Task tracking zone is required when passing an update callback to ' + 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n      }\n      // These arguments are 'Function' above to keep the public API simple.\n      this.addCallback(doneCb, timeout, updateCb);\n      this._runCallbacksIfReady();\n    }\n    /**\n     * Get the number of pending requests\n     * @deprecated pending requests are now tracked with zones\n     */\n    getPendingRequestCount() {\n      return this._pendingCount;\n    }\n    /**\n     * Registers an application with a testability hook so that it can be tracked.\n     * @param token token of application, root element\n     *\n     * @internal\n     */\n    registerApplication(token) {\n      this.registry.registerApplication(token, this);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     *\n     * @internal\n     */\n    unregisterApplication(token) {\n      this.registry.unregisterApplication(token);\n    }\n    /**\n     * Find providers by name\n     * @param using The root element to search from\n     * @param provider The name of binding variable\n     * @param exactMatch Whether using exactMatch\n     */\n    findProviders(using, provider, exactMatch) {\n      // TODO(juliemr): implement.\n      return [];\n    }\n  }\n  Testability.ɵfac = function Testability_Factory(t) {\n    return new (t || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER));\n  };\n  Testability.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: Testability,\n    factory: Testability.ɵfac\n  });\n  return Testability;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: NgZone\n    }, {\n      type: TestabilityRegistry\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [TESTABILITY_GETTER]\n      }]\n    }];\n  }, null);\n})();\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nlet TestabilityRegistry = /*#__PURE__*/(() => {\n  class TestabilityRegistry {\n    constructor() {\n      /** @internal */\n      this._applications = new Map();\n    }\n    /**\n     * Registers an application with a testability hook so that it can be tracked\n     * @param token token of application, root element\n     * @param testability Testability hook\n     */\n    registerApplication(token, testability) {\n      this._applications.set(token, testability);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     */\n    unregisterApplication(token) {\n      this._applications.delete(token);\n    }\n    /**\n     * Unregisters all applications\n     */\n    unregisterAllApplications() {\n      this._applications.clear();\n    }\n    /**\n     * Get a testability hook associated with the application\n     * @param elem root element\n     */\n    getTestability(elem) {\n      return this._applications.get(elem) || null;\n    }\n    /**\n     * Get all registered testabilities\n     */\n    getAllTestabilities() {\n      return Array.from(this._applications.values());\n    }\n    /**\n     * Get all registered applications(root elements)\n     */\n    getAllRootElements() {\n      return Array.from(this._applications.keys());\n    }\n    /**\n     * Find testability of a node in the Tree\n     * @param elem node\n     * @param findInAncestors whether finding testability in ancestors if testability was not found in\n     * current node\n     */\n    findTestabilityInTree(elem, findInAncestors = true) {\n      return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;\n    }\n  }\n  TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) {\n    return new (t || TestabilityRegistry)();\n  };\n  TestabilityRegistry.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: TestabilityRegistry,\n    factory: TestabilityRegistry.ɵfac,\n    providedIn: 'platform'\n  });\n  return TestabilityRegistry;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'platform'\n    }]\n  }], null, null);\n})();\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nfunction setTestabilityGetter(getter) {\n  _testabilityGetter = getter;\n}\nlet _testabilityGetter;\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\nlet _platformInjector = null;\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nconst ALLOW_MULTIPLE_PLATFORMS = /*#__PURE__*/new InjectionToken('AllowMultipleToken');\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nconst PLATFORM_DESTROY_LISTENERS = /*#__PURE__*/new InjectionToken('PlatformDestroyListeners');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = /*#__PURE__*/new InjectionToken('appBootstrapListener');\nfunction compileNgModuleFactory(injector, options, moduleType) {\n  ngDevMode && assertNgModuleType(moduleType);\n  const moduleFactory = new NgModuleFactory(moduleType);\n  // All of the logic below is irrelevant for AOT-compiled code.\n  if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n    return Promise.resolve(moduleFactory);\n  }\n  const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n  // Configure the compiler to use the provided options. This call may fail when multiple modules\n  // are bootstrapped with incompatible options, as a component can only be compiled according to\n  // a single set of options.\n  setJitOptions({\n    defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n    preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))\n  });\n  if (isComponentResourceResolutionQueueEmpty()) {\n    return Promise.resolve(moduleFactory);\n  }\n  const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers));\n  // In case there are no compiler providers, we just return the module factory as\n  // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n  // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n  // unnecessarily require the JIT compiler.\n  if (compilerProviders.length === 0) {\n    return Promise.resolve(moduleFactory);\n  }\n  const compiler = getCompilerFacade({\n    usage: 0 /* JitCompilerUsage.Decorator */,\n    kind: 'NgModule',\n    type: moduleType\n  });\n  const compilerInjector = Injector.create({\n    providers: compilerProviders\n  });\n  const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n  // The resource loader can also return a string while the \"resolveComponentResources\"\n  // always expects a promise. Therefore we need to wrap the returned value in a promise.\n  return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);\n}\nfunction publishDefaultGlobalUtils() {\n  ngDevMode && publishDefaultGlobalUtils$1();\n}\nfunction isBoundToModule(cf) {\n  return cf.isBoundToModule;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nclass NgProbeToken {\n  constructor(name, token) {\n    this.name = name;\n    this.token = token;\n  }\n}\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n  if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n    throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');\n  }\n  publishDefaultGlobalUtils();\n  _platformInjector = injector;\n  const platform = injector.get(PlatformRef);\n  runPlatformInitializers(injector);\n  return platform;\n}\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nfunction createOrReusePlatformInjector(providers = []) {\n  // If a platform injector already exists, it means that the platform\n  // is already bootstrapped and no additional actions are required.\n  if (_platformInjector) return _platformInjector;\n  // Otherwise, setup a new platform injector and run platform initializers.\n  const injector = createPlatformInjector(providers);\n  _platformInjector = injector;\n  publishDefaultGlobalUtils();\n  runPlatformInitializers(injector);\n  return injector;\n}\nfunction runPlatformInitializers(injector) {\n  const inits = injector.get(PLATFORM_INITIALIZER, null);\n  if (inits) {\n    inits.forEach(init => init());\n  }\n}\n/**\n * Internal create application API that implements the core application creation logic and optional\n * bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\nfunction internalCreateApplication(config) {\n  const {\n    rootComponent,\n    appProviders,\n    platformProviders\n  } = config;\n  if (NG_DEV_MODE && rootComponent !== undefined) {\n    assertStandaloneComponentType(rootComponent);\n  }\n  const platformInjector = createOrReusePlatformInjector(platformProviders);\n  const ngZone = getNgZone('zone.js', getNgZoneOptions());\n  return ngZone.run(() => {\n    // Create root application injector based on a set of providers configured at the platform\n    // bootstrap level as well as providers passed to the bootstrap call by a user.\n    const allAppProviders = [{\n      provide: NgZone,\n      useValue: ngZone\n    }, ...(appProviders || []) //\n    ];\n\n    const envInjector = createEnvironmentInjector(allAppProviders, platformInjector, 'Environment Injector');\n    const exceptionHandler = envInjector.get(ErrorHandler, null);\n    if (NG_DEV_MODE && !exceptionHandler) {\n      throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, 'No `ErrorHandler` found in the Dependency Injection tree.');\n    }\n    let onErrorSubscription;\n    ngZone.runOutsideAngular(() => {\n      onErrorSubscription = ngZone.onError.subscribe({\n        next: error => {\n          exceptionHandler.handleError(error);\n        }\n      });\n    });\n    // If the whole platform is destroyed, invoke the `destroy` method\n    // for all bootstrapped applications as well.\n    const destroyListener = () => envInjector.destroy();\n    const onPlatformDestroyListeners = platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n    onPlatformDestroyListeners.add(destroyListener);\n    envInjector.onDestroy(() => {\n      onErrorSubscription.unsubscribe();\n      onPlatformDestroyListeners.delete(destroyListener);\n    });\n    return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n      const initStatus = envInjector.get(ApplicationInitStatus);\n      initStatus.runInitializers();\n      return initStatus.donePromise.then(() => {\n        const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n        setLocaleId(localeId || DEFAULT_LOCALE_ID);\n        const appRef = envInjector.get(ApplicationRef);\n        if (rootComponent !== undefined) {\n          appRef.bootstrap(rootComponent);\n        }\n        return appRef;\n      });\n    });\n  });\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n  const desc = `Platform: ${name}`;\n  const marker = new InjectionToken(desc);\n  return (extraProviders = []) => {\n    let platform = getPlatform();\n    if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n      const platformProviders = [...providers, ...extraProviders, {\n        provide: marker,\n        useValue: true\n      }];\n      if (parentPlatformFactory) {\n        parentPlatformFactory(platformProviders);\n      } else {\n        createPlatform(createPlatformInjector(platformProviders, desc));\n      }\n    }\n    return assertPlatform(marker);\n  };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n  const platform = getPlatform();\n  if (!platform) {\n    throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode && 'No platform exists!');\n  }\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) {\n    throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, 'A platform with a different configuration has been created. Please destroy it first.');\n  }\n  return platform;\n}\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers = [], name) {\n  return Injector.create({\n    name,\n    providers: [{\n      provide: INJECTOR_SCOPE,\n      useValue: 'platform'\n    }, {\n      provide: PLATFORM_DESTROY_LISTENERS,\n      useValue: new Set([() => _platformInjector = null])\n    }, ...providers]\n  });\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n  getPlatform()?.destroy();\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n  return _platformInjector?.get(PlatformRef) ?? null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nlet PlatformRef = /*#__PURE__*/(() => {\n  class PlatformRef {\n    /** @internal */\n    constructor(_injector) {\n      this._injector = _injector;\n      this._modules = [];\n      this._destroyListeners = [];\n      this._destroyed = false;\n    }\n    /**\n     * Creates an instance of an `@NgModule` for the given platform.\n     *\n     * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n     *     argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n     */\n    bootstrapModuleFactory(moduleFactory, options) {\n      // Note: We need to create the NgZone _before_ we instantiate the module,\n      // as instantiating the module creates some providers eagerly.\n      // So we create a mini parent injector that just contains the new NgZone and\n      // pass that as parent to the NgModuleFactory.\n      const ngZone = getNgZone(options?.ngZone, getNgZoneOptions(options));\n      const providers = [{\n        provide: NgZone,\n        useValue: ngZone\n      }];\n      // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n      // created within the Angular zone\n      // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n      // created outside of the Angular zone.\n      return ngZone.run(() => {\n        const ngZoneInjector = Injector.create({\n          providers: providers,\n          parent: this.injector,\n          name: moduleFactory.moduleType.name\n        });\n        const moduleRef = moduleFactory.create(ngZoneInjector);\n        const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n        if (!exceptionHandler) {\n          throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, ngDevMode && 'No ErrorHandler. Is platform module (BrowserModule) included?');\n        }\n        ngZone.runOutsideAngular(() => {\n          const subscription = ngZone.onError.subscribe({\n            next: error => {\n              exceptionHandler.handleError(error);\n            }\n          });\n          moduleRef.onDestroy(() => {\n            remove(this._modules, moduleRef);\n            subscription.unsubscribe();\n          });\n        });\n        return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n          const initStatus = moduleRef.injector.get(ApplicationInitStatus);\n          initStatus.runInitializers();\n          return initStatus.donePromise.then(() => {\n            // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n            const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n            setLocaleId(localeId || DEFAULT_LOCALE_ID);\n            this._moduleDoBootstrap(moduleRef);\n            return moduleRef;\n          });\n        });\n      });\n    }\n    /**\n     * Creates an instance of an `@NgModule` for a given platform.\n     *\n     * @usageNotes\n     * ### Simple Example\n     *\n     * ```typescript\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n     * ```\n     *\n     */\n    bootstrapModule(moduleType, compilerOptions = []) {\n      const options = optionsReducer({}, compilerOptions);\n      return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n    }\n    _moduleDoBootstrap(moduleRef) {\n      const appRef = moduleRef.injector.get(ApplicationRef);\n      if (moduleRef._bootstrapComponents.length > 0) {\n        moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n      } else if (moduleRef.instance.ngDoBootstrap) {\n        moduleRef.instance.ngDoBootstrap(appRef);\n      } else {\n        throw new RuntimeError(-403 /* RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND */, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` + `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` + `Please define one of these.`);\n      }\n      this._modules.push(moduleRef);\n    }\n    /**\n     * Registers a listener to be called when the platform is destroyed.\n     */\n    onDestroy(callback) {\n      this._destroyListeners.push(callback);\n    }\n    /**\n     * Retrieves the platform {@link Injector}, which is the parent injector for\n     * every Angular application on the page and provides singleton providers.\n     */\n    get injector() {\n      return this._injector;\n    }\n    /**\n     * Destroys the current Angular platform and all Angular applications on the page.\n     * Destroys all modules and listeners registered with the platform.\n     */\n    destroy() {\n      if (this._destroyed) {\n        throw new RuntimeError(404 /* RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED */, ngDevMode && 'The platform has already been destroyed!');\n      }\n      this._modules.slice().forEach(module => module.destroy());\n      this._destroyListeners.forEach(listener => listener());\n      const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n      if (destroyListeners) {\n        destroyListeners.forEach(listener => listener());\n        destroyListeners.clear();\n      }\n      this._destroyed = true;\n    }\n    /**\n     * Indicates whether this instance was destroyed.\n     */\n    get destroyed() {\n      return this._destroyed;\n    }\n  }\n  PlatformRef.ɵfac = function PlatformRef_Factory(t) {\n    return new (t || PlatformRef)(ɵɵinject(Injector));\n  };\n  PlatformRef.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: PlatformRef,\n    factory: PlatformRef.ɵfac,\n    providedIn: 'platform'\n  });\n  return PlatformRef;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'platform'\n    }]\n  }], function () {\n    return [{\n      type: Injector\n    }];\n  }, null);\n})();\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nfunction getNgZoneOptions(options) {\n  return {\n    enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n    shouldCoalesceEventChangeDetection: !!(options && options.ngZoneEventCoalescing) || false,\n    shouldCoalesceRunChangeDetection: !!(options && options.ngZoneRunCoalescing) || false\n  };\n}\nfunction getNgZone(ngZoneToUse, options) {\n  let ngZone;\n  if (ngZoneToUse === 'noop') {\n    ngZone = new NoopNgZone();\n  } else {\n    ngZone = (ngZoneToUse === 'zone.js' ? undefined : ngZoneToUse) || new NgZone(options);\n  }\n  return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n  try {\n    const result = callback();\n    if (isPromise(result)) {\n      return result.catch(e => {\n        ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n        // rethrow as the exception handler might not do it\n        throw e;\n      });\n    }\n    return result;\n  } catch (e) {\n    ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n    // rethrow as the exception handler might not do it\n    throw e;\n  }\n}\nfunction optionsReducer(dst, objs) {\n  if (Array.isArray(objs)) {\n    dst = objs.reduce(optionsReducer, dst);\n  } else {\n    dst = {\n      ...dst,\n      ...objs\n    };\n  }\n  return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *      filter(stable => stable)\n *   ).subscribe(() => console.log('App is stable now');\n *   interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     tap(stable => console.log('App is stable now')),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => {\n *     this.value = counter;\n *     cd.detectChanges();\n *   });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\nlet ApplicationRef = /*#__PURE__*/(() => {\n  class ApplicationRef {\n    /**\n     * Indicates whether this instance was destroyed.\n     */\n    get destroyed() {\n      return this._destroyed;\n    }\n    /**\n     * The `EnvironmentInjector` used to create this application.\n     */\n    get injector() {\n      return this._injector;\n    }\n    /** @internal */\n    constructor(_zone, _injector, _exceptionHandler) {\n      this._zone = _zone;\n      this._injector = _injector;\n      this._exceptionHandler = _exceptionHandler;\n      /** @internal */\n      this._bootstrapListeners = [];\n      this._views = [];\n      this._runningTick = false;\n      this._stable = true;\n      this._destroyed = false;\n      this._destroyListeners = [];\n      /**\n       * Get a list of component types registered to this application.\n       * This list is populated even before the component is created.\n       */\n      this.componentTypes = [];\n      /**\n       * Get a list of components registered to this application.\n       */\n      this.components = [];\n      this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n        next: () => {\n          this._zone.run(() => {\n            this.tick();\n          });\n        }\n      });\n      const isCurrentlyStable = new Observable(observer => {\n        this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks;\n        this._zone.runOutsideAngular(() => {\n          observer.next(this._stable);\n          observer.complete();\n        });\n      });\n      const isStable = new Observable(observer => {\n        // Create the subscription to onStable outside the Angular Zone so that\n        // the callback is run outside the Angular Zone.\n        let stableSub;\n        this._zone.runOutsideAngular(() => {\n          stableSub = this._zone.onStable.subscribe(() => {\n            NgZone.assertNotInAngularZone();\n            // Check whether there are no pending macro/micro tasks in the next tick\n            // to allow for NgZone to update the state.\n            scheduleMicroTask(() => {\n              if (!this._stable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks) {\n                this._stable = true;\n                observer.next(true);\n              }\n            });\n          });\n        });\n        const unstableSub = this._zone.onUnstable.subscribe(() => {\n          NgZone.assertInAngularZone();\n          if (this._stable) {\n            this._stable = false;\n            this._zone.runOutsideAngular(() => {\n              observer.next(false);\n            });\n          }\n        });\n        return () => {\n          stableSub.unsubscribe();\n          unstableSub.unsubscribe();\n        };\n      });\n      this.isStable = merge$1(isCurrentlyStable, isStable.pipe(share()));\n    }\n    /**\n     * Bootstrap a component onto the element identified by its selector or, optionally, to a\n     * specified element.\n     *\n     * @usageNotes\n     * ### Bootstrap process\n     *\n     * When bootstrapping a component, Angular mounts it onto a target DOM element\n     * and kicks off automatic change detection. The target DOM element can be\n     * provided using the `rootSelectorOrNode` argument.\n     *\n     * If the target DOM element is not provided, Angular tries to find one on a page\n     * using the `selector` of the component that is being bootstrapped\n     * (first matched element is used).\n     *\n     * ### Example\n     *\n     * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n     * but it requires us to know the component while writing the application code.\n     *\n     * Imagine a situation where we have to wait for an API call to decide about the component to\n     * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n     * dynamically bootstrap a component.\n     *\n     * {@example core/ts/platform/platform.ts region='componentSelector'}\n     *\n     * Optionally, a component can be mounted onto a DOM element that does not match the\n     * selector of the bootstrapped component.\n     *\n     * In the following example, we are providing a CSS selector to match the target element.\n     *\n     * {@example core/ts/platform/platform.ts region='cssSelector'}\n     *\n     * While in this example, we are providing reference to a DOM node.\n     *\n     * {@example core/ts/platform/platform.ts region='domNode'}\n     */\n    bootstrap(componentOrFactory, rootSelectorOrNode) {\n      NG_DEV_MODE && this.warnIfDestroyed();\n      const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;\n      const initStatus = this._injector.get(ApplicationInitStatus);\n      if (!initStatus.done) {\n        const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n        const errorMessage = 'Cannot bootstrap as there are still asynchronous initializers running.' + (standalone ? '' : ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n        throw new RuntimeError(405 /* RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING */, NG_DEV_MODE && errorMessage);\n      }\n      let componentFactory;\n      if (isComponentFactory) {\n        componentFactory = componentOrFactory;\n      } else {\n        const resolver = this._injector.get(ComponentFactoryResolver$1);\n        componentFactory = resolver.resolveComponentFactory(componentOrFactory);\n      }\n      this.componentTypes.push(componentFactory.componentType);\n      // Create a factory associated with the current module if it's not bound to some other\n      const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef$1);\n      const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n      const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n      const nativeElement = compRef.location.nativeElement;\n      const testability = compRef.injector.get(TESTABILITY, null);\n      testability?.registerApplication(nativeElement);\n      compRef.onDestroy(() => {\n        this.detachView(compRef.hostView);\n        remove(this.components, compRef);\n        testability?.unregisterApplication(nativeElement);\n      });\n      this._loadComponent(compRef);\n      if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        const _console = this._injector.get(Console);\n        _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n      }\n      return compRef;\n    }\n    /**\n     * Invoke this method to explicitly process change detection and its side-effects.\n     *\n     * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n     * further changes are detected. If additional changes are picked up during this second cycle,\n     * bindings in the app have side-effects that cannot be resolved in a single change detection\n     * pass.\n     * In this case, Angular throws an error, since an Angular application can only have one change\n     * detection pass during which all change detection must complete.\n     */\n    tick() {\n      NG_DEV_MODE && this.warnIfDestroyed();\n      if (this._runningTick) {\n        throw new RuntimeError(101 /* RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK */, ngDevMode && 'ApplicationRef.tick is called recursively');\n      }\n      try {\n        this._runningTick = true;\n        for (let view of this._views) {\n          view.detectChanges();\n        }\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          for (let view of this._views) {\n            view.checkNoChanges();\n          }\n        }\n      } catch (e) {\n        // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n        this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n      } finally {\n        this._runningTick = false;\n      }\n    }\n    /**\n     * Attaches a view so that it will be dirty checked.\n     * The view will be automatically detached when it is destroyed.\n     * This will throw if the view is already attached to a ViewContainer.\n     */\n    attachView(viewRef) {\n      NG_DEV_MODE && this.warnIfDestroyed();\n      const view = viewRef;\n      this._views.push(view);\n      view.attachToAppRef(this);\n    }\n    /**\n     * Detaches a view from dirty checking again.\n     */\n    detachView(viewRef) {\n      NG_DEV_MODE && this.warnIfDestroyed();\n      const view = viewRef;\n      remove(this._views, view);\n      view.detachFromAppRef();\n    }\n    _loadComponent(componentRef) {\n      this.attachView(componentRef.hostView);\n      this.tick();\n      this.components.push(componentRef);\n      // Get the listeners lazily to prevent DI cycles.\n      const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);\n      if (ngDevMode && !Array.isArray(listeners)) {\n        throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' + `(expected an array, but got ${typeof listeners}). ` + 'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' + '`multi: true` provider.');\n      }\n      listeners.push(...this._bootstrapListeners);\n      listeners.forEach(listener => listener(componentRef));\n    }\n    /** @internal */\n    ngOnDestroy() {\n      if (this._destroyed) return;\n      try {\n        // Call all the lifecycle hooks.\n        this._destroyListeners.forEach(listener => listener());\n        // Destroy all registered views.\n        this._views.slice().forEach(view => view.destroy());\n        this._onMicrotaskEmptySubscription.unsubscribe();\n      } finally {\n        // Indicate that this instance is destroyed.\n        this._destroyed = true;\n        // Release all references.\n        this._views = [];\n        this._bootstrapListeners = [];\n        this._destroyListeners = [];\n      }\n    }\n    /**\n     * Registers a listener to be called when an instance is destroyed.\n     *\n     * @param callback A callback function to add as a listener.\n     * @returns A function which unregisters a listener.\n     *\n     * @internal\n     */\n    onDestroy(callback) {\n      NG_DEV_MODE && this.warnIfDestroyed();\n      this._destroyListeners.push(callback);\n      return () => remove(this._destroyListeners, callback);\n    }\n    /**\n     * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n     * will destroy the associated environment injectors as well as all the bootstrapped components\n     * with their views.\n     */\n    destroy() {\n      if (this._destroyed) {\n        throw new RuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.');\n      }\n      const injector = this._injector;\n      // Check that this injector instance supports destroy operation.\n      if (injector.destroy && !injector.destroyed) {\n        // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n        // hook, which invokes the remaining cleanup actions.\n        injector.destroy();\n      }\n    }\n    /**\n     * Returns the number of attached views.\n     */\n    get viewCount() {\n      return this._views.length;\n    }\n    warnIfDestroyed() {\n      if (NG_DEV_MODE && this._destroyed) {\n        console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));\n      }\n    }\n  }\n  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) {\n    return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(EnvironmentInjector), ɵɵinject(ErrorHandler));\n  };\n  ApplicationRef.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: ApplicationRef,\n    factory: ApplicationRef.ɵfac,\n    providedIn: 'root'\n  });\n  return ApplicationRef;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n    type: Injectable,\n    args: [{\n      providedIn: 'root'\n    }]\n  }], function () {\n    return [{\n      type: NgZone\n    }, {\n      type: EnvironmentInjector\n    }, {\n      type: ErrorHandler\n    }];\n  }, null);\n})();\nfunction remove(list, el) {\n  const index = list.indexOf(el);\n  if (index > -1) {\n    list.splice(index, 1);\n  }\n}\nfunction _lastDefined(args) {\n  for (let i = args.length - 1; i >= 0; i--) {\n    if (args[i] !== undefined) {\n      return args[i];\n    }\n  }\n  return undefined;\n}\nfunction _mergeArrays(parts) {\n  const result = [];\n  parts.forEach(part => part && result.push(...part));\n  return result;\n}\n\n/**\n * Returns whether Angular is in development mode.\n *\n * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the\n * application is built using the Angular CLI with the `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction isDevMode() {\n  return typeof ngDevMode === 'undefined' || !!ngDevMode;\n}\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * Using this method is discouraged as the Angular CLI will set production mode when using the\n * `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction enableProdMode() {\n  // The below check is there so when ngDevMode is set via terser\n  // `global['ngDevMode'] = false;` is also dropped.\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    _global['ngDevMode'] = false;\n  }\n}\n\n// Public API for Zone\n\n// Public API for render\n\n/**\n * Returns the NgModuleFactory with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n * @deprecated Use `getNgModuleById` instead.\n */\nfunction getModuleFactory(id) {\n  const type = getRegisteredNgModuleType(id);\n  if (!type) throw noModuleError(id);\n  return new NgModuleFactory(type);\n}\n/**\n * Returns the NgModule class with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n */\nfunction getNgModuleById(id) {\n  const type = getRegisteredNgModuleType(id);\n  if (!type) throw noModuleError(id);\n  return type;\n}\nfunction noModuleError(id) {\n  return new Error(`No module with ID ${id} loaded`);\n}\n\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nlet ChangeDetectorRef = /*#__PURE__*/(() => {\n  class ChangeDetectorRef {}\n  /**\n   * @internal\n   * @nocollapse\n   */\n  ChangeDetectorRef.__NG_ELEMENT_ID__ = injectChangeDetectorRef;\n  /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\n  return ChangeDetectorRef;\n})();\nfunction injectChangeDetectorRef(flags) {\n  return createViewRef(getCurrentTNode(), getLView(), (flags & 16 /* InternalInjectFlags.ForPipe */) === 16 /* InternalInjectFlags.ForPipe */);\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode, lView, isPipe) {\n  if (isComponentHost(tNode) && !isPipe) {\n    // The LView represents the location where the component is declared.\n    // Instead we want the LView for the component View and so we need to look it up.\n    const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n    return new ViewRef$1(componentView, componentView);\n  } else if (tNode.type & (3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */)) {\n    // The LView represents the location where the injection is requested from.\n    // We need to locate the containing LView (in case where the `lView` is an embedded view)\n    const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n    return new ViewRef$1(hostComponentView, lView);\n  }\n  return null;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nclass ViewRef extends ChangeDetectorRef {}\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <li *ngFor=\"let  item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n *   <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n *   <ng-template view-container-ref></ng-template>\n *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nclass EmbeddedViewRef extends ViewRef {}\n\n// Public API for compiler\n\n// This file exists for easily patching NgModuleFactoryLoader in g3\nvar ng_module_factory_loader_impl = {};\n\n/**\n * @publicApi\n */\nclass DebugEventListener {\n  constructor(name, callback) {\n    this.name = name;\n    this.callback = callback;\n  }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n  return debugEls.map(el => el.nativeElement);\n}\n/**\n * @publicApi\n */\nclass DebugNode {\n  constructor(nativeNode) {\n    this.nativeNode = nativeNode;\n  }\n  /**\n   * The `DebugElement` parent. Will be `null` if this is the root element.\n   */\n  get parent() {\n    const parent = this.nativeNode.parentNode;\n    return parent ? new DebugElement(parent) : null;\n  }\n  /**\n   * The host dependency injector. For example, the root element's component instance injector.\n   */\n  get injector() {\n    return getInjector(this.nativeNode);\n  }\n  /**\n   * The element's own component instance, if it has one.\n   */\n  get componentInstance() {\n    const nativeElement = this.nativeNode;\n    return nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement));\n  }\n  /**\n   * An object that provides parent context for this element. Often an ancestor component instance\n   * that governs this element.\n   *\n   * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n   * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n   * of heroes\"`.\n   */\n  get context() {\n    return getComponent(this.nativeNode) || getContext(this.nativeNode);\n  }\n  /**\n   * The callbacks attached to the component's @Output properties and/or the element's event\n   * properties.\n   */\n  get listeners() {\n    return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');\n  }\n  /**\n   * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n   * variable name.\n   */\n  get references() {\n    return getLocalRefs(this.nativeNode);\n  }\n  /**\n   * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n   * component lists in its providers metadata.\n   */\n  get providerTokens() {\n    return getInjectionTokens(this.nativeNode);\n  }\n}\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing-components-scenarios)\n * @see [Basics of testing components](guide/testing-components-basics)\n * @see [Testing utility APIs](guide/testing-utility-apis)\n */\nclass DebugElement extends DebugNode {\n  constructor(nativeNode) {\n    ngDevMode && assertDomNode(nativeNode);\n    super(nativeNode);\n  }\n  /**\n   * The underlying DOM element at the root of the component.\n   */\n  get nativeElement() {\n    return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n  }\n  /**\n   * The element tag name, if it is an element.\n   */\n  get name() {\n    const context = getLContext(this.nativeNode);\n    const lView = context ? context.lView : null;\n    if (lView !== null) {\n      const tData = lView[TVIEW].data;\n      const tNode = tData[context.nodeIndex];\n      return tNode.value;\n    } else {\n      return this.nativeNode.nodeName;\n    }\n  }\n  /**\n   *  Gets a map of property names to property values for an element.\n   *\n   *  This map includes:\n   *  - Regular property bindings (e.g. `[id]=\"id\"`)\n   *  - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n   *  - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n   *\n   *  It does not include:\n   *  - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n   *  - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n   */\n  get properties() {\n    const context = getLContext(this.nativeNode);\n    const lView = context ? context.lView : null;\n    if (lView === null) {\n      return {};\n    }\n    const tData = lView[TVIEW].data;\n    const tNode = tData[context.nodeIndex];\n    const properties = {};\n    // Collect properties from the DOM.\n    copyDomProperties(this.nativeElement, properties);\n    // Collect properties from the bindings. This is needed for animation renderer which has\n    // synthetic properties which don't get reflected into the DOM.\n    collectPropertyBindings(properties, tNode, lView, tData);\n    return properties;\n  }\n  /**\n   *  A map of attribute names to attribute values for an element.\n   */\n  get attributes() {\n    const attributes = {};\n    const element = this.nativeElement;\n    if (!element) {\n      return attributes;\n    }\n    const context = getLContext(element);\n    const lView = context ? context.lView : null;\n    if (lView === null) {\n      return {};\n    }\n    const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n    const lowercaseTNodeAttrs = [];\n    // For debug nodes we take the element's attribute directly from the DOM since it allows us\n    // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n    // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n    // however since we have the attributes already on the TNode, we can preserve the case by going\n    // through them once, adding them to the `attributes` map and putting their lower-cased name\n    // into an array. Afterwards when we're going through the native DOM attributes, we can check\n    // whether we haven't run into an attribute already through the TNode.\n    if (tNodeAttrs) {\n      let i = 0;\n      while (i < tNodeAttrs.length) {\n        const attrName = tNodeAttrs[i];\n        // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n        // else will be handled below when we read the final attributes off the DOM.\n        if (typeof attrName !== 'string') break;\n        const attrValue = tNodeAttrs[i + 1];\n        attributes[attrName] = attrValue;\n        lowercaseTNodeAttrs.push(attrName.toLowerCase());\n        i += 2;\n      }\n    }\n    const eAttrs = element.attributes;\n    for (let i = 0; i < eAttrs.length; i++) {\n      const attr = eAttrs[i];\n      const lowercaseName = attr.name.toLowerCase();\n      // Make sure that we don't assign the same attribute both in its\n      // case-sensitive form and the lower-cased one from the browser.\n      if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n        // Save the lowercase name to align the behavior between browsers.\n        // IE preserves the case, while all other browser convert it to lower case.\n        attributes[lowercaseName] = attr.value;\n      }\n    }\n    return attributes;\n  }\n  /**\n   * The inline styles of the DOM element.\n   *\n   * Will be `null` if there is no `style` property on the underlying DOM element.\n   *\n   * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n   */\n  get styles() {\n    if (this.nativeElement && this.nativeElement.style) {\n      return this.nativeElement.style;\n    }\n    return {};\n  }\n  /**\n   * A map containing the class names on the element as keys.\n   *\n   * This map is derived from the `className` property of the DOM element.\n   *\n   * Note: The values of this object will always be `true`. The class key will not appear in the KV\n   * object if it does not exist on the element.\n   *\n   * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n   */\n  get classes() {\n    const result = {};\n    const element = this.nativeElement;\n    // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n    const className = element.className;\n    const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n    classes.forEach(value => result[value] = true);\n    return result;\n  }\n  /**\n   * The `childNodes` of the DOM element as a `DebugNode` array.\n   *\n   * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n   */\n  get childNodes() {\n    const childNodes = this.nativeNode.childNodes;\n    const children = [];\n    for (let i = 0; i < childNodes.length; i++) {\n      const element = childNodes[i];\n      children.push(getDebugNode(element));\n    }\n    return children;\n  }\n  /**\n   * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n   */\n  get children() {\n    const nativeElement = this.nativeElement;\n    if (!nativeElement) return [];\n    const childNodes = nativeElement.children;\n    const children = [];\n    for (let i = 0; i < childNodes.length; i++) {\n      const element = childNodes[i];\n      children.push(getDebugNode(element));\n    }\n    return children;\n  }\n  /**\n   * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n   */\n  query(predicate) {\n    const results = this.queryAll(predicate);\n    return results[0] || null;\n  }\n  /**\n   * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n   */\n  queryAll(predicate) {\n    const matches = [];\n    _queryAll(this, predicate, matches, true);\n    return matches;\n  }\n  /**\n   * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n   */\n  queryAllNodes(predicate) {\n    const matches = [];\n    _queryAll(this, predicate, matches, false);\n    return matches;\n  }\n  /**\n   * Triggers the event by its name if there is a corresponding listener in the element's\n   * `listeners` collection.\n   *\n   * If the event lacks a listener or there's some other problem, consider\n   * calling `nativeElement.dispatchEvent(eventObject)`.\n   *\n   * @param eventName The name of the event to trigger\n   * @param eventObj The _event object_ expected by the handler\n   *\n   * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\n   */\n  triggerEventHandler(eventName, eventObj) {\n    const node = this.nativeNode;\n    const invokedListeners = [];\n    this.listeners.forEach(listener => {\n      if (listener.name === eventName) {\n        const callback = listener.callback;\n        callback.call(node, eventObj);\n        invokedListeners.push(callback);\n      }\n    });\n    // We need to check whether `eventListeners` exists, because it's something\n    // that Zone.js only adds to `EventTarget` in browser environments.\n    if (typeof node.eventListeners === 'function') {\n      // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n      // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n      // listener.\n      node.eventListeners(eventName).forEach(listener => {\n        // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n        // use `toString` on the listener and see if it contains the token. We use this approach to\n        // ensure that it still worked with compiled code since it cannot remove or rename string\n        // literals. We also considered using a special function name (i.e. if(listener.name ===\n        // special)) but that was more cumbersome and we were also concerned the compiled code could\n        // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n        if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n          const unwrappedListener = listener('__ngUnwrap__');\n          return invokedListeners.indexOf(unwrappedListener) === -1 && unwrappedListener.call(node, eventObj);\n        }\n      });\n    }\n  }\n}\nfunction copyDomProperties(element, properties) {\n  if (element) {\n    // Skip own properties (as those are patched)\n    let obj = Object.getPrototypeOf(element);\n    const NodePrototype = Node.prototype;\n    while (obj !== null && obj !== NodePrototype) {\n      const descriptors = Object.getOwnPropertyDescriptors(obj);\n      for (let key in descriptors) {\n        if (!key.startsWith('__') && !key.startsWith('on')) {\n          // don't include properties starting with `__` and `on`.\n          // `__` are patched values which should not be included.\n          // `on` are listeners which also should not be included.\n          const value = element[key];\n          if (isPrimitiveValue(value)) {\n            properties[key] = value;\n          }\n        }\n      }\n      obj = Object.getPrototypeOf(obj);\n    }\n  }\n}\nfunction isPrimitiveValue(value) {\n  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' || value === null;\n}\nfunction _queryAll(parentElement, predicate, matches, elementsOnly) {\n  const context = getLContext(parentElement.nativeNode);\n  const lView = context ? context.lView : null;\n  if (lView !== null) {\n    const parentTNode = lView[TVIEW].data[context.nodeIndex];\n    _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n  } else {\n    // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n    // APIs.\n    _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n  }\n}\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n  // For each type of TNode, specific logic is executed.\n  if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n    // Case 1: the TNode is an element\n    // The native node has to be checked.\n    _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n    if (isComponentHost(tNode)) {\n      // If the element is the host of a component, then all nodes in its view have to be processed.\n      // Note: the component's content (tNode.child) will be processed from the insertion points.\n      const componentView = getComponentLViewByIndex(tNode.index, lView);\n      if (componentView && componentView[TVIEW].firstChild) {\n        _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n      }\n    } else {\n      if (tNode.child) {\n        // Otherwise, its children have to be processed.\n        _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n      }\n      // We also have to query the DOM directly in order to catch elements inserted through\n      // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n      // times. ViewEngine could do it more efficiently, because all the insertions go through\n      // Renderer2, however that's not the case in Ivy. This approach is being used because:\n      // 1. Matching the ViewEngine behavior would mean potentially introducing a dependency\n      //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n      // 2. It allows us to capture nodes that were inserted directly via the DOM.\n      nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n    }\n    // In all cases, if a dynamic container exists for this node, each view inside it has to be\n    // processed.\n    const nodeOrContainer = lView[tNode.index];\n    if (isLContainer(nodeOrContainer)) {\n      _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  } else if (tNode.type & 4 /* TNodeType.Container */) {\n    // Case 2: the TNode is a container\n    // The native node has to be checked.\n    const lContainer = lView[tNode.index];\n    _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n    // Each view inside the container has to be processed.\n    _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n  } else if (tNode.type & 16 /* TNodeType.Projection */) {\n    // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n    // The nodes projected at this location all need to be processed.\n    const componentView = lView[DECLARATION_COMPONENT_VIEW];\n    const componentHost = componentView[T_HOST];\n    const head = componentHost.projection[tNode.projection];\n    if (Array.isArray(head)) {\n      for (let nativeNode of head) {\n        _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n      }\n    } else if (head) {\n      const nextLView = componentView[PARENT];\n      const nextTNode = nextLView[TVIEW].data[head.index];\n      _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  } else if (tNode.child) {\n    // Case 4: the TNode is a view.\n    _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n  }\n  // We don't want to go to the next sibling of the root node.\n  if (rootNativeNode !== nativeNode) {\n    // To determine the next node to be processed, we need to use the next or the projectionNext\n    // link, depending on whether the current node has been projected.\n    const nextTNode = tNode.flags & 2 /* TNodeFlags.isProjected */ ? tNode.projectionNext : tNode.next;\n    if (nextTNode) {\n      _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  }\n}\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    const childView = lContainer[i];\n    const firstChild = childView[TVIEW].firstChild;\n    if (firstChild) {\n      _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  }\n}\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n  if (rootNativeNode !== nativeNode) {\n    const debugNode = getDebugNode(nativeNode);\n    if (!debugNode) {\n      return;\n    }\n    // Type of the \"predicate and \"matches\" array are set based on the value of\n    // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n    // types with generics, so we manually cast the parameters accordingly.\n    if (elementsOnly && debugNode instanceof DebugElement && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n      matches.push(debugNode);\n    } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n      matches.push(debugNode);\n    }\n  }\n}\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n  const nodes = parentNode.childNodes;\n  const length = nodes.length;\n  for (let i = 0; i < length; i++) {\n    const node = nodes[i];\n    const debugNode = getDebugNode(node);\n    if (debugNode) {\n      if (elementsOnly && debugNode instanceof DebugElement && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n        matches.push(debugNode);\n      } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n        matches.push(debugNode);\n      }\n      _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n    }\n  }\n}\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n  let bindingIndexes = tNode.propertyBindings;\n  if (bindingIndexes !== null) {\n    for (let i = 0; i < bindingIndexes.length; i++) {\n      const bindingIndex = bindingIndexes[i];\n      const propMetadata = tData[bindingIndex];\n      const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n      const propertyName = metadataParts[0];\n      if (metadataParts.length > 1) {\n        let value = metadataParts[1];\n        for (let j = 1; j < metadataParts.length - 1; j++) {\n          value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n        }\n        properties[propertyName] = value;\n      } else {\n        properties[propertyName] = lView[bindingIndex];\n      }\n    }\n  }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = /*#__PURE__*/new Map();\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n/**\n * @publicApi\n */\nfunction getDebugNode(nativeNode) {\n  if (nativeNode instanceof Node) {\n    if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {\n      nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement(nativeNode) : new DebugNode(nativeNode);\n    }\n    return nativeNode[NG_DEBUG_PROPERTY];\n  }\n  return null;\n}\n// TODO: cleanup all references to this function and remove it.\nfunction getDebugNodeR2(_nativeNode) {\n  return null;\n}\nfunction getAllDebugNodes() {\n  return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n  _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n  _nativeNodeToDebugNode.delete(node.nativeNode);\n}\nclass DefaultIterableDifferFactory {\n  constructor() {}\n  supports(obj) {\n    return isListLikeIterable(obj);\n  }\n  create(trackByFn) {\n    return new DefaultIterableDiffer(trackByFn);\n  }\n}\nconst trackByIdentity = (index, item) => item;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nclass DefaultIterableDiffer {\n  constructor(trackByFn) {\n    this.length = 0;\n    // Keeps track of the used records at any point in time (during & across `_check()` calls)\n    this._linkedRecords = null;\n    // Keeps track of the removed records at any point in time during `_check()` calls.\n    this._unlinkedRecords = null;\n    this._previousItHead = null;\n    this._itHead = null;\n    this._itTail = null;\n    this._additionsHead = null;\n    this._additionsTail = null;\n    this._movesHead = null;\n    this._movesTail = null;\n    this._removalsHead = null;\n    this._removalsTail = null;\n    // Keeps track of records where custom track by is the same, but item identity has changed\n    this._identityChangesHead = null;\n    this._identityChangesTail = null;\n    this._trackByFn = trackByFn || trackByIdentity;\n  }\n  forEachItem(fn) {\n    let record;\n    for (record = this._itHead; record !== null; record = record._next) {\n      fn(record);\n    }\n  }\n  forEachOperation(fn) {\n    let nextIt = this._itHead;\n    let nextRemove = this._removalsHead;\n    let addRemoveOffset = 0;\n    let moveOffsets = null;\n    while (nextIt || nextRemove) {\n      // Figure out which is the next record to process\n      // Order: remove, add, move\n      const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;\n      const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n      const currentIndex = record.currentIndex;\n      // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n      if (record === nextRemove) {\n        addRemoveOffset--;\n        nextRemove = nextRemove._nextRemoved;\n      } else {\n        nextIt = nextIt._next;\n        if (record.previousIndex == null) {\n          addRemoveOffset++;\n        } else {\n          // INVARIANT:  currentIndex < previousIndex\n          if (!moveOffsets) moveOffsets = [];\n          const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n          const localCurrentIndex = currentIndex - addRemoveOffset;\n          if (localMovePreviousIndex != localCurrentIndex) {\n            for (let i = 0; i < localMovePreviousIndex; i++) {\n              const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;\n              const index = offset + i;\n              if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                moveOffsets[i] = offset + 1;\n              }\n            }\n            const previousIndex = record.previousIndex;\n            moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n          }\n        }\n      }\n      if (adjPreviousIndex !== currentIndex) {\n        fn(record, adjPreviousIndex, currentIndex);\n      }\n    }\n  }\n  forEachPreviousItem(fn) {\n    let record;\n    for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n      fn(record);\n    }\n  }\n  forEachAddedItem(fn) {\n    let record;\n    for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n      fn(record);\n    }\n  }\n  forEachMovedItem(fn) {\n    let record;\n    for (record = this._movesHead; record !== null; record = record._nextMoved) {\n      fn(record);\n    }\n  }\n  forEachRemovedItem(fn) {\n    let record;\n    for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n      fn(record);\n    }\n  }\n  forEachIdentityChange(fn) {\n    let record;\n    for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n      fn(record);\n    }\n  }\n  diff(collection) {\n    if (collection == null) collection = [];\n    if (!isListLikeIterable(collection)) {\n      throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n    }\n    if (this.check(collection)) {\n      return this;\n    } else {\n      return null;\n    }\n  }\n  onDestroy() {}\n  check(collection) {\n    this._reset();\n    let record = this._itHead;\n    let mayBeDirty = false;\n    let index;\n    let item;\n    let itemTrackBy;\n    if (Array.isArray(collection)) {\n      this.length = collection.length;\n      for (let index = 0; index < this.length; index++) {\n        item = collection[index];\n        itemTrackBy = this._trackByFn(index, item);\n        if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n          record = this._mismatch(record, item, itemTrackBy, index);\n          mayBeDirty = true;\n        } else {\n          if (mayBeDirty) {\n            // TODO(misko): can we limit this to duplicates only?\n            record = this._verifyReinsertion(record, item, itemTrackBy, index);\n          }\n          if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n        }\n        record = record._next;\n      }\n    } else {\n      index = 0;\n      iterateListLike(collection, item => {\n        itemTrackBy = this._trackByFn(index, item);\n        if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n          record = this._mismatch(record, item, itemTrackBy, index);\n          mayBeDirty = true;\n        } else {\n          if (mayBeDirty) {\n            // TODO(misko): can we limit this to duplicates only?\n            record = this._verifyReinsertion(record, item, itemTrackBy, index);\n          }\n          if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n        }\n        record = record._next;\n        index++;\n      });\n      this.length = index;\n    }\n    this._truncate(record);\n    this.collection = collection;\n    return this.isDirty;\n  }\n  /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n   * changes.\n   */\n  get isDirty() {\n    return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;\n  }\n  /**\n   * Reset the state of the change objects to show no changes. This means set previousKey to\n   * currentKey, and clear all of the queues (additions, moves, removals).\n   * Set the previousIndexes of moved and added items to their currentIndexes\n   * Reset the list of additions, moves and removals\n   *\n   * @internal\n   */\n  _reset() {\n    if (this.isDirty) {\n      let record;\n      for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n        record._nextPrevious = record._next;\n      }\n      for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n        record.previousIndex = record.currentIndex;\n      }\n      this._additionsHead = this._additionsTail = null;\n      for (record = this._movesHead; record !== null; record = record._nextMoved) {\n        record.previousIndex = record.currentIndex;\n      }\n      this._movesHead = this._movesTail = null;\n      this._removalsHead = this._removalsTail = null;\n      this._identityChangesHead = this._identityChangesTail = null;\n      // TODO(vicb): when assert gets supported\n      // assert(!this.isDirty);\n    }\n  }\n  /**\n   * This is the core function which handles differences between collections.\n   *\n   * - `record` is the record which we saw at this position last time. If null then it is a new\n   *   item.\n   * - `item` is the current item in the collection\n   * - `index` is the position of the item in the collection\n   *\n   * @internal\n   */\n  _mismatch(record, item, itemTrackBy, index) {\n    // The previous record after which we will append the current one.\n    let previousRecord;\n    if (record === null) {\n      previousRecord = this._itTail;\n    } else {\n      previousRecord = record._prev;\n      // Remove the record from the collection since we know it does not match the item.\n      this._remove(record);\n    }\n    // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n    record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n    if (record !== null) {\n      // It is an item which we have evicted earlier: reinsert it back into the list.\n      // But first we need to check if identity changed, so we can update in view if necessary.\n      if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n      this._reinsertAfter(record, previousRecord, index);\n    } else {\n      // Attempt to see if the item is at some posterior position of _itHead list.\n      record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n      if (record !== null) {\n        // We have the item in _itHead at/after `index` position. We need to move it forward in the\n        // collection.\n        // But first we need to check if identity changed, so we can update in view if necessary.\n        if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n        this._moveAfter(record, previousRecord, index);\n      } else {\n        // It is a new item: add it.\n        record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n      }\n    }\n    return record;\n  }\n  /**\n   * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n   *\n   * Use case: `[a, a]` => `[b, a, a]`\n   *\n   * If we did not have this check then the insertion of `b` would:\n   *   1) evict first `a`\n   *   2) insert `b` at `0` index.\n   *   3) leave `a` at index `1` as is. <-- this is wrong!\n   *   3) reinsert `a` at index 2. <-- this is wrong!\n   *\n   * The correct behavior is:\n   *   1) evict first `a`\n   *   2) insert `b` at `0` index.\n   *   3) reinsert `a` at index 1.\n   *   3) move `a` at from `1` to `2`.\n   *\n   *\n   * Double check that we have not evicted a duplicate item. We need to check if the item type may\n   * have already been removed:\n   * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n   * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n   * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n   * at the end.\n   *\n   * @internal\n   */\n  _verifyReinsertion(record, item, itemTrackBy, index) {\n    let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n    if (reinsertRecord !== null) {\n      record = this._reinsertAfter(reinsertRecord, record._prev, index);\n    } else if (record.currentIndex != index) {\n      record.currentIndex = index;\n      this._addToMoves(record, index);\n    }\n    return record;\n  }\n  /**\n   * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n   *\n   * - `record` The first excess {@link IterableChangeRecord_}.\n   *\n   * @internal\n   */\n  _truncate(record) {\n    // Anything after that needs to be removed;\n    while (record !== null) {\n      const nextRecord = record._next;\n      this._addToRemovals(this._unlink(record));\n      record = nextRecord;\n    }\n    if (this._unlinkedRecords !== null) {\n      this._unlinkedRecords.clear();\n    }\n    if (this._additionsTail !== null) {\n      this._additionsTail._nextAdded = null;\n    }\n    if (this._movesTail !== null) {\n      this._movesTail._nextMoved = null;\n    }\n    if (this._itTail !== null) {\n      this._itTail._next = null;\n    }\n    if (this._removalsTail !== null) {\n      this._removalsTail._nextRemoved = null;\n    }\n    if (this._identityChangesTail !== null) {\n      this._identityChangesTail._nextIdentityChange = null;\n    }\n  }\n  /** @internal */\n  _reinsertAfter(record, prevRecord, index) {\n    if (this._unlinkedRecords !== null) {\n      this._unlinkedRecords.remove(record);\n    }\n    const prev = record._prevRemoved;\n    const next = record._nextRemoved;\n    if (prev === null) {\n      this._removalsHead = next;\n    } else {\n      prev._nextRemoved = next;\n    }\n    if (next === null) {\n      this._removalsTail = prev;\n    } else {\n      next._prevRemoved = prev;\n    }\n    this._insertAfter(record, prevRecord, index);\n    this._addToMoves(record, index);\n    return record;\n  }\n  /** @internal */\n  _moveAfter(record, prevRecord, index) {\n    this._unlink(record);\n    this._insertAfter(record, prevRecord, index);\n    this._addToMoves(record, index);\n    return record;\n  }\n  /** @internal */\n  _addAfter(record, prevRecord, index) {\n    this._insertAfter(record, prevRecord, index);\n    if (this._additionsTail === null) {\n      // TODO(vicb):\n      // assert(this._additionsHead === null);\n      this._additionsTail = this._additionsHead = record;\n    } else {\n      // TODO(vicb):\n      // assert(_additionsTail._nextAdded === null);\n      // assert(record._nextAdded === null);\n      this._additionsTail = this._additionsTail._nextAdded = record;\n    }\n    return record;\n  }\n  /** @internal */\n  _insertAfter(record, prevRecord, index) {\n    // TODO(vicb):\n    // assert(record != prevRecord);\n    // assert(record._next === null);\n    // assert(record._prev === null);\n    const next = prevRecord === null ? this._itHead : prevRecord._next;\n    // TODO(vicb):\n    // assert(next != record);\n    // assert(prevRecord != record);\n    record._next = next;\n    record._prev = prevRecord;\n    if (next === null) {\n      this._itTail = record;\n    } else {\n      next._prev = record;\n    }\n    if (prevRecord === null) {\n      this._itHead = record;\n    } else {\n      prevRecord._next = record;\n    }\n    if (this._linkedRecords === null) {\n      this._linkedRecords = new _DuplicateMap();\n    }\n    this._linkedRecords.put(record);\n    record.currentIndex = index;\n    return record;\n  }\n  /** @internal */\n  _remove(record) {\n    return this._addToRemovals(this._unlink(record));\n  }\n  /** @internal */\n  _unlink(record) {\n    if (this._linkedRecords !== null) {\n      this._linkedRecords.remove(record);\n    }\n    const prev = record._prev;\n    const next = record._next;\n    // TODO(vicb):\n    // assert((record._prev = null) === null);\n    // assert((record._next = null) === null);\n    if (prev === null) {\n      this._itHead = next;\n    } else {\n      prev._next = next;\n    }\n    if (next === null) {\n      this._itTail = prev;\n    } else {\n      next._prev = prev;\n    }\n    return record;\n  }\n  /** @internal */\n  _addToMoves(record, toIndex) {\n    // TODO(vicb):\n    // assert(record._nextMoved === null);\n    if (record.previousIndex === toIndex) {\n      return record;\n    }\n    if (this._movesTail === null) {\n      // TODO(vicb):\n      // assert(_movesHead === null);\n      this._movesTail = this._movesHead = record;\n    } else {\n      // TODO(vicb):\n      // assert(_movesTail._nextMoved === null);\n      this._movesTail = this._movesTail._nextMoved = record;\n    }\n    return record;\n  }\n  _addToRemovals(record) {\n    if (this._unlinkedRecords === null) {\n      this._unlinkedRecords = new _DuplicateMap();\n    }\n    this._unlinkedRecords.put(record);\n    record.currentIndex = null;\n    record._nextRemoved = null;\n    if (this._removalsTail === null) {\n      // TODO(vicb):\n      // assert(_removalsHead === null);\n      this._removalsTail = this._removalsHead = record;\n      record._prevRemoved = null;\n    } else {\n      // TODO(vicb):\n      // assert(_removalsTail._nextRemoved === null);\n      // assert(record._nextRemoved === null);\n      record._prevRemoved = this._removalsTail;\n      this._removalsTail = this._removalsTail._nextRemoved = record;\n    }\n    return record;\n  }\n  /** @internal */\n  _addIdentityChange(record, item) {\n    record.item = item;\n    if (this._identityChangesTail === null) {\n      this._identityChangesTail = this._identityChangesHead = record;\n    } else {\n      this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n    }\n    return record;\n  }\n}\nclass IterableChangeRecord_ {\n  constructor(item, trackById) {\n    this.item = item;\n    this.trackById = trackById;\n    this.currentIndex = null;\n    this.previousIndex = null;\n    /** @internal */\n    this._nextPrevious = null;\n    /** @internal */\n    this._prev = null;\n    /** @internal */\n    this._next = null;\n    /** @internal */\n    this._prevDup = null;\n    /** @internal */\n    this._nextDup = null;\n    /** @internal */\n    this._prevRemoved = null;\n    /** @internal */\n    this._nextRemoved = null;\n    /** @internal */\n    this._nextAdded = null;\n    /** @internal */\n    this._nextMoved = null;\n    /** @internal */\n    this._nextIdentityChange = null;\n  }\n}\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList {\n  constructor() {\n    /** @internal */\n    this._head = null;\n    /** @internal */\n    this._tail = null;\n  }\n  /**\n   * Append the record to the list of duplicates.\n   *\n   * Note: by design all records in the list of duplicates hold the same value in record.item.\n   */\n  add(record) {\n    if (this._head === null) {\n      this._head = this._tail = record;\n      record._nextDup = null;\n      record._prevDup = null;\n    } else {\n      // TODO(vicb):\n      // assert(record.item ==  _head.item ||\n      //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n      this._tail._nextDup = record;\n      record._prevDup = this._tail;\n      record._nextDup = null;\n      this._tail = record;\n    }\n  }\n  // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n  // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n  get(trackById, atOrAfterIndex) {\n    let record;\n    for (record = this._head; record !== null; record = record._nextDup) {\n      if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {\n        return record;\n      }\n    }\n    return null;\n  }\n  /**\n   * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n   *\n   * Returns whether the list of duplicates is empty.\n   */\n  remove(record) {\n    // TODO(vicb):\n    // assert(() {\n    //  // verify that the record being removed is in the list.\n    //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n    //    if (identical(cursor, record)) return true;\n    //  }\n    //  return false;\n    //});\n    const prev = record._prevDup;\n    const next = record._nextDup;\n    if (prev === null) {\n      this._head = next;\n    } else {\n      prev._nextDup = next;\n    }\n    if (next === null) {\n      this._tail = prev;\n    } else {\n      next._prevDup = prev;\n    }\n    return this._head === null;\n  }\n}\nclass _DuplicateMap {\n  constructor() {\n    this.map = new Map();\n  }\n  put(record) {\n    const key = record.trackById;\n    let duplicates = this.map.get(key);\n    if (!duplicates) {\n      duplicates = new _DuplicateItemRecordList();\n      this.map.set(key, duplicates);\n    }\n    duplicates.add(record);\n  }\n  /**\n   * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n   * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n   *\n   * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n   * have any more `a`s needs to return the second `a`.\n   */\n  get(trackById, atOrAfterIndex) {\n    const key = trackById;\n    const recordList = this.map.get(key);\n    return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n  }\n  /**\n   * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n   *\n   * The list of duplicates also is removed from the map if it gets empty.\n   */\n  remove(record) {\n    const key = record.trackById;\n    const recordList = this.map.get(key);\n    // Remove the list of duplicates when it gets empty\n    if (recordList.remove(record)) {\n      this.map.delete(key);\n    }\n    return record;\n  }\n  get isEmpty() {\n    return this.map.size === 0;\n  }\n  clear() {\n    this.map.clear();\n  }\n}\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n  const previousIndex = item.previousIndex;\n  if (previousIndex === null) return previousIndex;\n  let moveOffset = 0;\n  if (moveOffsets && previousIndex < moveOffsets.length) {\n    moveOffset = moveOffsets[previousIndex];\n  }\n  return previousIndex + addRemoveOffset + moveOffset;\n}\nclass DefaultKeyValueDifferFactory {\n  constructor() {}\n  supports(obj) {\n    return obj instanceof Map || isJsObject(obj);\n  }\n  create() {\n    return new DefaultKeyValueDiffer();\n  }\n}\nclass DefaultKeyValueDiffer {\n  constructor() {\n    this._records = new Map();\n    this._mapHead = null;\n    // _appendAfter is used in the check loop\n    this._appendAfter = null;\n    this._previousMapHead = null;\n    this._changesHead = null;\n    this._changesTail = null;\n    this._additionsHead = null;\n    this._additionsTail = null;\n    this._removalsHead = null;\n    this._removalsTail = null;\n  }\n  get isDirty() {\n    return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;\n  }\n  forEachItem(fn) {\n    let record;\n    for (record = this._mapHead; record !== null; record = record._next) {\n      fn(record);\n    }\n  }\n  forEachPreviousItem(fn) {\n    let record;\n    for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n      fn(record);\n    }\n  }\n  forEachChangedItem(fn) {\n    let record;\n    for (record = this._changesHead; record !== null; record = record._nextChanged) {\n      fn(record);\n    }\n  }\n  forEachAddedItem(fn) {\n    let record;\n    for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n      fn(record);\n    }\n  }\n  forEachRemovedItem(fn) {\n    let record;\n    for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n      fn(record);\n    }\n  }\n  diff(map) {\n    if (!map) {\n      map = new Map();\n    } else if (!(map instanceof Map || isJsObject(map))) {\n      throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n    }\n    return this.check(map) ? this : null;\n  }\n  onDestroy() {}\n  /**\n   * Check the current state of the map vs the previous.\n   * The algorithm is optimised for when the keys do no change.\n   */\n  check(map) {\n    this._reset();\n    let insertBefore = this._mapHead;\n    this._appendAfter = null;\n    this._forEach(map, (value, key) => {\n      if (insertBefore && insertBefore.key === key) {\n        this._maybeAddToChanges(insertBefore, value);\n        this._appendAfter = insertBefore;\n        insertBefore = insertBefore._next;\n      } else {\n        const record = this._getOrCreateRecordForKey(key, value);\n        insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n      }\n    });\n    // Items remaining at the end of the list have been deleted\n    if (insertBefore) {\n      if (insertBefore._prev) {\n        insertBefore._prev._next = null;\n      }\n      this._removalsHead = insertBefore;\n      for (let record = insertBefore; record !== null; record = record._nextRemoved) {\n        if (record === this._mapHead) {\n          this._mapHead = null;\n        }\n        this._records.delete(record.key);\n        record._nextRemoved = record._next;\n        record.previousValue = record.currentValue;\n        record.currentValue = null;\n        record._prev = null;\n        record._next = null;\n      }\n    }\n    // Make sure tails have no next records from previous runs\n    if (this._changesTail) this._changesTail._nextChanged = null;\n    if (this._additionsTail) this._additionsTail._nextAdded = null;\n    return this.isDirty;\n  }\n  /**\n   * Inserts a record before `before` or append at the end of the list when `before` is null.\n   *\n   * Notes:\n   * - This method appends at `this._appendAfter`,\n   * - This method updates `this._appendAfter`,\n   * - The return value is the new value for the insertion pointer.\n   */\n  _insertBeforeOrAppend(before, record) {\n    if (before) {\n      const prev = before._prev;\n      record._next = before;\n      record._prev = prev;\n      before._prev = record;\n      if (prev) {\n        prev._next = record;\n      }\n      if (before === this._mapHead) {\n        this._mapHead = record;\n      }\n      this._appendAfter = before;\n      return before;\n    }\n    if (this._appendAfter) {\n      this._appendAfter._next = record;\n      record._prev = this._appendAfter;\n    } else {\n      this._mapHead = record;\n    }\n    this._appendAfter = record;\n    return null;\n  }\n  _getOrCreateRecordForKey(key, value) {\n    if (this._records.has(key)) {\n      const record = this._records.get(key);\n      this._maybeAddToChanges(record, value);\n      const prev = record._prev;\n      const next = record._next;\n      if (prev) {\n        prev._next = next;\n      }\n      if (next) {\n        next._prev = prev;\n      }\n      record._next = null;\n      record._prev = null;\n      return record;\n    }\n    const record = new KeyValueChangeRecord_(key);\n    this._records.set(key, record);\n    record.currentValue = value;\n    this._addToAdditions(record);\n    return record;\n  }\n  /** @internal */\n  _reset() {\n    if (this.isDirty) {\n      let record;\n      // let `_previousMapHead` contain the state of the map before the changes\n      this._previousMapHead = this._mapHead;\n      for (record = this._previousMapHead; record !== null; record = record._next) {\n        record._nextPrevious = record._next;\n      }\n      // Update `record.previousValue` with the value of the item before the changes\n      // We need to update all changed items (that's those which have been added and changed)\n      for (record = this._changesHead; record !== null; record = record._nextChanged) {\n        record.previousValue = record.currentValue;\n      }\n      for (record = this._additionsHead; record != null; record = record._nextAdded) {\n        record.previousValue = record.currentValue;\n      }\n      this._changesHead = this._changesTail = null;\n      this._additionsHead = this._additionsTail = null;\n      this._removalsHead = null;\n    }\n  }\n  // Add the record or a given key to the list of changes only when the value has actually changed\n  _maybeAddToChanges(record, newValue) {\n    if (!Object.is(newValue, record.currentValue)) {\n      record.previousValue = record.currentValue;\n      record.currentValue = newValue;\n      this._addToChanges(record);\n    }\n  }\n  _addToAdditions(record) {\n    if (this._additionsHead === null) {\n      this._additionsHead = this._additionsTail = record;\n    } else {\n      this._additionsTail._nextAdded = record;\n      this._additionsTail = record;\n    }\n  }\n  _addToChanges(record) {\n    if (this._changesHead === null) {\n      this._changesHead = this._changesTail = record;\n    } else {\n      this._changesTail._nextChanged = record;\n      this._changesTail = record;\n    }\n  }\n  /** @internal */\n  _forEach(obj, fn) {\n    if (obj instanceof Map) {\n      obj.forEach(fn);\n    } else {\n      Object.keys(obj).forEach(k => fn(obj[k], k));\n    }\n  }\n}\nclass KeyValueChangeRecord_ {\n  constructor(key) {\n    this.key = key;\n    this.previousValue = null;\n    this.currentValue = null;\n    /** @internal */\n    this._nextPrevious = null;\n    /** @internal */\n    this._next = null;\n    /** @internal */\n    this._prev = null;\n    /** @internal */\n    this._nextAdded = null;\n    /** @internal */\n    this._nextRemoved = null;\n    /** @internal */\n    this._nextChanged = null;\n  }\n}\nfunction defaultIterableDiffersFactory() {\n  return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nlet IterableDiffers = /*#__PURE__*/(() => {\n  class IterableDiffers {\n    constructor(factories) {\n      this.factories = factories;\n    }\n    static create(factories, parent) {\n      if (parent != null) {\n        const copied = parent.factories.slice();\n        factories = factories.concat(copied);\n      }\n      return new IterableDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n     * inherited {@link IterableDiffers} instance with the provided factories and return a new\n     * {@link IterableDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link IterableDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     IterableDiffers.extend([new ImmutableListDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n      return {\n        provide: IterableDiffers,\n        useFactory: parent => {\n          // if parent is null, it means that we are in the root injector and we have just overridden\n          // the default injection mechanism for IterableDiffers, in such a case just assume\n          // `defaultIterableDiffersFactory`.\n          return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n        },\n        // Dependency technically isn't optional, but we can provide a better error message this way.\n        deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n      };\n    }\n    find(iterable) {\n      const factory = this.factories.find(f => f.supports(iterable));\n      if (factory != null) {\n        return factory;\n      } else {\n        throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n      }\n    }\n  }\n  /** @nocollapse */\n  IterableDiffers.ɵprov = ɵɵdefineInjectable({\n    token: IterableDiffers,\n    providedIn: 'root',\n    factory: defaultIterableDiffersFactory\n  });\n  return IterableDiffers;\n})();\nfunction getTypeNameForDebugging(type) {\n  return type['name'] || typeof type;\n}\nfunction defaultKeyValueDiffersFactory() {\n  return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nlet KeyValueDiffers = /*#__PURE__*/(() => {\n  class KeyValueDiffers {\n    constructor(factories) {\n      this.factories = factories;\n    }\n    static create(factories, parent) {\n      if (parent) {\n        const copied = parent.factories.slice();\n        factories = factories.concat(copied);\n      }\n      return new KeyValueDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n     * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n     * {@link KeyValueDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link KeyValueDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     KeyValueDiffers.extend([new ImmutableMapDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n      return {\n        provide: KeyValueDiffers,\n        useFactory: parent => {\n          // if parent is null, it means that we are in the root injector and we have just overridden\n          // the default injection mechanism for KeyValueDiffers, in such a case just assume\n          // `defaultKeyValueDiffersFactory`.\n          return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n        },\n        // Dependency technically isn't optional, but we can provide a better error message this way.\n        deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n      };\n    }\n    find(kv) {\n      const factory = this.factories.find(f => f.supports(kv));\n      if (factory) {\n        return factory;\n      }\n      throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode && `Cannot find a differ supporting object '${kv}'`);\n    }\n  }\n  /** @nocollapse */\n  KeyValueDiffers.ɵprov = ɵɵdefineInjectable({\n    token: KeyValueDiffers,\n    providedIn: 'root',\n    factory: defaultKeyValueDiffersFactory\n  });\n\n  /**\n   * Structural diffing for `Object`s and `Map`s.\n   */\n  return KeyValueDiffers;\n})();\nconst keyValDiff = [/*#__PURE__*/new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff = [/*#__PURE__*/new DefaultIterableDifferFactory()];\nconst defaultIterableDiffers = /*#__PURE__*/new IterableDiffers(iterableDiff);\nconst defaultKeyValueDiffers = /*#__PURE__*/new KeyValueDiffers(keyValDiff);\n\n/**\n * @module\n * @description\n * Change detection enables data binding in Angular.\n */\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = /*#__PURE__*/createPlatformFactory(null, 'core', []);\n\n/**\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects\n * `ApplicationRef` to instantiate it.\n *\n * @publicApi\n */\nlet ApplicationModule = /*#__PURE__*/(() => {\n  class ApplicationModule {\n    // Inject ApplicationRef to make it eager...\n    constructor(appRef) {}\n  }\n  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) {\n    return new (t || ApplicationModule)(ɵɵinject(ApplicationRef));\n  };\n  ApplicationModule.ɵmod = /*@__PURE__*/ɵɵdefineNgModule({\n    type: ApplicationModule\n  });\n  ApplicationModule.ɵinj = /*@__PURE__*/ɵɵdefineInjector({});\n  return ApplicationModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n    type: NgModule\n  }], function () {\n    return [{\n      type: ApplicationRef\n    }];\n  }, null);\n})();\n\n/** Coerces a value (typically a string) to a boolean. */\nfunction coerceToBoolean(value) {\n  return typeof value === 'boolean' ? value : value != null && value !== 'false';\n}\n\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareDirective(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'directive',\n    type: decl.type\n  });\n  return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareClassMetadata(decl) {\n  setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);\n}\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareComponent(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'component',\n    type: decl.type\n  });\n  return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareFactory(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: getFactoryKind(decl.target),\n    type: decl.type\n  });\n  return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\nfunction getFactoryKind(target) {\n  switch (target) {\n    case FactoryTarget.Directive:\n      return 'directive';\n    case FactoryTarget.Component:\n      return 'component';\n    case FactoryTarget.Injectable:\n      return 'injectable';\n    case FactoryTarget.Pipe:\n      return 'pipe';\n    case FactoryTarget.NgModule:\n      return 'NgModule';\n  }\n}\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjectable(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'injectable',\n    type: decl.type\n  });\n  return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjector(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'NgModule',\n    type: decl.type\n  });\n  return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareNgModule(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'NgModule',\n    type: decl.type\n  });\n  return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclarePipe(decl) {\n  const compiler = getCompilerFacade({\n    usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n    kind: 'pipe',\n    type: decl.type\n  });\n  return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\n}\n\n// clang-format off\n// clang-format on\n\n/**\n * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```typescript\n * @Component({\n *   standalone: true,\n *   template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n *   name = 'Angular';\n * }\n *\n * @Component({\n *   standalone: true,\n *   template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const host = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {host, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n *  * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see\n * additional info about it at https://angular.io/guide/standalone-components#environment-injectors.\n *  * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n *  * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it at\n * https://angular.io/guide/hierarchical-dependency-injection#elementinjector.\n *  * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n *                      [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nfunction createComponent(component, options) {\n  ngDevMode && assertComponentDef(component);\n  const componentDef = getComponentDef(component);\n  const elementInjector = options.elementInjector || getNullInjector();\n  const factory = new ComponentFactory(componentDef);\n  return factory.create(elementInjector, options.projectableNodes, options.hostElement, options.environmentInjector);\n}\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```typescript\n * @Component({\n *   standalone: true,\n *   selector: 'foo-component',\n *   template: `\n *     <ng-content></ng-content>\n *     <ng-content select=\"content-selector-a\"></ng-content>\n *   `,\n * })\n * class FooComponent {\n *   @Input('inputName') inputPropName: string;\n *   @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n *   '*',                 // first `<ng-content>` in a template, the selector defaults to `*`\n *   'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nfunction reflectComponentType(component) {\n  const componentDef = getComponentDef(component);\n  if (!componentDef) return null;\n  const factory = new ComponentFactory(componentDef);\n  return {\n    get selector() {\n      return factory.selector;\n    },\n    get type() {\n      return factory.componentType;\n    },\n    get inputs() {\n      return factory.inputs;\n    },\n    get outputs() {\n      return factory.outputs;\n    },\n    get ngContentSelectors() {\n      return factory.ngContentSelectors;\n    },\n    get isStandalone() {\n      return componentDef.standalone;\n    }\n  };\n}\n\n/**\n * @module\n * @description\n * Entry point from which you should import all public core APIs.\n */\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n  // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n  // installed `@angular/localize` in their app.\n  // tslint:disable-next-line: no-toplevel-property-access\n  _global.$localize = _global.$localize || function () {\n    throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' + 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' + 'Please run `ng add @angular/localize` from the Angular CLI.\\n' + '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' + 'For server-side rendering applications add the import to your `main.server.ts` file.)');\n  };\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/* This file is not used to build this module. It is only used during editing\n * by the TypeScript language service and during build for verification. `ngc`\n * replaces this file with production index.ts when it rewrites private symbol\n * names.\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, isDevMode, isStandalone, makeEnvironmentProviders, platformCore, reflectComponentType, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, makeDecorator as ɵmakeDecorator, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵvalidateIframeAttribute, ɵɵviewQuery };\n//# sourceMappingURL=core.mjs.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bbda4b8fc0a4b0d0f80c4f823a7111c8bc9b413fd81e6c62a05d1dd68b1106b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7bbda4b8fc0a4b0d0f80c4f823a7111c8bc9b413fd81e6c62a05d1dd68b1106b.json
deleted file mode 100644
index be9eb0e289f311a037fcd1d1eaf8a12153358d24..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bbda4b8fc0a4b0d0f80c4f823a7111c8bc9b413fd81e6c62a05d1dd68b1106b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n  return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindNodeCallback.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd0d5154c8f2e760726d3de2e0595bfc9e5da3f662e6c881d0e11b5b2b11bc4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd0d5154c8f2e760726d3de2e0595bfc9e5da3f662e6c881d0e11b5b2b11bc4.json
deleted file mode 100644
index 6b84bb01abc42496b40d9679ad47e9cb93ece5f2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd0d5154c8f2e760726d3de2e0595bfc9e5da3f662e6c881d0e11b5b2b11bc4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n  if (isFunction(resultSelector)) {\n    return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n  } else if (typeof resultSelector === 'number') {\n    concurrent = resultSelector;\n  }\n  return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd98ff65f394a1b207ebecf42b2da064b65389331f6d4554eaffc0998d38f66.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd98ff65f394a1b207ebecf42b2da064b65389331f6d4554eaffc0998d38f66.json
deleted file mode 100644
index 1ea5249ab04cf08dba19d4213b975e83536f9f85..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7bd98ff65f394a1b207ebecf42b2da064b65389331f6d4554eaffc0998d38f66.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n  return new Observable(subscriber => {\n    const resource = resourceFactory();\n    const result = observableFactory(resource);\n    const source = result ? innerFrom(result) : EMPTY;\n    source.subscribe(subscriber);\n    return () => {\n      if (resource) {\n        resource.unsubscribe();\n      }\n    };\n  });\n}\n//# sourceMappingURL=using.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7c479916bc64183d83b0da5286b791a4ed95255e8d18c4fe22fa4a59e71ce1d5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7c479916bc64183d83b0da5286b791a4ed95255e8d18c4fe22fa4a59e71ce1d5.json
deleted file mode 100644
index 2fd47f35c9a4d75e2c20f6dfbee5aa20f27e26e5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7c479916bc64183d83b0da5286b791a4ed95255e8d18c4fe22fa4a59e71ce1d5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7c99cce043e5930e661c91ab1d9ff2daf9de5411f0cee71e839f46832f204a09.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7c99cce043e5930e661c91ab1d9ff2daf9de5411f0cee71e839f46832f204a09.json
deleted file mode 100644
index e520d075e0c5b4241f400f18bea231957061d3c8..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7c99cce043e5930e661c91ab1d9ff2daf9de5411f0cee71e839f46832f204a09.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function mergeScan(accumulator, seed, concurrent = Infinity) {\n  return operate((source, subscriber) => {\n    let state = seed;\n    return mergeInternals(source, subscriber, (value, index) => accumulator(state, value, index), concurrent, value => {\n      state = value;\n    }, false, undefined, () => state = null);\n  });\n}\n//# sourceMappingURL=mergeScan.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ce5cfafde58cceb282870c72bde989a9b06e14fa8935c51016fa7ba6d7ca081.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7ce5cfafde58cceb282870c72bde989a9b06e14fa8935c51016fa7ba6d7ca081.json
deleted file mode 100644
index 07c2b73c268ee4c780329b70bef7068ea5202b1e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7ce5cfafde58cceb282870c72bde989a9b06e14fa8935c51016fa7ba6d7ca081.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const timeoutProvider = {\n  setTimeout(handler, timeout, ...args) {\n    const {\n      delegate\n    } = timeoutProvider;\n    if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n      return delegate.setTimeout(handler, timeout, ...args);\n    }\n    return setTimeout(handler, timeout, ...args);\n  },\n  clearTimeout(handle) {\n    const {\n      delegate\n    } = timeoutProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=timeoutProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7d59aebd65e6888a438256aa2a5624e8df254b0031be6fe152c33a784f7c006e.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7d59aebd65e6888a438256aa2a5624e8df254b0031be6fe152c33a784f7c006e.json
deleted file mode 100644
index 1de2fc8d91bf8faa2075dc0e9e883a67f464bb54..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7d59aebd65e6888a438256aa2a5624e8df254b0031be6fe152c33a784f7c006e.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n  const scheduler = popScheduler(args);\n  const concurrent = popNumber(args, Infinity);\n  const sources = args;\n  return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7dbed13ee444ae4299fd32e5d7d9fe6488876c053863a2cdcf7ee74d3135ca53.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7dbed13ee444ae4299fd32e5d7d9fe6488876c053863a2cdcf7ee74d3135ca53.json
deleted file mode 100644
index c1d1cb154f0afaa141c49f68bf69658c35b51a0b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7dbed13ee444ae4299fd32e5d7d9fe6488876c053863a2cdcf7ee74d3135ca53.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * A container for all of the Logger instances\r\n */\nconst instances = [];\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\nvar LogLevel = /*#__PURE__*/(() => {\n  (function (LogLevel) {\n    LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n    LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\n    LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\n    LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\n    LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\n    LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\n  })(LogLevel || (LogLevel = {}));\n  return LogLevel;\n})();\nconst levelStringToEnum = {\n  'debug': LogLevel.DEBUG,\n  'verbose': LogLevel.VERBOSE,\n  'info': LogLevel.INFO,\n  'warn': LogLevel.WARN,\n  'error': LogLevel.ERROR,\n  'silent': LogLevel.SILENT\n};\n/**\r\n * The default log level\r\n */\nconst defaultLogLevel = LogLevel.INFO;\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\nconst ConsoleMethod = {\n  [LogLevel.DEBUG]: 'log',\n  [LogLevel.VERBOSE]: 'log',\n  [LogLevel.INFO]: 'info',\n  [LogLevel.WARN]: 'warn',\n  [LogLevel.ERROR]: 'error'\n};\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\nconst defaultLogHandler = (instance, logType, ...args) => {\n  if (logType < instance.logLevel) {\n    return;\n  }\n  const now = new Date().toISOString();\n  const method = ConsoleMethod[logType];\n  if (method) {\n    console[method](`[${now}]  ${instance.name}:`, ...args);\n  } else {\n    throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`);\n  }\n};\nclass Logger {\n  /**\r\n   * Gives you an instance of a Logger to capture messages according to\r\n   * Firebase's logging scheme.\r\n   *\r\n   * @param name The name that the logs will be associated with\r\n   */\n  constructor(name) {\n    this.name = name;\n    /**\r\n     * The log level of the given Logger instance.\r\n     */\n    this._logLevel = defaultLogLevel;\n    /**\r\n     * The main (internal) log handler for the Logger instance.\r\n     * Can be set to a new function in internal package code but not by user.\r\n     */\n    this._logHandler = defaultLogHandler;\n    /**\r\n     * The optional, additional, user-defined log handler for the Logger instance.\r\n     */\n    this._userLogHandler = null;\n    /**\r\n     * Capture the current instance for later use\r\n     */\n    instances.push(this);\n  }\n  get logLevel() {\n    return this._logLevel;\n  }\n  set logLevel(val) {\n    if (!(val in LogLevel)) {\n      throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n    }\n    this._logLevel = val;\n  }\n  // Workaround for setter/getter having to be the same type.\n  setLogLevel(val) {\n    this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\n  }\n  get logHandler() {\n    return this._logHandler;\n  }\n  set logHandler(val) {\n    if (typeof val !== 'function') {\n      throw new TypeError('Value assigned to `logHandler` must be a function');\n    }\n    this._logHandler = val;\n  }\n  get userLogHandler() {\n    return this._userLogHandler;\n  }\n  set userLogHandler(val) {\n    this._userLogHandler = val;\n  }\n  /**\r\n   * The functions below are all based on the `console` interface\r\n   */\n  debug(...args) {\n    this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...args);\n    this._logHandler(this, LogLevel.DEBUG, ...args);\n  }\n  log(...args) {\n    this._userLogHandler && this._userLogHandler(this, LogLevel.VERBOSE, ...args);\n    this._logHandler(this, LogLevel.VERBOSE, ...args);\n  }\n  info(...args) {\n    this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...args);\n    this._logHandler(this, LogLevel.INFO, ...args);\n  }\n  warn(...args) {\n    this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...args);\n    this._logHandler(this, LogLevel.WARN, ...args);\n  }\n  error(...args) {\n    this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...args);\n    this._logHandler(this, LogLevel.ERROR, ...args);\n  }\n}\nfunction setLogLevel(level) {\n  instances.forEach(inst => {\n    inst.setLogLevel(level);\n  });\n}\nfunction setUserLogHandler(logCallback, options) {\n  for (const instance of instances) {\n    let customLogLevel = null;\n    if (options && options.level) {\n      customLogLevel = levelStringToEnum[options.level];\n    }\n    if (logCallback === null) {\n      instance.userLogHandler = null;\n    } else {\n      instance.userLogHandler = (instance, level, ...args) => {\n        const message = args.map(arg => {\n          if (arg == null) {\n            return null;\n          } else if (typeof arg === 'string') {\n            return arg;\n          } else if (typeof arg === 'number' || typeof arg === 'boolean') {\n            return arg.toString();\n          } else if (arg instanceof Error) {\n            return arg.message;\n          } else {\n            try {\n              return JSON.stringify(arg);\n            } catch (ignored) {\n              return null;\n            }\n          }\n        }).filter(arg => arg).join(' ');\n        if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\n          logCallback({\n            level: LogLevel[level].toLowerCase(),\n            message,\n            args,\n            type: instance.name\n          });\n        }\n      };\n    }\n  }\n}\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7e1cab6bf91fa1f2179c4e790b21757eadcb19e60e2cc11dcfcd35dbaa68f8ab.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7e1cab6bf91fa1f2179c4e790b21757eadcb19e60e2cc11dcfcd35dbaa68f8ab.json
deleted file mode 100644
index f76efedaccbef57a932cc3cffb3a4aae4bda8ef4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7e1cab6bf91fa1f2179c4e790b21757eadcb19e60e2cc11dcfcd35dbaa68f8ab.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { zip as zipStatic } from '../observable/zip';\nimport { operate } from '../util/lift';\nexport function zip(...sources) {\n  return operate((source, subscriber) => {\n    zipStatic(source, ...sources).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=zip.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/7fb93f9a75714cf34b72e9688748d9faf31cfa8998c8d55ea0f71a8137b465b5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/7fb93f9a75714cf34b72e9688748d9faf31cfa8998c8d55ea0f71a8137b465b5.json
deleted file mode 100644
index 73e495ee66d0eb3b0e79616aa3a7a58f9627fb28..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/7fb93f9a75714cf34b72e9688748d9faf31cfa8998c8d55ea0f71a8137b465b5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n  return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n  return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n  return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n  return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/80411716969ff00c1afad630d82d0b4544967ca5e5ba0dd0a92005e1ceb8aed1.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/80411716969ff00c1afad630d82d0b4544967ca5e5ba0dd0a92005e1ceb8aed1.json
deleted file mode 100644
index 779b2d1d955ecf5ded47bd8fef844f4aef96d391..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/80411716969ff00c1afad630d82d0b4544967ca5e5ba0dd0a92005e1ceb8aed1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n  const hasConfig = typeof config === 'object';\n  return new Promise((resolve, reject) => {\n    let _hasValue = false;\n    let _value;\n    source.subscribe({\n      next: value => {\n        _value = value;\n        _hasValue = true;\n      },\n      error: reject,\n      complete: () => {\n        if (_hasValue) {\n          resolve(_value);\n        } else if (hasConfig) {\n          resolve(config.defaultValue);\n        } else {\n          reject(new EmptyError());\n        }\n      }\n    });\n  });\n}\n//# sourceMappingURL=lastValueFrom.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/820f24e83da29347372a415ac454e4923d104c0708523489a5731b50f8e4012b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/820f24e83da29347372a415ac454e4923d104c0708523489a5731b50f8e4012b.json
deleted file mode 100644
index cb7d6199042c9c1ca63ef57eb83013cdf8a395b8..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/820f24e83da29347372a415ac454e4923d104c0708523489a5731b50f8e4012b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      hasValue = true;\n      subscriber.next(value);\n    }, () => {\n      if (!hasValue) {\n        subscriber.next(defaultValue);\n      }\n      subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/82c52fc81e499898aadd2f8a41460a49c4aaa7999fac513ccc424a6c33dae814.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/82c52fc81e499898aadd2f8a41460a49c4aaa7999fac513ccc424a6c33dae814.json
deleted file mode 100644
index fc714149ed10e2f250dbf65f024f2f0350dc0727..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/82c52fc81e499898aadd2f8a41460a49c4aaa7999fac513ccc424a6c33dae814.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Logger } from '@firebase/logger';\nimport { ErrorFactory, calculateBackoffMillis, FirebaseError, isIndexedDBAvailable, validateIndexedDBOpenable, isBrowserExtension, areCookiesEnabled, getModularInstance, deepEqual } from '@firebase/util';\nimport { Component } from '@firebase/component';\nimport '@firebase/installations';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Type constant for Firebase Analytics.\r\n */\nconst ANALYTICS_TYPE = 'analytics';\n// Key to attach FID to in gtag params.\nconst GA_FID_KEY = 'firebase_id';\nconst ORIGIN_KEY = 'origin';\nconst FETCH_TIMEOUT_MILLIS = 60 * 1000;\nconst DYNAMIC_CONFIG_URL = 'https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig';\nconst GTAG_URL = 'https://www.googletagmanager.com/gtag/js';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logger = new Logger('@firebase/analytics');\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Makeshift polyfill for Promise.allSettled(). Resolves when all promises\r\n * have either resolved or rejected.\r\n *\r\n * @param promises Array of promises to wait for.\r\n */\nfunction promiseAllSettled(promises) {\n  return Promise.all(promises.map(promise => promise.catch(e => e)));\n}\n/**\r\n * Inserts gtag script tag into the page to asynchronously download gtag.\r\n * @param dataLayerName Name of datalayer (most often the default, \"_dataLayer\").\r\n */\nfunction insertScriptTag(dataLayerName, measurementId) {\n  const script = document.createElement('script');\n  // We are not providing an analyticsId in the URL because it would trigger a `page_view`\n  // without fid. We will initialize ga-id using gtag (config) command together with fid.\n  script.src = `${GTAG_URL}?l=${dataLayerName}&id=${measurementId}`;\n  script.async = true;\n  document.head.appendChild(script);\n}\n/**\r\n * Get reference to, or create, global datalayer.\r\n * @param dataLayerName Name of datalayer (most often the default, \"_dataLayer\").\r\n */\nfunction getOrCreateDataLayer(dataLayerName) {\n  // Check for existing dataLayer and create if needed.\n  let dataLayer = [];\n  if (Array.isArray(window[dataLayerName])) {\n    dataLayer = window[dataLayerName];\n  } else {\n    window[dataLayerName] = dataLayer;\n  }\n  return dataLayer;\n}\n/**\r\n * Wrapped gtag logic when gtag is called with 'config' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param measurementId GA Measurement ID to set config for.\r\n * @param gtagParams Gtag config params to set.\r\n */\nfunction gtagOnConfig(_x, _x2, _x3, _x4, _x5, _x6) {\n  return _gtagOnConfig.apply(this, arguments);\n}\n/**\r\n * Wrapped gtag logic when gtag is called with 'event' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementId GA Measurement ID to log event to.\r\n * @param gtagParams Params to log with this event.\r\n */\nfunction _gtagOnConfig() {\n  _gtagOnConfig = _asyncToGenerator(function* (gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams) {\n    // If config is already fetched, we know the appId and can use it to look up what FID promise we\n    /// are waiting for, and wait only on that one.\n    const correspondingAppId = measurementIdToAppId[measurementId];\n    try {\n      if (correspondingAppId) {\n        yield initializationPromisesMap[correspondingAppId];\n      } else {\n        // If config is not fetched yet, wait for all configs (we don't know which one we need) and\n        // find the appId (if any) corresponding to this measurementId. If there is one, wait on\n        // that appId's initialization promise. If there is none, promise resolves and gtag\n        // call goes through.\n        const dynamicConfigResults = yield promiseAllSettled(dynamicConfigPromisesList);\n        const foundConfig = dynamicConfigResults.find(config => config.measurementId === measurementId);\n        if (foundConfig) {\n          yield initializationPromisesMap[foundConfig.appId];\n        }\n      }\n    } catch (e) {\n      logger.error(e);\n    }\n    gtagCore(\"config\" /* GtagCommand.CONFIG */, measurementId, gtagParams);\n  });\n  return _gtagOnConfig.apply(this, arguments);\n}\nfunction gtagOnEvent(_x7, _x8, _x9, _x10, _x11) {\n  return _gtagOnEvent.apply(this, arguments);\n}\n/**\r\n * Wraps a standard gtag function with extra code to wait for completion of\r\n * relevant initialization promises before sending requests.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n */\nfunction _gtagOnEvent() {\n  _gtagOnEvent = _asyncToGenerator(function* (gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams) {\n    try {\n      let initializationPromisesToWaitFor = [];\n      // If there's a 'send_to' param, check if any ID specified matches\n      // an initializeIds() promise we are waiting for.\n      if (gtagParams && gtagParams['send_to']) {\n        let gaSendToList = gtagParams['send_to'];\n        // Make it an array if is isn't, so it can be dealt with the same way.\n        if (!Array.isArray(gaSendToList)) {\n          gaSendToList = [gaSendToList];\n        }\n        // Checking 'send_to' fields requires having all measurement ID results back from\n        // the dynamic config fetch.\n        const dynamicConfigResults = yield promiseAllSettled(dynamicConfigPromisesList);\n        for (const sendToId of gaSendToList) {\n          // Any fetched dynamic measurement ID that matches this 'send_to' ID\n          const foundConfig = dynamicConfigResults.find(config => config.measurementId === sendToId);\n          const initializationPromise = foundConfig && initializationPromisesMap[foundConfig.appId];\n          if (initializationPromise) {\n            initializationPromisesToWaitFor.push(initializationPromise);\n          } else {\n            // Found an item in 'send_to' that is not associated\n            // directly with an FID, possibly a group.  Empty this array,\n            // exit the loop early, and let it get populated below.\n            initializationPromisesToWaitFor = [];\n            break;\n          }\n        }\n      }\n      // This will be unpopulated if there was no 'send_to' field , or\n      // if not all entries in the 'send_to' field could be mapped to\n      // a FID. In these cases, wait on all pending initialization promises.\n      if (initializationPromisesToWaitFor.length === 0) {\n        initializationPromisesToWaitFor = Object.values(initializationPromisesMap);\n      }\n      // Run core gtag function with args after all relevant initialization\n      // promises have been resolved.\n      yield Promise.all(initializationPromisesToWaitFor);\n      // Workaround for http://b/141370449 - third argument cannot be undefined.\n      gtagCore(\"event\" /* GtagCommand.EVENT */, measurementId, gtagParams || {});\n    } catch (e) {\n      logger.error(e);\n    }\n  });\n  return _gtagOnEvent.apply(this, arguments);\n}\nfunction wrapGtag(gtagCore,\n/**\r\n * Allows wrapped gtag calls to wait on whichever intialization promises are required,\r\n * depending on the contents of the gtag params' `send_to` field, if any.\r\n */\ninitializationPromisesMap,\n/**\r\n * Wrapped gtag calls sometimes require all dynamic config fetches to have returned\r\n * before determining what initialization promises (which include FIDs) to wait for.\r\n */\ndynamicConfigPromisesList,\n/**\r\n * Wrapped gtag config calls can narrow down which initialization promise (with FID)\r\n * to wait for if the measurementId is already fetched, by getting the corresponding appId,\r\n * which is the key for the initialization promises map.\r\n */\nmeasurementIdToAppId) {\n  /**\r\n   * Wrapper around gtag that ensures FID is sent with gtag calls.\r\n   * @param command Gtag command type.\r\n   * @param idOrNameOrParams Measurement ID if command is EVENT/CONFIG, params if command is SET.\r\n   * @param gtagParams Params if event is EVENT/CONFIG.\r\n   */\n  function gtagWrapper(_x12, _x13, _x14) {\n    return _gtagWrapper.apply(this, arguments);\n  }\n  function _gtagWrapper() {\n    _gtagWrapper = _asyncToGenerator(function* (command, idOrNameOrParams, gtagParams) {\n      try {\n        // If event, check that relevant initialization promises have completed.\n        if (command === \"event\" /* GtagCommand.EVENT */) {\n          // If EVENT, second arg must be measurementId.\n          yield gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, idOrNameOrParams, gtagParams);\n        } else if (command === \"config\" /* GtagCommand.CONFIG */) {\n          // If CONFIG, second arg must be measurementId.\n          yield gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, idOrNameOrParams, gtagParams);\n        } else if (command === \"consent\" /* GtagCommand.CONSENT */) {\n          // If CONFIG, second arg must be measurementId.\n          gtagCore(\"consent\" /* GtagCommand.CONSENT */, 'update', gtagParams);\n        } else {\n          // If SET, second arg must be params.\n          gtagCore(\"set\" /* GtagCommand.SET */, idOrNameOrParams);\n        }\n      } catch (e) {\n        logger.error(e);\n      }\n    });\n    return _gtagWrapper.apply(this, arguments);\n  }\n  return gtagWrapper;\n}\n/**\r\n * Creates global gtag function or wraps existing one if found.\r\n * This wrapped function attaches Firebase instance ID (FID) to gtag 'config' and\r\n * 'event' calls that belong to the GAID associated with this Firebase instance.\r\n *\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param dataLayerName Name of global GA datalayer array.\r\n * @param gtagFunctionName Name of global gtag function (\"gtag\" if not user-specified).\r\n */\nfunction wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagFunctionName) {\n  // Create a basic core gtag function\n  let gtagCore = function (..._args) {\n    // Must push IArguments object, not an array.\n    window[dataLayerName].push(arguments);\n  };\n  // Replace it with existing one if found\n  if (window[gtagFunctionName] && typeof window[gtagFunctionName] === 'function') {\n    // @ts-ignore\n    gtagCore = window[gtagFunctionName];\n  }\n  window[gtagFunctionName] = wrapGtag(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId);\n  return {\n    gtagCore,\n    wrappedGtag: window[gtagFunctionName]\n  };\n}\n/**\r\n * Returns the script tag in the DOM matching both the gtag url pattern\r\n * and the provided data layer name.\r\n */\nfunction findGtagScriptOnPage(dataLayerName) {\n  const scriptTags = window.document.getElementsByTagName('script');\n  for (const tag of Object.values(scriptTags)) {\n    if (tag.src && tag.src.includes(GTAG_URL) && tag.src.includes(dataLayerName)) {\n      return tag;\n    }\n  }\n  return null;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERRORS = {\n  [\"already-exists\" /* AnalyticsError.ALREADY_EXISTS */]: 'A Firebase Analytics instance with the appId {$id} ' + ' already exists. ' + 'Only one Firebase Analytics instance can be created for each appId.',\n  [\"already-initialized\" /* AnalyticsError.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-intialized instance.',\n  [\"already-initialized-settings\" /* AnalyticsError.ALREADY_INITIALIZED_SETTINGS */]: 'Firebase Analytics has already been initialized.' + 'settings() must be called before initializing any Analytics instance' + 'or it will have no effect.',\n  [\"interop-component-reg-failed\" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */]: 'Firebase Analytics Interop Component failed to instantiate: {$reason}',\n  [\"invalid-analytics-context\" /* AnalyticsError.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}',\n  [\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */]: 'IndexedDB unavailable or restricted in this environment. ' + 'Wrap initialization of analytics in analytics.isSupported() ' + 'to prevent initialization in unsupported environments. Details: {$errorInfo}',\n  [\"fetch-throttle\" /* AnalyticsError.FETCH_THROTTLE */]: 'The config fetch request timed out while in an exponential backoff state.' + ' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',\n  [\"config-fetch-failed\" /* AnalyticsError.CONFIG_FETCH_FAILED */]: 'Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}',\n  [\"no-api-key\" /* AnalyticsError.NO_API_KEY */]: 'The \"apiKey\" field is empty in the local Firebase config. Firebase Analytics requires this field to' + 'contain a valid API key.',\n  [\"no-app-id\" /* AnalyticsError.NO_APP_ID */]: 'The \"appId\" field is empty in the local Firebase config. Firebase Analytics requires this field to' + 'contain a valid app ID.'\n};\nconst ERROR_FACTORY = new ErrorFactory('analytics', 'Analytics', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Backoff factor for 503 errors, which we want to be conservative about\r\n * to avoid overloading servers. Each retry interval will be\r\n * BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one\r\n * will be ~30 seconds (with fuzzing).\r\n */\nconst LONG_RETRY_FACTOR = 30;\n/**\r\n * Base wait interval to multiplied by backoffFactor^backoffCount.\r\n */\nconst BASE_INTERVAL_MILLIS = 1000;\n/**\r\n * Stubbable retry data storage class.\r\n */\nclass RetryData {\n  constructor(throttleMetadata = {}, intervalMillis = BASE_INTERVAL_MILLIS) {\n    this.throttleMetadata = throttleMetadata;\n    this.intervalMillis = intervalMillis;\n  }\n  getThrottleMetadata(appId) {\n    return this.throttleMetadata[appId];\n  }\n  setThrottleMetadata(appId, metadata) {\n    this.throttleMetadata[appId] = metadata;\n  }\n  deleteThrottleMetadata(appId) {\n    delete this.throttleMetadata[appId];\n  }\n}\nconst defaultRetryData = new RetryData();\n/**\r\n * Set GET request headers.\r\n * @param apiKey App API key.\r\n */\nfunction getHeaders(apiKey) {\n  return new Headers({\n    Accept: 'application/json',\n    'x-goog-api-key': apiKey\n  });\n}\n/**\r\n * Fetches dynamic config from backend.\r\n * @param app Firebase app to fetch config for.\r\n */\nfunction fetchDynamicConfig(_x15) {\n  return _fetchDynamicConfig.apply(this, arguments);\n}\n/**\r\n * Fetches dynamic config from backend, retrying if failed.\r\n * @param app Firebase app to fetch config for.\r\n */\nfunction _fetchDynamicConfig() {\n  _fetchDynamicConfig = _asyncToGenerator(function* (appFields) {\n    var _a;\n    const {\n      appId,\n      apiKey\n    } = appFields;\n    const request = {\n      method: 'GET',\n      headers: getHeaders(apiKey)\n    };\n    const appUrl = DYNAMIC_CONFIG_URL.replace('{app-id}', appId);\n    const response = yield fetch(appUrl, request);\n    if (response.status !== 200 && response.status !== 304) {\n      let errorMessage = '';\n      try {\n        // Try to get any error message text from server response.\n        const jsonResponse = yield response.json();\n        if ((_a = jsonResponse.error) === null || _a === void 0 ? void 0 : _a.message) {\n          errorMessage = jsonResponse.error.message;\n        }\n      } catch (_ignored) {}\n      throw ERROR_FACTORY.create(\"config-fetch-failed\" /* AnalyticsError.CONFIG_FETCH_FAILED */, {\n        httpStatus: response.status,\n        responseMessage: errorMessage\n      });\n    }\n    return response.json();\n  });\n  return _fetchDynamicConfig.apply(this, arguments);\n}\nfunction fetchDynamicConfigWithRetry(_x16) {\n  return _fetchDynamicConfigWithRetry.apply(this, arguments);\n}\n/**\r\n * Runs one retry attempt.\r\n * @param appFields Necessary app config fields.\r\n * @param throttleMetadata Ongoing metadata to determine throttling times.\r\n * @param signal Abort signal.\r\n */\nfunction _fetchDynamicConfigWithRetry() {\n  _fetchDynamicConfigWithRetry = _asyncToGenerator(function* (app,\n  // retryData and timeoutMillis are parameterized to allow passing a different value for testing.\n  retryData = defaultRetryData, timeoutMillis) {\n    const {\n      appId,\n      apiKey,\n      measurementId\n    } = app.options;\n    if (!appId) {\n      throw ERROR_FACTORY.create(\"no-app-id\" /* AnalyticsError.NO_APP_ID */);\n    }\n\n    if (!apiKey) {\n      if (measurementId) {\n        return {\n          measurementId,\n          appId\n        };\n      }\n      throw ERROR_FACTORY.create(\"no-api-key\" /* AnalyticsError.NO_API_KEY */);\n    }\n\n    const throttleMetadata = retryData.getThrottleMetadata(appId) || {\n      backoffCount: 0,\n      throttleEndTimeMillis: Date.now()\n    };\n    const signal = new AnalyticsAbortSignal();\n    setTimeout( /*#__PURE__*/_asyncToGenerator(function* () {\n      // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\n      signal.abort();\n    }), timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\n    return attemptFetchDynamicConfigWithRetry({\n      appId,\n      apiKey,\n      measurementId\n    }, throttleMetadata, signal, retryData);\n  });\n  return _fetchDynamicConfigWithRetry.apply(this, arguments);\n}\nfunction attemptFetchDynamicConfigWithRetry(_x17, _x18, _x19) {\n  return _attemptFetchDynamicConfigWithRetry.apply(this, arguments);\n}\n/**\r\n * Supports waiting on a backoff by:\r\n *\r\n * <ul>\r\n *   <li>Promisifying setTimeout, so we can set a timeout in our Promise chain</li>\r\n *   <li>Listening on a signal bus for abort events, just like the Fetch API</li>\r\n *   <li>Failing in the same way the Fetch API fails, so timing out a live request and a throttled\r\n *       request appear the same.</li>\r\n * </ul>\r\n *\r\n * <p>Visible for testing.\r\n */\nfunction _attemptFetchDynamicConfigWithRetry() {\n  _attemptFetchDynamicConfigWithRetry = _asyncToGenerator(function* (appFields, {\n    throttleEndTimeMillis,\n    backoffCount\n  }, signal, retryData = defaultRetryData // for testing\n  ) {\n    var _a;\n    const {\n      appId,\n      measurementId\n    } = appFields;\n    // Starts with a (potentially zero) timeout to support resumption from stored state.\n    // Ensures the throttle end time is honored if the last attempt timed out.\n    // Note the SDK will never make a request if the fetch timeout expires at this point.\n    try {\n      yield setAbortableTimeout(signal, throttleEndTimeMillis);\n    } catch (e) {\n      if (measurementId) {\n        logger.warn(`Timed out fetching this Firebase app's measurement ID from the server.` + ` Falling back to the measurement ID ${measurementId}` + ` provided in the \"measurementId\" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`);\n        return {\n          appId,\n          measurementId\n        };\n      }\n      throw e;\n    }\n    try {\n      const response = yield fetchDynamicConfig(appFields);\n      // Note the SDK only clears throttle state if response is success or non-retriable.\n      retryData.deleteThrottleMetadata(appId);\n      return response;\n    } catch (e) {\n      const error = e;\n      if (!isRetriableError(error)) {\n        retryData.deleteThrottleMetadata(appId);\n        if (measurementId) {\n          logger.warn(`Failed to fetch this Firebase app's measurement ID from the server.` + ` Falling back to the measurement ID ${measurementId}` + ` provided in the \"measurementId\" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\n          return {\n            appId,\n            measurementId\n          };\n        } else {\n          throw e;\n        }\n      }\n      const backoffMillis = Number((_a = error === null || error === void 0 ? void 0 : error.customData) === null || _a === void 0 ? void 0 : _a.httpStatus) === 503 ? calculateBackoffMillis(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR) : calculateBackoffMillis(backoffCount, retryData.intervalMillis);\n      // Increments backoff state.\n      const throttleMetadata = {\n        throttleEndTimeMillis: Date.now() + backoffMillis,\n        backoffCount: backoffCount + 1\n      };\n      // Persists state.\n      retryData.setThrottleMetadata(appId, throttleMetadata);\n      logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\n      return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\n    }\n  });\n  return _attemptFetchDynamicConfigWithRetry.apply(this, arguments);\n}\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\n  return new Promise((resolve, reject) => {\n    // Derives backoff from given end time, normalizing negative numbers to zero.\n    const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\n    const timeout = setTimeout(resolve, backoffMillis);\n    // Adds listener, rather than sets onabort, because signal is a shared object.\n    signal.addEventListener(() => {\n      clearTimeout(timeout);\n      // If the request completes before this timeout, the rejection has no effect.\n      reject(ERROR_FACTORY.create(\"fetch-throttle\" /* AnalyticsError.FETCH_THROTTLE */, {\n        throttleEndTimeMillis\n      }));\n    });\n  });\n}\n/**\r\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\r\n */\nfunction isRetriableError(e) {\n  if (!(e instanceof FirebaseError) || !e.customData) {\n    return false;\n  }\n  // Uses string index defined by ErrorData, which FirebaseError implements.\n  const httpStatus = Number(e.customData['httpStatus']);\n  return httpStatus === 429 || httpStatus === 500 || httpStatus === 503 || httpStatus === 504;\n}\n/**\r\n * Shims a minimal AbortSignal (copied from Remote Config).\r\n *\r\n * <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects\r\n * of networking, such as retries. Firebase doesn't use AbortController enough to justify a\r\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\r\n * swapped out if/when we do.\r\n */\nclass AnalyticsAbortSignal {\n  constructor() {\n    this.listeners = [];\n  }\n  addEventListener(listener) {\n    this.listeners.push(listener);\n  }\n  abort() {\n    this.listeners.forEach(listener => listener());\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Event parameters to set on 'gtag' during initialization.\r\n */\nlet defaultEventParametersForInit;\n/**\r\n * Logs an analytics event through the Firebase SDK.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param eventName Google Analytics event name, choose from standard list or use a custom string.\r\n * @param eventParams Analytics event parameters.\r\n */\nfunction logEvent$1(_x20, _x21, _x22, _x23, _x24) {\n  return _logEvent$.apply(this, arguments);\n}\n/**\r\n * Set screen_name parameter for this Google Analytics ID.\r\n *\r\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\r\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param screenName Screen name string to set.\r\n */\nfunction _logEvent$() {\n  _logEvent$ = _asyncToGenerator(function* (gtagFunction, initializationPromise, eventName, eventParams, options) {\n    if (options && options.global) {\n      gtagFunction(\"event\" /* GtagCommand.EVENT */, eventName, eventParams);\n      return;\n    } else {\n      const measurementId = yield initializationPromise;\n      const params = Object.assign(Object.assign({}, eventParams), {\n        'send_to': measurementId\n      });\n      gtagFunction(\"event\" /* GtagCommand.EVENT */, eventName, params);\n    }\n  });\n  return _logEvent$.apply(this, arguments);\n}\nfunction setCurrentScreen$1(_x25, _x26, _x27, _x28) {\n  return _setCurrentScreen$.apply(this, arguments);\n}\n/**\r\n * Set user_id parameter for this Google Analytics ID.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param id User ID string to set\r\n */\nfunction _setCurrentScreen$() {\n  _setCurrentScreen$ = _asyncToGenerator(function* (gtagFunction, initializationPromise, screenName, options) {\n    if (options && options.global) {\n      gtagFunction(\"set\" /* GtagCommand.SET */, {\n        'screen_name': screenName\n      });\n      return Promise.resolve();\n    } else {\n      const measurementId = yield initializationPromise;\n      gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n        update: true,\n        'screen_name': screenName\n      });\n    }\n  });\n  return _setCurrentScreen$.apply(this, arguments);\n}\nfunction setUserId$1(_x29, _x30, _x31, _x32) {\n  return _setUserId$.apply(this, arguments);\n}\n/**\r\n * Set all other user properties other than user_id and screen_name.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param properties Map of user properties to set\r\n */\nfunction _setUserId$() {\n  _setUserId$ = _asyncToGenerator(function* (gtagFunction, initializationPromise, id, options) {\n    if (options && options.global) {\n      gtagFunction(\"set\" /* GtagCommand.SET */, {\n        'user_id': id\n      });\n      return Promise.resolve();\n    } else {\n      const measurementId = yield initializationPromise;\n      gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n        update: true,\n        'user_id': id\n      });\n    }\n  });\n  return _setUserId$.apply(this, arguments);\n}\nfunction setUserProperties$1(_x33, _x34, _x35, _x36) {\n  return _setUserProperties$.apply(this, arguments);\n}\n/**\r\n * Set whether collection is enabled for this ID.\r\n *\r\n * @param enabled If true, collection is enabled for this ID.\r\n */\nfunction _setUserProperties$() {\n  _setUserProperties$ = _asyncToGenerator(function* (gtagFunction, initializationPromise, properties, options) {\n    if (options && options.global) {\n      const flatProperties = {};\n      for (const key of Object.keys(properties)) {\n        // use dot notation for merge behavior in gtag.js\n        flatProperties[`user_properties.${key}`] = properties[key];\n      }\n      gtagFunction(\"set\" /* GtagCommand.SET */, flatProperties);\n      return Promise.resolve();\n    } else {\n      const measurementId = yield initializationPromise;\n      gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n        update: true,\n        'user_properties': properties\n      });\n    }\n  });\n  return _setUserProperties$.apply(this, arguments);\n}\nfunction setAnalyticsCollectionEnabled$1(_x37, _x38) {\n  return _setAnalyticsCollectionEnabled$.apply(this, arguments);\n}\n/**\r\n * Consent parameters to default to during 'gtag' initialization.\r\n */\nfunction _setAnalyticsCollectionEnabled$() {\n  _setAnalyticsCollectionEnabled$ = _asyncToGenerator(function* (initializationPromise, enabled) {\n    const measurementId = yield initializationPromise;\n    window[`ga-disable-${measurementId}`] = !enabled;\n  });\n  return _setAnalyticsCollectionEnabled$.apply(this, arguments);\n}\nlet defaultConsentSettingsForInit;\n/**\r\n * Sets the variable {@link defaultConsentSettingsForInit} for use in the initialization of\r\n * analytics.\r\n *\r\n * @param consentSettings Maps the applicable end user consent state for gtag.js.\r\n */\nfunction _setConsentDefaultForInit(consentSettings) {\n  defaultConsentSettingsForInit = consentSettings;\n}\n/**\r\n * Sets the variable `defaultEventParametersForInit` for use in the initialization of\r\n * analytics.\r\n *\r\n * @param customParams Any custom params the user may pass to gtag.js.\r\n */\nfunction _setDefaultEventParametersForInit(customParams) {\n  defaultEventParametersForInit = customParams;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction validateIndexedDB() {\n  return _validateIndexedDB.apply(this, arguments);\n}\n/**\r\n * Initialize the analytics instance in gtag.js by calling config command with fid.\r\n *\r\n * NOTE: We combine analytics initialization and setting fid together because we want fid to be\r\n * part of the `page_view` event that's sent during the initialization\r\n * @param app Firebase app\r\n * @param gtagCore The gtag function that's not wrapped.\r\n * @param dynamicConfigPromisesList Array of all dynamic config promises.\r\n * @param measurementIdToAppId Maps measurementID to appID.\r\n * @param installations _FirebaseInstallationsInternal instance.\r\n *\r\n * @returns Measurement ID.\r\n */\nfunction _validateIndexedDB() {\n  _validateIndexedDB = _asyncToGenerator(function* () {\n    if (!isIndexedDBAvailable()) {\n      logger.warn(ERROR_FACTORY.create(\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\n        errorInfo: 'IndexedDB is not available in this environment.'\n      }).message);\n      return false;\n    } else {\n      try {\n        yield validateIndexedDBOpenable();\n      } catch (e) {\n        logger.warn(ERROR_FACTORY.create(\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\n          errorInfo: e === null || e === void 0 ? void 0 : e.toString()\n        }).message);\n        return false;\n      }\n    }\n    return true;\n  });\n  return _validateIndexedDB.apply(this, arguments);\n}\nfunction _initializeAnalytics(_x39, _x40, _x41, _x42, _x43, _x44, _x45) {\n  return _initializeAnalytics2.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Analytics Service class.\r\n */\nfunction _initializeAnalytics2() {\n  _initializeAnalytics2 = _asyncToGenerator(function* (app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\n    var _a;\n    const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\n    // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\n    dynamicConfigPromise.then(config => {\n      measurementIdToAppId[config.measurementId] = config.appId;\n      if (app.options.measurementId && config.measurementId !== app.options.measurementId) {\n        logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` + ` does not match the measurement ID fetched from the server (${config.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.`);\n      }\n    }).catch(e => logger.error(e));\n    // Add to list to track state of all dynamic config promises.\n    dynamicConfigPromisesList.push(dynamicConfigPromise);\n    const fidPromise = validateIndexedDB().then(envIsValid => {\n      if (envIsValid) {\n        return installations.getId();\n      } else {\n        return undefined;\n      }\n    });\n    const [dynamicConfig, fid] = yield Promise.all([dynamicConfigPromise, fidPromise]);\n    // Detect if user has already put the gtag <script> tag on this page with the passed in\n    // data layer name.\n    if (!findGtagScriptOnPage(dataLayerName)) {\n      insertScriptTag(dataLayerName, dynamicConfig.measurementId);\n    }\n    // Detects if there are consent settings that need to be configured.\n    if (defaultConsentSettingsForInit) {\n      gtagCore(\"consent\" /* GtagCommand.CONSENT */, 'default', defaultConsentSettingsForInit);\n      _setConsentDefaultForInit(undefined);\n    }\n    // This command initializes gtag.js and only needs to be called once for the entire web app,\n    // but since it is idempotent, we can call it multiple times.\n    // We keep it together with other initialization logic for better code structure.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    gtagCore('js', new Date());\n    // User config added first. We don't want users to accidentally overwrite\n    // base Firebase config properties.\n    const configProperties = (_a = options === null || options === void 0 ? void 0 : options.config) !== null && _a !== void 0 ? _a : {};\n    // guard against developers accidentally setting properties with prefix `firebase_`\n    configProperties[ORIGIN_KEY] = 'firebase';\n    configProperties.update = true;\n    if (fid != null) {\n      configProperties[GA_FID_KEY] = fid;\n    }\n    // It should be the first config command called on this GA-ID\n    // Initialize this GA-ID and set FID on it using the gtag config API.\n    // Note: This will trigger a page_view event unless 'send_page_view' is set to false in\n    // `configProperties`.\n    gtagCore(\"config\" /* GtagCommand.CONFIG */, dynamicConfig.measurementId, configProperties);\n    // Detects if there is data that will be set on every event logged from the SDK.\n    if (defaultEventParametersForInit) {\n      gtagCore(\"set\" /* GtagCommand.SET */, defaultEventParametersForInit);\n      _setDefaultEventParametersForInit(undefined);\n    }\n    return dynamicConfig.measurementId;\n  });\n  return _initializeAnalytics2.apply(this, arguments);\n}\nclass AnalyticsService {\n  constructor(app) {\n    this.app = app;\n  }\n  _delete() {\n    delete initializationPromisesMap[this.app.options.appId];\n    return Promise.resolve();\n  }\n}\n/**\r\n * Maps appId to full initialization promise. Wrapped gtag calls must wait on\r\n * all or some of these, depending on the call's `send_to` param and the status\r\n * of the dynamic config fetches (see below).\r\n */\nlet initializationPromisesMap = {};\n/**\r\n * List of dynamic config fetch promises. In certain cases, wrapped gtag calls\r\n * wait on all these to be complete in order to determine if it can selectively\r\n * wait for only certain initialization (FID) promises or if it must wait for all.\r\n */\nlet dynamicConfigPromisesList = [];\n/**\r\n * Maps fetched measurementIds to appId. Populated when the app's dynamic config\r\n * fetch completes. If already populated, gtag config calls can use this to\r\n * selectively wait for only this app's initialization promise (FID) instead of all\r\n * initialization promises.\r\n */\nconst measurementIdToAppId = {};\n/**\r\n * Name for window global data layer array used by GA: defaults to 'dataLayer'.\r\n */\nlet dataLayerName = 'dataLayer';\n/**\r\n * Name for window global gtag function used by GA: defaults to 'gtag'.\r\n */\nlet gtagName = 'gtag';\n/**\r\n * Reproduction of standard gtag function or reference to existing\r\n * gtag function on window object.\r\n */\nlet gtagCoreFunction;\n/**\r\n * Wrapper around gtag function that ensures FID is sent with all\r\n * relevant event and config calls.\r\n */\nlet wrappedGtagFunction;\n/**\r\n * Flag to ensure page initialization steps (creation or wrapping of\r\n * dataLayer and gtag script) are only run once per page load.\r\n */\nlet globalInitDone = false;\n/**\r\n * Configures Firebase Analytics to use custom `gtag` or `dataLayer` names.\r\n * Intended to be used if `gtag.js` script has been installed on\r\n * this page independently of Firebase Analytics, and is using non-default\r\n * names for either the `gtag` function or for `dataLayer`.\r\n * Must be called before calling `getAnalytics()` or it won't\r\n * have any effect.\r\n *\r\n * @public\r\n *\r\n * @param options - Custom gtag and dataLayer names.\r\n */\nfunction settings(options) {\n  if (globalInitDone) {\n    throw ERROR_FACTORY.create(\"already-initialized\" /* AnalyticsError.ALREADY_INITIALIZED */);\n  }\n\n  if (options.dataLayerName) {\n    dataLayerName = options.dataLayerName;\n  }\n  if (options.gtagName) {\n    gtagName = options.gtagName;\n  }\n}\n/**\r\n * Returns true if no environment mismatch is found.\r\n * If environment mismatches are found, throws an INVALID_ANALYTICS_CONTEXT\r\n * error that also lists details for each mismatch found.\r\n */\nfunction warnOnBrowserContextMismatch() {\n  const mismatchedEnvMessages = [];\n  if (isBrowserExtension()) {\n    mismatchedEnvMessages.push('This is a browser extension environment.');\n  }\n  if (!areCookiesEnabled()) {\n    mismatchedEnvMessages.push('Cookies are not available.');\n  }\n  if (mismatchedEnvMessages.length > 0) {\n    const details = mismatchedEnvMessages.map((message, index) => `(${index + 1}) ${message}`).join(' ');\n    const err = ERROR_FACTORY.create(\"invalid-analytics-context\" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */, {\n      errorInfo: details\n    });\n    logger.warn(err.message);\n  }\n}\n/**\r\n * Analytics instance factory.\r\n * @internal\r\n */\nfunction factory(app, installations, options) {\n  warnOnBrowserContextMismatch();\n  const appId = app.options.appId;\n  if (!appId) {\n    throw ERROR_FACTORY.create(\"no-app-id\" /* AnalyticsError.NO_APP_ID */);\n  }\n\n  if (!app.options.apiKey) {\n    if (app.options.measurementId) {\n      logger.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 ${app.options.measurementId}` + ` provided in the \"measurementId\" field in the local Firebase config.`);\n    } else {\n      throw ERROR_FACTORY.create(\"no-api-key\" /* AnalyticsError.NO_API_KEY */);\n    }\n  }\n\n  if (initializationPromisesMap[appId] != null) {\n    throw ERROR_FACTORY.create(\"already-exists\" /* AnalyticsError.ALREADY_EXISTS */, {\n      id: appId\n    });\n  }\n  if (!globalInitDone) {\n    // Steps here should only be done once per page: creation or wrapping\n    // of dataLayer and global gtag function.\n    getOrCreateDataLayer(dataLayerName);\n    const {\n      wrappedGtag,\n      gtagCore\n    } = wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagName);\n    wrappedGtagFunction = wrappedGtag;\n    gtagCoreFunction = gtagCore;\n    globalInitDone = true;\n  }\n  // Async but non-blocking.\n  // This map reflects the completion state of all promises for each appId.\n  initializationPromisesMap[appId] = _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCoreFunction, dataLayerName, options);\n  const analyticsInstance = new AnalyticsService(app);\n  return analyticsInstance;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\r\n * Returns an {@link Analytics} instance for the given app.\r\n *\r\n * @public\r\n *\r\n * @param app - The {@link @firebase/app#FirebaseApp} to use.\r\n */\nfunction getAnalytics(app = getApp()) {\n  app = getModularInstance(app);\n  // Dependencies\n  const analyticsProvider = _getProvider(app, ANALYTICS_TYPE);\n  if (analyticsProvider.isInitialized()) {\n    return analyticsProvider.getImmediate();\n  }\n  return initializeAnalytics(app);\n}\n/**\r\n * Returns an {@link Analytics} instance for the given app.\r\n *\r\n * @public\r\n *\r\n * @param app - The {@link @firebase/app#FirebaseApp} to use.\r\n */\nfunction initializeAnalytics(app, options = {}) {\n  // Dependencies\n  const analyticsProvider = _getProvider(app, ANALYTICS_TYPE);\n  if (analyticsProvider.isInitialized()) {\n    const existingInstance = analyticsProvider.getImmediate();\n    if (deepEqual(options, analyticsProvider.getOptions())) {\n      return existingInstance;\n    } else {\n      throw ERROR_FACTORY.create(\"already-initialized\" /* AnalyticsError.ALREADY_INITIALIZED */);\n    }\n  }\n\n  const analyticsInstance = analyticsProvider.initialize({\n    options\n  });\n  return analyticsInstance;\n}\n/**\r\n * This is a public static method provided to users that wraps four different checks:\r\n *\r\n * 1. Check if it's not a browser extension environment.\r\n * 2. Check if cookies are enabled in current browser.\r\n * 3. Check if IndexedDB is supported by the browser environment.\r\n * 4. Check if the current browser context is valid for using `IndexedDB.open()`.\r\n *\r\n * @public\r\n *\r\n */\nfunction isSupported() {\n  return _isSupported.apply(this, arguments);\n}\n/**\r\n * Use gtag `config` command to set `screen_name`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\r\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\r\n *\r\n * @param analyticsInstance - The {@link Analytics} instance.\r\n * @param screenName - Screen name to set.\r\n */\nfunction _isSupported() {\n  _isSupported = _asyncToGenerator(function* () {\n    if (isBrowserExtension()) {\n      return false;\n    }\n    if (!areCookiesEnabled()) {\n      return false;\n    }\n    if (!isIndexedDBAvailable()) {\n      return false;\n    }\n    try {\n      const isDBOpenable = yield validateIndexedDBOpenable();\n      return isDBOpenable;\n    } catch (error) {\n      return false;\n    }\n  });\n  return _isSupported.apply(this, arguments);\n}\nfunction setCurrentScreen(analyticsInstance, screenName, options) {\n  analyticsInstance = getModularInstance(analyticsInstance);\n  setCurrentScreen$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], screenName, options).catch(e => logger.error(e));\n}\n/**\r\n * Use gtag `config` command to set `user_id`.\r\n *\r\n * @public\r\n *\r\n * @param analyticsInstance - The {@link Analytics} instance.\r\n * @param id - User ID to set.\r\n */\nfunction setUserId(analyticsInstance, id, options) {\n  analyticsInstance = getModularInstance(analyticsInstance);\n  setUserId$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], id, options).catch(e => logger.error(e));\n}\n/**\r\n * Use gtag `config` command to set all params specified.\r\n *\r\n * @public\r\n */\nfunction setUserProperties(analyticsInstance, properties, options) {\n  analyticsInstance = getModularInstance(analyticsInstance);\n  setUserProperties$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], properties, options).catch(e => logger.error(e));\n}\n/**\r\n * Sets whether Google Analytics collection is enabled for this app on this device.\r\n * Sets global `window['ga-disable-analyticsId'] = true;`\r\n *\r\n * @public\r\n *\r\n * @param analyticsInstance - The {@link Analytics} instance.\r\n * @param enabled - If true, enables collection, if false, disables it.\r\n */\nfunction setAnalyticsCollectionEnabled(analyticsInstance, enabled) {\n  analyticsInstance = getModularInstance(analyticsInstance);\n  setAnalyticsCollectionEnabled$1(initializationPromisesMap[analyticsInstance.app.options.appId], enabled).catch(e => logger.error(e));\n}\n/**\r\n * Adds data that will be set on every event logged from the SDK, including automatic ones.\r\n * With gtag's \"set\" command, the values passed persist on the current page and are passed with\r\n * all subsequent events.\r\n * @public\r\n * @param customParams - Any custom params the user may pass to gtag.js.\r\n */\nfunction setDefaultEventParameters(customParams) {\n  // Check if reference to existing gtag function on window object exists\n  if (wrappedGtagFunction) {\n    wrappedGtagFunction(\"set\" /* GtagCommand.SET */, customParams);\n  } else {\n    _setDefaultEventParametersForInit(customParams);\n  }\n}\n/**\r\n * Sends a Google Analytics event with given `eventParams`. This method\r\n * automatically associates this logged event with this Firebase web\r\n * app instance on this device.\r\n * List of official event parameters can be found in the gtag.js\r\n * reference documentation:\r\n * {@link https://developers.google.com/gtagjs/reference/ga4-events\r\n * | the GA4 reference documentation}.\r\n *\r\n * @public\r\n */\nfunction logEvent(analyticsInstance, eventName, eventParams, options) {\n  analyticsInstance = getModularInstance(analyticsInstance);\n  logEvent$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], eventName, eventParams, options).catch(e => logger.error(e));\n}\n/**\r\n * Sets the applicable end user consent state for this web app across all gtag references once\r\n * Firebase Analytics is initialized.\r\n *\r\n * Use the {@link ConsentSettings} to specify individual consent type values. By default consent\r\n * types are set to \"granted\".\r\n * @public\r\n * @param consentSettings - Maps the applicable end user consent state for gtag.js.\r\n */\nfunction setConsent(consentSettings) {\n  // Check if reference to existing gtag function on window object exists\n  if (wrappedGtagFunction) {\n    wrappedGtagFunction(\"consent\" /* GtagCommand.CONSENT */, 'update', consentSettings);\n  } else {\n    _setConsentDefaultForInit(consentSettings);\n  }\n}\nconst name = \"@firebase/analytics\";\nconst version = \"0.9.4\";\n\n/**\r\n * Firebase Analytics\r\n *\r\n * @packageDocumentation\r\n */\nfunction registerAnalytics() {\n  _registerComponent(new Component(ANALYTICS_TYPE, (container, {\n    options: analyticsOptions\n  }) => {\n    // getImmediate for FirebaseApp will always succeed\n    const app = container.getProvider('app').getImmediate();\n    const installations = container.getProvider('installations-internal').getImmediate();\n    return factory(app, installations, analyticsOptions);\n  }, \"PUBLIC\" /* ComponentType.PUBLIC */));\n  _registerComponent(new Component('analytics-internal', internalFactory, \"PRIVATE\" /* ComponentType.PRIVATE */));\n  registerVersion(name, version);\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name, version, 'esm2017');\n  function internalFactory(container) {\n    try {\n      const analytics = container.getProvider(ANALYTICS_TYPE).getImmediate();\n      return {\n        logEvent: (eventName, eventParams, options) => logEvent(analytics, eventName, eventParams, options)\n      };\n    } catch (e) {\n      throw ERROR_FACTORY.create(\"interop-component-reg-failed\" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */, {\n        reason: e\n      });\n    }\n  }\n}\nregisterAnalytics();\nexport { getAnalytics, initializeAnalytics, isSupported, logEvent, setAnalyticsCollectionEnabled, setConsent, setCurrentScreen, setDefaultEventParameters, setUserId, setUserProperties, settings };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/83007c32654d98fae632b2af17b7df4d4b6a68fe97eec726d46353bc66efe4f1.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/83007c32654d98fae632b2af17b7df4d4b6a68fe97eec726d46353bc66efe4f1.json
deleted file mode 100644
index 3d282d3ff789f62b73cc89371286a1d9bdffc990..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/83007c32654d98fae632b2af17b7df4d4b6a68fe97eec726d46353bc66efe4f1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nimport { timer, from } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { fromTask as fromTask$1, percentage as percentage$1 } from 'rxfire/storage';\nimport { connectStorageEmulator as connectStorageEmulator$1, deleteObject as deleteObject$1, getBlob as getBlob$1, getBytes as getBytes$1, getDownloadURL as getDownloadURL$1, getMetadata as getMetadata$1, getStorage as getStorage$1, getStream as getStream$1, list as list$1, listAll as listAll$1, ref as ref$1, updateMetadata as updateMetadata$1, uploadBytes as uploadBytes$1, uploadBytesResumable as uploadBytesResumable$1, uploadString as uploadString$1 } from 'firebase/storage';\nexport * from 'firebase/storage';\nclass Storage {\n  constructor(auth) {\n    return auth;\n  }\n}\nconst STORAGE_PROVIDER_NAME = 'storage';\nclass StorageInstances {\n  constructor() {\n    return ɵgetAllInstancesOf(STORAGE_PROVIDER_NAME);\n  }\n}\nconst storageInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(STORAGE_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_STORAGE_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.storage-instances');\nfunction defaultStorageInstanceFactory(provided, defaultApp) {\n  const defaultStorage = ɵgetDefaultInstanceOf(STORAGE_PROVIDER_NAME, provided, defaultApp);\n  return defaultStorage && new Storage(defaultStorage);\n}\nfunction storageInstanceFactory(fn) {\n  return (zone, injector) => {\n    const storage = zone.runOutsideAngular(() => fn(injector));\n    return new Storage(storage);\n  };\n}\nconst STORAGE_INSTANCES_PROVIDER = {\n  provide: StorageInstances,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_STORAGE_INSTANCES]]\n};\nconst DEFAULT_STORAGE_INSTANCE_PROVIDER = {\n  provide: Storage,\n  useFactory: defaultStorageInstanceFactory,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_STORAGE_INSTANCES], FirebaseApp]\n};\nlet StorageModule = /*#__PURE__*/(() => {\n  class StorageModule {\n    constructor() {\n      registerVersion('angularfire', VERSION.full, 'gcs');\n    }\n  }\n  StorageModule.ɵfac = function StorageModule_Factory(t) {\n    return new (t || StorageModule)();\n  };\n  StorageModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: StorageModule\n  });\n  StorageModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [DEFAULT_STORAGE_INSTANCE_PROVIDER, STORAGE_INSTANCES_PROVIDER]\n  });\n  return StorageModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideStorage(fn, ...deps) {\n  return {\n    ngModule: StorageModule,\n    providers: [{\n      provide: PROVIDED_STORAGE_INSTANCES,\n      useFactory: storageInstanceFactory(fn),\n      multi: true,\n      deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps,\n      // Defensively load Auth first, if provided\n      [new Optional(), AuthInstances], [new Optional(), AppCheckInstances], ...deps]\n    }]\n  };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst fromTask = /*#__PURE__*/ɵzoneWrap(fromTask$1, true);\nconst percentage = /*#__PURE__*/ɵzoneWrap(percentage$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst connectStorageEmulator = /*#__PURE__*/ɵzoneWrap(connectStorageEmulator$1, true);\nconst deleteObject = /*#__PURE__*/ɵzoneWrap(deleteObject$1, true);\nconst getBlob = /*#__PURE__*/ɵzoneWrap(getBlob$1, true);\nconst getBytes = /*#__PURE__*/ɵzoneWrap(getBytes$1, true);\nconst getDownloadURL = /*#__PURE__*/ɵzoneWrap(getDownloadURL$1, true);\nconst getMetadata = /*#__PURE__*/ɵzoneWrap(getMetadata$1, true);\nconst getStorage = /*#__PURE__*/ɵzoneWrap(getStorage$1, true);\nconst getStream = /*#__PURE__*/ɵzoneWrap(getStream$1, true);\nconst list = /*#__PURE__*/ɵzoneWrap(list$1, true);\nconst listAll = /*#__PURE__*/ɵzoneWrap(listAll$1, true);\nconst ref = /*#__PURE__*/ɵzoneWrap(ref$1, true);\nconst updateMetadata = /*#__PURE__*/ɵzoneWrap(updateMetadata$1, true);\nconst uploadBytes = /*#__PURE__*/ɵzoneWrap(uploadBytes$1, true);\nconst uploadBytesResumable = /*#__PURE__*/ɵzoneWrap(uploadBytesResumable$1, true);\nconst uploadString = /*#__PURE__*/ɵzoneWrap(uploadString$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Storage, StorageInstances, StorageModule, connectStorageEmulator, deleteObject, fromTask, getBlob, getBytes, getDownloadURL, getMetadata, getStorage, getStream, list, listAll, percentage, provideStorage, ref, storageInstance$, updateMetadata, uploadBytes, uploadBytesResumable, uploadString };\n//# sourceMappingURL=angular-fire-storage.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/830b4051a44de343833105a7052c4fb90317cdb82cfd47762afdbc33015280c6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/830b4051a44de343833105a7052c4fb90317cdb82cfd47762afdbc33015280c6.json
deleted file mode 100644
index 05ae1cbba64aa26bf703afaa05bc5b07a4fc13f3..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/830b4051a44de343833105a7052c4fb90317cdb82cfd47762afdbc33015280c6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const performanceTimestampProvider = {\n  now() {\n    return (performanceTimestampProvider.delegate || performance).now();\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=performanceTimestampProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/830e794136dd5097b38261d76ee8cbbeb11a2dd7cffcc05d6e6188522db4bb15.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/830e794136dd5097b38261d76ee8cbbeb11a2dd7cffcc05d6e6188522db4bb15.json
deleted file mode 100644
index f45c571e327b0e579f3d0079d41f5d5cef0bb5b2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/830e794136dd5097b38261d76ee8cbbeb11a2dd7cffcc05d6e6188522db4bb15.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n  return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/84f313da87a94988abb10e3bc20670d2c8a4de5a321c2ab6da1d60c827b8acef.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/84f313da87a94988abb10e3bc20670d2c8a4de5a321c2ab6da1d60c827b8acef.json
deleted file mode 100644
index 8a3f1c3d4979486f6c1343daaf2501d7de832e73..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/84f313da87a94988abb10e3bc20670d2c8a4de5a321c2ab6da1d60c827b8acef.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n  let intervalDuration = -1;\n  if (intervalOrScheduler != null) {\n    if (isScheduler(intervalOrScheduler)) {\n      scheduler = intervalOrScheduler;\n    } else {\n      intervalDuration = intervalOrScheduler;\n    }\n  }\n  return new Observable(subscriber => {\n    let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n    if (due < 0) {\n      due = 0;\n    }\n    let n = 0;\n    return scheduler.schedule(function () {\n      if (!subscriber.closed) {\n        subscriber.next(n++);\n        if (0 <= intervalDuration) {\n          this.schedule(undefined, intervalDuration);\n        } else {\n          subscriber.complete();\n        }\n      }\n    }, due);\n  });\n}\n//# sourceMappingURL=timer.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8781f7d445c65bbcda3cddd3c9add06546707bb51ded93d9b2fadb5a56880030.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8781f7d445c65bbcda3cddd3c9add06546707bb51ded93d9b2fadb5a56880030.json
deleted file mode 100644
index 819dfee3f385e9856303cac32cac1defd1a809f4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8781f7d445c65bbcda3cddd3c9add06546707bb51ded93d9b2fadb5a56880030.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nimport { isFunction } from '../util/isFunction';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) {\n  if (selectorOrScheduler && !isFunction(selectorOrScheduler)) {\n    timestampProvider = selectorOrScheduler;\n  }\n  const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;\n  return source => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source);\n}\n//# sourceMappingURL=publishReplay.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/89b68bc016ec242c8dd785603bfab5a4eefb63a2c9afa154a53d77c6e1bb9b09.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/89b68bc016ec242c8dd785603bfab5a4eefb63a2c9afa154a53d77c6e1bb9b09.json
deleted file mode 100644
index 207c8e0117e32126e20291222b74d57fa0c220d0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/89b68bc016ec242c8dd785603bfab5a4eefb63a2c9afa154a53d77c6e1bb9b09.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n  return operate((source, subscriber) => {\n    subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n  });\n}\n//# sourceMappingURL=subscribeOn.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8b2f313e6c7b6197d450f5e67effdec0f134067999ad5d5aad2f9f4e47287a93.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8b2f313e6c7b6197d450f5e67effdec0f134067999ad5d5aad2f9f4e47287a93.json
deleted file mode 100644
index 5a7ba394e6a683200a65a45ee522a66ff9838a3d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8b2f313e6c7b6197d450f5e67effdec0f134067999ad5d5aad2f9f4e47287a93.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n  const scheduler = popScheduler(args);\n  const resultSelector = popResultSelector(args);\n  const {\n    args: observables,\n    keys\n  } = argsArgArrayOrObject(args);\n  if (observables.length === 0) {\n    return from([], scheduler);\n  }\n  const result = new Observable(combineLatestInit(observables, scheduler, keys ? values => createObject(keys, values) : identity));\n  return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n  return subscriber => {\n    maybeSchedule(scheduler, () => {\n      const {\n        length\n      } = observables;\n      const values = new Array(length);\n      let active = length;\n      let remainingFirstValues = length;\n      for (let i = 0; i < length; i++) {\n        maybeSchedule(scheduler, () => {\n          const source = from(observables[i], scheduler);\n          let hasFirstValue = false;\n          source.subscribe(createOperatorSubscriber(subscriber, value => {\n            values[i] = value;\n            if (!hasFirstValue) {\n              hasFirstValue = true;\n              remainingFirstValues--;\n            }\n            if (!remainingFirstValues) {\n              subscriber.next(valueTransform(values.slice()));\n            }\n          }, () => {\n            if (! --active) {\n              subscriber.complete();\n            }\n          }));\n        }, subscriber);\n      }\n    }, subscriber);\n  };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n  if (scheduler) {\n    executeSchedule(subscription, scheduler, execute);\n  } else {\n    execute();\n  }\n}\n//# sourceMappingURL=combineLatest.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8d2cc4117628deaae5db0265b0b860699a58fc4dfc350a9dcf13d8bd9e3c86a9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8d2cc4117628deaae5db0265b0b860699a58fc4dfc350a9dcf13d8bd9e3c86a9.json
deleted file mode 100644
index 44d986e6e8bdb0fc0433730193c03ff1851813e9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8d2cc4117628deaae5db0265b0b860699a58fc4dfc350a9dcf13d8bd9e3c86a9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n  return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e30384f2b2c524f2f21086a33f55eedfd2346a0ff33513f5879717abdbba886.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8e30384f2b2c524f2f21086a33f55eedfd2346a0ff33513f5879717abdbba886.json
deleted file mode 100644
index c75e56354dca664275808239a71c224f49b43354..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e30384f2b2c524f2f21086a33f55eedfd2346a0ff33513f5879717abdbba886.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n  constructor(initialTeardown) {\n    this.initialTeardown = initialTeardown;\n    this.closed = false;\n    this._parentage = null;\n    this._finalizers = null;\n  }\n  unsubscribe() {\n    let errors;\n    if (!this.closed) {\n      this.closed = true;\n      const {\n        _parentage\n      } = this;\n      if (_parentage) {\n        this._parentage = null;\n        if (Array.isArray(_parentage)) {\n          for (const parent of _parentage) {\n            parent.remove(this);\n          }\n        } else {\n          _parentage.remove(this);\n        }\n      }\n      const {\n        initialTeardown: initialFinalizer\n      } = this;\n      if (isFunction(initialFinalizer)) {\n        try {\n          initialFinalizer();\n        } catch (e) {\n          errors = e instanceof UnsubscriptionError ? e.errors : [e];\n        }\n      }\n      const {\n        _finalizers\n      } = this;\n      if (_finalizers) {\n        this._finalizers = null;\n        for (const finalizer of _finalizers) {\n          try {\n            execFinalizer(finalizer);\n          } catch (err) {\n            errors = errors !== null && errors !== void 0 ? errors : [];\n            if (err instanceof UnsubscriptionError) {\n              errors = [...errors, ...err.errors];\n            } else {\n              errors.push(err);\n            }\n          }\n        }\n      }\n      if (errors) {\n        throw new UnsubscriptionError(errors);\n      }\n    }\n  }\n  add(teardown) {\n    var _a;\n    if (teardown && teardown !== this) {\n      if (this.closed) {\n        execFinalizer(teardown);\n      } else {\n        if (teardown instanceof Subscription) {\n          if (teardown.closed || teardown._hasParent(this)) {\n            return;\n          }\n          teardown._addParent(this);\n        }\n        (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n      }\n    }\n  }\n  _hasParent(parent) {\n    const {\n      _parentage\n    } = this;\n    return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);\n  }\n  _addParent(parent) {\n    const {\n      _parentage\n    } = this;\n    this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n  }\n  _removeParent(parent) {\n    const {\n      _parentage\n    } = this;\n    if (_parentage === parent) {\n      this._parentage = null;\n    } else if (Array.isArray(_parentage)) {\n      arrRemove(_parentage, parent);\n    }\n  }\n  remove(teardown) {\n    const {\n      _finalizers\n    } = this;\n    _finalizers && arrRemove(_finalizers, teardown);\n    if (teardown instanceof Subscription) {\n      teardown._removeParent(this);\n    }\n  }\n}\nSubscription.EMPTY = (() => {\n  const empty = new Subscription();\n  empty.closed = true;\n  return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n  return value instanceof Subscription || value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);\n}\nfunction execFinalizer(finalizer) {\n  if (isFunction(finalizer)) {\n    finalizer();\n  } else {\n    finalizer.unsubscribe();\n  }\n}\n//# sourceMappingURL=Subscription.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e4528ca77db8e51576c6c39ba2dc7a04f27fc91517a6baf720674dde03ffc24.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8e4528ca77db8e51576c6c39ba2dc7a04f27fc91517a6baf720674dde03ffc24.json
deleted file mode 100644
index 37a88685c8d5c46b7454040de86549cebdff2f81..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e4528ca77db8e51576c6c39ba2dc7a04f27fc91517a6baf720674dde03ffc24.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { from } from './from';\nexport function pairs(obj, scheduler) {\n  return from(Object.entries(obj), scheduler);\n}\n//# sourceMappingURL=pairs.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e8a4760f249e61a4f1fd6d411f7cdf322396bb6771c88bef069ee8136f02ca6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/8e8a4760f249e61a4f1fd6d411f7cdf322396bb6771c88bef069ee8136f02ca6.json
deleted file mode 100644
index 9c1872814922de9f69faa35c9cf7770531d317b4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/8e8a4760f249e61a4f1fd6d411f7cdf322396bb6771c88bef069ee8136f02ca6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n  return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n    const reader = readableStream.getReader();\n    try {\n      while (true) {\n        const {\n          value,\n          done\n        } = yield __await(reader.read());\n        if (done) {\n          return yield __await(void 0);\n        }\n        yield yield __await(value);\n      }\n    } finally {\n      reader.releaseLock();\n    }\n  });\n}\nexport function isReadableStreamLike(obj) {\n  return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/90774d3e77a7b6addb320b13595bf23b5535426ddcfa7e75a3d44b6512b4326b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/90774d3e77a7b6addb320b13595bf23b5535426ddcfa7e75a3d44b6512b4326b.json
deleted file mode 100644
index 153b5a901d0cefb24318b78a8f84a9707839c17c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/90774d3e77a7b6addb320b13595bf23b5535426ddcfa7e75a3d44b6512b4326b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function noop() {}\n//# sourceMappingURL=noop.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/90aba3d4e6e3ac4dc3ad793eed9839295ddf071f578586a932eea4ca99af7ea4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/90aba3d4e6e3ac4dc3ad793eed9839295ddf071f578586a932eea4ca99af7ea4.json
deleted file mode 100644
index 7a59d0cc08b418d2bce22f2345c6fa2e0c827aed..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/90aba3d4e6e3ac4dc3ad793eed9839295ddf071f578586a932eea4ca99af7ea4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-3363a72a.js';\nimport '@firebase/util';\nimport '@firebase/app';\nimport '@firebase/logger';\nimport 'tslib';\nimport '@firebase/component';\n//# sourceMappingURL=index.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/91b0e04d30b5bedee0c6d12f559138dcfe85f298ee7351567719a58be9e796ce.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/91b0e04d30b5bedee0c6d12f559138dcfe85f298ee7351567719a58be9e796ce.json
deleted file mode 100644
index 66a6bdd769b7984feb8e1d708503a1822cc43560..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/91b0e04d30b5bedee0c6d12f559138dcfe85f298ee7351567719a58be9e796ce.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n  return operate((source, subscriber) => {\n    let activeTask = null;\n    let lastValue = null;\n    let lastTime = null;\n    const emit = () => {\n      if (activeTask) {\n        activeTask.unsubscribe();\n        activeTask = null;\n        const value = lastValue;\n        lastValue = null;\n        subscriber.next(value);\n      }\n    };\n    function emitWhenIdle() {\n      const targetTime = lastTime + dueTime;\n      const now = scheduler.now();\n      if (now < targetTime) {\n        activeTask = this.schedule(undefined, targetTime - now);\n        subscriber.add(activeTask);\n        return;\n      }\n      emit();\n    }\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      lastValue = value;\n      lastTime = scheduler.now();\n      if (!activeTask) {\n        activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n        subscriber.add(activeTask);\n      }\n    }, () => {\n      emit();\n      subscriber.complete();\n    }, undefined, () => {\n      lastValue = activeTask = null;\n    }));\n  });\n}\n//# sourceMappingURL=debounceTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9255678fa3a2080fb570a0895b611e63af4c7dbf1947504cdd77ce8374f496d0.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9255678fa3a2080fb570a0895b611e63af4c7dbf1947504cdd77ce8374f496d0.json
deleted file mode 100644
index 04ef494d2623933b539757fd9aa8e1ed4e54c5f9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9255678fa3a2080fb570a0895b611e63af4c7dbf1947504cdd77ce8374f496d0.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { exhaustAll } from './exhaustAll';\nexport const exhaust = exhaustAll;\n//# sourceMappingURL=exhaust.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9559ab7ef71691b7b2808fa66262af3d03faa7e44064f3de36238c54af4d5129.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9559ab7ef71691b7b2808fa66262af3d03faa7e44064f3de36238c54af4d5129.json
deleted file mode 100644
index e9c32cd4e1c1480078435a0436bed7ad35624df9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9559ab7ef71691b7b2808fa66262af3d03faa7e44064f3de36238c54af4d5129.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { onAuthStateChanged, onIdTokenChanged, getIdToken } from 'firebase/auth';\nimport { Observable, from, of } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Create an observable of authentication state. The observer is only\n * triggered on sign-in or sign-out.\n * @param auth firebase.auth.Auth\n */\nfunction authState(auth) {\n  return new Observable(function (subscriber) {\n    var unsubscribe = onAuthStateChanged(auth, subscriber.next.bind(subscriber), subscriber.error.bind(subscriber), subscriber.complete.bind(subscriber));\n    return {\n      unsubscribe: unsubscribe\n    };\n  });\n}\n/**\n * Create an observable of user state. The observer is triggered for sign-in,\n * sign-out, and token refresh events\n * @param auth firebase.auth.Auth\n */\nfunction user(auth) {\n  return new Observable(function (subscriber) {\n    var unsubscribe = onIdTokenChanged(auth, subscriber.next.bind(subscriber), subscriber.error.bind(subscriber), subscriber.complete.bind(subscriber));\n    return {\n      unsubscribe: unsubscribe\n    };\n  });\n}\n/**\n * Create an observable of idToken state. The observer is triggered for sign-in,\n * sign-out, and token refresh events\n * @param auth firebase.auth.Auth\n */\nfunction idToken(auth) {\n  return user(auth).pipe(switchMap(function (user) {\n    return user ? from(getIdToken(user)) : of(null);\n  }));\n}\nexport { authState, idToken, user };\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9714c4606956cddb185c02a1eabea42417eaa44ecc767781132eaac5acae3c14.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9714c4606956cddb185c02a1eabea42417eaa44ecc767781132eaac5acae3c14.json
deleted file mode 100644
index 1f04330885b4aab74d0a600b9aa2dbea29f36769..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9714c4606956cddb185c02a1eabea42417eaa44ecc767781132eaac5acae3c14.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n  return new Observable(subscriber => {\n    let iterator;\n    executeSchedule(subscriber, scheduler, () => {\n      iterator = input[Symbol_iterator]();\n      executeSchedule(subscriber, scheduler, () => {\n        let value;\n        let done;\n        try {\n          ({\n            value,\n            done\n          } = iterator.next());\n        } catch (err) {\n          subscriber.error(err);\n          return;\n        }\n        if (done) {\n          subscriber.complete();\n        } else {\n          subscriber.next(value);\n        }\n      }, 0, true);\n    });\n    return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n  });\n}\n//# sourceMappingURL=scheduleIterable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9794d22030b13726d742b5b5824040cc813342b1810206afcb01230336765307.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9794d22030b13726d742b5b5824040cc813342b1810206afcb01230336765307.json
deleted file mode 100644
index a8fdc9bbf4ff3fc3da0fdfda4e41b9a06db61730..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9794d22030b13726d742b5b5824040cc813342b1810206afcb01230336765307.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n  return operate((source, subscriber) => {\n    let innerSub = null;\n    let syncUnsub = false;\n    let handledResult;\n    innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, err => {\n      handledResult = innerFrom(selector(err, catchError(selector)(source)));\n      if (innerSub) {\n        innerSub.unsubscribe();\n        innerSub = null;\n        handledResult.subscribe(subscriber);\n      } else {\n        syncUnsub = true;\n      }\n    }));\n    if (syncUnsub) {\n      innerSub.unsubscribe();\n      innerSub = null;\n      handledResult.subscribe(subscriber);\n    }\n  });\n}\n//# sourceMappingURL=catchError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/994bcc0e30cc21da3b3f89cba64be88721af1f3acc39d328f0155d84f3e4cf69.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/994bcc0e30cc21da3b3f89cba64be88721af1f3acc39d328f0155d84f3e4cf69.json
deleted file mode 100644
index 0e00e3429100d268d92c52aef09633f924eafbbe..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/994bcc0e30cc21da3b3f89cba64be88721af1f3acc39d328f0155d84f3e4cf69.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { Version, Injectable } from '@angular/core';\nimport { getApps } from 'firebase/app';\nimport { isSupported as isSupported$2 } from 'firebase/remote-config';\nimport { isSupported as isSupported$1 } from 'firebase/messaging';\nimport { isSupported } from 'firebase/analytics';\nimport { queueScheduler, asyncScheduler, Observable } from 'rxjs';\nimport { tap, observeOn, subscribeOn } from 'rxjs/operators';\nconst VERSION = /*#__PURE__*/new Version('7.5.0');\nconst isAnalyticsSupportedValueSymbol = '__angularfire_symbol__analyticsIsSupportedValue';\nconst isAnalyticsSupportedPromiseSymbol = '__angularfire_symbol__analyticsIsSupported';\nconst isRemoteConfigSupportedValueSymbol = '__angularfire_symbol__remoteConfigIsSupportedValue';\nconst isRemoteConfigSupportedPromiseSymbol = '__angularfire_symbol__remoteConfigIsSupported';\nconst isMessagingSupportedValueSymbol = '__angularfire_symbol__messagingIsSupportedValue';\nconst isMessagingSupportedPromiseSymbol = '__angularfire_symbol__messagingIsSupported';\nglobalThis[isAnalyticsSupportedPromiseSymbol] || (globalThis[isAnalyticsSupportedPromiseSymbol] = /*#__PURE__*/ /*#__PURE__*/ /*#__PURE__*/isSupported().then(it => globalThis[isAnalyticsSupportedValueSymbol] = it).catch(() => globalThis[isAnalyticsSupportedValueSymbol] = false));\nglobalThis[isMessagingSupportedPromiseSymbol] || (globalThis[isMessagingSupportedPromiseSymbol] = /*#__PURE__*/ /*#__PURE__*/ /*#__PURE__*/isSupported$1().then(it => globalThis[isMessagingSupportedValueSymbol] = it).catch(() => globalThis[isMessagingSupportedValueSymbol] = false));\nglobalThis[isRemoteConfigSupportedPromiseSymbol] || (globalThis[isRemoteConfigSupportedPromiseSymbol] = /*#__PURE__*/ /*#__PURE__*/ /*#__PURE__*/isSupported$2().then(it => globalThis[isRemoteConfigSupportedValueSymbol] = it).catch(() => globalThis[isRemoteConfigSupportedValueSymbol] = false));\nconst isSupportedError = module => `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\nconst ɵisMessagingSupportedFactory = {\n  async: () => globalThis[isMessagingSupportedPromiseSymbol],\n  sync: () => {\n    const ret = globalThis[isMessagingSupportedValueSymbol];\n    if (ret === undefined) {\n      throw new Error(isSupportedError('Messaging'));\n    }\n    return ret;\n  }\n};\nconst ɵisRemoteConfigSupportedFactory = {\n  async: () => globalThis[isRemoteConfigSupportedPromiseSymbol],\n  sync: () => {\n    const ret = globalThis[isRemoteConfigSupportedValueSymbol];\n    if (ret === undefined) {\n      throw new Error(isSupportedError('RemoteConfig'));\n    }\n    return ret;\n  }\n};\nconst ɵisAnalyticsSupportedFactory = {\n  async: () => globalThis[isAnalyticsSupportedPromiseSymbol],\n  sync: () => {\n    const ret = globalThis[isAnalyticsSupportedValueSymbol];\n    if (ret === undefined) {\n      throw new Error(isSupportedError('Analytics'));\n    }\n    return ret;\n  }\n};\nfunction ɵgetDefaultInstanceOf(identifier, provided, defaultApp) {\n  if (provided) {\n    // Was provide* only called once? If so grab that\n    if (provided.length === 1) {\n      return provided[0];\n    }\n    const providedUsingDefaultApp = provided.filter(it => it.app === defaultApp);\n    // Was provide* only called once, using the default app? If so use that\n    if (providedUsingDefaultApp.length === 1) {\n      return providedUsingDefaultApp[0];\n    }\n  }\n  // Grab the default instance from the defaultApp\n  const defaultAppWithContainer = defaultApp;\n  const provider = defaultAppWithContainer.container.getProvider(identifier);\n  return provider.getImmediate({\n    optional: true\n  });\n}\nconst ɵgetAllInstancesOf = (identifier, app) => {\n  const apps = app ? [app] : getApps();\n  const instances = [];\n  apps.forEach(app => {\n    const provider = app.container.getProvider(identifier);\n    provider.instances.forEach(instance => {\n      if (!instances.includes(instance)) {\n        instances.push(instance);\n      }\n    });\n  });\n  return instances;\n};\nfunction noop() {}\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\n// tslint:disable-next-line:class-name\nclass ɵZoneScheduler {\n  constructor(zone, delegate = queueScheduler) {\n    this.zone = zone;\n    this.delegate = delegate;\n  }\n  now() {\n    return this.delegate.now();\n  }\n  schedule(work, delay, state) {\n    const targetZone = this.zone;\n    // Wrap the specified work function to make sure that if nested scheduling takes place the\n    // work is executed in the correct zone\n    const workInZone = function (state) {\n      targetZone.runGuarded(() => {\n        work.apply(this, [state]);\n      });\n    };\n    // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n    // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n    // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n    return this.delegate.schedule(workInZone, delay, state);\n  }\n}\nclass BlockUntilFirstOperator {\n  constructor(zone) {\n    this.zone = zone;\n    this.task = null;\n  }\n  call(subscriber, source) {\n    const unscheduleTask = this.unscheduleTask.bind(this);\n    this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n    return source.pipe(tap({\n      next: unscheduleTask,\n      complete: unscheduleTask,\n      error: unscheduleTask\n    })).subscribe(subscriber).add(unscheduleTask);\n  }\n  unscheduleTask() {\n    // maybe this is a race condition, invoke in a timeout\n    // hold for 10ms while I try to figure out what is going on\n    setTimeout(() => {\n      if (this.task != null && this.task.state === 'scheduled') {\n        this.task.invoke();\n        this.task = null;\n      }\n    }, 10);\n  }\n}\n// tslint:disable-next-line:class-name\nlet ɵAngularFireSchedulers = /*#__PURE__*/(() => {\n  class ɵAngularFireSchedulers {\n    constructor(ngZone) {\n      this.ngZone = ngZone;\n      this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n      this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n      globalThis.ɵAngularFireScheduler || (globalThis.ɵAngularFireScheduler = this);\n    }\n  }\n  ɵAngularFireSchedulers.ɵfac = function ɵAngularFireSchedulers_Factory(t) {\n    return new (t || ɵAngularFireSchedulers)(i0.ɵɵinject(i0.NgZone));\n  };\n  ɵAngularFireSchedulers.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: ɵAngularFireSchedulers,\n    factory: ɵAngularFireSchedulers.ɵfac,\n    providedIn: 'root'\n  });\n  return ɵAngularFireSchedulers;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction getSchedulers() {\n  const schedulers = globalThis.ɵAngularFireScheduler;\n  if (!schedulers) {\n    throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n  }\n  return schedulers;\n}\nfunction runOutsideAngular(fn) {\n  return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\nfunction run(fn) {\n  return getSchedulers().ngZone.run(() => fn());\n}\nfunction observeOutsideAngular(obs$) {\n  return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\nfunction observeInsideAngular(obs$) {\n  return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\nfunction keepUnstableUntilFirst(obs$) {\n  const scheduler = getSchedulers();\n  return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nfunction ɵkeepUnstableUntilFirstFactory(schedulers) {\n  return function keepUnstableUntilFirst(obs$) {\n    obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone));\n    return obs$.pipe(\n    // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n    subscribeOn(schedulers.outsideAngular),\n    // Run operators inside the angular zone (e.g. side effects via tap())\n    observeOn(schedulers.insideAngular)\n    // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n    // share()\n    );\n  };\n}\n\nconst zoneWrapFn = (it, macrotask) => {\n  const _this = this;\n  // function() is needed for the arguments object\n  // tslint:disable-next-line:only-arrow-functions\n  return function () {\n    const _arguments = arguments;\n    if (macrotask) {\n      setTimeout(() => {\n        if (macrotask.state === 'scheduled') {\n          macrotask.invoke();\n        }\n      }, 10);\n    }\n    return run(() => it.apply(_this, _arguments));\n  };\n};\nconst ɵzoneWrap = (it, blockUntilFirst) => {\n  // function() is needed for the arguments object\n  // tslint:disable-next-line:only-arrow-functions\n  return function () {\n    let macrotask;\n    const _arguments = arguments;\n    // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it\n    // only once one of the callback functions is tripped.\n    for (let i = 0; i < arguments.length; i++) {\n      if (typeof _arguments[i] === 'function') {\n        if (blockUntilFirst) {\n          macrotask || (macrotask = run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop)));\n        }\n        // TODO create a microtask to track callback functions\n        _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n      }\n    }\n    const ret = runOutsideAngular(() => it.apply(this, _arguments));\n    if (!blockUntilFirst) {\n      if (ret instanceof Observable) {\n        const schedulers = getSchedulers();\n        return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n      } else {\n        return run(() => ret);\n      }\n    }\n    if (ret instanceof Observable) {\n      return ret.pipe(keepUnstableUntilFirst);\n    } else if (ret instanceof Promise) {\n      return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n    } else if (typeof ret === 'function' && macrotask) {\n      // Handle unsubscribe\n      // function() is needed for the arguments object\n      // tslint:disable-next-line:only-arrow-functions\n      return function () {\n        setTimeout(() => {\n          if (macrotask && macrotask.state === 'scheduled') {\n            macrotask.invoke();\n          }\n        }, 10);\n        return ret.apply(this, arguments);\n      };\n    } else {\n      // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n      return run(() => ret);\n    }\n  };\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAngularFireSchedulers, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisAnalyticsSupportedFactory, ɵisMessagingSupportedFactory, ɵisRemoteConfigSupportedFactory, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };\n//# sourceMappingURL=angular-fire.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/996cd915cd64566f4de8175301c8b446e679a6d93f06e1cf8f6b710d7b1b3e51.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/996cd915cd64566f4de8175301c8b446e679a6d93f06e1cf8f6b710d7b1b3e51.json
deleted file mode 100644
index e75cbb0f4995619df5c7127d8b46e408b2a25de4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/996cd915cd64566f4de8175301c8b446e679a6d93f06e1cf8f6b710d7b1b3e51.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function windowCount(windowSize, startWindowEvery = 0) {\n  const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;\n  return operate((source, subscriber) => {\n    let windows = [new Subject()];\n    let starts = [];\n    let count = 0;\n    subscriber.next(windows[0].asObservable());\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      for (const window of windows) {\n        window.next(value);\n      }\n      const c = count - windowSize + 1;\n      if (c >= 0 && c % startEvery === 0) {\n        windows.shift().complete();\n      }\n      if (++count % startEvery === 0) {\n        const window = new Subject();\n        windows.push(window);\n        subscriber.next(window.asObservable());\n      }\n    }, () => {\n      while (windows.length > 0) {\n        windows.shift().complete();\n      }\n      subscriber.complete();\n    }, err => {\n      while (windows.length > 0) {\n        windows.shift().error(err);\n      }\n      subscriber.error(err);\n    }, () => {\n      starts = null;\n      windows = null;\n    }));\n  });\n}\n//# sourceMappingURL=windowCount.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9b8d6c57f199874da3f8422a1f8031a1eb58660f2d58e842b0745b6a03ee10d4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9b8d6c57f199874da3f8422a1f8031a1eb58660f2d58e842b0745b6a03ee10d4.json
deleted file mode 100644
index f5ec74736803fc45e1f9e51b79717c641c28ab8e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9b8d6c57f199874da3f8422a1f8031a1eb58660f2d58e842b0745b6a03ee10d4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { BehaviorSubject } from '../BehaviorSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishBehavior(initialValue) {\n  return source => {\n    const subject = new BehaviorSubject(initialValue);\n    return new ConnectableObservable(source, () => subject);\n  };\n}\n//# sourceMappingURL=publishBehavior.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9bc7ca4b97d014064938dd782f19d2218a911a7ed3b09a4ca7907e0301ad961a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9bc7ca4b97d014064938dd782f19d2218a911a7ed3b09a4ca7907e0301ad961a.json
deleted file mode 100644
index 561b1841178012227aa52f744bd68b69a7158c22..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9bc7ca4b97d014064938dd782f19d2218a911a7ed3b09a4ca7907e0301ad961a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nimport { timer, from } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { authState as authState$1, user as user$1, idToken as idToken$1 } from 'rxfire/auth';\nimport { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';\nexport * from 'firebase/auth';\nconst AUTH_PROVIDER_NAME = 'auth';\nclass Auth {\n  constructor(auth) {\n    return auth;\n  }\n}\nclass AuthInstances {\n  constructor() {\n    return ɵgetAllInstancesOf(AUTH_PROVIDER_NAME);\n  }\n}\nconst authInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(AUTH_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_AUTH_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.auth-instances');\nfunction defaultAuthInstanceFactory(provided, defaultApp) {\n  const defaultAuth = ɵgetDefaultInstanceOf(AUTH_PROVIDER_NAME, provided, defaultApp);\n  return defaultAuth && new Auth(defaultAuth);\n}\nfunction authInstanceFactory(fn) {\n  return (zone, injector) => {\n    const auth = zone.runOutsideAngular(() => fn(injector));\n    return new Auth(auth);\n  };\n}\nconst AUTH_INSTANCES_PROVIDER = {\n  provide: AuthInstances,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES]]\n};\nconst DEFAULT_AUTH_INSTANCE_PROVIDER = {\n  provide: Auth,\n  useFactory: defaultAuthInstanceFactory,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES], FirebaseApp]\n};\nlet AuthModule = /*#__PURE__*/(() => {\n  class AuthModule {\n    constructor() {\n      registerVersion('angularfire', VERSION.full, 'auth');\n    }\n  }\n  AuthModule.ɵfac = function AuthModule_Factory(t) {\n    return new (t || AuthModule)();\n  };\n  AuthModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: AuthModule\n  });\n  AuthModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [DEFAULT_AUTH_INSTANCE_PROVIDER, AUTH_INSTANCES_PROVIDER]\n  });\n  return AuthModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAuth(fn, ...deps) {\n  return {\n    ngModule: AuthModule,\n    providers: [{\n      provide: PROVIDED_AUTH_INSTANCES,\n      useFactory: authInstanceFactory(fn),\n      multi: true,\n      deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps, [new Optional(), AppCheckInstances], ...deps]\n    }]\n  };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst authState = /*#__PURE__*/ɵzoneWrap(authState$1, true);\nconst user = /*#__PURE__*/ɵzoneWrap(user$1, true);\nconst idToken = /*#__PURE__*/ɵzoneWrap(idToken$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst applyActionCode = /*#__PURE__*/ɵzoneWrap(applyActionCode$1, true);\nconst beforeAuthStateChanged = /*#__PURE__*/ɵzoneWrap(beforeAuthStateChanged$1, true);\nconst checkActionCode = /*#__PURE__*/ɵzoneWrap(checkActionCode$1, true);\nconst confirmPasswordReset = /*#__PURE__*/ɵzoneWrap(confirmPasswordReset$1, true);\nconst connectAuthEmulator = /*#__PURE__*/ɵzoneWrap(connectAuthEmulator$1, true);\nconst createUserWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(createUserWithEmailAndPassword$1, true);\nconst deleteUser = /*#__PURE__*/ɵzoneWrap(deleteUser$1, true);\nconst fetchSignInMethodsForEmail = /*#__PURE__*/ɵzoneWrap(fetchSignInMethodsForEmail$1, true);\nconst getAdditionalUserInfo = /*#__PURE__*/ɵzoneWrap(getAdditionalUserInfo$1, true);\nconst getAuth = /*#__PURE__*/ɵzoneWrap(getAuth$1, true);\nconst getIdToken = /*#__PURE__*/ɵzoneWrap(getIdToken$1, true);\nconst getIdTokenResult = /*#__PURE__*/ɵzoneWrap(getIdTokenResult$1, true);\nconst getMultiFactorResolver = /*#__PURE__*/ɵzoneWrap(getMultiFactorResolver$1, true);\nconst getRedirectResult = /*#__PURE__*/ɵzoneWrap(getRedirectResult$1, true);\nconst initializeAuth = /*#__PURE__*/ɵzoneWrap(initializeAuth$1, true);\nconst isSignInWithEmailLink = /*#__PURE__*/ɵzoneWrap(isSignInWithEmailLink$1, true);\nconst linkWithCredential = /*#__PURE__*/ɵzoneWrap(linkWithCredential$1, true);\nconst linkWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(linkWithPhoneNumber$1, true);\nconst linkWithPopup = /*#__PURE__*/ɵzoneWrap(linkWithPopup$1, true);\nconst linkWithRedirect = /*#__PURE__*/ɵzoneWrap(linkWithRedirect$1, true);\nconst multiFactor = /*#__PURE__*/ɵzoneWrap(multiFactor$1, true);\nconst onAuthStateChanged = /*#__PURE__*/ɵzoneWrap(onAuthStateChanged$1, true);\nconst onIdTokenChanged = /*#__PURE__*/ɵzoneWrap(onIdTokenChanged$1, true);\nconst parseActionCodeURL = /*#__PURE__*/ɵzoneWrap(parseActionCodeURL$1, true);\nconst reauthenticateWithCredential = /*#__PURE__*/ɵzoneWrap(reauthenticateWithCredential$1, true);\nconst reauthenticateWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPhoneNumber$1, true);\nconst reauthenticateWithPopup = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPopup$1, true);\nconst reauthenticateWithRedirect = /*#__PURE__*/ɵzoneWrap(reauthenticateWithRedirect$1, true);\nconst reload = /*#__PURE__*/ɵzoneWrap(reload$1, true);\nconst sendEmailVerification = /*#__PURE__*/ɵzoneWrap(sendEmailVerification$1, true);\nconst sendPasswordResetEmail = /*#__PURE__*/ɵzoneWrap(sendPasswordResetEmail$1, true);\nconst sendSignInLinkToEmail = /*#__PURE__*/ɵzoneWrap(sendSignInLinkToEmail$1, true);\nconst setPersistence = /*#__PURE__*/ɵzoneWrap(setPersistence$1, true);\nconst signInAnonymously = /*#__PURE__*/ɵzoneWrap(signInAnonymously$1, true);\nconst signInWithCredential = /*#__PURE__*/ɵzoneWrap(signInWithCredential$1, true);\nconst signInWithCustomToken = /*#__PURE__*/ɵzoneWrap(signInWithCustomToken$1, true);\nconst signInWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(signInWithEmailAndPassword$1, true);\nconst signInWithEmailLink = /*#__PURE__*/ɵzoneWrap(signInWithEmailLink$1, true);\nconst signInWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(signInWithPhoneNumber$1, true);\nconst signInWithPopup = /*#__PURE__*/ɵzoneWrap(signInWithPopup$1, true);\nconst signInWithRedirect = /*#__PURE__*/ɵzoneWrap(signInWithRedirect$1, true);\nconst signOut = /*#__PURE__*/ɵzoneWrap(signOut$1, true);\nconst unlink = /*#__PURE__*/ɵzoneWrap(unlink$1, true);\nconst updateCurrentUser = /*#__PURE__*/ɵzoneWrap(updateCurrentUser$1, true);\nconst updateEmail = /*#__PURE__*/ɵzoneWrap(updateEmail$1, true);\nconst updatePassword = /*#__PURE__*/ɵzoneWrap(updatePassword$1, true);\nconst updatePhoneNumber = /*#__PURE__*/ɵzoneWrap(updatePhoneNumber$1, true);\nconst updateProfile = /*#__PURE__*/ɵzoneWrap(updateProfile$1, true);\nconst useDeviceLanguage = /*#__PURE__*/ɵzoneWrap(useDeviceLanguage$1, true);\nconst verifyBeforeUpdateEmail = /*#__PURE__*/ɵzoneWrap(verifyBeforeUpdateEmail$1, true);\nconst verifyPasswordResetCode = /*#__PURE__*/ɵzoneWrap(verifyPasswordResetCode$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, verifyBeforeUpdateEmail, verifyPasswordResetCode };\n//# sourceMappingURL=angular-fire-auth.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9c3f00f0aaaaf9ad9259e5ff53c484752c0871923cf56e366a0385aa693c5cae.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9c3f00f0aaaaf9ad9259e5ff53c484752c0871923cf56e366a0385aa693c5cae.json
deleted file mode 100644
index 87decdc021249649b0227979caa6f0fba4ce1198..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9c3f00f0aaaaf9ad9259e5ff53c484752c0871923cf56e366a0385aa693c5cae.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @fileoverview Firebase constants.  Some of these (@defines) can be overridden at compile-time.\r\n */\nconst CONSTANTS = {\n  /**\r\n   * @define {boolean} Whether this is the client Node.js SDK.\r\n   */\n  NODE_CLIENT: false,\n  /**\r\n   * @define {boolean} Whether this is the Admin Node.js SDK.\r\n   */\n  NODE_ADMIN: false,\n  /**\r\n   * Firebase SDK Version\r\n   */\n  SDK_VERSION: '${JSCORE_VERSION}'\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Throws an error if the provided assertion is falsy\r\n */\nconst assert = function (assertion, message) {\n  if (!assertion) {\n    throw assertionError(message);\n  }\n};\n/**\r\n * Returns an Error object suitable for throwing.\r\n */\nconst assertionError = function (message) {\n  return new Error('Firebase Database (' + CONSTANTS.SDK_VERSION + ') INTERNAL ASSERT FAILED: ' + message);\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst stringToByteArray$1 = function (str) {\n  // TODO(user): Use native implementations if/when available\n  const out = [];\n  let p = 0;\n  for (let i = 0; i < str.length; i++) {\n    let c = str.charCodeAt(i);\n    if (c < 128) {\n      out[p++] = c;\n    } else if (c < 2048) {\n      out[p++] = c >> 6 | 192;\n      out[p++] = c & 63 | 128;\n    } else if ((c & 0xfc00) === 0xd800 && i + 1 < str.length && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n      // Surrogate Pair\n      c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\n      out[p++] = c >> 18 | 240;\n      out[p++] = c >> 12 & 63 | 128;\n      out[p++] = c >> 6 & 63 | 128;\n      out[p++] = c & 63 | 128;\n    } else {\n      out[p++] = c >> 12 | 224;\n      out[p++] = c >> 6 & 63 | 128;\n      out[p++] = c & 63 | 128;\n    }\n  }\n  return out;\n};\n/**\r\n * Turns an array of numbers into the string given by the concatenation of the\r\n * characters to which the numbers correspond.\r\n * @param bytes Array of numbers representing characters.\r\n * @return Stringification of the array.\r\n */\nconst byteArrayToString = function (bytes) {\n  // TODO(user): Use native implementations if/when available\n  const out = [];\n  let pos = 0,\n    c = 0;\n  while (pos < bytes.length) {\n    const c1 = bytes[pos++];\n    if (c1 < 128) {\n      out[c++] = String.fromCharCode(c1);\n    } else if (c1 > 191 && c1 < 224) {\n      const c2 = bytes[pos++];\n      out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63);\n    } else if (c1 > 239 && c1 < 365) {\n      // Surrogate Pair\n      const c2 = bytes[pos++];\n      const c3 = bytes[pos++];\n      const c4 = bytes[pos++];\n      const u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 0x10000;\n      out[c++] = String.fromCharCode(0xd800 + (u >> 10));\n      out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\n    } else {\n      const c2 = bytes[pos++];\n      const c3 = bytes[pos++];\n      out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n    }\n  }\n  return out.join('');\n};\n// We define it as an object literal instead of a class because a class compiled down to es5 can't\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\n// Static lookup maps, lazily populated by init_()\nconst base64 = {\n  /**\r\n   * Maps bytes to characters.\r\n   */\n  byteToCharMap_: null,\n  /**\r\n   * Maps characters to bytes.\r\n   */\n  charToByteMap_: null,\n  /**\r\n   * Maps bytes to websafe characters.\r\n   * @private\r\n   */\n  byteToCharMapWebSafe_: null,\n  /**\r\n   * Maps websafe characters to bytes.\r\n   * @private\r\n   */\n  charToByteMapWebSafe_: null,\n  /**\r\n   * Our default alphabet, shared between\r\n   * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n   */\n  ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n  /**\r\n   * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n   */\n  get ENCODED_VALS() {\n    return this.ENCODED_VALS_BASE + '+/=';\n  },\n  /**\r\n   * Our websafe alphabet.\r\n   */\n  get ENCODED_VALS_WEBSAFE() {\n    return this.ENCODED_VALS_BASE + '-_.';\n  },\n  /**\r\n   * Whether this browser supports the atob and btoa functions. This extension\r\n   * started at Mozilla but is now implemented by many browsers. We use the\r\n   * ASSUME_* variables to avoid pulling in the full useragent detection library\r\n   * but still allowing the standard per-browser compilations.\r\n   *\r\n   */\n  HAS_NATIVE_SUPPORT: typeof atob === 'function',\n  /**\r\n   * Base64-encode an array of bytes.\r\n   *\r\n   * @param input An array of bytes (numbers with\r\n   *     value in [0, 255]) to encode.\r\n   * @param webSafe Boolean indicating we should use the\r\n   *     alternative alphabet.\r\n   * @return The base64 encoded string.\r\n   */\n  encodeByteArray(input, webSafe) {\n    if (!Array.isArray(input)) {\n      throw Error('encodeByteArray takes an array as a parameter');\n    }\n    this.init_();\n    const byteToCharMap = webSafe ? this.byteToCharMapWebSafe_ : this.byteToCharMap_;\n    const output = [];\n    for (let i = 0; i < input.length; i += 3) {\n      const byte1 = input[i];\n      const haveByte2 = i + 1 < input.length;\n      const byte2 = haveByte2 ? input[i + 1] : 0;\n      const haveByte3 = i + 2 < input.length;\n      const byte3 = haveByte3 ? input[i + 2] : 0;\n      const outByte1 = byte1 >> 2;\n      const outByte2 = (byte1 & 0x03) << 4 | byte2 >> 4;\n      let outByte3 = (byte2 & 0x0f) << 2 | byte3 >> 6;\n      let outByte4 = byte3 & 0x3f;\n      if (!haveByte3) {\n        outByte4 = 64;\n        if (!haveByte2) {\n          outByte3 = 64;\n        }\n      }\n      output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\n    }\n    return output.join('');\n  },\n  /**\r\n   * Base64-encode a string.\r\n   *\r\n   * @param input A string to encode.\r\n   * @param webSafe If true, we should use the\r\n   *     alternative alphabet.\r\n   * @return The base64 encoded string.\r\n   */\n  encodeString(input, webSafe) {\n    // Shortcut for Mozilla browsers that implement\n    // a native base64 encoder in the form of \"btoa/atob\"\n    if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n      return btoa(input);\n    }\n    return this.encodeByteArray(stringToByteArray$1(input), webSafe);\n  },\n  /**\r\n   * Base64-decode a string.\r\n   *\r\n   * @param input to decode.\r\n   * @param webSafe True if we should use the\r\n   *     alternative alphabet.\r\n   * @return string representing the decoded value.\r\n   */\n  decodeString(input, webSafe) {\n    // Shortcut for Mozilla browsers that implement\n    // a native base64 encoder in the form of \"btoa/atob\"\n    if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n      return atob(input);\n    }\n    return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\n  },\n  /**\r\n   * Base64-decode a string.\r\n   *\r\n   * In base-64 decoding, groups of four characters are converted into three\r\n   * bytes.  If the encoder did not apply padding, the input length may not\r\n   * be a multiple of 4.\r\n   *\r\n   * In this case, the last group will have fewer than 4 characters, and\r\n   * padding will be inferred.  If the group has one or two characters, it decodes\r\n   * to one byte.  If the group has three characters, it decodes to two bytes.\r\n   *\r\n   * @param input Input to decode.\r\n   * @param webSafe True if we should use the web-safe alphabet.\r\n   * @return bytes representing the decoded value.\r\n   */\n  decodeStringToByteArray(input, webSafe) {\n    this.init_();\n    const charToByteMap = webSafe ? this.charToByteMapWebSafe_ : this.charToByteMap_;\n    const output = [];\n    for (let i = 0; i < input.length;) {\n      const byte1 = charToByteMap[input.charAt(i++)];\n      const haveByte2 = i < input.length;\n      const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n      ++i;\n      const haveByte3 = i < input.length;\n      const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n      ++i;\n      const haveByte4 = i < input.length;\n      const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n      ++i;\n      if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n        throw new DecodeBase64StringError();\n      }\n      const outByte1 = byte1 << 2 | byte2 >> 4;\n      output.push(outByte1);\n      if (byte3 !== 64) {\n        const outByte2 = byte2 << 4 & 0xf0 | byte3 >> 2;\n        output.push(outByte2);\n        if (byte4 !== 64) {\n          const outByte3 = byte3 << 6 & 0xc0 | byte4;\n          output.push(outByte3);\n        }\n      }\n    }\n    return output;\n  },\n  /**\r\n   * Lazy static initialization function. Called before\r\n   * accessing any of the static map variables.\r\n   * @private\r\n   */\n  init_() {\n    if (!this.byteToCharMap_) {\n      this.byteToCharMap_ = {};\n      this.charToByteMap_ = {};\n      this.byteToCharMapWebSafe_ = {};\n      this.charToByteMapWebSafe_ = {};\n      // We want quick mappings back and forth, so we precompute two maps.\n      for (let i = 0; i < this.ENCODED_VALS.length; i++) {\n        this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n        this.charToByteMap_[this.byteToCharMap_[i]] = i;\n        this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n        this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\n        // Be forgiving when decoding and correctly decode both encodings.\n        if (i >= this.ENCODED_VALS_BASE.length) {\n          this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n          this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n        }\n      }\n    }\n  }\n};\n/**\r\n * An error encountered while decoding base64 string.\r\n */\nclass DecodeBase64StringError extends Error {\n  constructor() {\n    super(...arguments);\n    this.name = 'DecodeBase64StringError';\n  }\n}\n/**\r\n * URL-safe base64 encoding\r\n */\nconst base64Encode = function (str) {\n  const utf8Bytes = stringToByteArray$1(str);\n  return base64.encodeByteArray(utf8Bytes, true);\n};\n/**\r\n * URL-safe base64 encoding (without \".\" padding in the end).\r\n * e.g. Used in JSON Web Token (JWT) parts.\r\n */\nconst base64urlEncodeWithoutPadding = function (str) {\n  // Use base64url encoding and remove padding in the end (dot characters).\n  return base64Encode(str).replace(/\\./g, '');\n};\n/**\r\n * URL-safe base64 decoding\r\n *\r\n * NOTE: DO NOT use the global atob() function - it does NOT support the\r\n * base64Url variant encoding.\r\n *\r\n * @param str To be decoded\r\n * @return Decoded result, if possible\r\n */\nconst base64Decode = function (str) {\n  try {\n    return base64.decodeString(str, true);\n  } catch (e) {\n    console.error('base64Decode failed: ', e);\n  }\n  return null;\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\nfunction deepCopy(value) {\n  return deepExtend(undefined, value);\n}\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays).  Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n *\r\n * Note: we don't merge __proto__ to prevent prototype pollution\r\n */\nfunction deepExtend(target, source) {\n  if (!(source instanceof Object)) {\n    return source;\n  }\n  switch (source.constructor) {\n    case Date:\n      // Treat Dates like scalars; if the target date object had any child\n      // properties - they will be lost!\n      const dateValue = source;\n      return new Date(dateValue.getTime());\n    case Object:\n      if (target === undefined) {\n        target = {};\n      }\n      break;\n    case Array:\n      // Always copy the array source and overwrite the target.\n      target = [];\n      break;\n    default:\n      // Not a plain Object - treat it as a scalar.\n      return source;\n  }\n  for (const prop in source) {\n    // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n    if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n      continue;\n    }\n    target[prop] = deepExtend(target[prop], source[prop]);\n  }\n  return target;\n}\nfunction isValidKey(key) {\n  return key !== '__proto__';\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Polyfill for `globalThis` object.\r\n * @returns the `globalThis` object for the given environment.\r\n * @public\r\n */\nfunction getGlobal() {\n  if (typeof self !== 'undefined') {\n    return self;\n  }\n  if (typeof window !== 'undefined') {\n    return window;\n  }\n  if (typeof global !== 'undefined') {\n    return global;\n  }\n  throw new Error('Unable to locate global object.');\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;\n/**\r\n * Attempt to read defaults from a JSON string provided to\r\n * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in\r\n * process(.)env(.)__FIREBASE_DEFAULTS_PATH__\r\n * The dots are in parens because certain compilers (Vite?) cannot\r\n * handle seeing that variable in comments.\r\n * See https://github.com/firebase/firebase-js-sdk/issues/6838\r\n */\nconst getDefaultsFromEnvVariable = () => {\n  if (typeof process === 'undefined' || typeof process.env === 'undefined') {\n    return;\n  }\n  const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;\n  if (defaultsJsonString) {\n    return JSON.parse(defaultsJsonString);\n  }\n};\nconst getDefaultsFromCookie = () => {\n  if (typeof document === 'undefined') {\n    return;\n  }\n  let match;\n  try {\n    match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);\n  } catch (e) {\n    // Some environments such as Angular Universal SSR have a\n    // `document` object but error on accessing `document.cookie`.\n    return;\n  }\n  const decoded = match && base64Decode(match[1]);\n  return decoded && JSON.parse(decoded);\n};\n/**\r\n * Get the __FIREBASE_DEFAULTS__ object. It checks in order:\r\n * (1) if such an object exists as a property of `globalThis`\r\n * (2) if such an object was provided on a shell environment variable\r\n * (3) if such an object exists in a cookie\r\n * @public\r\n */\nconst getDefaults = () => {\n  try {\n    return getDefaultsFromGlobal() || getDefaultsFromEnvVariable() || getDefaultsFromCookie();\n  } catch (e) {\n    /**\r\n     * Catch-all for being unable to get __FIREBASE_DEFAULTS__ due\r\n     * to any environment case we have not accounted for. Log to\r\n     * info instead of swallowing so we can find these unknown cases\r\n     * and add paths for them if needed.\r\n     */\n    console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);\n    return;\n  }\n};\n/**\r\n * Returns emulator host stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a URL host formatted like `127.0.0.1:9999` or `[::1]:4000` if available\r\n * @public\r\n */\nconst getDefaultEmulatorHost = productName => {\n  var _a, _b;\n  return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName];\n};\n/**\r\n * Returns emulator hostname and port stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a pair of hostname and port like `[\"::1\", 4000]` if available\r\n * @public\r\n */\nconst getDefaultEmulatorHostnameAndPort = productName => {\n  const host = getDefaultEmulatorHost(productName);\n  if (!host) {\n    return undefined;\n  }\n  const separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.\n  if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {\n    throw new Error(`Invalid host ${host} with no separate hostname and port!`);\n  }\n  // eslint-disable-next-line no-restricted-globals\n  const port = parseInt(host.substring(separatorIndex + 1), 10);\n  if (host[0] === '[') {\n    // Bracket-quoted `[ipv6addr]:port` => return \"ipv6addr\" (without brackets).\n    return [host.substring(1, separatorIndex - 1), port];\n  } else {\n    return [host.substring(0, separatorIndex), port];\n  }\n};\n/**\r\n * Returns Firebase app config stored in the __FIREBASE_DEFAULTS__ object.\r\n * @public\r\n */\nconst getDefaultAppConfig = () => {\n  var _a;\n  return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config;\n};\n/**\r\n * Returns an experimental setting on the __FIREBASE_DEFAULTS__ object (properties\r\n * prefixed by \"_\")\r\n * @public\r\n */\nconst getExperimentalSetting = name => {\n  var _a;\n  return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`];\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass Deferred {\n  constructor() {\n    this.reject = () => {};\n    this.resolve = () => {};\n    this.promise = new Promise((resolve, reject) => {\n      this.resolve = resolve;\n      this.reject = reject;\n    });\n  }\n  /**\r\n   * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n   * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n   * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n   */\n  wrapCallback(callback) {\n    return (error, value) => {\n      if (error) {\n        this.reject(error);\n      } else {\n        this.resolve(value);\n      }\n      if (typeof callback === 'function') {\n        // Attaching noop handler just in case developer wasn't expecting\n        // promises\n        this.promise.catch(() => {});\n        // Some of our callbacks don't expect a value and our own tests\n        // assert that the parameter length is 1\n        if (callback.length === 1) {\n          callback(error);\n        } else {\n          callback(error, value);\n        }\n      }\n    };\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction createMockUserToken(token, projectId) {\n  if (token.uid) {\n    throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\n  }\n  // Unsecured JWTs use \"none\" as the algorithm.\n  const header = {\n    alg: 'none',\n    type: 'JWT'\n  };\n  const project = projectId || 'demo-project';\n  const iat = token.iat || 0;\n  const sub = token.sub || token.user_id;\n  if (!sub) {\n    throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\n  }\n  const payload = Object.assign({\n    // Set all required fields to decent defaults\n    iss: `https://securetoken.google.com/${project}`,\n    aud: project,\n    iat,\n    exp: iat + 3600,\n    auth_time: iat,\n    sub,\n    user_id: sub,\n    firebase: {\n      sign_in_provider: 'custom',\n      identities: {}\n    }\n  }, token);\n  // Unsecured JWTs use the empty string as a signature.\n  const signature = '';\n  return [base64urlEncodeWithoutPadding(JSON.stringify(header)), base64urlEncodeWithoutPadding(JSON.stringify(payload)), signature].join('.');\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns navigator.userAgent string or '' if it's not defined.\r\n * @return user agent string\r\n */\nfunction getUA() {\n  if (typeof navigator !== 'undefined' && typeof navigator['userAgent'] === 'string') {\n    return navigator['userAgent'];\n  } else {\n    return '';\n  }\n}\n/**\r\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\r\n *\r\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\r\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\r\n * wait for a callback.\r\n */\nfunction isMobileCordova() {\n  return typeof window !== 'undefined' &&\n  // @ts-ignore Setting up an broadly applicable index signature for Window\n  // just to deal with this case would probably be a bad idea.\n  !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA());\n}\n/**\r\n * Detect Node.js.\r\n *\r\n * @return true if Node.js environment is detected or specified.\r\n */\n// Node detection logic from: https://github.com/iliakan/detect-node/\nfunction isNode() {\n  var _a;\n  const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;\n  if (forceEnvironment === 'node') {\n    return true;\n  } else if (forceEnvironment === 'browser') {\n    return false;\n  }\n  try {\n    return Object.prototype.toString.call(global.process) === '[object process]';\n  } catch (e) {\n    return false;\n  }\n}\n/**\r\n * Detect Browser Environment\r\n */\nfunction isBrowser() {\n  return typeof self === 'object' && self.self === self;\n}\nfunction isBrowserExtension() {\n  const runtime = typeof chrome === 'object' ? chrome.runtime : typeof browser === 'object' ? browser.runtime : undefined;\n  return typeof runtime === 'object' && runtime.id !== undefined;\n}\n/**\r\n * Detect React Native.\r\n *\r\n * @return true if ReactNative environment is detected.\r\n */\nfunction isReactNative() {\n  return typeof navigator === 'object' && navigator['product'] === 'ReactNative';\n}\n/** Detects Electron apps. */\nfunction isElectron() {\n  return getUA().indexOf('Electron/') >= 0;\n}\n/** Detects Internet Explorer. */\nfunction isIE() {\n  const ua = getUA();\n  return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\n}\n/** Detects Universal Windows Platform apps. */\nfunction isUWP() {\n  return getUA().indexOf('MSAppHost/') >= 0;\n}\n/**\r\n * Detect whether the current SDK build is the Node version.\r\n *\r\n * @return true if it's the Node SDK build.\r\n */\nfunction isNodeSdk() {\n  return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\n}\n/** Returns true if we are running in Safari. */\nfunction isSafari() {\n  return !isNode() && navigator.userAgent.includes('Safari') && !navigator.userAgent.includes('Chrome');\n}\n/**\r\n * This method checks if indexedDB is supported by current browser/service worker context\r\n * @return true if indexedDB is supported by current browser/service worker context\r\n */\nfunction isIndexedDBAvailable() {\n  try {\n    return typeof indexedDB === 'object';\n  } catch (e) {\n    return false;\n  }\n}\n/**\r\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\r\n * if errors occur during the database open operation.\r\n *\r\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\r\n * private browsing)\r\n */\nfunction validateIndexedDBOpenable() {\n  return new Promise((resolve, reject) => {\n    try {\n      let preExist = true;\n      const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';\n      const request = self.indexedDB.open(DB_CHECK_NAME);\n      request.onsuccess = () => {\n        request.result.close();\n        // delete database only when it doesn't pre-exist\n        if (!preExist) {\n          self.indexedDB.deleteDatabase(DB_CHECK_NAME);\n        }\n        resolve(true);\n      };\n      request.onupgradeneeded = () => {\n        preExist = false;\n      };\n      request.onerror = () => {\n        var _a;\n        reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');\n      };\n    } catch (error) {\n      reject(error);\n    }\n  });\n}\n/**\r\n *\r\n * This method checks whether cookie is enabled within current browser\r\n * @return true if cookie is enabled within current browser\r\n */\nfunction areCookiesEnabled() {\n  if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {\n    return false;\n  }\n  return true;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @fileoverview Standardized Firebase Error.\r\n *\r\n * Usage:\r\n *\r\n *   // Typescript string literals for type-safe codes\r\n *   type Err =\r\n *     'unknown' |\r\n *     'object-not-found'\r\n *     ;\r\n *\r\n *   // Closure enum for type-safe error codes\r\n *   // at-enum {string}\r\n *   var Err = {\r\n *     UNKNOWN: 'unknown',\r\n *     OBJECT_NOT_FOUND: 'object-not-found',\r\n *   }\r\n *\r\n *   let errors: Map<Err, string> = {\r\n *     'generic-error': \"Unknown error\",\r\n *     'file-not-found': \"Could not find file: {$file}\",\r\n *   };\r\n *\r\n *   // Type-safe function - must pass a valid error code as param.\r\n *   let error = new ErrorFactory<Err>('service', 'Service', errors);\r\n *\r\n *   ...\r\n *   throw error.create(Err.GENERIC);\r\n *   ...\r\n *   throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});\r\n *   ...\r\n *   // Service: Could not file file: foo.txt (service/file-not-found).\r\n *\r\n *   catch (e) {\r\n *     assert(e.message === \"Could not find file: foo.txt.\");\r\n *     if ((e as FirebaseError)?.code === 'service/file-not-found') {\r\n *       console.log(\"Could not read file: \" + e['file']);\r\n *     }\r\n *   }\r\n */\nconst ERROR_NAME = 'FirebaseError';\n// Based on code from:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\nclass FirebaseError extends Error {\n  constructor( /** The error code for this error. */\n  code, message, /** Custom data for this error. */\n  customData) {\n    super(message);\n    this.code = code;\n    this.customData = customData;\n    /** The custom name for all FirebaseErrors. */\n    this.name = ERROR_NAME;\n    // Fix For ES5\n    // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n    Object.setPrototypeOf(this, FirebaseError.prototype);\n    // Maintains proper stack trace for where our error was thrown.\n    // Only available on V8.\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, ErrorFactory.prototype.create);\n    }\n  }\n}\nclass ErrorFactory {\n  constructor(service, serviceName, errors) {\n    this.service = service;\n    this.serviceName = serviceName;\n    this.errors = errors;\n  }\n  create(code, ...data) {\n    const customData = data[0] || {};\n    const fullCode = `${this.service}/${code}`;\n    const template = this.errors[code];\n    const message = template ? replaceTemplate(template, customData) : 'Error';\n    // Service Name: Error message (service/code).\n    const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;\n    const error = new FirebaseError(fullCode, fullMessage, customData);\n    return error;\n  }\n}\nfunction replaceTemplate(template, data) {\n  return template.replace(PATTERN, (_, key) => {\n    const value = data[key];\n    return value != null ? String(value) : `<${key}?>`;\n  });\n}\nconst PATTERN = /\\{\\$([^}]+)}/g;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Evaluates a JSON string into a javascript object.\r\n *\r\n * @param {string} str A string containing JSON.\r\n * @return {*} The javascript object representing the specified JSON.\r\n */\nfunction jsonEval(str) {\n  return JSON.parse(str);\n}\n/**\r\n * Returns JSON representing a javascript object.\r\n * @param {*} data Javascript object to be stringified.\r\n * @return {string} The JSON contents of the object.\r\n */\nfunction stringify(data) {\n  return JSON.stringify(data);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Decodes a Firebase auth. token into constituent parts.\r\n *\r\n * Notes:\r\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\nconst decode = function (token) {\n  let header = {},\n    claims = {},\n    data = {},\n    signature = '';\n  try {\n    const parts = token.split('.');\n    header = jsonEval(base64Decode(parts[0]) || '');\n    claims = jsonEval(base64Decode(parts[1]) || '');\n    signature = parts[2];\n    data = claims['d'] || {};\n    delete claims['d'];\n  } catch (e) {}\n  return {\n    header,\n    claims,\n    data,\n    signature\n  };\n};\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\r\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\nconst isValidTimestamp = function (token) {\n  const claims = decode(token).claims;\n  const now = Math.floor(new Date().getTime() / 1000);\n  let validSince = 0,\n    validUntil = 0;\n  if (typeof claims === 'object') {\n    if (claims.hasOwnProperty('nbf')) {\n      validSince = claims['nbf'];\n    } else if (claims.hasOwnProperty('iat')) {\n      validSince = claims['iat'];\n    }\n    if (claims.hasOwnProperty('exp')) {\n      validUntil = claims['exp'];\n    } else {\n      // token will expire after 24h by default\n      validUntil = validSince + 86400;\n    }\n  }\n  return !!now && !!validSince && !!validUntil && now >= validSince && now <= validUntil;\n};\n/**\r\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\r\n *\r\n * Notes:\r\n * - May return null if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\nconst issuedAtTime = function (token) {\n  const claims = decode(token).claims;\n  if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\n    return claims['iat'];\n  }\n  return null;\n};\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\nconst isValidFormat = function (token) {\n  const decoded = decode(token),\n    claims = decoded.claims;\n  return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\n};\n/**\r\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\nconst isAdmin = function (token) {\n  const claims = decode(token).claims;\n  return typeof claims === 'object' && claims['admin'] === true;\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction contains(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\nfunction safeGet(obj, key) {\n  if (Object.prototype.hasOwnProperty.call(obj, key)) {\n    return obj[key];\n  } else {\n    return undefined;\n  }\n}\nfunction isEmpty(obj) {\n  for (const key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction map(obj, fn, contextObj) {\n  const res = {};\n  for (const key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      res[key] = fn.call(contextObj, obj[key], key, obj);\n    }\n  }\n  return res;\n}\n/**\r\n * Deep equal two objects. Support Arrays and Objects.\r\n */\nfunction deepEqual(a, b) {\n  if (a === b) {\n    return true;\n  }\n  const aKeys = Object.keys(a);\n  const bKeys = Object.keys(b);\n  for (const k of aKeys) {\n    if (!bKeys.includes(k)) {\n      return false;\n    }\n    const aProp = a[k];\n    const bProp = b[k];\n    if (isObject(aProp) && isObject(bProp)) {\n      if (!deepEqual(aProp, bProp)) {\n        return false;\n      }\n    } else if (aProp !== bProp) {\n      return false;\n    }\n  }\n  for (const k of bKeys) {\n    if (!aKeys.includes(k)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction isObject(thing) {\n  return thing !== null && typeof thing === 'object';\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Rejects if the given promise doesn't resolve in timeInMS milliseconds.\r\n * @internal\r\n */\nfunction promiseWithTimeout(promise, timeInMS = 2000) {\n  const deferredPromise = new Deferred();\n  setTimeout(() => deferredPromise.reject('timeout!'), timeInMS);\n  promise.then(deferredPromise.resolve, deferredPromise.reject);\n  return deferredPromise.promise;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\r\n * params object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n */\nfunction querystring(querystringParams) {\n  const params = [];\n  for (const [key, value] of Object.entries(querystringParams)) {\n    if (Array.isArray(value)) {\n      value.forEach(arrayVal => {\n        params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\n      });\n    } else {\n      params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n    }\n  }\n  return params.length ? '&' + params.join('&') : '';\n}\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\r\n * (e.g. {arg: 'val', arg2: 'val2'})\r\n */\nfunction querystringDecode(querystring) {\n  const obj = {};\n  const tokens = querystring.replace(/^\\?/, '').split('&');\n  tokens.forEach(token => {\n    if (token) {\n      const [key, value] = token.split('=');\n      obj[decodeURIComponent(key)] = decodeURIComponent(value);\n    }\n  });\n  return obj;\n}\n/**\r\n * Extract the query string part of a URL, including the leading question mark (if present).\r\n */\nfunction extractQuerystring(url) {\n  const queryStart = url.indexOf('?');\n  if (!queryStart) {\n    return '';\n  }\n  const fragmentStart = url.indexOf('#', queryStart);\n  return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @fileoverview SHA-1 cryptographic hash.\r\n * Variable names follow the notation in FIPS PUB 180-3:\r\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\r\n *\r\n * Usage:\r\n *   var sha1 = new sha1();\r\n *   sha1.update(bytes);\r\n *   var hash = sha1.digest();\r\n *\r\n * Performance:\r\n *   Chrome 23:   ~400 Mbit/s\r\n *   Firefox 16:  ~250 Mbit/s\r\n *\r\n */\n/**\r\n * SHA-1 cryptographic hash constructor.\r\n *\r\n * The properties declared here are discussed in the above algorithm document.\r\n * @constructor\r\n * @final\r\n * @struct\r\n */\nclass Sha1 {\n  constructor() {\n    /**\r\n     * Holds the previous values of accumulated variables a-e in the compress_\r\n     * function.\r\n     * @private\r\n     */\n    this.chain_ = [];\n    /**\r\n     * A buffer holding the partially computed hash result.\r\n     * @private\r\n     */\n    this.buf_ = [];\n    /**\r\n     * An array of 80 bytes, each a part of the message to be hashed.  Referred to\r\n     * as the message schedule in the docs.\r\n     * @private\r\n     */\n    this.W_ = [];\n    /**\r\n     * Contains data needed to pad messages less than 64 bytes.\r\n     * @private\r\n     */\n    this.pad_ = [];\n    /**\r\n     * @private {number}\r\n     */\n    this.inbuf_ = 0;\n    /**\r\n     * @private {number}\r\n     */\n    this.total_ = 0;\n    this.blockSize = 512 / 8;\n    this.pad_[0] = 128;\n    for (let i = 1; i < this.blockSize; ++i) {\n      this.pad_[i] = 0;\n    }\n    this.reset();\n  }\n  reset() {\n    this.chain_[0] = 0x67452301;\n    this.chain_[1] = 0xefcdab89;\n    this.chain_[2] = 0x98badcfe;\n    this.chain_[3] = 0x10325476;\n    this.chain_[4] = 0xc3d2e1f0;\n    this.inbuf_ = 0;\n    this.total_ = 0;\n  }\n  /**\r\n   * Internal compress helper function.\r\n   * @param buf Block to compress.\r\n   * @param offset Offset of the block in the buffer.\r\n   * @private\r\n   */\n  compress_(buf, offset) {\n    if (!offset) {\n      offset = 0;\n    }\n    const W = this.W_;\n    // get 16 big endian words\n    if (typeof buf === 'string') {\n      for (let i = 0; i < 16; i++) {\n        // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\n        // have a bug that turns the post-increment ++ operator into pre-increment\n        // during JIT compilation.  We have code that depends heavily on SHA-1 for\n        // correctness and which is affected by this bug, so I've removed all uses\n        // of post-increment ++ in which the result value is used.  We can revert\n        // this change once the Safari bug\n        // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\n        // most clients have been updated.\n        W[i] = buf.charCodeAt(offset) << 24 | buf.charCodeAt(offset + 1) << 16 | buf.charCodeAt(offset + 2) << 8 | buf.charCodeAt(offset + 3);\n        offset += 4;\n      }\n    } else {\n      for (let i = 0; i < 16; i++) {\n        W[i] = buf[offset] << 24 | buf[offset + 1] << 16 | buf[offset + 2] << 8 | buf[offset + 3];\n        offset += 4;\n      }\n    }\n    // expand to 80 words\n    for (let i = 16; i < 80; i++) {\n      const t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n      W[i] = (t << 1 | t >>> 31) & 0xffffffff;\n    }\n    let a = this.chain_[0];\n    let b = this.chain_[1];\n    let c = this.chain_[2];\n    let d = this.chain_[3];\n    let e = this.chain_[4];\n    let f, k;\n    // TODO(user): Try to unroll this loop to speed up the computation.\n    for (let i = 0; i < 80; i++) {\n      if (i < 40) {\n        if (i < 20) {\n          f = d ^ b & (c ^ d);\n          k = 0x5a827999;\n        } else {\n          f = b ^ c ^ d;\n          k = 0x6ed9eba1;\n        }\n      } else {\n        if (i < 60) {\n          f = b & c | d & (b | c);\n          k = 0x8f1bbcdc;\n        } else {\n          f = b ^ c ^ d;\n          k = 0xca62c1d6;\n        }\n      }\n      const t = (a << 5 | a >>> 27) + f + e + k + W[i] & 0xffffffff;\n      e = d;\n      d = c;\n      c = (b << 30 | b >>> 2) & 0xffffffff;\n      b = a;\n      a = t;\n    }\n    this.chain_[0] = this.chain_[0] + a & 0xffffffff;\n    this.chain_[1] = this.chain_[1] + b & 0xffffffff;\n    this.chain_[2] = this.chain_[2] + c & 0xffffffff;\n    this.chain_[3] = this.chain_[3] + d & 0xffffffff;\n    this.chain_[4] = this.chain_[4] + e & 0xffffffff;\n  }\n  update(bytes, length) {\n    // TODO(johnlenz): tighten the function signature and remove this check\n    if (bytes == null) {\n      return;\n    }\n    if (length === undefined) {\n      length = bytes.length;\n    }\n    const lengthMinusBlock = length - this.blockSize;\n    let n = 0;\n    // Using local instead of member variables gives ~5% speedup on Firefox 16.\n    const buf = this.buf_;\n    let inbuf = this.inbuf_;\n    // The outer while loop should execute at most twice.\n    while (n < length) {\n      // When we have no data in the block to top up, we can directly process the\n      // input buffer (assuming it contains sufficient data). This gives ~25%\n      // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\n      // the data is provided in large chunks (or in multiples of 64 bytes).\n      if (inbuf === 0) {\n        while (n <= lengthMinusBlock) {\n          this.compress_(bytes, n);\n          n += this.blockSize;\n        }\n      }\n      if (typeof bytes === 'string') {\n        while (n < length) {\n          buf[inbuf] = bytes.charCodeAt(n);\n          ++inbuf;\n          ++n;\n          if (inbuf === this.blockSize) {\n            this.compress_(buf);\n            inbuf = 0;\n            // Jump to the outer loop so we use the full-block optimization.\n            break;\n          }\n        }\n      } else {\n        while (n < length) {\n          buf[inbuf] = bytes[n];\n          ++inbuf;\n          ++n;\n          if (inbuf === this.blockSize) {\n            this.compress_(buf);\n            inbuf = 0;\n            // Jump to the outer loop so we use the full-block optimization.\n            break;\n          }\n        }\n      }\n    }\n    this.inbuf_ = inbuf;\n    this.total_ += length;\n  }\n  /** @override */\n  digest() {\n    const digest = [];\n    let totalBits = this.total_ * 8;\n    // Add pad 0x80 0x00*.\n    if (this.inbuf_ < 56) {\n      this.update(this.pad_, 56 - this.inbuf_);\n    } else {\n      this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\n    }\n    // Add # bits.\n    for (let i = this.blockSize - 1; i >= 56; i--) {\n      this.buf_[i] = totalBits & 255;\n      totalBits /= 256; // Don't use bit-shifting here!\n    }\n\n    this.compress_(this.buf_);\n    let n = 0;\n    for (let i = 0; i < 5; i++) {\n      for (let j = 24; j >= 0; j -= 8) {\n        digest[n] = this.chain_[i] >> j & 255;\n        ++n;\n      }\n    }\n    return digest;\n  }\n}\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n *     as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\nfunction createSubscribe(executor, onNoObservers) {\n  const proxy = new ObserverProxy(executor, onNoObservers);\n  return proxy.subscribe.bind(proxy);\n}\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\nclass ObserverProxy {\n  /**\r\n   * @param executor Function which can make calls to a single Observer\r\n   *     as a proxy.\r\n   * @param onNoObservers Callback when count of Observers goes to zero.\r\n   */\n  constructor(executor, onNoObservers) {\n    this.observers = [];\n    this.unsubscribes = [];\n    this.observerCount = 0;\n    // Micro-task scheduling by calling task.then().\n    this.task = Promise.resolve();\n    this.finalized = false;\n    this.onNoObservers = onNoObservers;\n    // Call the executor asynchronously so subscribers that are called\n    // synchronously after the creation of the subscribe function\n    // can still receive the very first value generated in the executor.\n    this.task.then(() => {\n      executor(this);\n    }).catch(e => {\n      this.error(e);\n    });\n  }\n  next(value) {\n    this.forEachObserver(observer => {\n      observer.next(value);\n    });\n  }\n  error(error) {\n    this.forEachObserver(observer => {\n      observer.error(error);\n    });\n    this.close(error);\n  }\n  complete() {\n    this.forEachObserver(observer => {\n      observer.complete();\n    });\n    this.close();\n  }\n  /**\r\n   * Subscribe function that can be used to add an Observer to the fan-out list.\r\n   *\r\n   * - We require that no event is sent to a subscriber sychronously to their\r\n   *   call to subscribe().\r\n   */\n  subscribe(nextOrObserver, error, complete) {\n    let observer;\n    if (nextOrObserver === undefined && error === undefined && complete === undefined) {\n      throw new Error('Missing Observer.');\n    }\n    // Assemble an Observer object when passed as callback functions.\n    if (implementsAnyMethods(nextOrObserver, ['next', 'error', 'complete'])) {\n      observer = nextOrObserver;\n    } else {\n      observer = {\n        next: nextOrObserver,\n        error,\n        complete\n      };\n    }\n    if (observer.next === undefined) {\n      observer.next = noop;\n    }\n    if (observer.error === undefined) {\n      observer.error = noop;\n    }\n    if (observer.complete === undefined) {\n      observer.complete = noop;\n    }\n    const unsub = this.unsubscribeOne.bind(this, this.observers.length);\n    // Attempt to subscribe to a terminated Observable - we\n    // just respond to the Observer with the final error or complete\n    // event.\n    if (this.finalized) {\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.task.then(() => {\n        try {\n          if (this.finalError) {\n            observer.error(this.finalError);\n          } else {\n            observer.complete();\n          }\n        } catch (e) {\n          // nothing\n        }\n        return;\n      });\n    }\n    this.observers.push(observer);\n    return unsub;\n  }\n  // Unsubscribe is synchronous - we guarantee that no events are sent to\n  // any unsubscribed Observer.\n  unsubscribeOne(i) {\n    if (this.observers === undefined || this.observers[i] === undefined) {\n      return;\n    }\n    delete this.observers[i];\n    this.observerCount -= 1;\n    if (this.observerCount === 0 && this.onNoObservers !== undefined) {\n      this.onNoObservers(this);\n    }\n  }\n  forEachObserver(fn) {\n    if (this.finalized) {\n      // Already closed by previous event....just eat the additional values.\n      return;\n    }\n    // Since sendOne calls asynchronously - there is no chance that\n    // this.observers will become undefined.\n    for (let i = 0; i < this.observers.length; i++) {\n      this.sendOne(i, fn);\n    }\n  }\n  // Call the Observer via one of it's callback function. We are careful to\n  // confirm that the observe has not been unsubscribed since this asynchronous\n  // function had been queued.\n  sendOne(i, fn) {\n    // Execute the callback asynchronously\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.task.then(() => {\n      if (this.observers !== undefined && this.observers[i] !== undefined) {\n        try {\n          fn(this.observers[i]);\n        } catch (e) {\n          // Ignore exceptions raised in Observers or missing methods of an\n          // Observer.\n          // Log error to console. b/31404806\n          if (typeof console !== 'undefined' && console.error) {\n            console.error(e);\n          }\n        }\n      }\n    });\n  }\n  close(err) {\n    if (this.finalized) {\n      return;\n    }\n    this.finalized = true;\n    if (err !== undefined) {\n      this.finalError = err;\n    }\n    // Proxy is no longer needed - garbage collect references\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.task.then(() => {\n      this.observers = undefined;\n      this.onNoObservers = undefined;\n    });\n  }\n}\n/** Turn synchronous function into one called asynchronously. */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction async(fn, onError) {\n  return (...args) => {\n    Promise.resolve(true).then(() => {\n      fn(...args);\n    }).catch(error => {\n      if (onError) {\n        onError(error);\n      }\n    });\n  };\n}\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\nfunction implementsAnyMethods(obj, methods) {\n  if (typeof obj !== 'object' || obj === null) {\n    return false;\n  }\n  for (const method of methods) {\n    if (method in obj && typeof obj[method] === 'function') {\n      return true;\n    }\n  }\n  return false;\n}\nfunction noop() {\n  // do nothing\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Check to make sure the appropriate number of arguments are provided for a public function.\r\n * Throws an error if it fails.\r\n *\r\n * @param fnName The function name\r\n * @param minCount The minimum number of arguments to allow for the function call\r\n * @param maxCount The maximum number of argument to allow for the function call\r\n * @param argCount The actual number of arguments provided.\r\n */\nconst validateArgCount = function (fnName, minCount, maxCount, argCount) {\n  let argError;\n  if (argCount < minCount) {\n    argError = 'at least ' + minCount;\n  } else if (argCount > maxCount) {\n    argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\n  }\n  if (argError) {\n    const error = fnName + ' failed: Was called with ' + argCount + (argCount === 1 ? ' argument.' : ' arguments.') + ' Expects ' + argError + '.';\n    throw new Error(error);\n  }\n};\n/**\r\n * Generates a string to prefix an error message about failed argument validation\r\n *\r\n * @param fnName The function name\r\n * @param argName The name of the argument\r\n * @return The prefix to add to the error thrown for validation.\r\n */\nfunction errorPrefix(fnName, argName) {\n  return `${fnName} failed: ${argName} argument `;\n}\n/**\r\n * @param fnName\r\n * @param argumentNumber\r\n * @param namespace\r\n * @param optional\r\n */\nfunction validateNamespace(fnName, namespace, optional) {\n  if (optional && !namespace) {\n    return;\n  }\n  if (typeof namespace !== 'string') {\n    //TODO: I should do more validation here. We only allow certain chars in namespaces.\n    throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\n  }\n}\nfunction validateCallback(fnName, argumentName,\n// eslint-disable-next-line @typescript-eslint/ban-types\ncallback, optional) {\n  if (optional && !callback) {\n    return;\n  }\n  if (typeof callback !== 'function') {\n    throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\n  }\n}\nfunction validateContextObject(fnName, argumentName, context, optional) {\n  if (optional && !context) {\n    return;\n  }\n  if (typeof context !== 'object' || context === null) {\n    throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\n// so it's been modified.\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\n// use 2 characters in Javascript.  All 4-byte UTF-8 characters begin with a first\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\n// pair).\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\n/**\r\n * @param {string} str\r\n * @return {Array}\r\n */\nconst stringToByteArray = function (str) {\n  const out = [];\n  let p = 0;\n  for (let i = 0; i < str.length; i++) {\n    let c = str.charCodeAt(i);\n    // Is this the lead surrogate in a surrogate pair?\n    if (c >= 0xd800 && c <= 0xdbff) {\n      const high = c - 0xd800; // the high 10 bits.\n      i++;\n      assert(i < str.length, 'Surrogate pair missing trail surrogate.');\n      const low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\n      c = 0x10000 + (high << 10) + low;\n    }\n    if (c < 128) {\n      out[p++] = c;\n    } else if (c < 2048) {\n      out[p++] = c >> 6 | 192;\n      out[p++] = c & 63 | 128;\n    } else if (c < 65536) {\n      out[p++] = c >> 12 | 224;\n      out[p++] = c >> 6 & 63 | 128;\n      out[p++] = c & 63 | 128;\n    } else {\n      out[p++] = c >> 18 | 240;\n      out[p++] = c >> 12 & 63 | 128;\n      out[p++] = c >> 6 & 63 | 128;\n      out[p++] = c & 63 | 128;\n    }\n  }\n  return out;\n};\n/**\r\n * Calculate length without actually converting; useful for doing cheaper validation.\r\n * @param {string} str\r\n * @return {number}\r\n */\nconst stringLength = function (str) {\n  let p = 0;\n  for (let i = 0; i < str.length; i++) {\n    const c = str.charCodeAt(i);\n    if (c < 128) {\n      p++;\n    } else if (c < 2048) {\n      p += 2;\n    } else if (c >= 0xd800 && c <= 0xdbff) {\n      // Lead surrogate of a surrogate pair.  The pair together will take 4 bytes to represent.\n      p += 4;\n      i++; // skip trail surrogate.\n    } else {\n      p += 3;\n    }\n  }\n  return p;\n};\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Copied from https://stackoverflow.com/a/2117523\r\n * Generates a new uuid.\r\n * @public\r\n */\nconst uuidv4 = function () {\n  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\n    const r = Math.random() * 16 | 0,\n      v = c === 'x' ? r : r & 0x3 | 0x8;\n    return v.toString(16);\n  });\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The amount of milliseconds to exponentially increase.\r\n */\nconst DEFAULT_INTERVAL_MILLIS = 1000;\n/**\r\n * The factor to backoff by.\r\n * Should be a number greater than 1.\r\n */\nconst DEFAULT_BACKOFF_FACTOR = 2;\n/**\r\n * The maximum milliseconds to increase to.\r\n *\r\n * <p>Visible for testing\r\n */\nconst MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\n/**\r\n * The percentage of backoff time to randomize by.\r\n * See\r\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\r\n * for context.\r\n *\r\n * <p>Visible for testing\r\n */\nconst RANDOM_FACTOR = 0.5;\n/**\r\n * Based on the backoff method from\r\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\r\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\r\n */\nfunction calculateBackoffMillis(backoffCount, intervalMillis = DEFAULT_INTERVAL_MILLIS, backoffFactor = DEFAULT_BACKOFF_FACTOR) {\n  // Calculates an exponentially increasing value.\n  // Deviation: calculates value from count and a constant interval, so we only need to save value\n  // and count to restore state.\n  const currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount);\n  // A random \"fuzz\" to avoid waves of retries.\n  // Deviation: randomFactor is required.\n  const randomWait = Math.round(\n  // A fraction of the backoff value to add/subtract.\n  // Deviation: changes multiplication order to improve readability.\n  RANDOM_FACTOR * currBaseValue * (\n  // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines\n  // if we add or subtract.\n  Math.random() - 0.5) * 2);\n  // Limits backoff to max to avoid effectively permanent backoff.\n  return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provide English ordinal letters after a number\r\n */\nfunction ordinal(i) {\n  if (!Number.isFinite(i)) {\n    return `${i}`;\n  }\n  return i + indicator(i);\n}\nfunction indicator(i) {\n  i = Math.abs(i);\n  const cent = i % 100;\n  if (cent >= 10 && cent <= 20) {\n    return 'th';\n  }\n  const dec = i % 10;\n  if (dec === 1) {\n    return 'st';\n  }\n  if (dec === 2) {\n    return 'nd';\n  }\n  if (dec === 3) {\n    return 'rd';\n  }\n  return 'th';\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getModularInstance(service) {\n  if (service && service._delegate) {\n    return service._delegate;\n  } else {\n    return service;\n  }\n}\nexport { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9ccb343265c3ad6c8cbc1c63af5b3c5357ff090436168459283290477092cc14.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9ccb343265c3ad6c8cbc1c63af5b3c5357ff090436168459283290477092cc14.json
deleted file mode 100644
index b59525efa427d0f1fb2fe1fbc18567f8e94e9a30..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9ccb343265c3ad6c8cbc1c63af5b3c5357ff090436168459283290477092cc14.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n  return operate((source, subscriber) => {\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      subscriber.next(Notification.createNext(value));\n    }, () => {\n      subscriber.next(Notification.createComplete());\n      subscriber.complete();\n    }, err => {\n      subscriber.next(Notification.createError(err));\n      subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=materialize.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9cf35bbcb9b1ac5b027896fc1763732e8d7cabc36b92996f9042dc03eb1eb8b0.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9cf35bbcb9b1ac5b027896fc1763732e8d7cabc36b92996f9042dc03eb1eb8b0.json
deleted file mode 100644
index bf5123e2fbfd2fbe0ac8bc3c30cde34223740ffc..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9cf35bbcb9b1ac5b027896fc1763732e8d7cabc36b92996f9042dc03eb1eb8b0.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n  comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n  return operate((source, subscriber) => {\n    let previousKey;\n    let first = true;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const currentKey = keySelector(value);\n      if (first || !comparator(previousKey, currentKey)) {\n        first = false;\n        previousKey = currentKey;\n        subscriber.next(value);\n      }\n    }));\n  });\n}\nfunction defaultCompare(a, b) {\n  return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/9ede4767a017186e11e546ebccf5ebe721b59f6afc3ea121ae8a5fec1ab30a55.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/9ede4767a017186e11e546ebccf5ebe721b59f6afc3ea121ae8a5fec1ab30a55.json
deleted file mode 100644
index 98a149e2154ee59ee6aafb5cfefaaa63a03ce0ed..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/9ede4767a017186e11e546ebccf5ebe721b59f6afc3ea121ae8a5fec1ab30a55.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { defer } from './defer';\nconst DEFAULT_CONFIG = {\n  connector: () => new Subject(),\n  resetOnDisconnect: true\n};\nexport function connectable(source, config = DEFAULT_CONFIG) {\n  let connection = null;\n  const {\n    connector,\n    resetOnDisconnect = true\n  } = config;\n  let subject = connector();\n  const result = new Observable(subscriber => {\n    return subject.subscribe(subscriber);\n  });\n  result.connect = () => {\n    if (!connection || connection.closed) {\n      connection = defer(() => source).subscribe(subject);\n      if (resetOnDisconnect) {\n        connection.add(() => subject = connector());\n      }\n    }\n    return connection;\n  };\n  return result;\n}\n//# sourceMappingURL=connectable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a02fc9f64550d0e67e39b76a4a225dc4995f0640181a6b2c82c229ad484bc741.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a02fc9f64550d0e67e39b76a4a225dc4995f0640181a6b2c82c229ad484bc741.json
deleted file mode 100644
index d1ab6e6a7cc57f4f12b673eca6780a0c2d116e9a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a02fc9f64550d0e67e39b76a4a225dc4995f0640181a6b2c82c229ad484bc741.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n  return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n    let buffer = [];\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      buffer.push(value);\n      count < buffer.length && buffer.shift();\n    }, () => {\n      for (const value of buffer) {\n        subscriber.next(value);\n      }\n      subscriber.complete();\n    }, undefined, () => {\n      buffer = null;\n    }));\n  });\n}\n//# sourceMappingURL=takeLast.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a13d01bf6ab11958bfaba83d7b1683b0416a1e80e993249722978ce0fc782c3f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a13d01bf6ab11958bfaba83d7b1683b0416a1e80e993249722978ce0fc782c3f.json
deleted file mode 100644
index 0c87bce2dd89fbd95b250331497f8e2e1f1869e5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a13d01bf6ab11958bfaba83d7b1683b0416a1e80e993249722978ce0fc782c3f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n  return new Observable(subscriber => {\n    innerFrom(observableFactory()).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=defer.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a1a0489194d762c362d744be32b7f0a97ac79f8ba072b0e0cbc87c70ddb5b251.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a1a0489194d762c362d744be32b7f0a97ac79f8ba072b0e0cbc87c70ddb5b251.json
deleted file mode 100644
index 0784f2888e02dd1d96c9a0d0e9e69511c65065c2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a1a0489194d762c362d744be32b7f0a97ac79f8ba072b0e0cbc87c70ddb5b251.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { ErrorFactory, FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\nconst name = \"@firebase/installations\";\nconst version = \"0.6.4\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst PENDING_TIMEOUT_MS = 10000;\nconst PACKAGE_VERSION = `w:${version}`;\nconst INTERNAL_AUTH_VERSION = 'FIS_v2';\nconst INSTALLATIONS_API_URL = 'https://firebaseinstallations.googleapis.com/v1';\nconst TOKEN_EXPIRATION_BUFFER = 60 * 60 * 1000; // One hour\nconst SERVICE = 'installations';\nconst SERVICE_NAME = 'Installations';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERROR_DESCRIPTION_MAP = {\n  [\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */]: 'Missing App configuration value: \"{$valueName}\"',\n  [\"not-registered\" /* ErrorCode.NOT_REGISTERED */]: 'Firebase Installation is not registered.',\n  [\"installation-not-found\" /* ErrorCode.INSTALLATION_NOT_FOUND */]: 'Firebase Installation not found.',\n  [\"request-failed\" /* ErrorCode.REQUEST_FAILED */]: '{$requestName} request failed with error \"{$serverCode} {$serverStatus}: {$serverMessage}\"',\n  [\"app-offline\" /* ErrorCode.APP_OFFLINE */]: 'Could not process request. Application offline.',\n  [\"delete-pending-registration\" /* ErrorCode.DELETE_PENDING_REGISTRATION */]: \"Can't delete installation while there is a pending registration request.\"\n};\nconst ERROR_FACTORY = new ErrorFactory(SERVICE, SERVICE_NAME, ERROR_DESCRIPTION_MAP);\n/** Returns true if error is a FirebaseError that is based on an error from the server. */\nfunction isServerError(error) {\n  return error instanceof FirebaseError && error.code.includes(\"request-failed\" /* ErrorCode.REQUEST_FAILED */);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getInstallationsEndpoint({\n  projectId\n}) {\n  return `${INSTALLATIONS_API_URL}/projects/${projectId}/installations`;\n}\nfunction extractAuthTokenInfoFromResponse(response) {\n  return {\n    token: response.token,\n    requestStatus: 2 /* RequestStatus.COMPLETED */,\n    expiresIn: getExpiresInFromResponseExpiresIn(response.expiresIn),\n    creationTime: Date.now()\n  };\n}\nfunction getErrorFromResponse(_x, _x2) {\n  return _getErrorFromResponse.apply(this, arguments);\n}\nfunction _getErrorFromResponse() {\n  _getErrorFromResponse = _asyncToGenerator(function* (requestName, response) {\n    const responseJson = yield response.json();\n    const errorData = responseJson.error;\n    return ERROR_FACTORY.create(\"request-failed\" /* ErrorCode.REQUEST_FAILED */, {\n      requestName,\n      serverCode: errorData.code,\n      serverMessage: errorData.message,\n      serverStatus: errorData.status\n    });\n  });\n  return _getErrorFromResponse.apply(this, arguments);\n}\nfunction getHeaders({\n  apiKey\n}) {\n  return new Headers({\n    'Content-Type': 'application/json',\n    Accept: 'application/json',\n    'x-goog-api-key': apiKey\n  });\n}\nfunction getHeadersWithAuth(appConfig, {\n  refreshToken\n}) {\n  const headers = getHeaders(appConfig);\n  headers.append('Authorization', getAuthorizationHeader(refreshToken));\n  return headers;\n}\n/**\r\n * Calls the passed in fetch wrapper and returns the response.\r\n * If the returned response has a status of 5xx, re-runs the function once and\r\n * returns the response.\r\n */\nfunction retryIfServerError(_x3) {\n  return _retryIfServerError.apply(this, arguments);\n}\nfunction _retryIfServerError() {\n  _retryIfServerError = _asyncToGenerator(function* (fn) {\n    const result = yield fn();\n    if (result.status >= 500 && result.status < 600) {\n      // Internal Server Error. Retry request.\n      return fn();\n    }\n    return result;\n  });\n  return _retryIfServerError.apply(this, arguments);\n}\nfunction getExpiresInFromResponseExpiresIn(responseExpiresIn) {\n  // This works because the server will never respond with fractions of a second.\n  return Number(responseExpiresIn.replace('s', '000'));\n}\nfunction getAuthorizationHeader(refreshToken) {\n  return `${INTERNAL_AUTH_VERSION} ${refreshToken}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction createInstallationRequest(_x4, _x5) {\n  return _createInstallationRequest.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** Returns a promise that resolves after given time passes. */\nfunction _createInstallationRequest() {\n  _createInstallationRequest = _asyncToGenerator(function* ({\n    appConfig,\n    heartbeatServiceProvider\n  }, {\n    fid\n  }) {\n    const endpoint = getInstallationsEndpoint(appConfig);\n    const headers = getHeaders(appConfig);\n    // If heartbeat service exists, add the heartbeat string to the header.\n    const heartbeatService = heartbeatServiceProvider.getImmediate({\n      optional: true\n    });\n    if (heartbeatService) {\n      const heartbeatsHeader = yield heartbeatService.getHeartbeatsHeader();\n      if (heartbeatsHeader) {\n        headers.append('x-firebase-client', heartbeatsHeader);\n      }\n    }\n    const body = {\n      fid,\n      authVersion: INTERNAL_AUTH_VERSION,\n      appId: appConfig.appId,\n      sdkVersion: PACKAGE_VERSION\n    };\n    const request = {\n      method: 'POST',\n      headers,\n      body: JSON.stringify(body)\n    };\n    const response = yield retryIfServerError(() => fetch(endpoint, request));\n    if (response.ok) {\n      const responseValue = yield response.json();\n      const registeredInstallationEntry = {\n        fid: responseValue.fid || fid,\n        registrationStatus: 2 /* RequestStatus.COMPLETED */,\n        refreshToken: responseValue.refreshToken,\n        authToken: extractAuthTokenInfoFromResponse(responseValue.authToken)\n      };\n      return registeredInstallationEntry;\n    } else {\n      throw yield getErrorFromResponse('Create Installation', response);\n    }\n  });\n  return _createInstallationRequest.apply(this, arguments);\n}\nfunction sleep(ms) {\n  return new Promise(resolve => {\n    setTimeout(resolve, ms);\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction bufferToBase64UrlSafe(array) {\n  const b64 = btoa(String.fromCharCode(...array));\n  return b64.replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst VALID_FID_PATTERN = /^[cdef][\\w-]{21}$/;\nconst INVALID_FID = '';\n/**\r\n * Generates a new FID using random values from Web Crypto API.\r\n * Returns an empty string if FID generation fails for any reason.\r\n */\nfunction generateFid() {\n  try {\n    // A valid FID has exactly 22 base64 characters, which is 132 bits, or 16.5\n    // bytes. our implementation generates a 17 byte array instead.\n    const fidByteArray = new Uint8Array(17);\n    const crypto = self.crypto || self.msCrypto;\n    crypto.getRandomValues(fidByteArray);\n    // Replace the first 4 random bits with the constant FID header of 0b0111.\n    fidByteArray[0] = 0b01110000 + fidByteArray[0] % 0b00010000;\n    const fid = encode(fidByteArray);\n    return VALID_FID_PATTERN.test(fid) ? fid : INVALID_FID;\n  } catch (_a) {\n    // FID generation errored\n    return INVALID_FID;\n  }\n}\n/** Converts a FID Uint8Array to a base64 string representation. */\nfunction encode(fidByteArray) {\n  const b64String = bufferToBase64UrlSafe(fidByteArray);\n  // Remove the 23rd character that was added because of the extra 4 bits at the\n  // end of our 17 byte array, and the '=' padding.\n  return b64String.substr(0, 22);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** Returns a string key that can be used to identify the app. */\nfunction getKey(appConfig) {\n  return `${appConfig.appName}!${appConfig.appId}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst fidChangeCallbacks = new Map();\n/**\r\n * Calls the onIdChange callbacks with the new FID value, and broadcasts the\r\n * change to other tabs.\r\n */\nfunction fidChanged(appConfig, fid) {\n  const key = getKey(appConfig);\n  callFidChangeCallbacks(key, fid);\n  broadcastFidChange(key, fid);\n}\nfunction addCallback(appConfig, callback) {\n  // Open the broadcast channel if it's not already open,\n  // to be able to listen to change events from other tabs.\n  getBroadcastChannel();\n  const key = getKey(appConfig);\n  let callbackSet = fidChangeCallbacks.get(key);\n  if (!callbackSet) {\n    callbackSet = new Set();\n    fidChangeCallbacks.set(key, callbackSet);\n  }\n  callbackSet.add(callback);\n}\nfunction removeCallback(appConfig, callback) {\n  const key = getKey(appConfig);\n  const callbackSet = fidChangeCallbacks.get(key);\n  if (!callbackSet) {\n    return;\n  }\n  callbackSet.delete(callback);\n  if (callbackSet.size === 0) {\n    fidChangeCallbacks.delete(key);\n  }\n  // Close broadcast channel if there are no more callbacks.\n  closeBroadcastChannel();\n}\nfunction callFidChangeCallbacks(key, fid) {\n  const callbacks = fidChangeCallbacks.get(key);\n  if (!callbacks) {\n    return;\n  }\n  for (const callback of callbacks) {\n    callback(fid);\n  }\n}\nfunction broadcastFidChange(key, fid) {\n  const channel = getBroadcastChannel();\n  if (channel) {\n    channel.postMessage({\n      key,\n      fid\n    });\n  }\n  closeBroadcastChannel();\n}\nlet broadcastChannel = null;\n/** Opens and returns a BroadcastChannel if it is supported by the browser. */\nfunction getBroadcastChannel() {\n  if (!broadcastChannel && 'BroadcastChannel' in self) {\n    broadcastChannel = new BroadcastChannel('[Firebase] FID Change');\n    broadcastChannel.onmessage = e => {\n      callFidChangeCallbacks(e.data.key, e.data.fid);\n    };\n  }\n  return broadcastChannel;\n}\nfunction closeBroadcastChannel() {\n  if (fidChangeCallbacks.size === 0 && broadcastChannel) {\n    broadcastChannel.close();\n    broadcastChannel = null;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DATABASE_NAME = 'firebase-installations-database';\nconst DATABASE_VERSION = 1;\nconst OBJECT_STORE_NAME = 'firebase-installations-store';\nlet dbPromise = null;\nfunction getDbPromise() {\n  if (!dbPromise) {\n    dbPromise = openDB(DATABASE_NAME, DATABASE_VERSION, {\n      upgrade: (db, oldVersion) => {\n        // We don't use 'break' in this switch statement, the fall-through\n        // behavior is what we want, because if there are multiple versions between\n        // the old version and the current version, we want ALL the migrations\n        // that correspond to those versions to run, not only the last one.\n        // eslint-disable-next-line default-case\n        switch (oldVersion) {\n          case 0:\n            db.createObjectStore(OBJECT_STORE_NAME);\n        }\n      }\n    });\n  }\n  return dbPromise;\n}\n/** Assigns or overwrites the record for the given key with the given value. */\nfunction set(_x6, _x7) {\n  return _set.apply(this, arguments);\n}\n/** Removes record(s) from the objectStore that match the given key. */\nfunction _set() {\n  _set = _asyncToGenerator(function* (appConfig, value) {\n    const key = getKey(appConfig);\n    const db = yield getDbPromise();\n    const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n    const objectStore = tx.objectStore(OBJECT_STORE_NAME);\n    const oldValue = yield objectStore.get(key);\n    yield objectStore.put(value, key);\n    yield tx.done;\n    if (!oldValue || oldValue.fid !== value.fid) {\n      fidChanged(appConfig, value.fid);\n    }\n    return value;\n  });\n  return _set.apply(this, arguments);\n}\nfunction remove(_x8) {\n  return _remove.apply(this, arguments);\n}\n/**\r\n * Atomically updates a record with the result of updateFn, which gets\r\n * called with the current value. If newValue is undefined, the record is\r\n * deleted instead.\r\n * @return Updated value\r\n */\nfunction _remove() {\n  _remove = _asyncToGenerator(function* (appConfig) {\n    const key = getKey(appConfig);\n    const db = yield getDbPromise();\n    const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n    yield tx.objectStore(OBJECT_STORE_NAME).delete(key);\n    yield tx.done;\n  });\n  return _remove.apply(this, arguments);\n}\nfunction update(_x9, _x10) {\n  return _update.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates and returns the InstallationEntry from the database.\r\n * Also triggers a registration request if it is necessary and possible.\r\n */\nfunction _update() {\n  _update = _asyncToGenerator(function* (appConfig, updateFn) {\n    const key = getKey(appConfig);\n    const db = yield getDbPromise();\n    const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n    const store = tx.objectStore(OBJECT_STORE_NAME);\n    const oldValue = yield store.get(key);\n    const newValue = updateFn(oldValue);\n    if (newValue === undefined) {\n      yield store.delete(key);\n    } else {\n      yield store.put(newValue, key);\n    }\n    yield tx.done;\n    if (newValue && (!oldValue || oldValue.fid !== newValue.fid)) {\n      fidChanged(appConfig, newValue.fid);\n    }\n    return newValue;\n  });\n  return _update.apply(this, arguments);\n}\nfunction getInstallationEntry(_x11) {\n  return _getInstallationEntry.apply(this, arguments);\n}\n/**\r\n * Creates a new Installation Entry if one does not exist.\r\n * Also clears timed out pending requests.\r\n */\nfunction _getInstallationEntry() {\n  _getInstallationEntry = _asyncToGenerator(function* (installations) {\n    let registrationPromise;\n    const installationEntry = yield update(installations.appConfig, oldEntry => {\n      const installationEntry = updateOrCreateInstallationEntry(oldEntry);\n      const entryWithPromise = triggerRegistrationIfNecessary(installations, installationEntry);\n      registrationPromise = entryWithPromise.registrationPromise;\n      return entryWithPromise.installationEntry;\n    });\n    if (installationEntry.fid === INVALID_FID) {\n      // FID generation failed. Waiting for the FID from the server.\n      return {\n        installationEntry: yield registrationPromise\n      };\n    }\n    return {\n      installationEntry,\n      registrationPromise\n    };\n  });\n  return _getInstallationEntry.apply(this, arguments);\n}\nfunction updateOrCreateInstallationEntry(oldEntry) {\n  const entry = oldEntry || {\n    fid: generateFid(),\n    registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n  };\n\n  return clearTimedOutRequest(entry);\n}\n/**\r\n * If the Firebase Installation is not registered yet, this will trigger the\r\n * registration and return an InProgressInstallationEntry.\r\n *\r\n * If registrationPromise does not exist, the installationEntry is guaranteed\r\n * to be registered.\r\n */\nfunction triggerRegistrationIfNecessary(installations, installationEntry) {\n  if (installationEntry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n    if (!navigator.onLine) {\n      // Registration required but app is offline.\n      const registrationPromiseWithError = Promise.reject(ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */));\n      return {\n        installationEntry,\n        registrationPromise: registrationPromiseWithError\n      };\n    }\n    // Try registering. Change status to IN_PROGRESS.\n    const inProgressEntry = {\n      fid: installationEntry.fid,\n      registrationStatus: 1 /* RequestStatus.IN_PROGRESS */,\n      registrationTime: Date.now()\n    };\n    const registrationPromise = registerInstallation(installations, inProgressEntry);\n    return {\n      installationEntry: inProgressEntry,\n      registrationPromise\n    };\n  } else if (installationEntry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n    return {\n      installationEntry,\n      registrationPromise: waitUntilFidRegistration(installations)\n    };\n  } else {\n    return {\n      installationEntry\n    };\n  }\n}\n/** This will be executed only once for each new Firebase Installation. */\nfunction registerInstallation(_x12, _x13) {\n  return _registerInstallation.apply(this, arguments);\n}\n/** Call if FID registration is pending in another request. */\nfunction _registerInstallation() {\n  _registerInstallation = _asyncToGenerator(function* (installations, installationEntry) {\n    try {\n      const registeredInstallationEntry = yield createInstallationRequest(installations, installationEntry);\n      return set(installations.appConfig, registeredInstallationEntry);\n    } catch (e) {\n      if (isServerError(e) && e.customData.serverCode === 409) {\n        // Server returned a \"FID can not be used\" error.\n        // Generate a new ID next time.\n        yield remove(installations.appConfig);\n      } else {\n        // Registration failed. Set FID as not registered.\n        yield set(installations.appConfig, {\n          fid: installationEntry.fid,\n          registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n        });\n      }\n\n      throw e;\n    }\n  });\n  return _registerInstallation.apply(this, arguments);\n}\nfunction waitUntilFidRegistration(_x14) {\n  return _waitUntilFidRegistration.apply(this, arguments);\n}\n/**\r\n * Called only if there is a CreateInstallation request in progress.\r\n *\r\n * Updates the InstallationEntry in the DB based on the status of the\r\n * CreateInstallation request.\r\n *\r\n * Returns the updated InstallationEntry.\r\n */\nfunction _waitUntilFidRegistration() {\n  _waitUntilFidRegistration = _asyncToGenerator(function* (installations) {\n    // Unfortunately, there is no way of reliably observing when a value in\n    // IndexedDB changes (yet, see https://github.com/WICG/indexed-db-observers),\n    // so we need to poll.\n    let entry = yield updateInstallationRequest(installations.appConfig);\n    while (entry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n      // createInstallation request still in progress.\n      yield sleep(100);\n      entry = yield updateInstallationRequest(installations.appConfig);\n    }\n    if (entry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n      // The request timed out or failed in a different call. Try again.\n      const {\n        installationEntry,\n        registrationPromise\n      } = yield getInstallationEntry(installations);\n      if (registrationPromise) {\n        return registrationPromise;\n      } else {\n        // if there is no registrationPromise, entry is registered.\n        return installationEntry;\n      }\n    }\n    return entry;\n  });\n  return _waitUntilFidRegistration.apply(this, arguments);\n}\nfunction updateInstallationRequest(appConfig) {\n  return update(appConfig, oldEntry => {\n    if (!oldEntry) {\n      throw ERROR_FACTORY.create(\"installation-not-found\" /* ErrorCode.INSTALLATION_NOT_FOUND */);\n    }\n\n    return clearTimedOutRequest(oldEntry);\n  });\n}\nfunction clearTimedOutRequest(entry) {\n  if (hasInstallationRequestTimedOut(entry)) {\n    return {\n      fid: entry.fid,\n      registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n    };\n  }\n\n  return entry;\n}\nfunction hasInstallationRequestTimedOut(installationEntry) {\n  return installationEntry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */ && installationEntry.registrationTime + PENDING_TIMEOUT_MS < Date.now();\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction generateAuthTokenRequest(_x15, _x16) {\n  return _generateAuthTokenRequest.apply(this, arguments);\n}\nfunction _generateAuthTokenRequest() {\n  _generateAuthTokenRequest = _asyncToGenerator(function* ({\n    appConfig,\n    heartbeatServiceProvider\n  }, installationEntry) {\n    const endpoint = getGenerateAuthTokenEndpoint(appConfig, installationEntry);\n    const headers = getHeadersWithAuth(appConfig, installationEntry);\n    // If heartbeat service exists, add the heartbeat string to the header.\n    const heartbeatService = heartbeatServiceProvider.getImmediate({\n      optional: true\n    });\n    if (heartbeatService) {\n      const heartbeatsHeader = yield heartbeatService.getHeartbeatsHeader();\n      if (heartbeatsHeader) {\n        headers.append('x-firebase-client', heartbeatsHeader);\n      }\n    }\n    const body = {\n      installation: {\n        sdkVersion: PACKAGE_VERSION,\n        appId: appConfig.appId\n      }\n    };\n    const request = {\n      method: 'POST',\n      headers,\n      body: JSON.stringify(body)\n    };\n    const response = yield retryIfServerError(() => fetch(endpoint, request));\n    if (response.ok) {\n      const responseValue = yield response.json();\n      const completedAuthToken = extractAuthTokenInfoFromResponse(responseValue);\n      return completedAuthToken;\n    } else {\n      throw yield getErrorFromResponse('Generate Auth Token', response);\n    }\n  });\n  return _generateAuthTokenRequest.apply(this, arguments);\n}\nfunction getGenerateAuthTokenEndpoint(appConfig, {\n  fid\n}) {\n  return `${getInstallationsEndpoint(appConfig)}/${fid}/authTokens:generate`;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a valid authentication token for the installation. Generates a new\r\n * token if one doesn't exist, is expired or about to expire.\r\n *\r\n * Should only be called if the Firebase Installation is registered.\r\n */\nfunction refreshAuthToken(_x17) {\n  return _refreshAuthToken.apply(this, arguments);\n}\n/**\r\n * Call only if FID is registered and Auth Token request is in progress.\r\n *\r\n * Waits until the current pending request finishes. If the request times out,\r\n * tries once in this thread as well.\r\n */\nfunction _refreshAuthToken() {\n  _refreshAuthToken = _asyncToGenerator(function* (installations, forceRefresh = false) {\n    let tokenPromise;\n    const entry = yield update(installations.appConfig, oldEntry => {\n      if (!isEntryRegistered(oldEntry)) {\n        throw ERROR_FACTORY.create(\"not-registered\" /* ErrorCode.NOT_REGISTERED */);\n      }\n\n      const oldAuthToken = oldEntry.authToken;\n      if (!forceRefresh && isAuthTokenValid(oldAuthToken)) {\n        // There is a valid token in the DB.\n        return oldEntry;\n      } else if (oldAuthToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n        // There already is a token request in progress.\n        tokenPromise = waitUntilAuthTokenRequest(installations, forceRefresh);\n        return oldEntry;\n      } else {\n        // No token or token expired.\n        if (!navigator.onLine) {\n          throw ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */);\n        }\n\n        const inProgressEntry = makeAuthTokenRequestInProgressEntry(oldEntry);\n        tokenPromise = fetchAuthTokenFromServer(installations, inProgressEntry);\n        return inProgressEntry;\n      }\n    });\n    const authToken = tokenPromise ? yield tokenPromise : entry.authToken;\n    return authToken;\n  });\n  return _refreshAuthToken.apply(this, arguments);\n}\nfunction waitUntilAuthTokenRequest(_x18, _x19) {\n  return _waitUntilAuthTokenRequest.apply(this, arguments);\n}\n/**\r\n * Called only if there is a GenerateAuthToken request in progress.\r\n *\r\n * Updates the InstallationEntry in the DB based on the status of the\r\n * GenerateAuthToken request.\r\n *\r\n * Returns the updated InstallationEntry.\r\n */\nfunction _waitUntilAuthTokenRequest() {\n  _waitUntilAuthTokenRequest = _asyncToGenerator(function* (installations, forceRefresh) {\n    // Unfortunately, there is no way of reliably observing when a value in\n    // IndexedDB changes (yet, see https://github.com/WICG/indexed-db-observers),\n    // so we need to poll.\n    let entry = yield updateAuthTokenRequest(installations.appConfig);\n    while (entry.authToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n      // generateAuthToken still in progress.\n      yield sleep(100);\n      entry = yield updateAuthTokenRequest(installations.appConfig);\n    }\n    const authToken = entry.authToken;\n    if (authToken.requestStatus === 0 /* RequestStatus.NOT_STARTED */) {\n      // The request timed out or failed in a different call. Try again.\n      return refreshAuthToken(installations, forceRefresh);\n    } else {\n      return authToken;\n    }\n  });\n  return _waitUntilAuthTokenRequest.apply(this, arguments);\n}\nfunction updateAuthTokenRequest(appConfig) {\n  return update(appConfig, oldEntry => {\n    if (!isEntryRegistered(oldEntry)) {\n      throw ERROR_FACTORY.create(\"not-registered\" /* ErrorCode.NOT_REGISTERED */);\n    }\n\n    const oldAuthToken = oldEntry.authToken;\n    if (hasAuthTokenRequestTimedOut(oldAuthToken)) {\n      return Object.assign(Object.assign({}, oldEntry), {\n        authToken: {\n          requestStatus: 0 /* RequestStatus.NOT_STARTED */\n        }\n      });\n    }\n\n    return oldEntry;\n  });\n}\nfunction fetchAuthTokenFromServer(_x20, _x21) {\n  return _fetchAuthTokenFromServer.apply(this, arguments);\n}\nfunction _fetchAuthTokenFromServer() {\n  _fetchAuthTokenFromServer = _asyncToGenerator(function* (installations, installationEntry) {\n    try {\n      const authToken = yield generateAuthTokenRequest(installations, installationEntry);\n      const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), {\n        authToken\n      });\n      yield set(installations.appConfig, updatedInstallationEntry);\n      return authToken;\n    } catch (e) {\n      if (isServerError(e) && (e.customData.serverCode === 401 || e.customData.serverCode === 404)) {\n        // Server returned a \"FID not found\" or a \"Invalid authentication\" error.\n        // Generate a new ID next time.\n        yield remove(installations.appConfig);\n      } else {\n        const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), {\n          authToken: {\n            requestStatus: 0 /* RequestStatus.NOT_STARTED */\n          }\n        });\n        yield set(installations.appConfig, updatedInstallationEntry);\n      }\n      throw e;\n    }\n  });\n  return _fetchAuthTokenFromServer.apply(this, arguments);\n}\nfunction isEntryRegistered(installationEntry) {\n  return installationEntry !== undefined && installationEntry.registrationStatus === 2 /* RequestStatus.COMPLETED */;\n}\n\nfunction isAuthTokenValid(authToken) {\n  return authToken.requestStatus === 2 /* RequestStatus.COMPLETED */ && !isAuthTokenExpired(authToken);\n}\nfunction isAuthTokenExpired(authToken) {\n  const now = Date.now();\n  return now < authToken.creationTime || authToken.creationTime + authToken.expiresIn < now + TOKEN_EXPIRATION_BUFFER;\n}\n/** Returns an updated InstallationEntry with an InProgressAuthToken. */\nfunction makeAuthTokenRequestInProgressEntry(oldEntry) {\n  const inProgressAuthToken = {\n    requestStatus: 1 /* RequestStatus.IN_PROGRESS */,\n    requestTime: Date.now()\n  };\n  return Object.assign(Object.assign({}, oldEntry), {\n    authToken: inProgressAuthToken\n  });\n}\nfunction hasAuthTokenRequestTimedOut(authToken) {\n  return authToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */ && authToken.requestTime + PENDING_TIMEOUT_MS < Date.now();\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Creates a Firebase Installation if there isn't one for the app and\r\n * returns the Installation ID.\r\n * @param installations - The `Installations` instance.\r\n *\r\n * @public\r\n */\nfunction getId(_x22) {\n  return _getId.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a Firebase Installations auth token, identifying the current\r\n * Firebase Installation.\r\n * @param installations - The `Installations` instance.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nfunction _getId() {\n  _getId = _asyncToGenerator(function* (installations) {\n    const installationsImpl = installations;\n    const {\n      installationEntry,\n      registrationPromise\n    } = yield getInstallationEntry(installationsImpl);\n    if (registrationPromise) {\n      registrationPromise.catch(console.error);\n    } else {\n      // If the installation is already registered, update the authentication\n      // token if needed.\n      refreshAuthToken(installationsImpl).catch(console.error);\n    }\n    return installationEntry.fid;\n  });\n  return _getId.apply(this, arguments);\n}\nfunction getToken(_x23) {\n  return _getToken.apply(this, arguments);\n}\nfunction _getToken() {\n  _getToken = _asyncToGenerator(function* (installations, forceRefresh = false) {\n    const installationsImpl = installations;\n    yield completeInstallationRegistration(installationsImpl);\n    // At this point we either have a Registered Installation in the DB, or we've\n    // already thrown an error.\n    const authToken = yield refreshAuthToken(installationsImpl, forceRefresh);\n    return authToken.token;\n  });\n  return _getToken.apply(this, arguments);\n}\nfunction completeInstallationRegistration(_x24) {\n  return _completeInstallationRegistration.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _completeInstallationRegistration() {\n  _completeInstallationRegistration = _asyncToGenerator(function* (installations) {\n    const {\n      registrationPromise\n    } = yield getInstallationEntry(installations);\n    if (registrationPromise) {\n      // A createInstallation request is in progress. Wait until it finishes.\n      yield registrationPromise;\n    }\n  });\n  return _completeInstallationRegistration.apply(this, arguments);\n}\nfunction deleteInstallationRequest(_x25, _x26) {\n  return _deleteInstallationRequest.apply(this, arguments);\n}\nfunction _deleteInstallationRequest() {\n  _deleteInstallationRequest = _asyncToGenerator(function* (appConfig, installationEntry) {\n    const endpoint = getDeleteEndpoint(appConfig, installationEntry);\n    const headers = getHeadersWithAuth(appConfig, installationEntry);\n    const request = {\n      method: 'DELETE',\n      headers\n    };\n    const response = yield retryIfServerError(() => fetch(endpoint, request));\n    if (!response.ok) {\n      throw yield getErrorFromResponse('Delete Installation', response);\n    }\n  });\n  return _deleteInstallationRequest.apply(this, arguments);\n}\nfunction getDeleteEndpoint(appConfig, {\n  fid\n}) {\n  return `${getInstallationsEndpoint(appConfig)}/${fid}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Deletes the Firebase Installation and all associated data.\r\n * @param installations - The `Installations` instance.\r\n *\r\n * @public\r\n */\nfunction deleteInstallations(_x27) {\n  return _deleteInstallations.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Sets a new callback that will get called when Installation ID changes.\r\n * Returns an unsubscribe function that will remove the callback when called.\r\n * @param installations - The `Installations` instance.\r\n * @param callback - The callback function that is invoked when FID changes.\r\n * @returns A function that can be called to unsubscribe.\r\n *\r\n * @public\r\n */\nfunction _deleteInstallations() {\n  _deleteInstallations = _asyncToGenerator(function* (installations) {\n    const {\n      appConfig\n    } = installations;\n    const entry = yield update(appConfig, oldEntry => {\n      if (oldEntry && oldEntry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n        // Delete the unregistered entry without sending a deleteInstallation request.\n        return undefined;\n      }\n      return oldEntry;\n    });\n    if (entry) {\n      if (entry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n        // Can't delete while trying to register.\n        throw ERROR_FACTORY.create(\"delete-pending-registration\" /* ErrorCode.DELETE_PENDING_REGISTRATION */);\n      } else if (entry.registrationStatus === 2 /* RequestStatus.COMPLETED */) {\n        if (!navigator.onLine) {\n          throw ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */);\n        } else {\n          yield deleteInstallationRequest(appConfig, entry);\n          yield remove(appConfig);\n        }\n      }\n    }\n  });\n  return _deleteInstallations.apply(this, arguments);\n}\nfunction onIdChange(installations, callback) {\n  const {\n    appConfig\n  } = installations;\n  addCallback(appConfig, callback);\n  return () => {\n    removeCallback(appConfig, callback);\n  };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns an instance of {@link Installations} associated with the given\r\n * {@link @firebase/app#FirebaseApp} instance.\r\n * @param app - The {@link @firebase/app#FirebaseApp} instance.\r\n *\r\n * @public\r\n */\nfunction getInstallations(app = getApp()) {\n  const installationsImpl = _getProvider(app, 'installations').getImmediate();\n  return installationsImpl;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction extractAppConfig(app) {\n  if (!app || !app.options) {\n    throw getMissingValueError('App Configuration');\n  }\n  if (!app.name) {\n    throw getMissingValueError('App Name');\n  }\n  // Required app config keys\n  const configKeys = ['projectId', 'apiKey', 'appId'];\n  for (const keyName of configKeys) {\n    if (!app.options[keyName]) {\n      throw getMissingValueError(keyName);\n    }\n  }\n  return {\n    appName: app.name,\n    projectId: app.options.projectId,\n    apiKey: app.options.apiKey,\n    appId: app.options.appId\n  };\n}\nfunction getMissingValueError(valueName) {\n  return ERROR_FACTORY.create(\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */, {\n    valueName\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst INSTALLATIONS_NAME = 'installations';\nconst INSTALLATIONS_NAME_INTERNAL = 'installations-internal';\nconst publicFactory = container => {\n  const app = container.getProvider('app').getImmediate();\n  // Throws if app isn't configured properly.\n  const appConfig = extractAppConfig(app);\n  const heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n  const installationsImpl = {\n    app,\n    appConfig,\n    heartbeatServiceProvider,\n    _delete: () => Promise.resolve()\n  };\n  return installationsImpl;\n};\nconst internalFactory = container => {\n  const app = container.getProvider('app').getImmediate();\n  // Internal FIS instance relies on public FIS instance.\n  const installations = _getProvider(app, INSTALLATIONS_NAME).getImmediate();\n  const installationsInternal = {\n    getId: () => getId(installations),\n    getToken: forceRefresh => getToken(installations, forceRefresh)\n  };\n  return installationsInternal;\n};\nfunction registerInstallations() {\n  _registerComponent(new Component(INSTALLATIONS_NAME, publicFactory, \"PUBLIC\" /* ComponentType.PUBLIC */));\n  _registerComponent(new Component(INSTALLATIONS_NAME_INTERNAL, internalFactory, \"PRIVATE\" /* ComponentType.PRIVATE */));\n}\n\n/**\r\n * Firebase Installations\r\n *\r\n * @packageDocumentation\r\n */\nregisterInstallations();\nregisterVersion(name, version);\n// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\nregisterVersion(name, version, 'esm2017');\nexport { deleteInstallations, getId, getInstallations, getToken, onIdChange };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a1b6ae9b0dcf2469434fe8a5df45a62a39b60d9a6c2b4de639930756a0c686e3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a1b6ae9b0dcf2469434fe8a5df45a62a39b60d9a6c2b4de639930756a0c686e3.json
deleted file mode 100644
index ab9eb897fa3175fd5a5c8c3cef7f1890121abeb1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a1b6ae9b0dcf2469434fe8a5df45a62a39b60d9a6c2b4de639930756a0c686e3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n  return distinctUntilChanged((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]);\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a235c9a8271a7893c84ca21b00b5b30e93618ef87635b5416d224ba7586c1af9.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a235c9a8271a7893c84ca21b00b5b30e93618ef87635b5416d224ba7586c1af9.json
deleted file mode 100644
index f90c1d673f1ab897adf0990ecea614c1c76c1a49..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a235c9a8271a7893c84ca21b00b5b30e93618ef87635b5416d224ba7586c1af9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n  return operate((source, subscriber) => {\n    let innerSub;\n    let syncResub = false;\n    let completions$;\n    let isNotifierComplete = false;\n    let isMainComplete = false;\n    const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true);\n    const getCompletionSubject = () => {\n      if (!completions$) {\n        completions$ = new Subject();\n        innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => {\n          if (innerSub) {\n            subscribeForRepeatWhen();\n          } else {\n            syncResub = true;\n          }\n        }, () => {\n          isNotifierComplete = true;\n          checkComplete();\n        }));\n      }\n      return completions$;\n    };\n    const subscribeForRepeatWhen = () => {\n      isMainComplete = false;\n      innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n        isMainComplete = true;\n        !checkComplete() && getCompletionSubject().next();\n      }));\n      if (syncResub) {\n        innerSub.unsubscribe();\n        innerSub = null;\n        syncResub = false;\n        subscribeForRepeatWhen();\n      }\n    };\n    subscribeForRepeatWhen();\n  });\n}\n//# sourceMappingURL=repeatWhen.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a31059de7cb0b2e0b16a6b524d5b8dd4c5e4cc87773c31cb4ae33fbad892eca2.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a31059de7cb0b2e0b16a6b524d5b8dd4c5e4cc87773c31cb4ae33fbad892eca2.json
deleted file mode 100644
index 58a6fba32062904cfc335692d34850aeceac8204..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a31059de7cb0b2e0b16a6b524d5b8dd4c5e4cc87773c31cb4ae33fbad892eca2.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { reduce } from './reduce';\nimport { operate } from '../util/lift';\nconst arrReducer = (arr, value) => (arr.push(value), arr);\nexport function toArray() {\n  return operate((source, subscriber) => {\n    reduce(arrReducer, [])(source).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=toArray.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a3fadd708c70791f668dcf06c3c9908373ac868f9f6817792f7f7531cc77a5d4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a3fadd708c70791f668dcf06c3c9908373ac868f9f6817792f7f7531cc77a5d4.json
deleted file mode 100644
index c1d88573527ced94020513fe87784fdc7f4146ac..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a3fadd708c70791f668dcf06c3c9908373ac868f9f6817792f7f7531cc77a5d4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const config = {\n  onUnhandledError: null,\n  onStoppedNotification: null,\n  Promise: undefined,\n  useDeprecatedSynchronousErrorHandling: false,\n  useDeprecatedNextContext: false\n};\n//# sourceMappingURL=config.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a44966438b7fc3fb01774dbe221ebbce2725d8c0497c92b8e62d820e1e227a4e.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a44966438b7fc3fb01774dbe221ebbce2725d8c0497c92b8e62d820e1e227a4e.json
deleted file mode 100644
index 9092bd1fa84af76dd04753207e63b53d957ff672..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a44966438b7fc3fb01774dbe221ebbce2725d8c0497c92b8e62d820e1e227a4e.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n  return operate((source, subscriber) => {\n    let element;\n    if (!elementOrOptions || typeof elementOrOptions === 'function') {\n      element = elementOrOptions;\n    } else {\n      ({\n        duration,\n        element,\n        connector\n      } = elementOrOptions);\n    }\n    const groups = new Map();\n    const notify = cb => {\n      groups.forEach(cb);\n      cb(subscriber);\n    };\n    const handleError = err => notify(consumer => consumer.error(err));\n    let activeGroups = 0;\n    let teardownAttempted = false;\n    const groupBySourceSubscriber = new OperatorSubscriber(subscriber, value => {\n      try {\n        const key = keySelector(value);\n        let group = groups.get(key);\n        if (!group) {\n          groups.set(key, group = connector ? connector() : new Subject());\n          const grouped = createGroupedObservable(key, group);\n          subscriber.next(grouped);\n          if (duration) {\n            const durationSubscriber = createOperatorSubscriber(group, () => {\n              group.complete();\n              durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n            }, undefined, undefined, () => groups.delete(key));\n            groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));\n          }\n        }\n        group.next(element ? element(value) : value);\n      } catch (err) {\n        handleError(err);\n      }\n    }, () => notify(consumer => consumer.complete()), handleError, () => groups.clear(), () => {\n      teardownAttempted = true;\n      return activeGroups === 0;\n    });\n    source.subscribe(groupBySourceSubscriber);\n    function createGroupedObservable(key, groupSubject) {\n      const result = new Observable(groupSubscriber => {\n        activeGroups++;\n        const innerSub = groupSubject.subscribe(groupSubscriber);\n        return () => {\n          innerSub.unsubscribe();\n          --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n        };\n      });\n      result.key = key;\n      return result;\n    }\n  });\n}\n//# sourceMappingURL=groupBy.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a65ce651cefd7b908b864b9a4d12bed802107c70bcf67ab3bb947cd5ded40e88.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a65ce651cefd7b908b864b9a4d12bed802107c70bcf67ab3bb947cd5ded40e88.json
deleted file mode 100644
index b99a1ea79e1ab1ebbea51c5cc8e1d2989ca739a6..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a65ce651cefd7b908b864b9a4d12bed802107c70bcf67ab3bb947cd5ded40e88.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { asyncScheduler } from '../scheduler/async';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function windowTime(windowTimeSpan, ...otherArgs) {\n  var _a, _b;\n  const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n  const windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n  const maxWindowSize = otherArgs[1] || Infinity;\n  return operate((source, subscriber) => {\n    let windowRecords = [];\n    let restartOnClose = false;\n    const closeWindow = record => {\n      const {\n        window,\n        subs\n      } = record;\n      window.complete();\n      subs.unsubscribe();\n      arrRemove(windowRecords, record);\n      restartOnClose && startWindow();\n    };\n    const startWindow = () => {\n      if (windowRecords) {\n        const subs = new Subscription();\n        subscriber.add(subs);\n        const window = new Subject();\n        const record = {\n          window,\n          subs,\n          seen: 0\n        };\n        windowRecords.push(record);\n        subscriber.next(window.asObservable());\n        executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan);\n      }\n    };\n    if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n      executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true);\n    } else {\n      restartOnClose = true;\n    }\n    startWindow();\n    const loop = cb => windowRecords.slice().forEach(cb);\n    const terminate = cb => {\n      loop(({\n        window\n      }) => cb(window));\n      cb(subscriber);\n      subscriber.unsubscribe();\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      loop(record => {\n        record.window.next(value);\n        maxWindowSize <= ++record.seen && closeWindow(record);\n      });\n    }, () => terminate(consumer => consumer.complete()), err => terminate(consumer => consumer.error(err))));\n    return () => {\n      windowRecords = null;\n    };\n  });\n}\n//# sourceMappingURL=windowTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a6f5e70cbece8460d1174f1840b1f64d187307eb20250a5f520d27f2f45f7b74.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a6f5e70cbece8460d1174f1840b1f64d187307eb20250a5f520d27f2f45f7b74.json
deleted file mode 100644
index 4d32d38dc7d179234c8f6a6f69a5fe1c425d188f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a6f5e70cbece8460d1174f1840b1f64d187307eb20250a5f520d27f2f45f7b74.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n  return operate((source, subscriber) => {\n    let connection = null;\n    source._refCount++;\n    const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n      if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n        connection = null;\n        return;\n      }\n      const sharedConnection = source._connection;\n      const conn = connection;\n      connection = null;\n      if (sharedConnection && (!conn || sharedConnection === conn)) {\n        sharedConnection.unsubscribe();\n      }\n      subscriber.unsubscribe();\n    });\n    source.subscribe(refCounter);\n    if (!refCounter.closed) {\n      connection = source.connect();\n    }\n  });\n}\n//# sourceMappingURL=refCount.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a6ff141c3150ec4f5590d1adee1681faa8c0e34d5f880a4f590d3c0310b3f9f4.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a6ff141c3150ec4f5590d1adee1681faa8c0e34d5f880a4f590d3c0310b3f9f4.json
deleted file mode 100644
index ba0a5a98f90aedceede7bf5a3a6e326154474ad9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a6ff141c3150ec4f5590d1adee1681faa8c0e34d5f880a4f590d3c0310b3f9f4.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from './innerFrom';\nexport function onErrorResumeNext(...sources) {\n  const nextSources = argsOrArgArray(sources);\n  return new Observable(subscriber => {\n    let sourceIndex = 0;\n    const subscribeNext = () => {\n      if (sourceIndex < nextSources.length) {\n        let nextSource;\n        try {\n          nextSource = innerFrom(nextSources[sourceIndex++]);\n        } catch (err) {\n          subscribeNext();\n          return;\n        }\n        const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);\n        nextSource.subscribe(innerSubscriber);\n        innerSubscriber.add(subscribeNext);\n      } else {\n        subscriber.complete();\n      }\n    };\n    subscribeNext();\n  });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7113f277a053407e6509eb7a5f9d08e72496f46a58c9dadebb84ba92878adb5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a7113f277a053407e6509eb7a5f9d08e72496f46a58c9dadebb84ba92878adb5.json
deleted file mode 100644
index 760ff99f84c002ae91c3d9d6238f797c0732988a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7113f277a053407e6509eb7a5f9d08e72496f46a58c9dadebb84ba92878adb5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/storage';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7702c19a63df18d52df16778e878514de364c384fc325f942b210763aa33d41.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a7702c19a63df18d52df16778e878514de364c384fc325f942b210763aa33d41.json
deleted file mode 100644
index d996e3728f3db8cf93945df6b684c196e7ed50ca..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7702c19a63df18d52df16778e878514de364c384fc325f942b210763aa33d41.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    let lastValue = null;\n    let durationSubscriber = null;\n    const emit = () => {\n      durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n      durationSubscriber = null;\n      if (hasValue) {\n        hasValue = false;\n        const value = lastValue;\n        lastValue = null;\n        subscriber.next(value);\n      }\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n      hasValue = true;\n      lastValue = value;\n      durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n      innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n    }, () => {\n      emit();\n      subscriber.complete();\n    }, undefined, () => {\n      lastValue = durationSubscriber = null;\n    }));\n  });\n}\n//# sourceMappingURL=debounce.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7c81d606f1d7fd80c0d00998ff34b39de5efdb0c0a3fadf66dda0263ddad42c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a7c81d606f1d7fd80c0d00998ff34b39de5efdb0c0a3fadf66dda0263ddad42c.json
deleted file mode 100644
index c401204cc9882e2e235c2922a723f5efa3bf5f3f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a7c81d606f1d7fd80c0d00998ff34b39de5efdb0c0a3fadf66dda0263ddad42c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent = Infinity) {\n  if (isFunction(resultSelector)) {\n    return mergeMap(() => innerObservable, resultSelector, concurrent);\n  }\n  if (typeof resultSelector === 'number') {\n    concurrent = resultSelector;\n  }\n  return mergeMap(() => innerObservable, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a959108802acdcf9894bcdbc6edb2055da8867627e5f39204e97e0cde9dbfc61.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a959108802acdcf9894bcdbc6edb2055da8867627e5f39204e97e0cde9dbfc61.json
deleted file mode 100644
index 5db5e79825b74b481aab6f417e1a799d19a74879..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a959108802acdcf9894bcdbc6edb2055da8867627e5f39204e97e0cde9dbfc61.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function createErrorClass(createImpl) {\n  const _super = instance => {\n    Error.call(instance);\n    instance.stack = new Error().stack;\n  };\n  const ctorFunc = createImpl(_super);\n  ctorFunc.prototype = Object.create(Error.prototype);\n  ctorFunc.prototype.constructor = ctorFunc;\n  return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9b66dced772236380d4e53e38f327c73981e857fe40681da09bed20b85c2e81.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a9b66dced772236380d4e53e38f327c73981e857fe40681da09bed20b85c2e81.json
deleted file mode 100644
index e7e4922c05f3de6558d574f97059fed518a8a1b5..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9b66dced772236380d4e53e38f327c73981e857fe40681da09bed20b85c2e81.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function getSymbolIterator() {\n  if (typeof Symbol !== 'function' || !Symbol.iterator) {\n    return '@@iterator';\n  }\n  return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9c0897e6ef3d6911e24e1b352fe2c8109244bb9d0abf9b7656d63554d73c378.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a9c0897e6ef3d6911e24e1b352fe2c8109244bb9d0abf9b7656d63554d73c378.json
deleted file mode 100644
index ffc928842160de398cf07f8800a65092d9d431bd..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9c0897e6ef3d6911e24e1b352fe2c8109244bb9d0abf9b7656d63554d73c378.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mergeAll } from './mergeAll';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function merge(...args) {\n  const scheduler = popScheduler(args);\n  const concurrent = popNumber(args, Infinity);\n  args = argsOrArgArray(args);\n  return operate((source, subscriber) => {\n    mergeAll(concurrent)(from([source, ...args], scheduler)).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=merge.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9ca5eefb9b6029ec4723e17c2dd2a5f8cf893f66d218e43ad5045bcbe88fe97.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/a9ca5eefb9b6029ec4723e17c2dd2a5f8cf893f66d218e43ad5045bcbe88fe97.json
deleted file mode 100644
index a9ea1aa4dc0d9f1b9ac624a1dcb289a77d2d6c32..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/a9ca5eefb9b6029ec4723e17c2dd2a5f8cf893f66d218e43ad5045bcbe88fe97.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concat } from './concat';\nexport function concatWith(...otherSources) {\n  return concat(...otherSources);\n}\n//# sourceMappingURL=concatWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/aa57f6e04dbf028e65d22cdf19777e5c560ea5a6a12198bfaf9a6948e6234d13.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/aa57f6e04dbf028e65d22cdf19777e5c560ea5a6a12198bfaf9a6948e6234d13.json
deleted file mode 100644
index 55a853eff71aeada599e5981489284c4a8b84f61..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/aa57f6e04dbf028e65d22cdf19777e5c560ea5a6a12198bfaf9a6948e6234d13.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n  constructor(schedulerActionCtor, now = Scheduler.now) {\n    this.schedulerActionCtor = schedulerActionCtor;\n    this.now = now;\n  }\n  schedule(work, delay = 0, state) {\n    return new this.schedulerActionCtor(this, work).schedule(state, delay);\n  }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/aaddff39d134a91ec6c0cd0c78dc8d64a36a13177c6fe51a832101f23c48baaa.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/aaddff39d134a91ec6c0cd0c78dc8d64a36a13177c6fe51a832101f23c48baaa.json
deleted file mode 100644
index 47284a5674629c64a0e4f94d9b094f4ed8645b5e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/aaddff39d134a91ec6c0cd0c78dc8d64a36a13177c6fe51a832101f23c48baaa.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { reduce } from './reduce';\nexport function count(predicate) {\n  return reduce((total, value, i) => !predicate || predicate(value, i) ? total + 1 : total, 0);\n}\n//# sourceMappingURL=count.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ac5ac478d3356cc96f797951569cfff0c0d7d65ed1e33d62f62a03c94685a365.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ac5ac478d3356cc96f797951569cfff0c0d7d65ed1e33d62f62a03c94685a365.json
deleted file mode 100644
index 144e2f10e00e7799527960fe9b5793e278feaf5e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ac5ac478d3356cc96f797951569cfff0c0d7d65ed1e33d62f62a03c94685a365.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n  const project = popResultSelector(inputs);\n  return operate((source, subscriber) => {\n    const len = inputs.length;\n    const otherValues = new Array(len);\n    let hasValue = inputs.map(() => false);\n    let ready = false;\n    for (let i = 0; i < len; i++) {\n      innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n        otherValues[i] = value;\n        if (!ready && !hasValue[i]) {\n          hasValue[i] = true;\n          (ready = hasValue.every(identity)) && (hasValue = null);\n        }\n      }, noop));\n    }\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      if (ready) {\n        const values = [value, ...otherValues];\n        subscriber.next(project ? project(...values) : values);\n      }\n    }));\n  });\n}\n//# sourceMappingURL=withLatestFrom.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/aebb27e2c251945ea810ae4d79b54d85c5fec2bc51d808772f8de55aab171d8f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/aebb27e2c251945ea810ae4d79b54d85c5fec2bc51d808772f8de55aab171d8f.json
deleted file mode 100644
index 5647a2fbbf489e7033944d3429654d9d1135c308..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/aebb27e2c251945ea810ae4d79b54d85c5fec2bc51d808772f8de55aab171d8f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass(_super => function UnsubscriptionErrorImpl(errors) {\n  _super(this);\n  this.message = errors ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n  ')}` : '';\n  this.name = 'UnsubscriptionError';\n  this.errors = errors;\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/af97f71964a1d5258a7d1ba376814e9face6521db56c3ecfd7f6c739ca288795.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/af97f71964a1d5258a7d1ba376814e9face6521db56c3ecfd7f6c739ca288795.json
deleted file mode 100644
index 239ef9208f1c7d6c380f387774837b60ac830e95..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/af97f71964a1d5258a7d1ba376814e9face6521db56c3ecfd7f6c739ca288795.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n  const scheduler = popScheduler(values);\n  return operate((source, subscriber) => {\n    (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=startWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b030c163c701725907220ef7bedfebf8bd97217b556b6d67b4dff4c56b122457.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b030c163c701725907220ef7bedfebf8bd97217b556b6d67b4dff4c56b122457.json
deleted file mode 100644
index 88e07709978a02a7a7e24aacf7ec7b679175bd67..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b030c163c701725907220ef7bedfebf8bd97217b556b6d67b4dff4c56b122457.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nexport function finalize(callback) {\n  return operate((source, subscriber) => {\n    try {\n      source.subscribe(subscriber);\n    } finally {\n      subscriber.add(callback);\n    }\n  });\n}\n//# sourceMappingURL=finalize.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b03842f397efadd826ec71c5c6117495e860b118d6507e817766e8ed933e7895.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b03842f397efadd826ec71c5c6117495e860b118d6507e817766e8ed933e7895.json
deleted file mode 100644
index 51b752573139619799e5fa7b6bade54b60854069..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b03842f397efadd826ec71c5c6117495e860b118d6507e817766e8ed933e7895.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n  flush(action) {\n    this._active = true;\n    const flushId = this._scheduled;\n    this._scheduled = undefined;\n    const {\n      actions\n    } = this;\n    let error;\n    action = action || actions.shift();\n    do {\n      if (error = action.execute(action.state, action.delay)) {\n        break;\n      }\n    } while ((action = actions[0]) && action.id === flushId && actions.shift());\n    this._active = false;\n    if (error) {\n      while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n        action.unsubscribe();\n      }\n      throw error;\n    }\n  }\n}\n//# sourceMappingURL=AsapScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b053092255a4ae7e76313468147d0cba6b49c4b2b71b2430ae9f9ea6ba4d9777.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b053092255a4ae7e76313468147d0cba6b49c4b2b71b2430ae9f9ea6ba4d9777.json
deleted file mode 100644
index 7c84fe3dcbe2c879ff2f4852a3d0da7e48e3ad26..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b053092255a4ae7e76313468147d0cba6b49c4b2b71b2430ae9f9ea6ba4d9777.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { identity } from './identity';\nexport function pipe(...fns) {\n  return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n  if (fns.length === 0) {\n    return identity;\n  }\n  if (fns.length === 1) {\n    return fns[0];\n  }\n  return function piped(input) {\n    return fns.reduce((prev, fn) => fn(prev), input);\n  };\n}\n//# sourceMappingURL=pipe.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b1044921656cfa6fe6d84ed357963a9ca640a7d586b725516601e483e26acbf3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b1044921656cfa6fe6d84ed357963a9ca640a7d586b725516601e483e26acbf3.json
deleted file mode 100644
index 9b4307e674c40b827a47a28cd36365541a0bb6d9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b1044921656cfa6fe6d84ed357963a9ca640a7d586b725516601e483e26acbf3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function createInvalidObservableTypeError(input) {\n  return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n//# sourceMappingURL=throwUnobservableError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b4338b8e07d2d01fc698b989f14042fcedf0ebf2641cb280f7f171594a00eb23.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b4338b8e07d2d01fc698b989f14042fcedf0ebf2641cb280f7f171594a00eb23.json
deleted file mode 100644
index 83934b7de80dac772e4d7bcbd246b6b03f87e836..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b4338b8e07d2d01fc698b989f14042fcedf0ebf2641cb280f7f171594a00eb23.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isScheduler } from '../util/isScheduler';\nimport { Observable } from '../Observable';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { observeOn } from '../operators/observeOn';\nimport { AsyncSubject } from '../AsyncSubject';\nexport function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) {\n  if (resultSelector) {\n    if (isScheduler(resultSelector)) {\n      scheduler = resultSelector;\n    } else {\n      return function (...args) {\n        return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler).apply(this, args).pipe(mapOneOrManyArgs(resultSelector));\n      };\n    }\n  }\n  if (scheduler) {\n    return function (...args) {\n      return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args).pipe(subscribeOn(scheduler), observeOn(scheduler));\n    };\n  }\n  return function (...args) {\n    const subject = new AsyncSubject();\n    let uninitialized = true;\n    return new Observable(subscriber => {\n      const subs = subject.subscribe(subscriber);\n      if (uninitialized) {\n        uninitialized = false;\n        let isAsync = false;\n        let isComplete = false;\n        callbackFunc.apply(this, [...args, (...results) => {\n          if (isNodeStyle) {\n            const err = results.shift();\n            if (err != null) {\n              subject.error(err);\n              return;\n            }\n          }\n          subject.next(1 < results.length ? results : results[0]);\n          isComplete = true;\n          if (isAsync) {\n            subject.complete();\n          }\n        }]);\n        if (isComplete) {\n          subject.complete();\n        }\n        isAsync = true;\n      }\n      return subs;\n    });\n  };\n}\n//# sourceMappingURL=bindCallbackInternals.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b5e5ee9f29a49a53fade3b273b109c212282c8e8f23fb54c978144d6762f7587.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b5e5ee9f29a49a53fade3b273b109c212282c8e8f23fb54c978144d6762f7587.json
deleted file mode 100644
index eab95cef063fecba9796aa1d6d28733a8a0f6a16..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b5e5ee9f29a49a53fade3b273b109c212282c8e8f23fb54c978144d6762f7587.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const intervalProvider = {\n  setInterval(handler, timeout, ...args) {\n    const {\n      delegate\n    } = intervalProvider;\n    if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n      return delegate.setInterval(handler, timeout, ...args);\n    }\n    return setInterval(handler, timeout, ...args);\n  },\n  clearInterval(handle) {\n    const {\n      delegate\n    } = intervalProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=intervalProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b634ab317c1d6230ae43f29d6c6769b2ccecef5631a503afea3c957f7b9e460f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b634ab317c1d6230ae43f29d6c6769b2ccecef5631a503afea3c957f7b9e460f.json
deleted file mode 100644
index 0026dfe9e16fa8d5de083e52e98cc1560ee66530..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b634ab317c1d6230ae43f29d6c6769b2ccecef5631a503afea3c957f7b9e460f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n  const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n  const init = subscriber => subscriber.error(errorFactory());\n  return new Observable(scheduler ? subscriber => scheduler.schedule(init, 0, subscriber) : init);\n}\n//# sourceMappingURL=throwError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b6577334d9cde4bb16ed4713937866bd77ba416070592651a00b759fc5b3e60b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b6577334d9cde4bb16ed4713937866bd77ba416070592651a00b759fc5b3e60b.json
deleted file mode 100644
index f6ea203ebd2ad9a84df9251f3e7c6a6dfaef4ee7..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b6577334d9cde4bb16ed4713937866bd77ba416070592651a00b759fc5b3e60b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n  return operate((source, subscriber) => {\n    innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n    !subscriber.closed && source.subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=takeUntil.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b981bb265c5f96bdc0ea771c140d3e868af23a33df4f83107514e3b99ca3b22b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b981bb265c5f96bdc0ea771c140d3e868af23a33df4f83107514e3b99ca3b22b.json
deleted file mode 100644
index 0b21421604f9e4ae3bcbb5a269eba40ae64d63a0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b981bb265c5f96bdc0ea771c140d3e868af23a33df4f83107514e3b99ca3b22b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      hasValue = true;\n      subscriber.next(value);\n    }, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory())));\n  });\n}\nfunction defaultErrorFactory() {\n  return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/b9c9281de3edf3a4ad8cb7d24ca4fec7757c15f1d331685bfeacc4dd421466cb.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/b9c9281de3edf3a4ad8cb7d24ca4fec7757c15f1d331685bfeacc4dd421466cb.json
deleted file mode 100644
index d3338c9f7fd98fdd0b39d09a790168a3623bc187..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/b9c9281de3edf3a4ad8cb7d24ca4fec7757c15f1d331685bfeacc4dd421466cb.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { combineLatest } from './combineLatest';\nexport function combineLatestWith(...otherSources) {\n  return combineLatest(...otherSources);\n}\n//# sourceMappingURL=combineLatestWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bae1c6f4cb394562c8ef8f4c0ed3eceabc3f3de68b00925df059f3e1e6a3c3fd.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bae1c6f4cb394562c8ef8f4c0ed3eceabc3f3de68b00925df059f3e1e6a3c3fd.json
deleted file mode 100644
index 47ec0b0d6c266d568d03c3f2586554284288ca30..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bae1c6f4cb394562c8ef8f4c0ed3eceabc3f3de68b00925df059f3e1e6a3c3fd.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass(_super => function EmptyErrorImpl() {\n  _super(this);\n  this.name = 'EmptyError';\n  this.message = 'no elements in sequence';\n});\n//# sourceMappingURL=EmptyError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bb042c7fd19204b84f4d6715e3badaf49669113db8c71f3d0f51d230f56d8880.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bb042c7fd19204b84f4d6715e3badaf49669113db8c71f3d0f51d230f56d8880.json
deleted file mode 100644
index b9de0d427af3383c96b77c6729ab0173bd7e93ab..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bb042c7fd19204b84f4d6715e3badaf49669113db8c71f3d0f51d230f56d8880.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const ArgumentOutOfRangeError = createErrorClass(_super => function ArgumentOutOfRangeErrorImpl() {\n  _super(this);\n  this.name = 'ArgumentOutOfRangeError';\n  this.message = 'argument out of range';\n});\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bb4d2c28e00fee32263bf6d2941e51df12fa49700d263766c6022292b81e5c99.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bb4d2c28e00fee32263bf6d2941e51df12fa49700d263766c6022292b81e5c99.json
deleted file mode 100644
index 4dc3411553d7137b3949c1364291f32e58e1d1c1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bb4d2c28e00fee32263bf6d2941e51df12fa49700d263766c6022292b81e5c99.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"/**\n * @license Angular v15.2.3\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = /*#__PURE__*/Symbol('RouteTitle');\nclass ParamsAsMap {\n  constructor(params) {\n    this.params = params || {};\n  }\n  has(name) {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n  get(name) {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n    return null;\n  }\n  getAll(name) {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n    return [];\n  }\n  get keys() {\n    return Object.keys(this.params);\n  }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n  return new ParamsAsMap(params);\n}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see UrlMatchResult\n * @see Route\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n  const parts = route.path.split('/');\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n  if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n  const posParams = {};\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n  return {\n    consumed: segments.slice(0, parts.length),\n    posParams\n  };\n}\nfunction shallowEqualArrays(a, b) {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\nfunction shallowEqual(a, b) {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n  return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\nfunction and(bools) {\n  return !bools.some(v => !v);\n}\nfunction forEach(map, callback) {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\nfunction wrapIntoObservable(value) {\n  if (ɵisObservable(value)) {\n    return value;\n  }\n  if (ɵisPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n  return of(value);\n}\nconst NG_DEV_MODE$b = typeof ngDevMode === 'undefined' || ngDevMode;\nconst pathCompareMap = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup\n};\nconst paramCompareMap = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true\n};\nfunction containsTree(container, containee, options) {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) && paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) && !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams)) return false;\n  }\n  return true;\n}\nfunction containsParams(container, containee) {\n  return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n  constructor( /** The root segment group of the URL tree */\n  root = new UrlSegmentGroup([], {}), /** The query params of the URL */\n  queryParams = {}, /** The fragment of the URL */\n  fragment = null) {\n    this.root = root;\n    this.queryParams = queryParams;\n    this.fragment = fragment;\n    if (NG_DEV_MODE$b) {\n      if (root.segments.length > 0) {\n        throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' + 'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n      }\n    }\n  }\n  get queryParamMap() {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n  constructor( /** The URL segments of this group. See `UrlSegment` for more information */\n  segments, /** The list of children of this group */\n  children) {\n    this.segments = segments;\n    this.children = children;\n    /** The parent node in the url tree */\n    this.parent = null;\n    forEach(children, (v, k) => v.parent = this);\n  }\n  /** Whether the segment has child segments */\n  hasChildren() {\n    return this.numberOfChildren > 0;\n  }\n  /** Number of child segments */\n  get numberOfChildren() {\n    return Object.keys(this.children).length;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return serializePaths(this);\n  }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n  constructor( /** The path part of a URL segment */\n  path, /** The matrix parameters associated with a segment */\n  parameters) {\n    this.path = path;\n    this.parameters = parameters;\n  }\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return serializePath(this);\n  }\n}\nfunction equalSegments(as, bs) {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n  let res = [];\n  forEach(segment.children, (child, childOutlet) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child, childOutlet) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nlet UrlSerializer = /*#__PURE__*/(() => {\n  class UrlSerializer {}\n  UrlSerializer.ɵfac = function UrlSerializer_Factory(t) {\n    return new (t || UrlSerializer)();\n  };\n  UrlSerializer.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: UrlSerializer,\n    factory: function () {\n      return (() => new DefaultUrlSerializer())();\n    },\n    providedIn: 'root'\n  });\n  return UrlSerializer;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url) {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n  /** Converts a `UrlTree` into a url */\n  serialize(tree) {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n    return `${segment}${query}${fragment}`;\n  }\n}\nconst DEFAULT_SERIALIZER = /*#__PURE__*/new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : '';\n    const children = [];\n    forEach(segment.children, (v, k) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n  } else {\n    const children = mapChildrenIntoArray(segment, (v, k) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n  return encodeURIComponent(s).replace(/%40/g, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n  return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n  return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n  return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n  return Object.keys(params).map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`).join('');\n}\nfunction serializeQueryParams(params) {\n  const strParams = Object.keys(params).map(name => {\n    const value = params[name];\n    return Array.isArray(value) ? value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n  }).filter(s => !!s);\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str) {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\nclass UrlParser {\n  constructor(url) {\n    this.url = url;\n    this.remaining = url;\n  }\n  parseRootSegment() {\n    this.consumeOptional('/');\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n  parseQueryParams() {\n    const params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n  parseFragment() {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n  parseChildren() {\n    if (this.remaining === '') {\n      return {};\n    }\n    this.consumeOptional('/');\n    const segments = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n    let children = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n    let res = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n    return res;\n  }\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  parseSegment() {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$b && `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n  parseMatrixParams() {\n    const params = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n  parseParam(params) {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n    params[decode(key)] = decode(value);\n  }\n  // Parse a single query parameter `name[=value]`\n  parseQueryParam(params) {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n  // parse `(a/b//outlet_name:c/d)`\n  parseParens(allowPrimary) {\n    const segments = {};\n    this.capture('(');\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n      const next = this.remaining[path.length];\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$b && `Cannot parse url '${this.url}'`);\n      }\n      let outletName = undefined;\n      if (path.indexOf(':') > -1) {\n        outletName = path.slice(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n    return segments;\n  }\n  peekStartsWith(str) {\n    return this.remaining.startsWith(str);\n  }\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  consumeOptional(str) {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n  capture(str) {\n    if (!this.consumeOptional(str)) {\n      throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$b && `Expected \"${str}\".`);\n    }\n  }\n}\nfunction createRoot(rootCandidate) {\n  return rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], {\n    [PRIMARY_OUTLET]: rootCandidate\n  }) : rootCandidate;\n}\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup) {\n  const newChildren = {};\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n  return s;\n}\nfunction isUrlTree(v) {\n  return v instanceof UrlTree;\n}\nconst NG_DEV_MODE$a = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n *     any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n  const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n  return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n  let targetGroup;\n  function createSegmentGroupFromRouteRecursive(currentRoute) {\n    const childOutlets = {};\n    for (const childSnapshot of currentRoute.children) {\n      const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n      childOutlets[childSnapshot.outlet] = root;\n    }\n    const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n    if (currentRoute === route) {\n      targetGroup = segmentGroup;\n    }\n    return segmentGroup;\n  }\n  const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n  const rootSegmentGroup = createRoot(rootCandidate);\n  return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n  let root = relativeTo;\n  while (root.parent) {\n    root = root.parent;\n  }\n  // There are no commands so the `UrlTree` goes to the same path as the one created from the\n  // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n  // applying any other logic.\n  if (commands.length === 0) {\n    return tree(root, root, root, queryParams, fragment);\n  }\n  const nav = computeNavigation(commands);\n  if (nav.toRoot()) {\n    return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n  }\n  const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n  const newSegmentGroup = position.processChildren ? updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) : updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n  return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree.root, queryParams, fragment);\n  }\n  const nav = computeNavigation(commands);\n  if (nav.toRoot()) {\n    return tree(urlTree.root, urlTree.root, new UrlSegmentGroup([], {}), queryParams, fragment);\n  }\n  function createTreeUsingPathIndex(lastPathIndex) {\n    const startingPosition = findStartingPosition(nav, urlTree, route.snapshot?._urlSegment, lastPathIndex);\n    const segmentGroup = startingPosition.processChildren ? updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) : updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n    return tree(urlTree.root, startingPosition.segmentGroup, segmentGroup, queryParams, fragment);\n  }\n  // Note: The types should disallow `snapshot` from being `undefined` but due to test mocks, this\n  // may be the case. Since we try to access it at an earlier point before the refactor to add the\n  // warning for `relativeLinkResolution: 'legacy'`, this may cause failures in tests where it\n  // didn't before.\n  const result = createTreeUsingPathIndex(route.snapshot?._lastPathIndex);\n  return result;\n}\nfunction isMatrixParams(command) {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n  return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n  let qp = {};\n  if (queryParams) {\n    forEach(queryParams, (value, name) => {\n      qp[name] = Array.isArray(value) ? value.map(v => `${v}`) : `${value}`;\n    });\n  }\n  let rootCandidate;\n  if (oldRoot === oldSegmentGroup) {\n    rootCandidate = newSegmentGroup;\n  } else {\n    rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n  }\n  const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n  return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n  const children = {};\n  forEach(current.children, (c, outletName) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n  constructor(isAbsolute, numberOfDoubleDots, commands) {\n    this.isAbsolute = isAbsolute;\n    this.numberOfDoubleDots = numberOfDoubleDots;\n    this.commands = commands;\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$a && 'Root segment cannot have matrix parameters');\n    }\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$a && '{outlets:{}} has to be the last command');\n    }\n  }\n  toRoot() {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n  if (typeof commands[0] === 'string' && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n  const res = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets = {};\n        forEach(cmd.outlets, (commands, name) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {\n          outlets\n        }];\n      }\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {\n          //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {\n          //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n      return res;\n    }\n    return [...res, cmd];\n  }, []);\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n  constructor(segmentGroup, processChildren, index) {\n    this.segmentGroup = segmentGroup;\n    this.processChildren = processChildren;\n    this.index = index;\n  }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n  if (nav.isAbsolute) {\n    return new Position(root, true, 0);\n  }\n  if (!target) {\n    // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n    // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n    // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n    // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n    return new Position(root, false, NaN);\n  }\n  if (target.parent === null) {\n    return new Position(target, true, 0);\n  }\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = target.segments.length - 1 + modifier;\n  return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction findStartingPosition(nav, tree, segmentGroup, lastPathIndex) {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n  if (lastPathIndex === -1) {\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(segmentGroup, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent;\n    if (!g) {\n      throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$a && 'Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n  return {\n    [PRIMARY_OUTLET]: commands\n  };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children = {};\n    // If the set of commands does not apply anything to the primary outlet and the child segment is\n    // an empty path primary segment on its own, we want to skip applying the commands at this\n    // level. Imagine the following config:\n    //\n    // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n    //\n    // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n    // navigation with commands\n    // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n    // root segment because that would result in\n    // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n    // the `ActivatedRoute` rather than updating the existing one.\n    //\n    // Because empty paths do not appear in the URL segments and the fact that the segments used in\n    // the output `UrlTree` are squashed to eliminate these empty paths where possible\n    // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n    // it can be hard to determine what is the right thing to do when applying commands to a\n    // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n    // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n    // the same level of the tree.\n    if (!outlets[PRIMARY_OUTLET] && segmentGroup.children[PRIMARY_OUTLET] && segmentGroup.numberOfChildren === 1 && segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n      return updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n    }\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n    forEach(segmentGroup.children, (child, childOutlet) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n  const noMatch = {\n    match: false,\n    pathIndex: 0,\n    commandIndex: 0\n  };\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n    if (currentPathIndex > 0 && curr === undefined) break;\n    if (curr && next && typeof next === 'object' && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n  return {\n    match: true,\n    pathIndex: currentPathIndex,\n    commandIndex: currentCommandIndex\n  };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = i < commands.length - 1 ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n  const children = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\nfunction stringify(params) {\n  const res = {};\n  forEach(params, (v, k) => res[k] = `${v}`);\n  return res;\n}\nfunction compare(path, params, segment) {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\nconst IMPERATIVE_NAVIGATION = 'imperative';\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n  constructor( /** A unique ID that the router assigns to every router navigation. */\n  id, /** The URL that is the destination for this navigation. */\n  url) {\n    this.id = id;\n    this.url = url;\n  }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  navigationTrigger = 'imperative', /** @docsNotRequired */\n  restoredState = null) {\n    super(id, url);\n    this.type = 0 /* EventType.NavigationStart */;\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.type = 1 /* EventType.NavigationEnd */;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n  }\n}\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url,\n  /**\n   * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n   * instead for a stable cancellation reason that can be used in production.\n   */\n  reason,\n  /**\n   * A code to indicate why the navigation was canceled. This cancellation code is stable for\n   * the reason and can be relied on whereas the `reason` string could change and should not be\n   * used in production.\n   */\n  code) {\n    super(id, url);\n    this.reason = reason;\n    this.code = code;\n    this.type = 2 /* EventType.NavigationCancel */;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url,\n  /**\n   * A description of why the navigation was skipped. For debug purposes only. Use `code`\n   * instead for a stable skipped reason that can be used in production.\n   */\n  reason,\n  /**\n   * A code to indicate why the navigation was skipped. This code is stable for\n   * the reason and can be relied on whereas the `reason` string could change and should not be\n   * used in production.\n   */\n  code) {\n    super(id, url);\n    this.reason = reason;\n    this.code = code;\n    this.type = 16 /* EventType.NavigationSkipped */;\n  }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  error,\n  /**\n   * The target of the navigation when the error occurred.\n   *\n   * Note that this can be `undefined` because an error could have occurred before the\n   * `RouterStateSnapshot` was created for the navigation.\n   */\n  target) {\n    super(id, url);\n    this.error = error;\n    this.target = target;\n    this.type = 3 /* EventType.NavigationError */;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects, /** @docsNotRequired */\n  state) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.state = state;\n    this.type = 4 /* EventType.RoutesRecognized */;\n  }\n  /** @docsNotRequired */\n  toString() {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects, /** @docsNotRequired */\n  state) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.state = state;\n    this.type = 7 /* EventType.GuardsCheckStart */;\n  }\n\n  toString() {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects, /** @docsNotRequired */\n  state, /** @docsNotRequired */\n  shouldActivate) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.state = state;\n    this.shouldActivate = shouldActivate;\n    this.type = 8 /* EventType.GuardsCheckEnd */;\n  }\n\n  toString() {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects, /** @docsNotRequired */\n  state) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.state = state;\n    this.type = 5 /* EventType.ResolveStart */;\n  }\n\n  toString() {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n  constructor( /** @docsNotRequired */\n  id, /** @docsNotRequired */\n  url, /** @docsNotRequired */\n  urlAfterRedirects, /** @docsNotRequired */\n  state) {\n    super(id, url);\n    this.urlAfterRedirects = urlAfterRedirects;\n    this.state = state;\n    this.type = 6 /* EventType.ResolveEnd */;\n  }\n\n  toString() {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n  constructor( /** @docsNotRequired */\n  route) {\n    this.route = route;\n    this.type = 9 /* EventType.RouteConfigLoadStart */;\n  }\n\n  toString() {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n  constructor( /** @docsNotRequired */\n  route) {\n    this.route = route;\n    this.type = 10 /* EventType.RouteConfigLoadEnd */;\n  }\n\n  toString() {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ChildActivationStart {\n  constructor( /** @docsNotRequired */\n  snapshot) {\n    this.snapshot = snapshot;\n    this.type = 11 /* EventType.ChildActivationStart */;\n  }\n\n  toString() {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nclass ChildActivationEnd {\n  constructor( /** @docsNotRequired */\n  snapshot) {\n    this.snapshot = snapshot;\n    this.type = 12 /* EventType.ChildActivationEnd */;\n  }\n\n  toString() {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationStart {\n  constructor( /** @docsNotRequired */\n  snapshot) {\n    this.snapshot = snapshot;\n    this.type = 13 /* EventType.ActivationStart */;\n  }\n\n  toString() {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationEnd {\n  constructor( /** @docsNotRequired */\n  snapshot) {\n    this.snapshot = snapshot;\n    this.type = 14 /* EventType.ActivationEnd */;\n  }\n\n  toString() {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n  constructor( /** @docsNotRequired */\n  routerEvent, /** @docsNotRequired */\n  position, /** @docsNotRequired */\n  anchor) {\n    this.routerEvent = routerEvent;\n    this.position = position;\n    this.anchor = anchor;\n    this.type = 15 /* EventType.Scroll */;\n  }\n\n  toString() {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\nfunction stringifyEvent(routerEvent) {\n  if (!('type' in routerEvent)) {\n    return `Unknown Router Event: ${routerEvent.constructor.name}`;\n  }\n  switch (routerEvent.type) {\n    case 14 /* EventType.ActivationEnd */:\n      return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n    case 13 /* EventType.ActivationStart */:\n      return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n    case 12 /* EventType.ChildActivationEnd */:\n      return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n    case 11 /* EventType.ChildActivationStart */:\n      return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n    case 8 /* EventType.GuardsCheckEnd */:\n      return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n    case 7 /* EventType.GuardsCheckStart */:\n      return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n    case 2 /* EventType.NavigationCancel */:\n      return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n    case 16 /* EventType.NavigationSkipped */:\n      return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n    case 1 /* EventType.NavigationEnd */:\n      return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n    case 3 /* EventType.NavigationError */:\n      return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n    case 0 /* EventType.NavigationStart */:\n      return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n    case 6 /* EventType.ResolveEnd */:\n      return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n    case 5 /* EventType.ResolveStart */:\n      return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n    case 10 /* EventType.RouteConfigLoadEnd */:\n      return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n    case 9 /* EventType.RouteConfigLoadStart */:\n      return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n    case 4 /* EventType.RoutesRecognized */:\n      return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n    case 15 /* EventType.Scroll */:\n      const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n      return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n  }\n}\nconst NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;\nlet LegacyCreateUrlTree = /*#__PURE__*/(() => {\n  class LegacyCreateUrlTree {\n    createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n      const a = relativeTo || currentState.root;\n      const tree = createUrlTree(a, currentUrlTree, commands, queryParams, fragment);\n      if (NG_DEV_MODE$9) {\n        const treeFromSnapshotStrategy = new CreateUrlTreeUsingSnapshot().createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment);\n        if (treeFromSnapshotStrategy.toString() !== tree.toString()) {\n          let warningString = `The navigation to ${tree.toString()} will instead go to ${treeFromSnapshotStrategy.toString()} in an upcoming version of Angular.`;\n          if (!!relativeTo) {\n            warningString += ' `relativeTo` might need to be removed from the `UrlCreationOptions`.';\n          }\n          tree._warnIfUsedForNavigation = warningString;\n        }\n      }\n      return tree;\n    }\n  }\n  LegacyCreateUrlTree.ɵfac = function LegacyCreateUrlTree_Factory(t) {\n    return new (t || LegacyCreateUrlTree)();\n  };\n  LegacyCreateUrlTree.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: LegacyCreateUrlTree,\n    factory: LegacyCreateUrlTree.ɵfac\n  });\n  return LegacyCreateUrlTree;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet CreateUrlTreeUsingSnapshot = /*#__PURE__*/(() => {\n  class CreateUrlTreeUsingSnapshot {\n    createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n      let relativeToUrlSegmentGroup;\n      try {\n        const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;\n        relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n      } catch (e) {\n        // This is strictly for backwards compatibility with tests that create\n        // invalid `ActivatedRoute` mocks.\n        // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n        // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n        // the moment.\n        if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {\n          // Navigations that were absolute in the old way of creating UrlTrees\n          // would still work because they wouldn't attempt to match the\n          // segments in the `ActivatedRoute` to the `currentUrlTree` but\n          // instead just replace the root segment with the navigation result.\n          // Non-absolute navigations would fail to apply the commands because\n          // the logic could not find the segment to replace (so they'd act like there were no\n          // commands).\n          commands = [];\n        }\n        relativeToUrlSegmentGroup = currentUrlTree.root;\n      }\n      return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n    }\n  }\n  CreateUrlTreeUsingSnapshot.ɵfac = function CreateUrlTreeUsingSnapshot_Factory(t) {\n    return new (t || CreateUrlTreeUsingSnapshot)();\n  };\n  CreateUrlTreeUsingSnapshot.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: CreateUrlTreeUsingSnapshot,\n    factory: CreateUrlTreeUsingSnapshot.ɵfac\n  });\n  return CreateUrlTreeUsingSnapshot;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet CreateUrlTreeStrategy = /*#__PURE__*/(() => {\n  class CreateUrlTreeStrategy {}\n  CreateUrlTreeStrategy.ɵfac = function CreateUrlTreeStrategy_Factory(t) {\n    return new (t || CreateUrlTreeStrategy)();\n  };\n  CreateUrlTreeStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: CreateUrlTreeStrategy,\n    factory: function (t) {\n      return LegacyCreateUrlTree.ɵfac(t);\n    },\n    providedIn: 'root'\n  });\n  return CreateUrlTreeStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Tree {\n  constructor(root) {\n    this._root = root;\n  }\n  get root() {\n    return this._root.value;\n  }\n  /**\n   * @internal\n   */\n  parent(t) {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n  /**\n   * @internal\n   */\n  children(t) {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n  /**\n   * @internal\n   */\n  firstChild(t) {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n  /**\n   * @internal\n   */\n  siblings(t) {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n  /**\n   * @internal\n   */\n  pathFromRoot(t) {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n  if (value === node.value) return node;\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n  return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n  if (value === node.value) return [node];\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n  return [];\n}\nclass TreeNode {\n  constructor(value, children) {\n    this.value = value;\n    this.children = children;\n  }\n  toString() {\n    return `TreeNode(${this.value})`;\n  }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n  const map = {};\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n  return map;\n}\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n  /** @internal */\n  constructor(root, /** The current snapshot of the router state */\n  snapshot) {\n    super(root);\n    this.snapshot = snapshot;\n    setRouterState(this, root);\n  }\n  toString() {\n    return this.snapshot.toString();\n  }\n}\nfunction createEmptyState(urlTree, rootComponent) {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n  /** @internal */\n  constructor( /** An observable of the URL segments matched by this route. */\n  url, /** An observable of the matrix parameters scoped to this route. */\n  params, /** An observable of the query parameters shared by all the routes. */\n  queryParams, /** An observable of the URL fragment shared by all the routes. */\n  fragment, /** An observable of the static and resolved data of this route. */\n  data, /** The outlet name of the route, a constant. */\n  outlet, /** The component of the route, a constant. */\n  component, futureSnapshot) {\n    this.url = url;\n    this.params = params;\n    this.queryParams = queryParams;\n    this.fragment = fragment;\n    this.data = data;\n    this.outlet = outlet;\n    this.component = component;\n    /** An Observable of the resolved route title */\n    this.title = this.data?.pipe(map(d => d[RouteTitleKey])) ?? of(undefined);\n    this._futureSnapshot = futureSnapshot;\n  }\n  /** The configuration used to match this route. */\n  get routeConfig() {\n    return this._futureSnapshot.routeConfig;\n  }\n  /** The root of the router state. */\n  get root() {\n    return this._routerState.root;\n  }\n  /** The parent of this route in the router state tree. */\n  get parent() {\n    return this._routerState.parent(this);\n  }\n  /** The first child of this route in the router state tree. */\n  get firstChild() {\n    return this._routerState.firstChild(this);\n  }\n  /** The children of this route in the router state tree. */\n  get children() {\n    return this._routerState.children(this);\n  }\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot() {\n    return this._routerState.pathFromRoot(this);\n  }\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap() {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map(p => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap() {\n    if (!this._queryParamMap) {\n      this._queryParamMap = this.queryParams.pipe(map(p => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n  toString() {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') {\n  const pathFromRoot = route.pathFromRoot;\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n      } else {\n        break;\n      }\n    }\n  }\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {\n      ...res.params,\n      ...curr.params\n    };\n    const data = {\n      ...res.data,\n      ...curr.data\n    };\n    const resolve = {\n      ...curr.data,\n      ...res.resolve,\n      ...curr.routeConfig?.data,\n      ...curr._resolvedData\n    };\n    return {\n      params,\n      data,\n      resolve\n    };\n  }, {\n    params: {},\n    data: {},\n    resolve: {}\n  });\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n  /** The resolved route title */\n  get title() {\n    // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n    // available at the time of class instantiation.\n    return this.data?.[RouteTitleKey];\n  }\n  /** @internal */\n  constructor( /** The URL segments matched by this route */\n  url,\n  /**\n   *  The matrix parameters scoped to this route.\n   *\n   *  You can compute all params (or data) in the router state or to get params outside\n   *  of an activated component by traversing the `RouterState` tree as in the following\n   *  example:\n   *  ```\n   *  collectRouteParams(router: Router) {\n   *    let params = {};\n   *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n   *    while (stack.length > 0) {\n   *      const route = stack.pop()!;\n   *      params = {...params, ...route.params};\n   *      stack.push(...route.children);\n   *    }\n   *    return params;\n   *  }\n   *  ```\n   */\n  params, /** The query parameters shared by all the routes */\n  queryParams, /** The URL fragment shared by all the routes */\n  fragment, /** The static and resolved data of this route */\n  data, /** The outlet name of the route */\n  outlet, /** The component of the route */\n  component, routeConfig, urlSegment, lastPathIndex, resolve) {\n    this.url = url;\n    this.params = params;\n    this.queryParams = queryParams;\n    this.fragment = fragment;\n    this.data = data;\n    this.outlet = outlet;\n    this.component = component;\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n  /** The root of the router state */\n  get root() {\n    return this._routerState.root;\n  }\n  /** The parent of this route in the router state tree */\n  get parent() {\n    return this._routerState.parent(this);\n  }\n  /** The first child of this route in the router state tree */\n  get firstChild() {\n    return this._routerState.firstChild(this);\n  }\n  /** The children of this route in the router state tree */\n  get children() {\n    return this._routerState.children(this);\n  }\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot() {\n    return this._routerState.pathFromRoot(this);\n  }\n  get paramMap() {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n  get queryParamMap() {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n  toString() {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n  /** @internal */\n  constructor( /** The url from which this snapshot was created */\n  url, root) {\n    super(root);\n    this.url = url;\n    setRouterState(this, root);\n  }\n  toString() {\n    return serializeNode(this._root);\n  }\n}\nfunction setRouterState(state, node) {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      route.queryParams.next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      route.fragment.next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      route.params.next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      route.url.next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      route.data.next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n    // this is for resolved data\n    route.data.next(route._futureSnapshot.data);\n  }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n  return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = detachedRouteHandle.route;\n        tree.value._futureSnapshot = curr.value;\n        tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\n        return tree;\n      }\n    }\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode(value, children);\n  }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\nfunction createActivatedRoute(c) {\n  return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n  const {\n    redirectTo,\n    navigationBehaviorOptions\n  } = isUrlTree(redirect) ? {\n    redirectTo: redirect,\n    navigationBehaviorOptions: undefined\n  } : redirect;\n  const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, 0 /* NavigationCancellationCode.Redirect */, redirect);\n  error.url = redirectTo;\n  error.navigationBehaviorOptions = navigationBehaviorOptions;\n  return error;\n}\nfunction navigationCancelingError(message, code, redirectUrl) {\n  const error = new Error('NavigationCancelingError: ' + (message || ''));\n  error[NAVIGATION_CANCELING_ERROR] = true;\n  error.cancellationCode = code;\n  if (redirectUrl) {\n    error.url = redirectUrl;\n  }\n  return error;\n}\nfunction isRedirectingNavigationCancelingError$1(error) {\n  return isNavigationCancelingError$1(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError$1(error) {\n  return error && error[NAVIGATION_CANCELING_ERROR];\n}\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n  constructor() {\n    this.outlet = null;\n    this.route = null;\n    /**\n     * @deprecated Passing a resolver to retrieve a component factory is not required and is\n     *     deprecated since v14.\n     */\n    this.resolver = null;\n    this.injector = null;\n    this.children = new ChildrenOutletContexts();\n    this.attachRef = null;\n  }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nlet ChildrenOutletContexts = /*#__PURE__*/(() => {\n  class ChildrenOutletContexts {\n    constructor() {\n      // contexts for child outlets, by name.\n      this.contexts = new Map();\n    }\n    /** Called when a `RouterOutlet` directive is instantiated */\n    onChildOutletCreated(childName, outlet) {\n      const context = this.getOrCreateContext(childName);\n      context.outlet = outlet;\n      this.contexts.set(childName, context);\n    }\n    /**\n     * Called when a `RouterOutlet` directive is destroyed.\n     * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n     * re-created later.\n     */\n    onChildOutletDestroyed(childName) {\n      const context = this.getContext(childName);\n      if (context) {\n        context.outlet = null;\n        context.attachRef = null;\n      }\n    }\n    /**\n     * Called when the corresponding route is deactivated during navigation.\n     * Because the component get destroyed, all children outlet are destroyed.\n     */\n    onOutletDeactivated() {\n      const contexts = this.contexts;\n      this.contexts = new Map();\n      return contexts;\n    }\n    onOutletReAttached(contexts) {\n      this.contexts = contexts;\n    }\n    getOrCreateContext(childName) {\n      let context = this.getContext(childName);\n      if (!context) {\n        context = new OutletContext();\n        this.contexts.set(childName, context);\n      }\n      return context;\n    }\n    getContext(childName) {\n      return this.contexts.get(childName) || null;\n    }\n  }\n  ChildrenOutletContexts.ɵfac = function ChildrenOutletContexts_Factory(t) {\n    return new (t || ChildrenOutletContexts)();\n  };\n  ChildrenOutletContexts.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: ChildrenOutletContexts,\n    factory: ChildrenOutletContexts.ɵfac,\n    providedIn: 'root'\n  });\n  return ChildrenOutletContexts;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'\n *   (attach)='onAttach($event)'\n *   (detach)='onDetach($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterOutlet = /*#__PURE__*/(() => {\n  class RouterOutlet {\n    constructor() {\n      this.activated = null;\n      this._activatedRoute = null;\n      /**\n       * The name of the outlet\n       *\n       * @see [named outlets](guide/router-tutorial-toh#displaying-multiple-routes-in-named-outlets)\n       */\n      this.name = PRIMARY_OUTLET;\n      this.activateEvents = new EventEmitter();\n      this.deactivateEvents = new EventEmitter();\n      /**\n       * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n       * previously detached subtree.\n       **/\n      this.attachEvents = new EventEmitter();\n      /**\n       * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n       * subtree.\n       */\n      this.detachEvents = new EventEmitter();\n      this.parentContexts = inject(ChildrenOutletContexts);\n      this.location = inject(ViewContainerRef);\n      this.changeDetector = inject(ChangeDetectorRef);\n      this.environmentInjector = inject(EnvironmentInjector);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      if (changes['name']) {\n        const {\n          firstChange,\n          previousValue\n        } = changes['name'];\n        if (firstChange) {\n          // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n          // input is set at all, we need to centrally handle the first change there.\n          return;\n        }\n        // unregister with the old name\n        if (this.isTrackedInParentContexts(previousValue)) {\n          this.deactivate();\n          this.parentContexts.onChildOutletDestroyed(previousValue);\n        }\n        // register the new name\n        this.initializeOutletWithName();\n      }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      // Ensure that the registered outlet is this one before removing it on the context.\n      if (this.isTrackedInParentContexts(this.name)) {\n        this.parentContexts.onChildOutletDestroyed(this.name);\n      }\n    }\n    isTrackedInParentContexts(outletName) {\n      return this.parentContexts.getContext(outletName)?.outlet === this;\n    }\n    /** @nodoc */\n    ngOnInit() {\n      this.initializeOutletWithName();\n    }\n    initializeOutletWithName() {\n      this.parentContexts.onChildOutletCreated(this.name, this);\n      if (this.activated) {\n        return;\n      }\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context?.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.injector);\n        }\n      }\n    }\n    get isActivated() {\n      return !!this.activated;\n    }\n    /**\n     * @returns The currently activated component instance.\n     * @throws An error if the outlet is not activated.\n     */\n    get component() {\n      if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n      return this.activated.instance;\n    }\n    get activatedRoute() {\n      if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n      return this._activatedRoute;\n    }\n    get activatedRouteData() {\n      if (this._activatedRoute) {\n        return this._activatedRoute.snapshot.data;\n      }\n      return {};\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree\n     */\n    detach() {\n      if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n      this.location.detach();\n      const cmp = this.activated;\n      this.activated = null;\n      this._activatedRoute = null;\n      this.detachEvents.emit(cmp.instance);\n      return cmp;\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n     */\n    attach(ref, activatedRoute) {\n      this.activated = ref;\n      this._activatedRoute = activatedRoute;\n      this.location.insert(ref.hostView);\n      this.attachEvents.emit(ref.instance);\n    }\n    deactivate() {\n      if (this.activated) {\n        const c = this.component;\n        this.activated.destroy();\n        this.activated = null;\n        this._activatedRoute = null;\n        this.deactivateEvents.emit(c);\n      }\n    }\n    activateWith(activatedRoute, resolverOrInjector) {\n      if (this.isActivated) {\n        throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$8 && 'Cannot activate an already activated outlet');\n      }\n      this._activatedRoute = activatedRoute;\n      const location = this.location;\n      const snapshot = activatedRoute.snapshot;\n      const component = snapshot.component;\n      const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n      const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n      if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {\n        const factory = resolverOrInjector.resolveComponentFactory(component);\n        this.activated = location.createComponent(factory, location.length, injector);\n      } else {\n        const environmentInjector = resolverOrInjector ?? this.environmentInjector;\n        this.activated = location.createComponent(component, {\n          index: location.length,\n          injector,\n          environmentInjector\n        });\n      }\n      // Calling `markForCheck` to make sure we will run the change detection when the\n      // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n      this.changeDetector.markForCheck();\n      this.activateEvents.emit(this.activated.instance);\n    }\n  }\n  RouterOutlet.ɵfac = function RouterOutlet_Factory(t) {\n    return new (t || RouterOutlet)();\n  };\n  RouterOutlet.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: RouterOutlet,\n    selectors: [[\"router-outlet\"]],\n    inputs: {\n      name: \"name\"\n    },\n    outputs: {\n      activateEvents: \"activate\",\n      deactivateEvents: \"deactivate\",\n      attachEvents: \"attach\",\n      detachEvents: \"detach\"\n    },\n    exportAs: [\"outlet\"],\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return RouterOutlet;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass OutletInjector {\n  constructor(route, childContexts, parent) {\n    this.route = route;\n    this.childContexts = childContexts;\n    this.parent = parent;\n  }\n  get(token, notFoundValue) {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n    return this.parent.get(token, notFoundValue);\n  }\n}\nfunction isComponentFactoryResolver(item) {\n  return !!item.resolveComponentFactory;\n}\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nlet ɵEmptyOutletComponent = /*#__PURE__*/(() => {\n  class ɵEmptyOutletComponent {}\n  ɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) {\n    return new (t || ɵEmptyOutletComponent)();\n  };\n  ɵEmptyOutletComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n    type: ɵEmptyOutletComponent,\n    selectors: [[\"ng-component\"]],\n    standalone: true,\n    features: [i0.ɵɵStandaloneFeature],\n    decls: 1,\n    vars: 0,\n    template: function ɵEmptyOutletComponent_Template(rf, ctx) {\n      if (rf & 1) {\n        i0.ɵɵelement(0, \"router-outlet\");\n      }\n    },\n    dependencies: [RouterOutlet],\n    encapsulation: 2\n  });\n  return ɵEmptyOutletComponent;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n  if (route.providers && !route._injector) {\n    route._injector = createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n  }\n  return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n  return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n  return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n  return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n  return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route = config[i];\n    const fullPath = getFullPath(parentPath, route);\n    validateNode(route, fullPath, requireStandaloneComponents);\n  }\n}\nfunction assertStandalone(fullPath, component) {\n  if (component && ɵisNgModule(component)) {\n    throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` + `but it must be used with standalone components. Use 'loadChildren' instead.`);\n  } else if (component && !isStandalone(component)) {\n    throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n  }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.redirectTo && !route.component && !route.loadComponent && !route.children && !route.loadChildren && route.outlet && route.outlet !== PRIMARY_OUTLET) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && (route.component || route.loadComponent)) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n    }\n    if (route.component && route.loadComponent) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` + `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.loadComponent && !route.children && !route.loadChildren) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (requireStandaloneComponents) {\n      assertStandalone(fullPath, route.component);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath, requireStandaloneComponents);\n  }\n}\nfunction getFullPath(parentPath, currentRoute) {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {\n    ...r,\n    children\n  } : {\n    ...r\n  };\n  if (!c.component && !c.loadComponent && (children || c.loadChildren) && c.outlet && c.outlet !== PRIMARY_OUTLET) {\n    c.component = ɵEmptyOutletComponent;\n  }\n  return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n  return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n  if (!snapshot) return null;\n  // If the current route has its own injector, which is created from the static providers on the\n  // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n  // include the lazy loaded injector from this route.\n  if (snapshot.routeConfig?._injector) {\n    return snapshot.routeConfig._injector;\n  }\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    // Note that the order here is important. `_loadedInjector` stored on the route with\n    // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n    // is created from the static providers on that parent route, so it applies to the children as\n    // well, but only if there is no lazy loaded NgModuleRef injector.\n    if (route?._loadedInjector) return route._loadedInjector;\n    if (route?._injector) return route._injector;\n  }\n  return null;\n}\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => map(t => {\n  new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent).activate(rootContexts);\n  return t;\n});\nclass ActivateRoutes {\n  constructor(routeReuseStrategy, futureState, currState, forwardEvent) {\n    this.routeReuseStrategy = routeReuseStrategy;\n    this.futureState = futureState;\n    this.currState = currState;\n    this.forwardEvent = forwardEvent;\n  }\n  activate(parentContexts) {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n  // De-activate the child route that are not re-used for the future state\n  deactivateChildRoutes(futureNode, currNode, contexts) {\n    const children = nodeChildrenAsMap(currNode);\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n    // De-activate the routes that will not be re-used\n    forEach(children, (v, childName) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n  deactivateRoutes(futureNode, currNode, parentContext) {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n  deactivateRouteAndItsChildren(route, parentContexts) {\n    // If there is no component, the Route is never attached to an outlet (because there is no\n    // component to attach).\n    if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n  detachAndStoreRouteSubtree(route, parentContexts) {\n    const context = parentContexts.getContext(route.value.outlet);\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children = nodeChildrenAsMap(route);\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {\n        componentRef,\n        route,\n        contexts\n      });\n    }\n  }\n  deactivateRouteAndOutlet(route, parentContexts) {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children = nodeChildrenAsMap(route);\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n  activateChildRoutes(futureNode, currNode, contexts) {\n    const children = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n  activateRoutes(futureNode, currNode, parentContexts) {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n    advanceActivatedRoute(future);\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRoute(stored.route.value);\n          this.activateChildRoutes(futureNode, null, context.children);\n        } else {\n          const injector = getClosestRouteInjector(future.snapshot);\n          const cmpFactoryResolver = injector?.get(ComponentFactoryResolver) ?? null;\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          context.injector = injector;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, context.injector);\n          }\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\nclass CanActivate {\n  constructor(path) {\n    this.path = path;\n    this.route = this.path[this.path.length - 1];\n  }\n}\nclass CanDeactivate {\n  constructor(component, route) {\n    this.component = component;\n    this.route = route;\n  }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {\n    node: p,\n    guards: canActivateChild\n  };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n  const NOT_FOUND = Symbol();\n  const result = injector.get(tokenOrFunction, NOT_FOUND);\n  if (result === NOT_FOUND) {\n    if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n      // We think the token is just a function so return it as-is\n      return tokenOrFunction;\n    } else {\n      // This will throw the not found error\n      return injector.get(tokenOrFunction);\n    }\n  }\n  return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n  canDeactivateChecks: [],\n  canActivateChecks: []\n}) {\n  const prevChildren = nodeChildrenAsMap(currNode);\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n  // Process any children left from the current route (not active for the future route)\n  forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n  return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n  canDeactivateChecks: [],\n  canActivateChecks: []\n}) {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n  return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams);\n    case 'always':\n      return true;\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams);\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n  forEach(children, (node, childName) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n  return typeof v === 'function';\n}\nfunction isBoolean(v) {\n  return typeof v === 'boolean';\n}\nfunction isCanLoad(guard) {\n  return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n  return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n  return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n  return guard && isFunction(guard.canDeactivate);\n}\nfunction isCanMatch(guard) {\n  return guard && isFunction(guard.canMatch);\n}\nfunction isRedirectingNavigationCancelingError(error) {\n  return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n  return error && error[NAVIGATION_CANCELING_ERROR];\n}\nfunction isEmptyError(e) {\n  return e instanceof EmptyError || e?.name === 'EmptyError';\n}\nconst INITIAL_VALUE = /*#__PURE__*/Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE)))).pipe(map(results => {\n      for (const result of results) {\n        if (result === true) {\n          // If result is true, check the next one\n          continue;\n        } else if (result === INITIAL_VALUE) {\n          // If guard has not finished, we need to stop processing.\n          return INITIAL_VALUE;\n        } else if (result === false || result instanceof UrlTree) {\n          // Result finished and was not true. Return the result.\n          // Note that we only allow false/UrlTree. Other values are considered invalid and\n          // ignored.\n          return result;\n        }\n      }\n      // Everything resolved to true. Return true.\n      return true;\n    }), filter(item => item !== INITIAL_VALUE), take(1));\n  });\n}\nfunction checkGuards(injector, forwardEvent) {\n  return mergeMap(t => {\n    const {\n      targetSnapshot,\n      currentSnapshot,\n      guards: {\n        canActivateChecks,\n        canDeactivateChecks\n      }\n    } = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({\n        ...t,\n        guardsResult: true\n      });\n    }\n    return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector).pipe(mergeMap(canDeactivate => {\n      return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) : of(canDeactivate);\n    }), map(guardsResult => ({\n      ...t,\n      guardsResult\n    })));\n  });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n  return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {\n    return result !== true;\n  }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n  return from(checks).pipe(concatMap(check => {\n    return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n  }), first(result => {\n    return result !== true;\n  }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, injector) {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n  const canActivateObservables = canActivate.map(canActivate => {\n    return defer(() => {\n      const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n      const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n      const guardVal = isCanActivate(guard) ? guard.canActivate(futureARS, futureRSS) : closestInjector.runInContext(() => guard(futureARS, futureRSS));\n      return wrapIntoObservable(guardVal).pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n  const futureARS = path[path.length - 1];\n  const canActivateChildGuards = path.slice(0, path.length - 1).reverse().map(p => getCanActivateChild(p)).filter(_ => _ !== null);\n  const canActivateChildGuardsMapped = canActivateChildGuards.map(d => {\n    return defer(() => {\n      const guardsMapped = d.guards.map(canActivateChild => {\n        const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n        const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n        const guardVal = isCanActivateChild(guard) ? guard.canActivateChild(futureARS, futureRSS) : closestInjector.runInContext(() => guard(futureARS, futureRSS));\n        return wrapIntoObservable(guardVal).pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map(c => {\n    const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n    const guard = getTokenOrFunctionIdentity(c, closestInjector);\n    const guardVal = isCanDeactivate(guard) ? guard.canDeactivate(component, currARS, currRSS, futureRSS) : closestInjector.runInContext(() => guard(component, currARS, currRSS, futureRSS));\n    return wrapIntoObservable(guardVal).pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n  const canLoad = route.canLoad;\n  if (canLoad === undefined || canLoad.length === 0) {\n    return of(true);\n  }\n  const canLoadObservables = canLoad.map(injectionToken => {\n    const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n    const guardVal = isCanLoad(guard) ? guard.canLoad(route, segments) : injector.runInContext(() => guard(route, segments));\n    return wrapIntoObservable(guardVal);\n  });\n  return of(canLoadObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n  return pipe(tap(result => {\n    if (!isUrlTree(result)) return;\n    throw redirectingNavigationError(urlSerializer, result);\n  }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n  const canMatch = route.canMatch;\n  if (!canMatch || canMatch.length === 0) return of(true);\n  const canMatchObservables = canMatch.map(injectionToken => {\n    const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n    const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : injector.runInContext(() => guard(route, segments));\n    return wrapIntoObservable(guardVal);\n  });\n  return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nconst noMatch$1 = {\n  matched: false,\n  consumedSegments: [],\n  remainingSegments: [],\n  parameters: {},\n  positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n  const result = match(segmentGroup, route, segments);\n  if (!result.matched) {\n    return of(result);\n  }\n  // Only create the Route's `EnvironmentInjector` if it matches the attempted\n  // navigation\n  injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n  return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(map(v => v === true ? result : {\n    ...noMatch$1\n  }));\n}\nfunction match(segmentGroup, route, segments) {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {\n        ...noMatch$1\n      };\n    }\n    return {\n      matched: true,\n      consumedSegments: [],\n      remainingSegments: segments,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {\n    ...noMatch$1\n  };\n  const posParams = {};\n  forEach(res.posParams, (v, k) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ? {\n    ...posParams,\n    ...res.consumed[res.consumed.length - 1].parameters\n  } : posParams;\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    remainingSegments: segments.slice(res.consumed.length),\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n  if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {\n      segmentGroup: s,\n      slicedSegments: []\n    };\n  }\n  if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {\n      segmentGroup: s,\n      slicedSegments\n    };\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {\n    segmentGroup: s,\n    slicedSegments\n  };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children) {\n  const res = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {\n    ...children,\n    ...res\n  };\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n  const res = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n  return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\nconst NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass NoMatch$1 {\n  constructor(segmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\nclass AbsoluteRedirect {\n  constructor(urlTree) {\n    this.urlTree = urlTree;\n  }\n}\nfunction noMatch(segmentGroup) {\n  return throwError(new NoMatch$1(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n  return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n  return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$7 && `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n  return throwError(navigationCancelingError(NG_DEV_MODE$7 && `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects$1(injector, configLoader, urlSerializer, urlTree, config) {\n  return new ApplyRedirects(injector, configLoader, urlSerializer, urlTree, config).apply();\n}\nclass ApplyRedirects {\n  constructor(injector, configLoader, urlSerializer, urlTree, config) {\n    this.injector = injector;\n    this.configLoader = configLoader;\n    this.urlSerializer = urlSerializer;\n    this.urlTree = urlTree;\n    this.config = config;\n    this.allowRedirects = true;\n  }\n  apply() {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n    const expanded$ = this.expandSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map(rootSegmentGroup => {\n      return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError(e => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n      if (e instanceof NoMatch$1) {\n        throw this.noMatchError(e);\n      }\n      throw e;\n    }));\n  }\n  match(tree) {\n    const expanded$ = this.expandSegmentGroup(this.injector, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map(rootSegmentGroup => {\n      return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError(e => {\n      if (e instanceof NoMatch$1) {\n        throw this.noMatchError(e);\n      }\n      throw e;\n    }));\n  }\n  noMatchError(e) {\n    return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$7 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n  createUrlTree(rootCandidate, queryParams, fragment) {\n    const root = createRoot(rootCandidate);\n    return new UrlTree(root, queryParams, fragment);\n  }\n  expandSegmentGroup(injector, routes, segmentGroup, outlet) {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(injector, routes, segmentGroup).pipe(map(children => new UrlSegmentGroup([], children)));\n    }\n    return this.expandSegment(injector, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n  // Recursively expand segment groups for all the child outlets\n  expandChildren(injector, routes, segmentGroup) {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n    return from(childOutlets).pipe(concatMap(childOutlet => {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the routes so routes with outlets that match the segment appear\n      // first, followed by routes for other outlets, which might match if they have an\n      // empty path.\n      const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n      return this.expandSegmentGroup(injector, sortedRoutes, child, childOutlet).pipe(map(s => ({\n        segment: s,\n        outlet: childOutlet\n      })));\n    }), scan((children, expandedChild) => {\n      children[expandedChild.outlet] = expandedChild.segment;\n      return children;\n    }, {}), last$1());\n  }\n  expandSegment(injector, segmentGroup, routes, segments, outlet, allowRedirects) {\n    return from(routes).pipe(concatMap(r => {\n      const expanded$ = this.expandSegmentAgainstRoute(injector, segmentGroup, routes, r, segments, outlet, allowRedirects);\n      return expanded$.pipe(catchError(e => {\n        if (e instanceof NoMatch$1) {\n          return of(null);\n        }\n        throw e;\n      }));\n    }), first(s => !!s), catchError((e, _) => {\n      if (isEmptyError(e)) {\n        if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n          return of(new UrlSegmentGroup([], {}));\n        }\n        return noMatch(segmentGroup);\n      }\n      throw e;\n    }));\n  }\n  expandSegmentAgainstRoute(injector, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(injector, segmentGroup, route, paths, outlet);\n    }\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, paths, outlet);\n    }\n    return noMatch(segmentGroup);\n  }\n  expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet);\n    }\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet);\n  }\n  expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet) {\n    const newTree = this.applyRedirectCommands([], route.redirectTo, {});\n    if (route.redirectTo.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap(newSegments => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(injector, group, routes, newSegments, outlet, false);\n    }));\n  }\n  expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n    const {\n      matched,\n      consumedSegments,\n      remainingSegments,\n      positionalParamSegments\n    } = match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n    const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n    if (route.redirectTo.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap(newSegments => {\n      return this.expandSegment(injector, segmentGroup, routes, newSegments.concat(remainingSegments), outlet, false);\n    }));\n  }\n  matchSegmentAgainstRoute(injector, rawSegmentGroup, route, segments, outlet) {\n    if (route.path === '**') {\n      // Only create the Route's `EnvironmentInjector` if it matches the attempted navigation\n      injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n      if (route.loadChildren) {\n        const loaded$ = route._loadedRoutes ? of({\n          routes: route._loadedRoutes,\n          injector: route._loadedInjector\n        }) : this.configLoader.loadChildren(injector, route);\n        return loaded$.pipe(map(cfg => {\n          route._loadedRoutes = cfg.routes;\n          route._loadedInjector = cfg.injector;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n    return matchWithChecks(rawSegmentGroup, route, segments, injector, this.urlSerializer).pipe(switchMap(({\n      matched,\n      consumedSegments,\n      remainingSegments\n    }) => {\n      if (!matched) return noMatch(rawSegmentGroup);\n      // If the route has an injector created from providers, we should start using that.\n      injector = route._injector ?? injector;\n      const childConfig$ = this.getChildConfig(injector, route, segments);\n      return childConfig$.pipe(mergeMap(routerConfig => {\n        const childInjector = routerConfig.injector ?? injector;\n        const childConfig = routerConfig.routes;\n        const {\n          segmentGroup: splitSegmentGroup,\n          slicedSegments\n        } = split(rawSegmentGroup, consumedSegments, remainingSegments, childConfig);\n        // See comment on the other call to `split` about why this is necessary.\n        const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n        if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n          const expanded$ = this.expandChildren(childInjector, childConfig, segmentGroup);\n          return expanded$.pipe(map(children => new UrlSegmentGroup(consumedSegments, children)));\n        }\n        if (childConfig.length === 0 && slicedSegments.length === 0) {\n          return of(new UrlSegmentGroup(consumedSegments, {}));\n        }\n        const matchedOnOutlet = getOutlet(route) === outlet;\n        const expanded$ = this.expandSegment(childInjector, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n        return expanded$.pipe(map(cs => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n      }));\n    }));\n  }\n  getChildConfig(injector, route, segments) {\n    if (route.children) {\n      // The children belong to the same module\n      return of({\n        routes: route.children,\n        injector\n      });\n    }\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedRoutes !== undefined) {\n        return of({\n          routes: route._loadedRoutes,\n          injector: route._loadedInjector\n        });\n      }\n      return runCanLoadGuards(injector, route, segments, this.urlSerializer).pipe(mergeMap(shouldLoadResult => {\n        if (shouldLoadResult) {\n          return this.configLoader.loadChildren(injector, route).pipe(tap(cfg => {\n            route._loadedRoutes = cfg.routes;\n            route._loadedInjector = cfg.injector;\n          }));\n        }\n        return canLoadFails(route);\n      }));\n    }\n    return of({\n      routes: [],\n      injector\n    });\n  }\n  lineralizeSegments(route, urlTree) {\n    let res = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo);\n      }\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n  applyRedirectCommands(segments, redirectTo, posParams) {\n    return this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n  applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n  }\n  createQueryParams(redirectToParams, actualParams) {\n    const res = {};\n    forEach(redirectToParams, (v, k) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n  createSegmentGroup(redirectTo, group, segments, posParams) {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n    let children = {};\n    forEach(group.children, (child, name) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n  createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n    return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) : this.findOrReturn(s, actualSegments));\n  }\n  findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos) throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$7 && `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n  findOrReturn(redirectToUrlSegment, actualSegments) {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\nfunction applyRedirects(environmentInjector, configLoader, urlSerializer, config) {\n  return switchMap(t => applyRedirects$1(environmentInjector, configLoader, urlSerializer, t.extractedUrl, config).pipe(map(urlAfterRedirects => ({\n    ...t,\n    urlAfterRedirects\n  }))));\n}\nconst NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NoMatch {}\nfunction newObservableError(e) {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable(obs => obs.error(e));\n}\nfunction recognize$1(injector, rootComponentType, config, urlTree, url, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n  return new Recognizer(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer).recognize().pipe(switchMap(result => {\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  }));\n}\nclass Recognizer {\n  constructor(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer) {\n    this.injector = injector;\n    this.rootComponentType = rootComponentType;\n    this.config = config;\n    this.urlTree = urlTree;\n    this.url = url;\n    this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n    this.urlSerializer = urlSerializer;\n  }\n  recognize() {\n    const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined)).segmentGroup;\n    return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET).pipe(map(children => {\n      if (children === null) {\n        return null;\n      }\n      // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n      // navigation, resulting in the router being out of sync with the browser.\n      const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({\n        ...this.urlTree.queryParams\n      }), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n      const rootNode = new TreeNode(root, children);\n      const routeState = new RouterStateSnapshot(this.url, rootNode);\n      this.inheritParamsAndData(routeState._root);\n      return routeState;\n    }));\n  }\n  inheritParamsAndData(routeNode) {\n    const route = routeNode.value;\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n  processSegmentGroup(injector, config, segmentGroup, outlet) {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(injector, config, segmentGroup);\n    }\n    return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet);\n  }\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(injector, config, segmentGroup) {\n    return from(Object.keys(segmentGroup.children)).pipe(concatMap(childOutlet => {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated\n      // appear first, followed by routes for other outlets, which might match if they have\n      // an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      return this.processSegmentGroup(injector, sortedConfig, child, childOutlet);\n    }), scan((children, outletChildren) => {\n      if (!children || !outletChildren) return null;\n      children.push(...outletChildren);\n      return children;\n    }), takeWhile(children => children !== null), defaultIfEmpty(null), last$1(), map(children => {\n      if (children === null) return null;\n      // Because we may have matched two outlets to the same empty path segment, we can have\n      // multiple activated results for the same outlet. We should merge the children of\n      // these results so the final return value is only one `TreeNode` per outlet.\n      const mergedChildren = mergeEmptyPathMatches(children);\n      if (NG_DEV_MODE$6) {\n        // This should really never happen - we are only taking the first match for each\n        // outlet and merge the empty path matches.\n        checkOutletNameUniqueness(mergedChildren);\n      }\n      sortActivatedRouteSnapshots(mergedChildren);\n      return mergedChildren;\n    }));\n  }\n  processSegment(injector, routes, segmentGroup, segments, outlet) {\n    return from(routes).pipe(concatMap(r => {\n      return this.processSegmentAgainstRoute(r._injector ?? injector, r, segmentGroup, segments, outlet);\n    }), first(x => !!x), catchError(e => {\n      if (isEmptyError(e)) {\n        if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n          return of([]);\n        }\n        return of(null);\n      }\n      throw e;\n    }));\n  }\n  processSegmentAgainstRoute(injector, route, rawSegment, segments, outlet) {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return of(null);\n    let matchResult;\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments).parameters : {};\n      const pathIndexShift = getPathIndexShift(rawSegment) + segments.length;\n      const snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze({\n        ...this.urlTree.queryParams\n      }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n      matchResult = of({\n        snapshot,\n        consumedSegments: [],\n        remainingSegments: []\n      });\n    } else {\n      matchResult = matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer).pipe(map(({\n        matched,\n        consumedSegments,\n        remainingSegments,\n        parameters\n      }) => {\n        if (!matched) {\n          return null;\n        }\n        const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;\n        const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({\n          ...this.urlTree.queryParams\n        }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n        return {\n          snapshot,\n          consumedSegments,\n          remainingSegments\n        };\n      }));\n    }\n    return matchResult.pipe(switchMap(result => {\n      if (result === null) {\n        return of(null);\n      }\n      const {\n        snapshot,\n        consumedSegments,\n        remainingSegments\n      } = result;\n      // If the route has an injector created from providers, we should start using that.\n      injector = route._injector ?? injector;\n      const childInjector = route._loadedInjector ?? injector;\n      const childConfig = getChildConfig(route);\n      const {\n        segmentGroup,\n        slicedSegments\n      } = split(rawSegment, consumedSegments, remainingSegments,\n      // Filter out routes with redirectTo because we are trying to create activated route\n      // snapshots and don't handle redirects here. That should have been done in\n      // `applyRedirects`.\n      childConfig.filter(c => c.redirectTo === undefined));\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        return this.processChildren(childInjector, childConfig, segmentGroup).pipe(map(children => {\n          if (children === null) {\n            return null;\n          }\n          return [new TreeNode(snapshot, children)];\n        }));\n      }\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of([new TreeNode(snapshot, [])]);\n      }\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      // If we matched a config due to empty path match on a different outlet, we need to\n      // continue passing the current outlet for the segment rather than switch to PRIMARY.\n      // Note that we switch to primary when we have a match because outlet configs look like\n      // this: {path: 'a', outlet: 'a', children: [\n      //  {path: 'b', component: B},\n      //  {path: 'c', component: C},\n      // ]}\n      // Notice that the children of the named outlet are configured with the primary outlet\n      return this.processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet).pipe(map(children => {\n        if (children === null) {\n          return null;\n        }\n        return [new TreeNode(snapshot, children)];\n      }));\n    }));\n  }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\nfunction getChildConfig(route) {\n  if (route.children) {\n    return route.children;\n  }\n  if (route.loadChildren) {\n    return route._loadedRoutes;\n  }\n  return [];\n}\nfunction hasEmptyPathConfig(node) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n  const result = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes = new Set();\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n    const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs\n  // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n  // if any of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n  const names = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$6 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\nfunction getSourceSegmentGroup(segmentGroup) {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n  let s = segmentGroup;\n  let res = s._segmentIndexShift ?? 0;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += s._segmentIndexShift ?? 0;\n  }\n  return res - 1;\n}\nfunction getCorrectedPathIndexShift(segmentGroup) {\n  let s = segmentGroup;\n  let res = s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n  }\n  return res - 1;\n}\nfunction getData(route) {\n  return route.data || {};\n}\nfunction getResolve(route) {\n  return route.resolve || {};\n}\nfunction recognize(injector, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n  return mergeMap(t => recognize$1(injector, rootComponentType, config, t.urlAfterRedirects, serializer.serialize(t.urlAfterRedirects), serializer, paramsInheritanceStrategy).pipe(map(targetSnapshot => ({\n    ...t,\n    targetSnapshot\n  }))));\n}\nfunction resolveData(paramsInheritanceStrategy, injector) {\n  return mergeMap(t => {\n    const {\n      targetSnapshot,\n      guards: {\n        canActivateChecks\n      }\n    } = t;\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks).pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, injector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));\n  });\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n  const config = futureARS.routeConfig;\n  const resolve = futureARS._resolve;\n  if (config?.title !== undefined && !hasStaticTitle(config)) {\n    resolve[RouteTitleKey] = config.title;\n  }\n  return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map(resolvedData => {\n    futureARS._resolvedData = resolvedData;\n    futureARS.data = inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve;\n    if (config && hasStaticTitle(config)) {\n      futureARS.data[RouteTitleKey] = config.title;\n    }\n    return null;\n  }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n  const keys = getDataKeys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data = {};\n  return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector).pipe(first(), tap(value => {\n    data[key] = value;\n  }))), takeLast(1), mapTo(data), catchError(e => isEmptyError(e) ? EMPTY : throwError(e)));\n}\nfunction getDataKeys(obj) {\n  return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n  const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n  const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n  const resolverValue = resolver.resolve ? resolver.resolve(futureARS, futureRSS) : closestInjector.runInContext(() => resolver(futureARS, futureRSS));\n  return wrapIntoObservable(resolverValue);\n}\nfunction hasStaticTitle(config) {\n  return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n\n// This file exists to support the legacy `loadChildren: string` behavior being patched back into\n// Angular.\nfunction deprecatedLoadChildrenString(injector, loadChildren) {\n  return null;\n}\nconst NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = /*#__PURE__*/new InjectionToken('ROUTES');\nlet RouterConfigLoader = /*#__PURE__*/(() => {\n  class RouterConfigLoader {\n    constructor(injector, compiler) {\n      this.injector = injector;\n      this.compiler = compiler;\n      this.componentLoaders = new WeakMap();\n      this.childrenLoaders = new WeakMap();\n    }\n    loadComponent(route) {\n      if (this.componentLoaders.get(route)) {\n        return this.componentLoaders.get(route);\n      } else if (route._loadedComponent) {\n        return of(route._loadedComponent);\n      }\n      if (this.onLoadStartListener) {\n        this.onLoadStartListener(route);\n      }\n      const loadRunner = wrapIntoObservable(route.loadComponent()).pipe(map(maybeUnwrapDefaultExport), tap(component => {\n        if (this.onLoadEndListener) {\n          this.onLoadEndListener(route);\n        }\n        NG_DEV_MODE$5 && assertStandalone(route.path ?? '', component);\n        route._loadedComponent = component;\n      }), finalize(() => {\n        this.componentLoaders.delete(route);\n      }));\n      // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n      const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n      this.componentLoaders.set(route, loader);\n      return loader;\n    }\n    loadChildren(parentInjector, route) {\n      if (this.childrenLoaders.get(route)) {\n        return this.childrenLoaders.get(route);\n      } else if (route._loadedRoutes) {\n        return of({\n          routes: route._loadedRoutes,\n          injector: route._loadedInjector\n        });\n      }\n      if (this.onLoadStartListener) {\n        this.onLoadStartListener(route);\n      }\n      const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);\n      const loadRunner = moduleFactoryOrRoutes$.pipe(map(factoryOrRoutes => {\n        if (this.onLoadEndListener) {\n          this.onLoadEndListener(route);\n        }\n        // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no\n        // injector associated with lazy loading a `Route` array.\n        let injector;\n        let rawRoutes;\n        let requireStandaloneComponents = false;\n        if (Array.isArray(factoryOrRoutes)) {\n          rawRoutes = factoryOrRoutes;\n          requireStandaloneComponents = true;\n        } else {\n          injector = factoryOrRoutes.create(parentInjector).injector;\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));\n        }\n        const routes = rawRoutes.map(standardizeConfig);\n        NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);\n        return {\n          routes,\n          injector\n        };\n      }), finalize(() => {\n        this.childrenLoaders.delete(route);\n      }));\n      // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n      const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n      this.childrenLoaders.set(route, loader);\n      return loader;\n    }\n    loadModuleFactoryOrRoutes(loadChildren) {\n      const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);\n      if (deprecatedResult) {\n        return deprecatedResult;\n      }\n      return wrapIntoObservable(loadChildren()).pipe(map(maybeUnwrapDefaultExport), mergeMap(t => {\n        if (t instanceof NgModuleFactory || Array.isArray(t)) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n  RouterConfigLoader.ɵfac = function RouterConfigLoader_Factory(t) {\n    return new (t || RouterConfigLoader)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i0.Compiler));\n  };\n  RouterConfigLoader.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: RouterConfigLoader,\n    factory: RouterConfigLoader.ɵfac,\n    providedIn: 'root'\n  });\n  return RouterConfigLoader;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isWrappedDefaultExport(value) {\n  // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n  // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n  // `default` will be a renamed property.\n  return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n  // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n  // subject to property renaming, so we reference it with bracket access.\n  return isWrappedDefaultExport(input) ? input['default'] : input;\n}\nconst NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nlet NavigationTransitions = /*#__PURE__*/(() => {\n  class NavigationTransitions {\n    get hasRequestedNavigation() {\n      return this.navigationId !== 0;\n    }\n    constructor() {\n      this.currentNavigation = null;\n      this.lastSuccessfulNavigation = null;\n      this.events = new Subject();\n      this.configLoader = inject(RouterConfigLoader);\n      this.environmentInjector = inject(EnvironmentInjector);\n      this.urlSerializer = inject(UrlSerializer);\n      this.rootContexts = inject(ChildrenOutletContexts);\n      this.navigationId = 0;\n      /**\n       * Hook that enables you to pause navigation after the preactivation phase.\n       * Used by `RouterModule`.\n       *\n       * @internal\n       */\n      this.afterPreactivation = () => of(void 0);\n      /** @internal */\n      this.rootComponentType = null;\n      const onLoadStart = r => this.events.next(new RouteConfigLoadStart(r));\n      const onLoadEnd = r => this.events.next(new RouteConfigLoadEnd(r));\n      this.configLoader.onLoadEndListener = onLoadEnd;\n      this.configLoader.onLoadStartListener = onLoadStart;\n    }\n    complete() {\n      this.transitions?.complete();\n    }\n    handleNavigationRequest(request) {\n      const id = ++this.navigationId;\n      this.transitions?.next({\n        ...this.transitions.value,\n        ...request,\n        id\n      });\n    }\n    setupNavigations(router) {\n      this.transitions = new BehaviorSubject({\n        id: 0,\n        targetPageId: 0,\n        currentUrlTree: router.currentUrlTree,\n        currentRawUrl: router.currentUrlTree,\n        extractedUrl: router.urlHandlingStrategy.extract(router.currentUrlTree),\n        urlAfterRedirects: router.urlHandlingStrategy.extract(router.currentUrlTree),\n        rawUrl: router.currentUrlTree,\n        extras: {},\n        resolve: null,\n        reject: null,\n        promise: Promise.resolve(true),\n        source: IMPERATIVE_NAVIGATION,\n        restoredState: null,\n        currentSnapshot: router.routerState.snapshot,\n        targetSnapshot: null,\n        currentRouterState: router.routerState,\n        targetRouterState: null,\n        guards: {\n          canActivateChecks: [],\n          canDeactivateChecks: []\n        },\n        guardsResult: null\n      });\n      return this.transitions.pipe(filter(t => t.id !== 0),\n      // Extract URL\n      map(t => ({\n        ...t,\n        extractedUrl: router.urlHandlingStrategy.extract(t.rawUrl)\n      })),\n      // Using switchMap so we cancel executing navigations when a new one comes in\n      switchMap(overallTransitionState => {\n        let completed = false;\n        let errored = false;\n        return of(overallTransitionState).pipe(\n        // Store the Navigation object\n        tap(t => {\n          this.currentNavigation = {\n            id: t.id,\n            initialUrl: t.rawUrl,\n            extractedUrl: t.extractedUrl,\n            trigger: t.source,\n            extras: t.extras,\n            previousNavigation: !this.lastSuccessfulNavigation ? null : {\n              ...this.lastSuccessfulNavigation,\n              previousNavigation: null\n            }\n          };\n        }), switchMap(t => {\n          const browserUrlTree = router.browserUrlTree.toString();\n          const urlTransition = !router.navigated || t.extractedUrl.toString() !== browserUrlTree ||\n          // Navigations which succeed or ones which fail and are cleaned up\n          // correctly should result in `browserUrlTree` and `currentUrlTree`\n          // matching. If this is not the case, assume something went wrong and\n          // try processing the URL again.\n          browserUrlTree !== router.currentUrlTree.toString();\n          const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n          if (!urlTransition && onSameUrlNavigation !== 'reload') {\n            const reason = NG_DEV_MODE$4 ? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` : '';\n            this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.rawUrl), reason, 0 /* NavigationSkippedCode.IgnoredSameUrlNavigation */));\n            router.rawUrlTree = t.rawUrl;\n            t.resolve(null);\n            return EMPTY;\n          }\n          if (router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n            // If the source of the navigation is from a browser event, the URL is\n            // already updated. We already need to sync the internal state.\n            if (isBrowserTriggeredNavigation(t.source)) {\n              router.browserUrlTree = t.extractedUrl;\n            }\n            return of(t).pipe(\n            // Fire NavigationStart event\n            switchMap(t => {\n              const transition = this.transitions?.getValue();\n              this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n              if (transition !== this.transitions?.getValue()) {\n                return EMPTY;\n              }\n              // This delay is required to match old behavior that forced\n              // navigation to always be async\n              return Promise.resolve(t);\n            }),\n            // ApplyRedirects\n            applyRedirects(this.environmentInjector, this.configLoader, this.urlSerializer, router.config),\n            // Update the currentNavigation\n            // `urlAfterRedirects` is guaranteed to be set after this point\n            tap(t => {\n              this.currentNavigation = {\n                ...this.currentNavigation,\n                finalUrl: t.urlAfterRedirects\n              };\n              overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n            }),\n            // Recognize\n            recognize(this.environmentInjector, this.rootComponentType, router.config, this.urlSerializer, router.paramsInheritanceStrategy),\n            // Update URL if in `eager` update mode\n            tap(t => {\n              overallTransitionState.targetSnapshot = t.targetSnapshot;\n              if (router.urlUpdateStrategy === 'eager') {\n                if (!t.extras.skipLocationChange) {\n                  const rawUrl = router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n                  router.setBrowserUrl(rawUrl, t);\n                }\n                router.browserUrlTree = t.urlAfterRedirects;\n              }\n              // Fire RoutesRecognized\n              const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n              this.events.next(routesRecognized);\n            }));\n          } else if (urlTransition && router.urlHandlingStrategy.shouldProcessUrl(router.rawUrlTree)) {\n            /* When the current URL shouldn't be processed, but the previous one\n             * was, we handle this \"error condition\" by navigating to the\n             * previously successful URL, but leaving the URL intact.*/\n            const {\n              id,\n              extractedUrl,\n              source,\n              restoredState,\n              extras\n            } = t;\n            const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n            this.events.next(navStart);\n            const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n            overallTransitionState = {\n              ...t,\n              targetSnapshot,\n              urlAfterRedirects: extractedUrl,\n              extras: {\n                ...extras,\n                skipLocationChange: false,\n                replaceUrl: false\n              }\n            };\n            return of(overallTransitionState);\n          } else {\n            /* When neither the current or previous URL can be processed, do\n             * nothing other than update router's internal reference to the\n             * current \"settled\" URL. This way the next navigation will be coming\n             * from the current URL in the browser.\n             */\n            const reason = NG_DEV_MODE$4 ? `Navigation was ignored because the UrlHandlingStrategy` + ` indicated neither the current URL ${router.rawUrlTree} nor target URL ${t.rawUrl} should be processed.` : '';\n            this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.extractedUrl), reason, 1 /* NavigationSkippedCode.IgnoredByUrlHandlingStrategy */));\n            router.rawUrlTree = t.rawUrl;\n            t.resolve(null);\n            return EMPTY;\n          }\n        }),\n        // --- GUARDS ---\n        tap(t => {\n          const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n          this.events.next(guardsStart);\n        }), map(t => {\n          overallTransitionState = {\n            ...t,\n            guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n          };\n          return overallTransitionState;\n        }), checkGuards(this.environmentInjector, evt => this.events.next(evt)), tap(t => {\n          overallTransitionState.guardsResult = t.guardsResult;\n          if (isUrlTree(t.guardsResult)) {\n            throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n          }\n          const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n          this.events.next(guardsEnd);\n        }), filter(t => {\n          if (!t.guardsResult) {\n            router.restoreHistory(t);\n            this.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */);\n            return false;\n          }\n          return true;\n        }),\n        // --- RESOLVE ---\n        switchTap(t => {\n          if (t.guards.canActivateChecks.length) {\n            return of(t).pipe(tap(t => {\n              const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n              this.events.next(resolveStart);\n            }), switchMap(t => {\n              let dataResolved = false;\n              return of(t).pipe(resolveData(router.paramsInheritanceStrategy, this.environmentInjector), tap({\n                next: () => dataResolved = true,\n                complete: () => {\n                  if (!dataResolved) {\n                    router.restoreHistory(t);\n                    this.cancelNavigationTransition(t, NG_DEV_MODE$4 ? `At least one route resolver didn't emit any value.` : '', 2 /* NavigationCancellationCode.NoDataFromResolver */);\n                  }\n                }\n              }));\n            }), tap(t => {\n              const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n              this.events.next(resolveEnd);\n            }));\n          }\n          return undefined;\n        }),\n        // --- LOAD COMPONENTS ---\n        switchTap(t => {\n          const loadComponents = route => {\n            const loaders = [];\n            if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {\n              loaders.push(this.configLoader.loadComponent(route.routeConfig).pipe(tap(loadedComponent => {\n                route.component = loadedComponent;\n              }), map(() => void 0)));\n            }\n            for (const child of route.children) {\n              loaders.push(...loadComponents(child));\n            }\n            return loaders;\n          };\n          return combineLatest(loadComponents(t.targetSnapshot.root)).pipe(defaultIfEmpty(), take(1));\n        }), switchTap(() => this.afterPreactivation()), map(t => {\n          const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n          overallTransitionState = {\n            ...t,\n            targetRouterState\n          };\n          return overallTransitionState;\n        }),\n        /* Once here, we are about to activate synchronously. The assumption is\n           this will succeed, and user code may read from the Router service.\n           Therefore before activation, we need to update router properties storing\n           the current URL and the RouterState, as well as updated the browser URL.\n           All this should happen *before* activating. */\n        tap(t => {\n          router.currentUrlTree = t.urlAfterRedirects;\n          router.rawUrlTree = router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n          router.routerState = t.targetRouterState;\n          if (router.urlUpdateStrategy === 'deferred') {\n            if (!t.extras.skipLocationChange) {\n              router.setBrowserUrl(router.rawUrlTree, t);\n            }\n            router.browserUrlTree = t.urlAfterRedirects;\n          }\n        }), activateRoutes(this.rootContexts, router.routeReuseStrategy, evt => this.events.next(evt)), tap({\n          next: t => {\n            completed = true;\n            this.lastSuccessfulNavigation = this.currentNavigation;\n            router.navigated = true;\n            this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(router.currentUrlTree)));\n            router.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n            t.resolve(true);\n          },\n          complete: () => {\n            completed = true;\n          }\n        }), finalize(() => {\n          /* When the navigation stream finishes either through error or success,\n           * we set the `completed` or `errored` flag. However, there are some\n           * situations where we could get here without either of those being set.\n           * For instance, a redirect during NavigationStart. Therefore, this is a\n           * catch-all to make sure the NavigationCancel event is fired when a\n           * navigation gets cancelled but not caught by other means. */\n          if (!completed && !errored) {\n            const cancelationReason = NG_DEV_MODE$4 ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}` : '';\n            this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);\n          }\n          // Only clear current navigation if it is still set to the one that\n          // finalized.\n          if (this.currentNavigation?.id === overallTransitionState.id) {\n            this.currentNavigation = null;\n          }\n        }), catchError(e => {\n          errored = true;\n          /* This error type is issued during Redirect, and is handled as a\n           * cancellation rather than an error. */\n          if (isNavigationCancelingError$1(e)) {\n            if (!isRedirectingNavigationCancelingError$1(e)) {\n              // Set property only if we're not redirecting. If we landed on a page\n              // and redirect to `/` route, the new navigation is going to see the\n              // `/` isn't a change from the default currentUrlTree and won't\n              // navigate. This is only applicable with initial navigation, so\n              // setting `navigated` only when not redirecting resolves this\n              // scenario.\n              router.navigated = true;\n              router.restoreHistory(overallTransitionState, true);\n            }\n            const navCancel = new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode);\n            this.events.next(navCancel);\n            // When redirecting, we need to delay resolving the navigation\n            // promise and push it to the redirect navigation\n            if (!isRedirectingNavigationCancelingError$1(e)) {\n              overallTransitionState.resolve(false);\n            } else {\n              const mergedTree = router.urlHandlingStrategy.merge(e.url, router.rawUrlTree);\n              const extras = {\n                skipLocationChange: overallTransitionState.extras.skipLocationChange,\n                // The URL is already updated at this point if we have 'eager' URL\n                // updates or if the navigation was triggered by the browser (back\n                // button, URL bar, etc). We want to replace that item in history\n                // if the navigation is rejected.\n                replaceUrl: router.urlUpdateStrategy === 'eager' || isBrowserTriggeredNavigation(overallTransitionState.source)\n              };\n              router.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n                resolve: overallTransitionState.resolve,\n                reject: overallTransitionState.reject,\n                promise: overallTransitionState.promise\n              });\n            }\n            /* All other errors should reset to the router's internal URL reference\n             * to the pre-error state. */\n          } else {\n            router.restoreHistory(overallTransitionState, true);\n            const navError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n            this.events.next(navError);\n            try {\n              overallTransitionState.resolve(router.errorHandler(e));\n            } catch (ee) {\n              overallTransitionState.reject(ee);\n            }\n          }\n          return EMPTY;\n        }));\n        // casting because `pipe` returns observable({}) when called with 8+ arguments\n      }));\n    }\n\n    cancelNavigationTransition(t, reason, code) {\n      const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n      this.events.next(navCancel);\n      t.resolve(false);\n    }\n  }\n  NavigationTransitions.ɵfac = function NavigationTransitions_Factory(t) {\n    return new (t || NavigationTransitions)();\n  };\n  NavigationTransitions.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: NavigationTransitions,\n    factory: NavigationTransitions.ɵfac,\n    providedIn: 'root'\n  });\n  return NavigationTransitions;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isBrowserTriggeredNavigation(source) {\n  return source !== IMPERATIVE_NAVIGATION;\n}\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n *   {path: 'base', title: 'base', children: [\n *     {path: 'child', title: 'child'},\n *   ],\n *   {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/router#setting-the-page-title)\n */\nlet TitleStrategy = /*#__PURE__*/(() => {\n  class TitleStrategy {\n    /**\n     * @returns The `title` of the deepest primary route.\n     */\n    buildTitle(snapshot) {\n      let pageTitle;\n      let route = snapshot.root;\n      while (route !== undefined) {\n        pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n        route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n      }\n      return pageTitle;\n    }\n    /**\n     * Given an `ActivatedRouteSnapshot`, returns the final value of the\n     * `Route.title` property, which can either be a static string or a resolved value.\n     */\n    getResolvedTitleForRoute(snapshot) {\n      return snapshot.data[RouteTitleKey];\n    }\n  }\n  TitleStrategy.ɵfac = function TitleStrategy_Factory(t) {\n    return new (t || TitleStrategy)();\n  };\n  TitleStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: TitleStrategy,\n    factory: function () {\n      return (() => inject(DefaultTitleStrategy))();\n    },\n    providedIn: 'root'\n  });\n  return TitleStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nlet DefaultTitleStrategy = /*#__PURE__*/(() => {\n  class DefaultTitleStrategy extends TitleStrategy {\n    constructor(title) {\n      super();\n      this.title = title;\n    }\n    /**\n     * Sets the title of the browser to the given value.\n     *\n     * @param title The `pageTitle` from the deepest primary route.\n     */\n    updateTitle(snapshot) {\n      const title = this.buildTitle(snapshot);\n      if (title !== undefined) {\n        this.title.setTitle(title);\n      }\n    }\n  }\n  DefaultTitleStrategy.ɵfac = function DefaultTitleStrategy_Factory(t) {\n    return new (t || DefaultTitleStrategy)(i0.ɵɵinject(i1.Title));\n  };\n  DefaultTitleStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DefaultTitleStrategy,\n    factory: DefaultTitleStrategy.ɵfac,\n    providedIn: 'root'\n  });\n  return DefaultTitleStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nlet RouteReuseStrategy = /*#__PURE__*/(() => {\n  class RouteReuseStrategy {}\n  RouteReuseStrategy.ɵfac = function RouteReuseStrategy_Factory(t) {\n    return new (t || RouteReuseStrategy)();\n  };\n  RouteReuseStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: RouteReuseStrategy,\n    factory: function () {\n      return (() => inject(DefaultRouteReuseStrategy))();\n    },\n    providedIn: 'root'\n  });\n  return RouteReuseStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route) {\n    return false;\n  }\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route, detachedTree) {}\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route) {\n    return false;\n  }\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route) {\n    return null;\n  }\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future, curr) {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\nlet DefaultRouteReuseStrategy = /*#__PURE__*/(() => {\n  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n  DefaultRouteReuseStrategy.ɵfac = /* @__PURE__ */function () {\n    let ɵDefaultRouteReuseStrategy_BaseFactory;\n    return function DefaultRouteReuseStrategy_Factory(t) {\n      return (ɵDefaultRouteReuseStrategy_BaseFactory || (ɵDefaultRouteReuseStrategy_BaseFactory = i0.ɵɵgetInheritedFactory(DefaultRouteReuseStrategy)))(t || DefaultRouteReuseStrategy);\n    };\n  }();\n  DefaultRouteReuseStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DefaultRouteReuseStrategy,\n    factory: DefaultRouteReuseStrategy.ɵfac,\n    providedIn: 'root'\n  });\n  return DefaultRouteReuseStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = /*#__PURE__*/new InjectionToken(NG_DEV_MODE$3 ? 'router config' : '', {\n  providedIn: 'root',\n  factory: () => ({})\n});\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nlet UrlHandlingStrategy = /*#__PURE__*/(() => {\n  class UrlHandlingStrategy {}\n  UrlHandlingStrategy.ɵfac = function UrlHandlingStrategy_Factory(t) {\n    return new (t || UrlHandlingStrategy)();\n  };\n  UrlHandlingStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: UrlHandlingStrategy,\n    factory: function () {\n      return (() => inject(DefaultUrlHandlingStrategy))();\n    },\n    providedIn: 'root'\n  });\n  return UrlHandlingStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nlet DefaultUrlHandlingStrategy = /*#__PURE__*/(() => {\n  class DefaultUrlHandlingStrategy {\n    shouldProcessUrl(url) {\n      return true;\n    }\n    extract(url) {\n      return url;\n    }\n    merge(newUrlPart, wholeUrl) {\n      return newUrlPart;\n    }\n  }\n  DefaultUrlHandlingStrategy.ɵfac = function DefaultUrlHandlingStrategy_Factory(t) {\n    return new (t || DefaultUrlHandlingStrategy)();\n  };\n  DefaultUrlHandlingStrategy.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: DefaultUrlHandlingStrategy,\n    factory: DefaultUrlHandlingStrategy.ɵfac,\n    providedIn: 'root'\n  });\n  return DefaultUrlHandlingStrategy;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NG_DEV_MODE$2 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction defaultErrorHandler(error) {\n  throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n  return urlSerializer.parse('/');\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet Router = /*#__PURE__*/(() => {\n  class Router {\n    // TODO(b/260747083): This should not exist and navigationId should be private in\n    // `NavigationTransitions`\n    get navigationId() {\n      return this.navigationTransitions.navigationId;\n    }\n    /**\n     * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n     * important for computing the target page id for new navigations because we need to ensure each\n     * page id in the browser history is 1 more than the previous entry.\n     */\n    get browserPageId() {\n      return this.location.getState()?.ɵrouterPageId;\n    }\n    /**\n     * An event stream for routing events.\n     */\n    get events() {\n      // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n      // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't\n      // allowed/supported but we still have to fix these or file bugs against the teams before making\n      // the change.\n      return this.navigationTransitions.events;\n    }\n    constructor() {\n      this.disposed = false;\n      /**\n       * The id of the currently active page in the router.\n       * Updated to the transition's target id on a successful navigation.\n       *\n       * This is used to track what page the router last activated. When an attempted navigation fails,\n       * the router can then use this to compute how to restore the state back to the previously active\n       * page.\n       */\n      this.currentPageId = 0;\n      this.console = inject(ɵConsole);\n      this.isNgZoneEnabled = false;\n      this.options = inject(ROUTER_CONFIGURATION, {\n        optional: true\n      }) || {};\n      /**\n       * A handler for navigation errors in this NgModule.\n       *\n       * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n       *   `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n       * @see `withNavigationErrorHandler`\n       */\n      this.errorHandler = this.options.errorHandler || defaultErrorHandler;\n      /**\n       * A handler for errors thrown by `Router.parseUrl(url)`\n       * when `url` contains an invalid character.\n       * The most common case is a `%` sign\n       * that's not encoded and is not part of a percent encoded sequence.\n       *\n       * @deprecated URI parsing errors should be handled in the `UrlSerializer`.\n       *\n       * @see `RouterModule`\n       */\n      this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;\n      /**\n       * True if at least one navigation event has occurred,\n       * false otherwise.\n       */\n      this.navigated = false;\n      this.lastSuccessfulId = -1;\n      /**\n       * A strategy for extracting and merging URLs.\n       * Used for AngularJS to Angular migrations.\n       *\n       * @deprecated Configure using `providers` instead:\n       *   `{provide: UrlHandlingStrategy, useClass: MyStrategy}`.\n       */\n      this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n      /**\n       * A strategy for re-using routes.\n       *\n       * @deprecated Configure using `providers` instead:\n       *   `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n       */\n      this.routeReuseStrategy = inject(RouteReuseStrategy);\n      /** Strategy used to create a UrlTree. */\n      this.urlCreationStrategy = inject(CreateUrlTreeStrategy);\n      /**\n       * A strategy for setting the title based on the `routerState`.\n       *\n       * @deprecated Configure using `providers` instead:\n       *   `{provide: TitleStrategy, useClass: MyStrategy}`.\n       */\n      this.titleStrategy = inject(TitleStrategy);\n      /**\n       * How to handle a navigation request to the current URL.\n       *\n       *\n       * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n       * @see `withRouterConfig`\n       * @see `provideRouter`\n       * @see `RouterModule`\n       */\n      this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n      /**\n       * How to merge parameters, data, resolved data, and title from parent to child\n       * routes. One of:\n       *\n       * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n       * for path-less or component-less routes.\n       * - `'always'` : Inherit parent parameters, data, and resolved data\n       * for all child routes.\n       *\n       * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n       * @see `withRouterConfig`\n       * @see `provideRouter`\n       * @see `RouterModule`\n       */\n      this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n      /**\n       * Determines when the router updates the browser URL.\n       * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n       * Set to `'eager'` to update the browser URL at the beginning of navigation.\n       * You can choose to update early so that, if navigation fails,\n       * you can show an error message with the URL that failed.\n       *\n       * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n       * @see `withRouterConfig`\n       * @see `provideRouter`\n       * @see `RouterModule`\n       */\n      this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n      /**\n       * Configures how the Router attempts to restore state when a navigation is cancelled.\n       *\n       * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n       * router before the navigation started. This means that if the URL of the browser is updated\n       * _before_ the navigation is canceled, the Router will simply replace the item in history rather\n       * than trying to restore to the previous location in the session history. This happens most\n       * frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward\n       * buttons.\n       *\n       * 'computed' - Will attempt to return to the same index in the session history that corresponds\n       * to the Angular route when the navigation gets cancelled. For example, if the browser back\n       * button is clicked and the navigation is cancelled, the Router will trigger a forward navigation\n       * and vice versa.\n       *\n       * Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only\n       * handles a portion of the URL because the history restoration navigates to the previous place in\n       * the browser history rather than simply resetting a portion of the URL.\n       *\n       * The default value is `replace`.\n       *\n       * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n       * @see `withRouterConfig`\n       * @see `provideRouter`\n       * @see `RouterModule`\n       */\n      this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n      this.config = flatten(inject(ROUTES, {\n        optional: true\n      }) ?? []);\n      this.navigationTransitions = inject(NavigationTransitions);\n      this.urlSerializer = inject(UrlSerializer);\n      this.location = inject(Location);\n      this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();\n      this.resetConfig(this.config);\n      this.currentUrlTree = new UrlTree();\n      this.rawUrlTree = this.currentUrlTree;\n      this.browserUrlTree = this.currentUrlTree;\n      this.routerState = createEmptyState(this.currentUrlTree, null);\n      this.navigationTransitions.setupNavigations(this).subscribe(t => {\n        this.lastSuccessfulId = t.id;\n        this.currentPageId = t.targetPageId;\n      }, e => {\n        this.console.warn(`Unhandled Navigation Error: ${e}`);\n      });\n    }\n    /** @internal */\n    resetRootComponentType(rootComponentType) {\n      // TODO: vsavkin router 4.0 should make the root component set to null\n      // this will simplify the lifecycle of the router.\n      this.routerState.root.component = rootComponentType;\n      this.navigationTransitions.rootComponentType = rootComponentType;\n    }\n    /**\n     * Sets up the location change listener and performs the initial navigation.\n     */\n    initialNavigation() {\n      this.setUpLocationChangeListener();\n      if (!this.navigationTransitions.hasRequestedNavigation) {\n        const state = this.location.getState();\n        this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, state);\n      }\n    }\n    /**\n     * Sets up the location change listener. This listener detects navigations triggered from outside\n     * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n     * navigation so that the correct events, guards, etc. are triggered.\n     */\n    setUpLocationChangeListener() {\n      // Don't need to use Zone.wrap any more, because zone.js\n      // already patch onPopState, so location change callback will\n      // run into ngZone\n      if (!this.locationSubscription) {\n        this.locationSubscription = this.location.subscribe(event => {\n          const source = event['type'] === 'popstate' ? 'popstate' : 'hashchange';\n          if (source === 'popstate') {\n            // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n            // hybrid apps.\n            setTimeout(() => {\n              this.navigateToSyncWithBrowser(event['url'], source, event.state);\n            }, 0);\n          }\n        });\n      }\n    }\n    /**\n     * Schedules a router navigation to synchronize Router state with the browser state.\n     *\n     * This is done as a response to a popstate event and the initial navigation. These\n     * two scenarios represent times when the browser URL/state has been updated and\n     * the Router needs to respond to ensure its internal state matches.\n     */\n    navigateToSyncWithBrowser(url, source, state) {\n      const extras = {\n        replaceUrl: true\n      };\n      // TODO: restoredState should always include the entire state, regardless\n      // of navigationId. This requires a breaking change to update the type on\n      // NavigationStart’s restoredState, which currently requires navigationId\n      // to always be present. The Router used to only restore history state if\n      // a navigationId was present.\n      // The stored navigationId is used by the RouterScroller to retrieve the scroll\n      // position for the page.\n      const restoredState = state?.navigationId ? state : null;\n      // Separate to NavigationStart.restoredState, we must also restore the state to\n      // history.state and generate a new navigationId, since it will be overwritten\n      if (state) {\n        const stateCopy = {\n          ...state\n        };\n        delete stateCopy.navigationId;\n        delete stateCopy.ɵrouterPageId;\n        if (Object.keys(stateCopy).length !== 0) {\n          extras.state = stateCopy;\n        }\n      }\n      const urlTree = this.parseUrl(url);\n      this.scheduleNavigation(urlTree, source, restoredState, extras);\n    }\n    /** The current URL. */\n    get url() {\n      return this.serializeUrl(this.currentUrlTree);\n    }\n    /**\n     * Returns the current `Navigation` object when the router is navigating,\n     * and `null` when idle.\n     */\n    getCurrentNavigation() {\n      return this.navigationTransitions.currentNavigation;\n    }\n    /**\n     * Resets the route configuration used for navigation and generating links.\n     *\n     * @param config The route array for the new configuration.\n     *\n     * @usageNotes\n     *\n     * ```\n     * router.resetConfig([\n     *  { path: 'team/:id', component: TeamCmp, children: [\n     *    { path: 'simple', component: SimpleCmp },\n     *    { path: 'user/:name', component: UserCmp }\n     *  ]}\n     * ]);\n     * ```\n     */\n    resetConfig(config) {\n      NG_DEV_MODE$2 && validateConfig(config);\n      this.config = config.map(standardizeConfig);\n      this.navigated = false;\n      this.lastSuccessfulId = -1;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      this.dispose();\n    }\n    /** Disposes of the router. */\n    dispose() {\n      this.navigationTransitions.complete();\n      if (this.locationSubscription) {\n        this.locationSubscription.unsubscribe();\n        this.locationSubscription = undefined;\n      }\n      this.disposed = true;\n    }\n    /**\n     * Appends URL segments to the current URL tree to create a new URL tree.\n     *\n     * @param commands An array of URL fragments with which to construct the new URL tree.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n     * property of the options object, if supplied.\n     * @param navigationExtras Options that control the navigation strategy.\n     * @returns The new URL tree.\n     *\n     * @usageNotes\n     *\n     * ```\n     * // create /team/33/user/11\n     * router.createUrlTree(['/team', 33, 'user', 11]);\n     *\n     * // create /team/33;expand=true/user/11\n     * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n     *\n     * // you can collapse static segments like this (this works only with the first passed-in value):\n     * router.createUrlTree(['/team/33/user', userId]);\n     *\n     * // If the first segment can contain slashes, and you do not want the router to split it,\n     * // you can do the following:\n     * router.createUrlTree([{segmentPath: '/one/two'}]);\n     *\n     * // create /team/33/(user/11//right:chat)\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n     *\n     * // remove the right secondary node\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n     *\n     * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n     *\n     * // navigate to /team/33/user/11/details\n     * router.createUrlTree(['details'], {relativeTo: route});\n     *\n     * // navigate to /team/33/user/22\n     * router.createUrlTree(['../22'], {relativeTo: route});\n     *\n     * // navigate to /team/44/user/22\n     * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n     *\n     * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n     * tree should be created relative to the root.\n     * ```\n     */\n    createUrlTree(commands, navigationExtras = {}) {\n      const {\n        relativeTo,\n        queryParams,\n        fragment,\n        queryParamsHandling,\n        preserveFragment\n      } = navigationExtras;\n      const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n      let q = null;\n      switch (queryParamsHandling) {\n        case 'merge':\n          q = {\n            ...this.currentUrlTree.queryParams,\n            ...queryParams\n          };\n          break;\n        case 'preserve':\n          q = this.currentUrlTree.queryParams;\n          break;\n        default:\n          q = queryParams || null;\n      }\n      if (q !== null) {\n        q = this.removeEmptyProps(q);\n      }\n      return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f ?? null);\n    }\n    /**\n     * Navigates to a view using an absolute route path.\n     *\n     * @param url An absolute path for a defined route. The function does not apply any delta to the\n     *     current URL.\n     * @param extras An object containing properties that modify the navigation strategy.\n     *\n     * @returns A Promise that resolves to 'true' when navigation succeeds,\n     * to 'false' when navigation fails, or is rejected on error.\n     *\n     * @usageNotes\n     *\n     * The following calls request navigation to an absolute path.\n     *\n     * ```\n     * router.navigateByUrl(\"/team/33/user/11\");\n     *\n     * // Navigate without updating the URL\n     * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n     * ```\n     *\n     * @see [Routing and Navigation guide](guide/router)\n     *\n     */\n    navigateByUrl(url, extras = {\n      skipLocationChange: false\n    }) {\n      if (NG_DEV_MODE$2) {\n        if (this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n          this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n        }\n        if (url instanceof UrlTree && url._warnIfUsedForNavigation) {\n          this.console.warn(url._warnIfUsedForNavigation);\n        }\n      }\n      const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n      const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n      return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras);\n    }\n    /**\n     * Navigate based on the provided array of commands and a starting point.\n     * If no starting route is provided, the navigation is absolute.\n     *\n     * @param commands An array of URL fragments with which to construct the target URL.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n     * of the options object, if supplied.\n     * @param extras An options object that determines how the URL should be constructed or\n     *     interpreted.\n     *\n     * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n     *     fails,\n     * or is rejected on error.\n     *\n     * @usageNotes\n     *\n     * The following calls request navigation to a dynamic route path relative to the current URL.\n     *\n     * ```\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n     *\n     * // Navigate without updating the URL, overriding the default behavior\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n     * ```\n     *\n     * @see [Routing and Navigation guide](guide/router)\n     *\n     */\n    navigate(commands, extras = {\n      skipLocationChange: false\n    }) {\n      validateCommands(commands);\n      return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n    }\n    /** Serializes a `UrlTree` into a string */\n    serializeUrl(url) {\n      return this.urlSerializer.serialize(url);\n    }\n    /** Parses a string into a `UrlTree` */\n    parseUrl(url) {\n      let urlTree;\n      try {\n        urlTree = this.urlSerializer.parse(url);\n      } catch (e) {\n        urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n      }\n      return urlTree;\n    }\n    isActive(url, matchOptions) {\n      let options;\n      if (matchOptions === true) {\n        options = {\n          ...exactMatchOptions\n        };\n      } else if (matchOptions === false) {\n        options = {\n          ...subsetMatchOptions\n        };\n      } else {\n        options = matchOptions;\n      }\n      if (isUrlTree(url)) {\n        return containsTree(this.currentUrlTree, url, options);\n      }\n      const urlTree = this.parseUrl(url);\n      return containsTree(this.currentUrlTree, urlTree, options);\n    }\n    removeEmptyProps(params) {\n      return Object.keys(params).reduce((result, key) => {\n        const value = params[key];\n        if (value !== null && value !== undefined) {\n          result[key] = value;\n        }\n        return result;\n      }, {});\n    }\n    /** @internal */\n    scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n      if (this.disposed) {\n        return Promise.resolve(false);\n      }\n      let resolve;\n      let reject;\n      let promise;\n      if (priorPromise) {\n        resolve = priorPromise.resolve;\n        reject = priorPromise.reject;\n        promise = priorPromise.promise;\n      } else {\n        promise = new Promise((res, rej) => {\n          resolve = res;\n          reject = rej;\n        });\n      }\n      let targetPageId;\n      if (this.canceledNavigationResolution === 'computed') {\n        // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n        // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n        // target id to the previously set value for that page.\n        if (restoredState && restoredState.ɵrouterPageId) {\n          targetPageId = restoredState.ɵrouterPageId;\n        } else {\n          // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n          // page id because we aren't pushing a new entry to history.\n          if (extras.replaceUrl || extras.skipLocationChange) {\n            targetPageId = this.browserPageId ?? 0;\n          } else {\n            targetPageId = (this.browserPageId ?? 0) + 1;\n          }\n        }\n      } else {\n        // This is unused when `canceledNavigationResolution` is not computed.\n        targetPageId = 0;\n      }\n      this.navigationTransitions.handleNavigationRequest({\n        targetPageId,\n        source,\n        restoredState,\n        currentUrlTree: this.currentUrlTree,\n        currentRawUrl: this.currentUrlTree,\n        rawUrl,\n        extras,\n        resolve,\n        reject,\n        promise,\n        currentSnapshot: this.routerState.snapshot,\n        currentRouterState: this.routerState\n      });\n      // Make sure that the error is propagated even though `processNavigations` catch\n      // handler does not rethrow\n      return promise.catch(e => {\n        return Promise.reject(e);\n      });\n    }\n    /** @internal */\n    setBrowserUrl(url, transition) {\n      const path = this.urlSerializer.serialize(url);\n      const state = {\n        ...transition.extras.state,\n        ...this.generateNgRouterState(transition.id, transition.targetPageId)\n      };\n      if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n        this.location.replaceState(path, '', state);\n      } else {\n        this.location.go(path, '', state);\n      }\n    }\n    /**\n     * Performs the necessary rollback action to restore the browser URL to the\n     * state before the transition.\n     * @internal\n     */\n    restoreHistory(transition, restoringFromCaughtError = false) {\n      if (this.canceledNavigationResolution === 'computed') {\n        const targetPagePosition = this.currentPageId - transition.targetPageId;\n        // The navigator change the location before triggered the browser event,\n        // so we need to go back to the current url if the navigation is canceled.\n        // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n        // go back. Because, when `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called\n        // before any verification.\n        const browserUrlUpdateOccurred = transition.source === 'popstate' || this.urlUpdateStrategy === 'eager' || this.currentUrlTree === this.getCurrentNavigation()?.finalUrl;\n        if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n          this.location.historyGo(targetPagePosition);\n        } else if (this.currentUrlTree === this.getCurrentNavigation()?.finalUrl && targetPagePosition === 0) {\n          // We got to the activation stage (where currentUrlTree is set to the navigation's\n          // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n          // We still need to reset the router state back to what it was when the navigation started.\n          this.resetState(transition);\n          // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n          // Investigate if this can be done by running TGP.\n          this.browserUrlTree = transition.currentUrlTree;\n          this.resetUrlToCurrentUrlTree();\n        } else {\n          // The browser URL and router state was not updated before the navigation cancelled so\n          // there's no restoration needed.\n        }\n      } else if (this.canceledNavigationResolution === 'replace') {\n        // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n        // for `deferred` navigations that haven't change the internal state yet because guards\n        // reject. For 'eager' navigations, it seems like we also really should reset the state\n        // because the navigation was cancelled. Investigate if this can be done by running TGP.\n        if (restoringFromCaughtError) {\n          this.resetState(transition);\n        }\n        this.resetUrlToCurrentUrlTree();\n      }\n    }\n    resetState(t) {\n      this.routerState = t.currentRouterState;\n      this.currentUrlTree = t.currentUrlTree;\n      // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n      // configured to handle only part of the navigation URL. This means we would only want to reset\n      // the part of the navigation handled by the Angular router rather than the whole URL. In\n      // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n      // when merging, such as the query params so they are not lost on a refresh.\n      this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n    }\n    resetUrlToCurrentUrlTree() {\n      this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n    }\n    generateNgRouterState(navigationId, routerPageId) {\n      if (this.canceledNavigationResolution === 'computed') {\n        return {\n          navigationId,\n          ɵrouterPageId: routerPageId\n        };\n      }\n      return {\n        navigationId\n      };\n    }\n  }\n  Router.ɵfac = function Router_Factory(t) {\n    return new (t || Router)();\n  };\n  Router.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: Router,\n    factory: Router.ɵfac,\n    providedIn: 'root'\n  });\n  return Router;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction validateCommands(commands) {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, NG_DEV_MODE$2 && `The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLink = /*#__PURE__*/(() => {\n  class RouterLink {\n    constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n      this.router = router;\n      this.route = route;\n      this.tabIndexAttribute = tabIndexAttribute;\n      this.renderer = renderer;\n      this.el = el;\n      this.locationStrategy = locationStrategy;\n      this._preserveFragment = false;\n      this._skipLocationChange = false;\n      this._replaceUrl = false;\n      /**\n       * Represents an `href` attribute value applied to a host element,\n       * when a host element is `<a>`. For other tags, the value is `null`.\n       */\n      this.href = null;\n      this.commands = null;\n      /** @internal */\n      this.onChanges = new Subject();\n      const tagName = el.nativeElement.tagName?.toLowerCase();\n      this.isAnchorElement = tagName === 'a' || tagName === 'area';\n      if (this.isAnchorElement) {\n        this.subscription = router.events.subscribe(s => {\n          if (s instanceof NavigationEnd) {\n            this.updateHref();\n          }\n        });\n      } else {\n        this.setTabIndexIfNotOnNativeEl('0');\n      }\n    }\n    /**\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n     * @see {@link Router#createUrlTree Router#createUrlTree}\n     */\n    set preserveFragment(preserveFragment) {\n      this._preserveFragment = ɵcoerceToBoolean(preserveFragment);\n    }\n    get preserveFragment() {\n      return this._preserveFragment;\n    }\n    /**\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\n     */\n    set skipLocationChange(skipLocationChange) {\n      this._skipLocationChange = ɵcoerceToBoolean(skipLocationChange);\n    }\n    get skipLocationChange() {\n      return this._skipLocationChange;\n    }\n    /**\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\n     */\n    set replaceUrl(replaceUrl) {\n      this._replaceUrl = ɵcoerceToBoolean(replaceUrl);\n    }\n    get replaceUrl() {\n      return this._replaceUrl;\n    }\n    /**\n     * Modifies the tab index if there was not a tabindex attribute on the element during\n     * instantiation.\n     */\n    setTabIndexIfNotOnNativeEl(newTabIndex) {\n      if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n        return;\n      }\n      this.applyAttributeValue('tabindex', newTabIndex);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      if (this.isAnchorElement) {\n        this.updateHref();\n      }\n      // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n      // to the RouterLinks it's tracking.\n      this.onChanges.next(this);\n    }\n    /**\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n     *   - **null|undefined**: effectively disables the `routerLink`\n     * @see {@link Router#createUrlTree Router#createUrlTree}\n     */\n    set routerLink(commands) {\n      if (commands != null) {\n        this.commands = Array.isArray(commands) ? commands : [commands];\n        this.setTabIndexIfNotOnNativeEl('0');\n      } else {\n        this.commands = null;\n        this.setTabIndexIfNotOnNativeEl(null);\n      }\n    }\n    /** @nodoc */\n    onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n      if (this.urlTree === null) {\n        return true;\n      }\n      if (this.isAnchorElement) {\n        if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n          return true;\n        }\n        if (typeof this.target === 'string' && this.target != '_self') {\n          return true;\n        }\n      }\n      const extras = {\n        skipLocationChange: this.skipLocationChange,\n        replaceUrl: this.replaceUrl,\n        state: this.state\n      };\n      this.router.navigateByUrl(this.urlTree, extras);\n      // Return `false` for `<a>` elements to prevent default action\n      // and cancel the native behavior, since the navigation is handled\n      // by the Router.\n      return !this.isAnchorElement;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      this.subscription?.unsubscribe();\n    }\n    updateHref() {\n      this.href = this.urlTree !== null && this.locationStrategy ? this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) : null;\n      const sanitizedValue = this.href === null ? null :\n      // This class represents a directive that can be added to both `<a>` elements,\n      // as well as other elements. As a result, we can't define security context at\n      // compile time. So the security context is deferred to runtime.\n      // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n      // based on the tag and property names. The logic mimics the one from\n      // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n      //\n      // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n      // instead of applying a value via a renderer, after a final merge of the\n      // `RouterLinkWithHref` directive.\n      ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n      this.applyAttributeValue('href', sanitizedValue);\n    }\n    applyAttributeValue(attrName, attrValue) {\n      const renderer = this.renderer;\n      const nativeElement = this.el.nativeElement;\n      if (attrValue !== null) {\n        renderer.setAttribute(nativeElement, attrName, attrValue);\n      } else {\n        renderer.removeAttribute(nativeElement, attrName);\n      }\n    }\n    get urlTree() {\n      if (this.commands === null) {\n        return null;\n      }\n      return this.router.createUrlTree(this.commands, {\n        // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n        // Otherwise, we should use the value provided by the user in the input.\n        relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n        queryParams: this.queryParams,\n        fragment: this.fragment,\n        queryParamsHandling: this.queryParamsHandling,\n        preserveFragment: this.preserveFragment\n      });\n    }\n  }\n  RouterLink.ɵfac = function RouterLink_Factory(t) {\n    return new (t || RouterLink)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(ActivatedRoute), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i3.LocationStrategy));\n  };\n  RouterLink.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: RouterLink,\n    selectors: [[\"\", \"routerLink\", \"\"]],\n    hostVars: 1,\n    hostBindings: function RouterLink_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        i0.ɵɵlistener(\"click\", function RouterLink_click_HostBindingHandler($event) {\n          return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey);\n        });\n      }\n      if (rf & 2) {\n        i0.ɵɵattribute(\"target\", ctx.target);\n      }\n    },\n    inputs: {\n      target: \"target\",\n      queryParams: \"queryParams\",\n      fragment: \"fragment\",\n      queryParamsHandling: \"queryParamsHandling\",\n      state: \"state\",\n      relativeTo: \"relativeTo\",\n      preserveFragment: \"preserveFragment\",\n      skipLocationChange: \"skipLocationChange\",\n      replaceUrl: \"replaceUrl\",\n      routerLink: \"routerLink\"\n    },\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return RouterLink;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLinkActive = /*#__PURE__*/(() => {\n  class RouterLinkActive {\n    get isActive() {\n      return this._isActive;\n    }\n    constructor(router, element, renderer, cdr, link) {\n      this.router = router;\n      this.element = element;\n      this.renderer = renderer;\n      this.cdr = cdr;\n      this.link = link;\n      this.classes = [];\n      this._isActive = false;\n      /**\n       * Options to configure how to determine if the router link is active.\n       *\n       * These options are passed to the `Router.isActive()` function.\n       *\n       * @see Router.isActive\n       */\n      this.routerLinkActiveOptions = {\n        exact: false\n      };\n      /**\n       *\n       * You can use the output `isActiveChange` to get notified each time the link becomes\n       * active or inactive.\n       *\n       * Emits:\n       * true  -> Route is active\n       * false -> Route is inactive\n       *\n       * ```\n       * <a\n       *  routerLink=\"/user/bob\"\n       *  routerLinkActive=\"active-link\"\n       *  (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n       * ```\n       */\n      this.isActiveChange = new EventEmitter();\n      this.routerEventsSubscription = router.events.subscribe(s => {\n        if (s instanceof NavigationEnd) {\n          this.update();\n        }\n      });\n    }\n    /** @nodoc */\n    ngAfterContentInit() {\n      // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n      of(this.links.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n        this.update();\n        this.subscribeToEachLinkOnChanges();\n      });\n    }\n    subscribeToEachLinkOnChanges() {\n      this.linkInputChangesSubscription?.unsubscribe();\n      const allLinkChanges = [...this.links.toArray(), this.link].filter(link => !!link).map(link => link.onChanges);\n      this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n        if (this._isActive !== this.isLinkActive(this.router)(link)) {\n          this.update();\n        }\n      });\n    }\n    set routerLinkActive(data) {\n      const classes = Array.isArray(data) ? data : data.split(' ');\n      this.classes = classes.filter(c => !!c);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n      this.update();\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      this.routerEventsSubscription.unsubscribe();\n      this.linkInputChangesSubscription?.unsubscribe();\n    }\n    update() {\n      if (!this.links || !this.router.navigated) return;\n      Promise.resolve().then(() => {\n        const hasActiveLinks = this.hasActiveLinks();\n        if (this._isActive !== hasActiveLinks) {\n          this._isActive = hasActiveLinks;\n          this.cdr.markForCheck();\n          this.classes.forEach(c => {\n            if (hasActiveLinks) {\n              this.renderer.addClass(this.element.nativeElement, c);\n            } else {\n              this.renderer.removeClass(this.element.nativeElement, c);\n            }\n          });\n          if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n            this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n          } else {\n            this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n          }\n          // Emit on isActiveChange after classes are updated\n          this.isActiveChange.emit(hasActiveLinks);\n        }\n      });\n    }\n    isLinkActive(router) {\n      const options = isActiveMatchOptions(this.routerLinkActiveOptions) ? this.routerLinkActiveOptions :\n      // While the types should disallow `undefined` here, it's possible without strict inputs\n      this.routerLinkActiveOptions.exact || false;\n      return link => link.urlTree ? router.isActive(link.urlTree, options) : false;\n    }\n    hasActiveLinks() {\n      const isActiveCheckFn = this.isLinkActive(this.router);\n      return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);\n    }\n  }\n  RouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) {\n    return new (t || RouterLinkActive)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RouterLink, 8));\n  };\n  RouterLinkActive.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n    type: RouterLinkActive,\n    selectors: [[\"\", \"routerLinkActive\", \"\"]],\n    contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) {\n      if (rf & 1) {\n        i0.ɵɵcontentQuery(dirIndex, RouterLink, 5);\n      }\n      if (rf & 2) {\n        let _t;\n        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.links = _t);\n      }\n    },\n    inputs: {\n      routerLinkActiveOptions: \"routerLinkActiveOptions\",\n      ariaCurrentWhenActive: \"ariaCurrentWhenActive\",\n      routerLinkActive: \"routerLinkActive\"\n    },\n    outputs: {\n      isActiveChange: \"isActiveChange\"\n    },\n    exportAs: [\"routerLinkActive\"],\n    standalone: true,\n    features: [i0.ɵɵNgOnChangesFeature]\n  });\n  return RouterLinkActive;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n  return !!options.paths;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nlet PreloadAllModules = /*#__PURE__*/(() => {\n  class PreloadAllModules {\n    preload(route, fn) {\n      return fn().pipe(catchError(() => of(null)));\n    }\n  }\n  PreloadAllModules.ɵfac = function PreloadAllModules_Factory(t) {\n    return new (t || PreloadAllModules)();\n  };\n  PreloadAllModules.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: PreloadAllModules,\n    factory: PreloadAllModules.ɵfac,\n    providedIn: 'root'\n  });\n  return PreloadAllModules;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nlet NoPreloading = /*#__PURE__*/(() => {\n  class NoPreloading {\n    preload(route, fn) {\n      return of(null);\n    }\n  }\n  NoPreloading.ɵfac = function NoPreloading_Factory(t) {\n    return new (t || NoPreloading)();\n  };\n  NoPreloading.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: NoPreloading,\n    factory: NoPreloading.ɵfac,\n    providedIn: 'root'\n  });\n  return NoPreloading;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nlet RouterPreloader = /*#__PURE__*/(() => {\n  class RouterPreloader {\n    constructor(router, compiler, injector, preloadingStrategy, loader) {\n      this.router = router;\n      this.injector = injector;\n      this.preloadingStrategy = preloadingStrategy;\n      this.loader = loader;\n    }\n    setUpPreloading() {\n      this.subscription = this.router.events.pipe(filter(e => e instanceof NavigationEnd), concatMap(() => this.preload())).subscribe(() => {});\n    }\n    preload() {\n      return this.processRoutes(this.injector, this.router.config);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      if (this.subscription) {\n        this.subscription.unsubscribe();\n      }\n    }\n    processRoutes(injector, routes) {\n      const res = [];\n      for (const route of routes) {\n        if (route.providers && !route._injector) {\n          route._injector = createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n        }\n        const injectorForCurrentRoute = route._injector ?? injector;\n        const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n        // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n        // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n        // happens as a consequence of needing to descend into children for route matching immediately\n        // while component loading is deferred until route activation. Because `canLoad` guards can\n        // have side effects, we cannot execute them here so we instead skip preloading altogether\n        // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n        // at all. Code splitting and lazy loading is separate from client-side authorization checks\n        // and should not be used as a security measure to prevent loading of code.\n        if (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined || route.loadComponent && !route._loadedComponent) {\n          res.push(this.preloadConfig(injectorForCurrentRoute, route));\n        } else if (route.children || route._loadedRoutes) {\n          res.push(this.processRoutes(injectorForChildren, route.children ?? route._loadedRoutes));\n        }\n      }\n      return from(res).pipe(mergeAll());\n    }\n    preloadConfig(injector, route) {\n      return this.preloadingStrategy.preload(route, () => {\n        let loadedChildren$;\n        if (route.loadChildren && route.canLoad === undefined) {\n          loadedChildren$ = this.loader.loadChildren(injector, route);\n        } else {\n          loadedChildren$ = of(null);\n        }\n        const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap(config => {\n          if (config === null) {\n            return of(void 0);\n          }\n          route._loadedRoutes = config.routes;\n          route._loadedInjector = config.injector;\n          // If the loaded config was a module, use that as the module/module injector going\n          // forward. Otherwise, continue using the current module/module injector.\n          return this.processRoutes(config.injector ?? injector, config.routes);\n        }));\n        if (route.loadComponent && !route._loadedComponent) {\n          const loadComponent$ = this.loader.loadComponent(route);\n          return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n        } else {\n          return recursiveLoadChildren$;\n        }\n      });\n    }\n  }\n  RouterPreloader.ɵfac = function RouterPreloader_Factory(t) {\n    return new (t || RouterPreloader)(i0.ɵɵinject(Router), i0.ɵɵinject(i0.Compiler), i0.ɵɵinject(i0.EnvironmentInjector), i0.ɵɵinject(PreloadingStrategy), i0.ɵɵinject(RouterConfigLoader));\n  };\n  RouterPreloader.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: RouterPreloader,\n    factory: RouterPreloader.ɵfac,\n    providedIn: 'root'\n  });\n  return RouterPreloader;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst ROUTER_SCROLLER = /*#__PURE__*/new InjectionToken('');\nlet RouterScroller = /*#__PURE__*/(() => {\n  class RouterScroller {\n    /** @nodoc */\n    constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n      this.urlSerializer = urlSerializer;\n      this.transitions = transitions;\n      this.viewportScroller = viewportScroller;\n      this.zone = zone;\n      this.options = options;\n      this.lastId = 0;\n      this.lastSource = 'imperative';\n      this.restoredId = 0;\n      this.store = {};\n      // Default both options to 'disabled'\n      options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n      options.anchorScrolling = options.anchorScrolling || 'disabled';\n    }\n    init() {\n      // we want to disable the automatic scrolling because having two places\n      // responsible for scrolling results race conditions, especially given\n      // that browser don't implement this behavior consistently\n      if (this.options.scrollPositionRestoration !== 'disabled') {\n        this.viewportScroller.setHistoryScrollRestoration('manual');\n      }\n      this.routerEventsSubscription = this.createScrollEvents();\n      this.scrollEventsSubscription = this.consumeScrollEvents();\n    }\n    createScrollEvents() {\n      return this.transitions.events.subscribe(e => {\n        if (e instanceof NavigationStart) {\n          // store the scroll position of the current stable navigations.\n          this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n          this.lastSource = e.navigationTrigger;\n          this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n        } else if (e instanceof NavigationEnd) {\n          this.lastId = e.id;\n          this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n        }\n      });\n    }\n    consumeScrollEvents() {\n      return this.transitions.events.subscribe(e => {\n        if (!(e instanceof Scroll)) return;\n        // a popstate event. The pop state event will always ignore anchor scrolling.\n        if (e.position) {\n          if (this.options.scrollPositionRestoration === 'top') {\n            this.viewportScroller.scrollToPosition([0, 0]);\n          } else if (this.options.scrollPositionRestoration === 'enabled') {\n            this.viewportScroller.scrollToPosition(e.position);\n          }\n          // imperative navigation \"forward\"\n        } else {\n          if (e.anchor && this.options.anchorScrolling === 'enabled') {\n            this.viewportScroller.scrollToAnchor(e.anchor);\n          } else if (this.options.scrollPositionRestoration !== 'disabled') {\n            this.viewportScroller.scrollToPosition([0, 0]);\n          }\n        }\n      });\n    }\n    scheduleScrollEvent(routerEvent, anchor) {\n      this.zone.runOutsideAngular(() => {\n        // The scroll event needs to be delayed until after change detection. Otherwise, we may\n        // attempt to restore the scroll position before the router outlet has fully rendered the\n        // component by executing its update block of the template function.\n        setTimeout(() => {\n          this.zone.run(() => {\n            this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n          });\n        }, 0);\n      });\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n      this.routerEventsSubscription?.unsubscribe();\n      this.scrollEventsSubscription?.unsubscribe();\n    }\n  }\n  RouterScroller.ɵfac = function RouterScroller_Factory(t) {\n    i0.ɵɵinvalidFactory();\n  };\n  RouterScroller.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: RouterScroller,\n    factory: RouterScroller.ɵfac\n  });\n  return RouterScroller;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar NavigationResult = /*#__PURE__*/(() => {\n  NavigationResult = NavigationResult || {};\n  NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n  NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n  NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n  return NavigationResult;\n})();\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n  router.events.pipe(filter(e => e instanceof NavigationEnd || e instanceof NavigationCancel || e instanceof NavigationError || e instanceof NavigationSkipped), map(e => {\n    if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n      return NavigationResult.COMPLETE;\n    }\n    const redirecting = e instanceof NavigationCancel ? e.code === 0 /* NavigationCancellationCode.Redirect */ || e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */ : false;\n    return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n  }), filter(result => result !== NavigationResult.REDIRECTING), take(1)).subscribe(() => {\n    action();\n  });\n}\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n *   providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes,\n *         withDebugTracing(),\n *         withRouterConfig({paramsInheritanceStrategy: 'always'}))\n *     ]\n *   }\n * );\n * ```\n *\n * @see `RouterFeatures`\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n  return makeEnvironmentProviders([{\n    provide: ROUTES,\n    multi: true,\n    useValue: routes\n  }, NG_DEV_MODE$1 ? {\n    provide: ROUTER_IS_PROVIDED,\n    useValue: true\n  } : [], {\n    provide: ActivatedRoute,\n    useFactory: rootRoute,\n    deps: [Router]\n  }, {\n    provide: APP_BOOTSTRAP_LISTENER,\n    multi: true,\n    useFactory: getBootstrapListener\n  }, features.map(feature => feature.ɵproviders)]);\n}\nfunction rootRoute(router) {\n  return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n  return {\n    ɵkind: kind,\n    ɵproviders: providers\n  };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = /*#__PURE__*/new InjectionToken('', {\n  providedIn: 'root',\n  factory: () => false\n});\nconst routerIsProvidedDevModeCheck = {\n  provide: ENVIRONMENT_INITIALIZER,\n  multi: true,\n  useFactory() {\n    return () => {\n      if (!inject(ROUTER_IS_PROVIDED)) {\n        console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' + 'This is likely a mistake.');\n      }\n    };\n  }\n};\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see `ROUTES`\n * @publicApi\n */\nfunction provideRoutes(routes) {\n  return [{\n    provide: ROUTES,\n    multi: true,\n    useValue: routes\n  }, NG_DEV_MODE$1 ? routerIsProvidedDevModeCheck : []];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withInMemoryScrolling())\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `ViewportScroller`\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n *     `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n  const providers = [{\n    provide: ROUTER_SCROLLER,\n    useFactory: () => {\n      const viewportScroller = inject(ViewportScroller);\n      const zone = inject(NgZone);\n      const transitions = inject(NavigationTransitions);\n      const urlSerializer = inject(UrlSerializer);\n      return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n    }\n  }];\n  return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n  const injector = inject(Injector);\n  return bootstrappedComponentRef => {\n    const ref = injector.get(ApplicationRef);\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n    const router = injector.get(Router);\n    const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n    if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n      router.initialNavigation();\n    }\n    injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n    injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    if (!bootstrapDone.closed) {\n      bootstrapDone.next();\n      bootstrapDone.unsubscribe();\n    }\n  };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = /*#__PURE__*/new InjectionToken(NG_DEV_MODE$1 ? 'bootstrap done indicator' : '', {\n  factory: () => {\n    return new Subject();\n  }\n});\nconst INITIAL_NAVIGATION = /*#__PURE__*/new InjectionToken(NG_DEV_MODE$1 ? 'initial navigation' : '', {\n  providedIn: 'root',\n  factory: () => 1 /* InitialNavigation.EnabledNonBlocking */\n});\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/universal) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n  const providers = [{\n    provide: INITIAL_NAVIGATION,\n    useValue: 0 /* InitialNavigation.EnabledBlocking */\n  }, {\n    provide: APP_INITIALIZER,\n    multi: true,\n    deps: [Injector],\n    useFactory: injector => {\n      const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n      return () => {\n        return locationInitialized.then(() => {\n          return new Promise(resolve => {\n            const router = injector.get(Router);\n            const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n            afterNextNavigation(router, () => {\n              // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n              // without a redirect.\n              resolve(true);\n            });\n            injector.get(NavigationTransitions).afterPreactivation = () => {\n              // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n              // assume activation will complete successfully (even though this is not\n              // guaranteed).\n              resolve(true);\n              return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n            };\n            router.initialNavigation();\n          });\n        });\n      };\n    }\n  }];\n  return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDisabledInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n  const providers = [{\n    provide: APP_INITIALIZER,\n    multi: true,\n    useFactory: () => {\n      const router = inject(Router);\n      return () => {\n        router.setUpLocationChangeListener();\n      };\n    }\n  }, {\n    provide: INITIAL_NAVIGATION,\n    useValue: 2 /* InitialNavigation.Disabled */\n  }];\n\n  return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDebugTracing())\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n  let providers = [];\n  if (NG_DEV_MODE$1) {\n    providers = [{\n      provide: ENVIRONMENT_INITIALIZER,\n      multi: true,\n      useFactory: () => {\n        const router = inject(Router);\n        return () => router.events.subscribe(e => {\n          // tslint:disable:no-console\n          console.group?.(`Router Event: ${e.constructor.name}`);\n          console.log(stringifyEvent(e));\n          console.log(e);\n          console.groupEnd?.();\n          // tslint:enable:no-console\n        });\n      }\n    }];\n  } else {\n    providers = [];\n  }\n  return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = /*#__PURE__*/new InjectionToken(NG_DEV_MODE$1 ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withPreloading(PreloadAllModules))\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n *     should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n  const providers = [{\n    provide: ROUTER_PRELOADER,\n    useExisting: RouterPreloader\n  }, {\n    provide: PreloadingStrategy,\n    useExisting: preloadingStrategy\n  }];\n  return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withRouterConfig({\n *          onSameUrlNavigation: 'reload'\n *       }))\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n *     additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n  const providers = [{\n    provide: ROUTER_CONFIGURATION,\n    useValue: options\n  }];\n  return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withHashLocation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `HashLocationStrategy`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n  const providers = [{\n    provide: LocationStrategy,\n    useClass: HashLocationStrategy\n  }];\n  return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Subscribes to the Router's navigation events and calls the given function when a\n * `NavigationError` happens.\n *\n * This function is run inside application's injection context so you can use the `inject` function.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n *     ]\n *   }\n * );\n * ```\n *\n * @see `NavigationError`\n * @see `inject`\n * @see `EnvironmentInjector#runInContext`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(fn) {\n  const providers = [{\n    provide: ENVIRONMENT_INITIALIZER,\n    multi: true,\n    useValue: () => {\n      const injector = inject(EnvironmentInjector);\n      inject(Router).events.subscribe(e => {\n        if (e instanceof NavigationError) {\n          injector.runInContext(() => fn(e));\n        }\n      });\n    }\n  }];\n  return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = /*#__PURE__*/new InjectionToken(NG_DEV_MODE ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [Location, {\n  provide: UrlSerializer,\n  useClass: DefaultUrlSerializer\n}, Router, ChildrenOutletContexts, {\n  provide: ActivatedRoute,\n  useFactory: rootRoute,\n  deps: [Router]\n}, RouterConfigLoader,\n// Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n// be removed when `provideRoutes` is removed.\nNG_DEV_MODE ? {\n  provide: ROUTER_IS_PROVIDED,\n  useValue: true\n} : []];\nfunction routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nlet RouterModule = /*#__PURE__*/(() => {\n  class RouterModule {\n    constructor(guard) {}\n    /**\n     * Creates and configures a module with all the router providers and directives.\n     * Optionally sets up an application listener to perform an initial navigation.\n     *\n     * When registering the NgModule at the root, import as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forRoot(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\n     *\n     * @param routes An array of `Route` objects that define the navigation paths for the application.\n     * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n     * @return The new `NgModule`.\n     *\n     */\n    static forRoot(routes, config) {\n      return {\n        ngModule: RouterModule,\n        providers: [ROUTER_PROVIDERS, NG_DEV_MODE ? config?.enableTracing ? withDebugTracing().ɵproviders : [] : [], {\n          provide: ROUTES,\n          multi: true,\n          useValue: routes\n        }, {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        }, {\n          provide: ROUTER_CONFIGURATION,\n          useValue: config ? config : {}\n        }, config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(), provideRouterScroller(), config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [], {\n          provide: NgProbeToken,\n          multi: true,\n          useFactory: routerNgProbeToken\n        }, config?.initialNavigation ? provideInitialNavigation(config) : [], provideRouterInitializer()]\n      };\n    }\n    /**\n     * Creates a module with all the router directives and a provider registering routes,\n     * without creating a new Router service.\n     * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forChild(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\n     *\n     * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n     * @return The new NgModule.\n     *\n     */\n    static forChild(routes) {\n      return {\n        ngModule: RouterModule,\n        providers: [{\n          provide: ROUTES,\n          multi: true,\n          useValue: routes\n        }]\n      };\n    }\n  }\n  RouterModule.ɵfac = function RouterModule_Factory(t) {\n    return new (t || RouterModule)(i0.ɵɵinject(ROUTER_FORROOT_GUARD, 8));\n  };\n  RouterModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: RouterModule\n  });\n  RouterModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    imports: [ɵEmptyOutletComponent]\n  });\n  return RouterModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n  return {\n    provide: ROUTER_SCROLLER,\n    useFactory: () => {\n      const viewportScroller = inject(ViewportScroller);\n      const zone = inject(NgZone);\n      const config = inject(ROUTER_CONFIGURATION);\n      const transitions = inject(NavigationTransitions);\n      const urlSerializer = inject(UrlSerializer);\n      if (config.scrollOffset) {\n        viewportScroller.setOffset(config.scrollOffset);\n      }\n      return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n    }\n  };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n  return {\n    provide: LocationStrategy,\n    useClass: HashLocationStrategy\n  };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n  return {\n    provide: LocationStrategy,\n    useClass: PathLocationStrategy\n  };\n}\nfunction provideForRootGuard(router) {\n  if (NG_DEV_MODE && router) {\n    throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` + ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n  return [config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [], config.initialNavigation === 'enabledBlocking' ? withEnabledBlockingInitialNavigation().ɵproviders : []];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = /*#__PURE__*/new InjectionToken(NG_DEV_MODE ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n  return [\n  // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n  // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n  {\n    provide: ROUTER_INITIALIZER,\n    useFactory: getBootstrapListener\n  }, {\n    provide: APP_BOOTSTRAP_LISTENER,\n    multi: true,\n    useExisting: ROUTER_INITIALIZER\n  }];\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('15.2.3');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, flatten as ɵflatten, withPreloading as ɵwithPreloading };\n//# sourceMappingURL=router.mjs.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bbbc6754f6c5929fa85bec1be49aebc2b4b13a22a458aa3a847f30fad3f4de9f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bbbc6754f6c5929fa85bec1be49aebc2b4b13a22a458aa3a847f30fad3f4de9f.json
deleted file mode 100644
index ca5e4365ac1a2ac9a96e3e91faba8567fb47b147..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bbbc6754f6c5929fa85bec1be49aebc2b4b13a22a458aa3a847f30fad3f4de9f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n  return !!obj && (obj instanceof Observable || isFunction(obj.lift) && isFunction(obj.subscribe));\n}\n//# sourceMappingURL=isObservable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bc00a70bcb8eb21cfc15ded6ba5ece6aa56b9a1b07a8ba14746ee95cdae59ed8.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bc00a70bcb8eb21cfc15ded6ba5ece6aa56b9a1b07a8ba14746ee95cdae59ed8.json
deleted file mode 100644
index 18689a1b35a1564be01b3ef381e494df7d480ec2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bc00a70bcb8eb21cfc15ded6ba5ece6aa56b9a1b07a8ba14746ee95cdae59ed8.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { switchMap } from './switchMap';\nimport { operate } from '../util/lift';\nexport function switchScan(accumulator, seed) {\n  return operate((source, subscriber) => {\n    let state = seed;\n    switchMap((value, index) => accumulator(state, value, index), (_, innerValue) => (state = innerValue, innerValue))(source).subscribe(subscriber);\n    return () => {\n      state = null;\n    };\n  });\n}\n//# sourceMappingURL=switchScan.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bd1353e41dd0f0a7992264ceb22b9a5b76dd31160ae584c1426dedd31b6aecf3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bd1353e41dd0f0a7992264ceb22b9a5b76dd31160ae584c1426dedd31b6aecf3.json
deleted file mode 100644
index f3e0a37e2ecf97d13029a933a2a04869956df85b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bd1353e41dd0f0a7992264ceb22b9a5b76dd31160ae584c1426dedd31b6aecf3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    let lastValue = null;\n    let durationSubscriber = null;\n    let isComplete = false;\n    const endDuration = () => {\n      durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n      durationSubscriber = null;\n      if (hasValue) {\n        hasValue = false;\n        const value = lastValue;\n        lastValue = null;\n        subscriber.next(value);\n      }\n      isComplete && subscriber.complete();\n    };\n    const cleanupDuration = () => {\n      durationSubscriber = null;\n      isComplete && subscriber.complete();\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      hasValue = true;\n      lastValue = value;\n      if (!durationSubscriber) {\n        innerFrom(durationSelector(value)).subscribe(durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration));\n      }\n    }, () => {\n      isComplete = true;\n      (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=audit.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/bf5bfc5898a6cc09abcb0dd6b2c3211121ea10dacbf8a8a7c8f8a62e9974f7a5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/bf5bfc5898a6cc09abcb0dd6b2c3211121ea10dacbf8a8a7c8f8a62e9974f7a5.json
deleted file mode 100644
index eb28106848f7a00c7de97d1baba028578e88d7c2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/bf5bfc5898a6cc09abcb0dd6b2c3211121ea10dacbf8a8a7c8f8a62e9974f7a5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const SequenceError = createErrorClass(_super => function SequenceErrorImpl(message) {\n  _super(this);\n  this.name = 'SequenceError';\n  this.message = message;\n});\n//# sourceMappingURL=SequenceError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c04caffd34180f156c3a90cb7b53e0071cd3768039aa815ca7c263fb3e221da3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c04caffd34180f156c3a90cb7b53e0071cd3768039aa815ca7c263fb3e221da3.json
deleted file mode 100644
index 59d394136b2f5380e1b8c3f77c7b1713f4fb2273..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c04caffd34180f156c3a90cb7b53e0071cd3768039aa815ca7c263fb3e221da3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export * from '@firebase/app-check';\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c3077d17d83666f5d7a1c75a1219c14838b446f869fd235e848c77405096d264.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c3077d17d83666f5d7a1c75a1219c14838b446f869fd235e848c77405096d264.json
deleted file mode 100644
index 4d553c42df1f441a63b7d58cbefff64ef2c6634e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c3077d17d83666f5d7a1c75a1219c14838b446f869fd235e848c77405096d264.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n  return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c533fe953673ac6911f89b337e7365d2d860a559c955f38001f43ab73989a413.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c533fe953673ac6911f89b337e7365d2d860a559c955f38001f43ab73989a413.json
deleted file mode 100644
index b7d478c87036c249c012b4de38a30c50effd8b74..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c533fe953673ac6911f89b337e7365d2d860a559c955f38001f43ab73989a413.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n  const hasDefaultValue = arguments.length >= 2;\n  return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=last.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c61bbfc2dc7570c167aca8b7f12a1df2268cac0e433d6e494ee003080adc2907.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c61bbfc2dc7570c167aca8b7f12a1df2268cac0e433d6e494ee003080adc2907.json
deleted file mode 100644
index 2f19c2c69b2b38a0d5f1e1d26a3887297c187bc4..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c61bbfc2dc7570c167aca8b7f12a1df2268cac0e433d6e494ee003080adc2907.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest(...args) {\n  const resultSelector = popResultSelector(args);\n  return resultSelector ? pipe(combineLatest(...args), mapOneOrManyArgs(resultSelector)) : operate((source, subscriber) => {\n    combineLatestInit([source, ...argsOrArgArray(args)])(subscriber);\n  });\n}\n//# sourceMappingURL=combineLatest.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c8cdcef89d2847bd92624a7cbaf95402ec0a718cbb380e8b2a49b62db19b3a0f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c8cdcef89d2847bd92624a7cbaf95402ec0a718cbb380e8b2a49b62db19b3a0f.json
deleted file mode 100644
index ffbe6e37c81fdd9edd9db44ee45bb69e89b2ed21..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c8cdcef89d2847bd92624a7cbaf95402ec0a718cbb380e8b2a49b62db19b3a0f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race(...sources) {\n  sources = argsOrArgArray(sources);\n  return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n  return subscriber => {\n    let subscriptions = [];\n    for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n      subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n        if (subscriptions) {\n          for (let s = 0; s < subscriptions.length; s++) {\n            s !== i && subscriptions[s].unsubscribe();\n          }\n          subscriptions = null;\n        }\n        subscriber.next(value);\n      })));\n    }\n  };\n}\n//# sourceMappingURL=race.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c959e5b245ac278891131e18dd79acd250605024cbfe8f24abda755b4edf01bd.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c959e5b245ac278891131e18dd79acd250605024cbfe8f24abda755b4edf01bd.json
deleted file mode 100644
index e331e497df62cae32d50528b7e886a668df41457..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c959e5b245ac278891131e18dd79acd250605024cbfe8f24abda755b4edf01bd.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { map } from './map';\nexport function pluck(...properties) {\n  const length = properties.length;\n  if (length === 0) {\n    throw new Error('list of properties cannot be empty.');\n  }\n  return map(x => {\n    let currentProp = x;\n    for (let i = 0; i < length; i++) {\n      const p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]];\n      if (typeof p !== 'undefined') {\n        currentProp = p;\n      } else {\n        return undefined;\n      }\n    }\n    return currentProp;\n  });\n}\n//# sourceMappingURL=pluck.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/c99242e7b4548f97fa6af16399e0d3a010f720343f17b8382a29680b678108f8.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/c99242e7b4548f97fa6af16399e0d3a010f720343f17b8382a29680b678108f8.json
deleted file mode 100644
index 3e487fda51e3dbdf3359c6d7e8559a6724ced34b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/c99242e7b4548f97fa6af16399e0d3a010f720343f17b8382a29680b678108f8.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n  return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cbc951709c24e22dffee73a8017538f6a6552e5db3869ebdb3e5303cd2190e26.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cbc951709c24e22dffee73a8017538f6a6552e5db3869ebdb3e5303cd2190e26.json
deleted file mode 100644
index 89bcadf7472f4441a92c11d7e95add8e7676a6db..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cbc951709c24e22dffee73a8017538f6a6552e5db3869ebdb3e5303cd2190e26.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { isFunction } from '../util/isFunction';\nimport { connect } from './connect';\nexport function multicast(subjectOrSubjectFactory, selector) {\n  const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory;\n  if (isFunction(selector)) {\n    return connect(selector, {\n      connector: subjectFactory\n    });\n  }\n  return source => new ConnectableObservable(source, subjectFactory);\n}\n//# sourceMappingURL=multicast.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cc313e0c0ca3faa5a966284810172839a3e488fd281dd19235303672f6f644e3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cc313e0c0ca3faa5a966284810172839a3e488fd281dd19235303672f6f644e3.json
deleted file mode 100644
index ea169baaef0ebdaf5a4e58fae480281dcdd63fe2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cc313e0c0ca3faa5a966284810172839a3e488fd281dd19235303672f6f644e3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const environment = {\n  firebase: {\n    projectId: 'takima-ar-eee39',\n    appId: '1:1096091676412:web:cb8da7edff6a187f893179',\n    storageBucket: 'takima-ar-eee39.appspot.com',\n    locationId: 'europe-west',\n    apiKey: 'AIzaSyDHKUL_jDBBhUKkqQMqugtlZZ3PLRPUTD8',\n    authDomain: 'takima-ar-eee39.firebaseapp.com',\n    messagingSenderId: '1096091676412',\n    measurementId: 'G-N6074QGX49'\n  }\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ccce4cd2504c09957023340c040cc21b8d78dc539a41fac0601e2d8cdf5bc498.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ccce4cd2504c09957023340c040cc21b8d78dc539a41fac0601e2d8cdf5bc498.json
deleted file mode 100644
index 51d0d674def80a72c82c53c5ab653e4aac36af4b..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ccce4cd2504c09957023340c040cc21b8d78dc539a41fac0601e2d8cdf5bc498.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function bufferWhen(closingSelector) {\n  return operate((source, subscriber) => {\n    let buffer = null;\n    let closingSubscriber = null;\n    const openBuffer = () => {\n      closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n      const b = buffer;\n      buffer = [];\n      b && subscriber.next(b);\n      innerFrom(closingSelector()).subscribe(closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop));\n    };\n    openBuffer();\n    source.subscribe(createOperatorSubscriber(subscriber, value => buffer === null || buffer === void 0 ? void 0 : buffer.push(value), () => {\n      buffer && subscriber.next(buffer);\n      subscriber.complete();\n    }, undefined, () => buffer = closingSubscriber = null));\n  });\n}\n//# sourceMappingURL=bufferWhen.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cd58c6696c2d50e57509abf63d1212a010fa363649595a0fe3305804cb8a96ea.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cd58c6696c2d50e57509abf63d1212a010fa363649595a0fe3305804cb8a96ea.json
deleted file mode 100644
index 2d6c557b92130a648e9b46b0346b975504f6226c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cd58c6696c2d50e57509abf63d1212a010fa363649595a0fe3305804cb8a96ea.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n  if (resultSelector) {\n    return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector));\n  }\n  return new Observable(subscriber => {\n    const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e);\n    const retValue = addHandler(handler);\n    return isFunction(removeHandler) ? () => removeHandler(handler, retValue) : undefined;\n  });\n}\n//# sourceMappingURL=fromEventPattern.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cd8a70e6a9a223ee8b783ef94beed055c72328fdbcb749f83b24f30f4292ef7a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cd8a70e6a9a223ee8b783ef94beed055c72328fdbcb749f83b24f30f4292ef7a.json
deleted file mode 100644
index d4081e327708a4a7e9563821420f8d3f42535f5d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cd8a70e6a9a223ee8b783ef94beed055c72328fdbcb749f83b24f30f4292ef7a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n  constructor(_value) {\n    super();\n    this._value = _value;\n  }\n  get value() {\n    return this.getValue();\n  }\n  _subscribe(subscriber) {\n    const subscription = super._subscribe(subscriber);\n    !subscription.closed && subscriber.next(this._value);\n    return subscription;\n  }\n  getValue() {\n    const {\n      hasError,\n      thrownError,\n      _value\n    } = this;\n    if (hasError) {\n      throw thrownError;\n    }\n    this._throwIfClosed();\n    return _value;\n  }\n  next(value) {\n    super.next(this._value = value);\n  }\n}\n//# sourceMappingURL=BehaviorSubject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cde16dccae7154aae7b978441a2f7ec360b3b117339acd3f79c9c54cf180bbe6.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cde16dccae7154aae7b978441a2f7ec360b3b117339acd3f79c9c54cf180bbe6.json
deleted file mode 100644
index 5d809273d708805acf47c2e28e348b41c02e9156..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cde16dccae7154aae7b978441a2f7ec360b3b117339acd3f79c9c54cf180bbe6.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { Component, ComponentContainer } from '@firebase/component';\nimport { Logger, setUserLogHandler, setLogLevel as setLogLevel$1 } from '@firebase/logger';\nimport { ErrorFactory, getDefaultAppConfig, deepEqual, FirebaseError, base64urlEncodeWithoutPadding, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nexport { FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass PlatformLoggerServiceImpl {\n  constructor(container) {\n    this.container = container;\n  }\n  // In initial implementation, this will be called by installations on\n  // auth token refresh, and installations will send this string.\n  getPlatformInfoString() {\n    const providers = this.container.getProviders();\n    // Loop through providers and get library/version pairs from any that are\n    // version components.\n    return providers.map(provider => {\n      if (isVersionServiceProvider(provider)) {\n        const service = provider.getImmediate();\n        return `${service.library}/${service.version}`;\n      } else {\n        return null;\n      }\n    }).filter(logString => logString).join(' ');\n  }\n}\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\nfunction isVersionServiceProvider(provider) {\n  const component = provider.getComponent();\n  return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\" /* ComponentType.VERSION */;\n}\n\nconst name$o = \"@firebase/app\";\nconst version$1 = \"0.9.5\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logger = new Logger('@firebase/app');\nconst name$n = \"@firebase/app-compat\";\nconst name$m = \"@firebase/analytics-compat\";\nconst name$l = \"@firebase/analytics\";\nconst name$k = \"@firebase/app-check-compat\";\nconst name$j = \"@firebase/app-check\";\nconst name$i = \"@firebase/auth\";\nconst name$h = \"@firebase/auth-compat\";\nconst name$g = \"@firebase/database\";\nconst name$f = \"@firebase/database-compat\";\nconst name$e = \"@firebase/functions\";\nconst name$d = \"@firebase/functions-compat\";\nconst name$c = \"@firebase/installations\";\nconst name$b = \"@firebase/installations-compat\";\nconst name$a = \"@firebase/messaging\";\nconst name$9 = \"@firebase/messaging-compat\";\nconst name$8 = \"@firebase/performance\";\nconst name$7 = \"@firebase/performance-compat\";\nconst name$6 = \"@firebase/remote-config\";\nconst name$5 = \"@firebase/remote-config-compat\";\nconst name$4 = \"@firebase/storage\";\nconst name$3 = \"@firebase/storage-compat\";\nconst name$2 = \"@firebase/firestore\";\nconst name$1 = \"@firebase/firestore-compat\";\nconst name = \"firebase\";\nconst version = \"9.18.0\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The default app name\r\n *\r\n * @internal\r\n */\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\nconst PLATFORM_LOG_STRING = {\n  [name$o]: 'fire-core',\n  [name$n]: 'fire-core-compat',\n  [name$l]: 'fire-analytics',\n  [name$m]: 'fire-analytics-compat',\n  [name$j]: 'fire-app-check',\n  [name$k]: 'fire-app-check-compat',\n  [name$i]: 'fire-auth',\n  [name$h]: 'fire-auth-compat',\n  [name$g]: 'fire-rtdb',\n  [name$f]: 'fire-rtdb-compat',\n  [name$e]: 'fire-fn',\n  [name$d]: 'fire-fn-compat',\n  [name$c]: 'fire-iid',\n  [name$b]: 'fire-iid-compat',\n  [name$a]: 'fire-fcm',\n  [name$9]: 'fire-fcm-compat',\n  [name$8]: 'fire-perf',\n  [name$7]: 'fire-perf-compat',\n  [name$6]: 'fire-rc',\n  [name$5]: 'fire-rc-compat',\n  [name$4]: 'fire-gcs',\n  [name$3]: 'fire-gcs-compat',\n  [name$2]: 'fire-fst',\n  [name$1]: 'fire-fst-compat',\n  'fire-js': 'fire-js',\n  [name]: 'fire-js-all'\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * @internal\r\n */\nconst _apps = new Map();\n/**\r\n * Registered components.\r\n *\r\n * @internal\r\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst _components = new Map();\n/**\r\n * @param component - the component being added to this app's container\r\n *\r\n * @internal\r\n */\nfunction _addComponent(app, component) {\n  try {\n    app.container.addComponent(component);\n  } catch (e) {\n    logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);\n  }\n}\n/**\r\n *\r\n * @internal\r\n */\nfunction _addOrOverwriteComponent(app, component) {\n  app.container.addOrOverwriteComponent(component);\n}\n/**\r\n *\r\n * @param component - the component to register\r\n * @returns whether or not the component is registered successfully\r\n *\r\n * @internal\r\n */\nfunction _registerComponent(component) {\n  const componentName = component.name;\n  if (_components.has(componentName)) {\n    logger.debug(`There were multiple attempts to register component ${componentName}.`);\n    return false;\n  }\n  _components.set(componentName, component);\n  // add the component to existing app instances\n  for (const app of _apps.values()) {\n    _addComponent(app, component);\n  }\n  return true;\n}\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n *\r\n * @returns the provider for the service with the matching name\r\n *\r\n * @internal\r\n */\nfunction _getProvider(app, name) {\n  const heartbeatController = app.container.getProvider('heartbeat').getImmediate({\n    optional: true\n  });\n  if (heartbeatController) {\n    void heartbeatController.triggerHeartbeat();\n  }\n  return app.container.getProvider(name);\n}\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n * @param instanceIdentifier - service instance identifier in case the service supports multiple instances\r\n *\r\n * @internal\r\n */\nfunction _removeServiceInstance(app, name, instanceIdentifier = DEFAULT_ENTRY_NAME) {\n  _getProvider(app, name).clearInstance(instanceIdentifier);\n}\n/**\r\n * Test only\r\n *\r\n * @internal\r\n */\nfunction _clearComponents() {\n  _components.clear();\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERRORS = {\n  [\"no-app\" /* AppError.NO_APP */]: \"No Firebase App '{$appName}' has been created - \" + 'call Firebase App.initializeApp()',\n  [\"bad-app-name\" /* AppError.BAD_APP_NAME */]: \"Illegal App name: '{$appName}\",\n  [\"duplicate-app\" /* AppError.DUPLICATE_APP */]: \"Firebase App named '{$appName}' already exists with different options or config\",\n  [\"app-deleted\" /* AppError.APP_DELETED */]: \"Firebase App named '{$appName}' already deleted\",\n  [\"no-options\" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',\n  [\"invalid-app-argument\" /* AppError.INVALID_APP_ARGUMENT */]: 'firebase.{$appName}() takes either no argument or a ' + 'Firebase App instance.',\n  [\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */]: 'First argument to `onLog` must be null or a function.',\n  [\"idb-open\" /* AppError.IDB_OPEN */]: 'Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.',\n  [\"idb-get\" /* AppError.IDB_GET */]: 'Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.',\n  [\"idb-set\" /* AppError.IDB_WRITE */]: 'Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.',\n  [\"idb-delete\" /* AppError.IDB_DELETE */]: 'Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.'\n};\nconst ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FirebaseAppImpl {\n  constructor(options, config, container) {\n    this._isDeleted = false;\n    this._options = Object.assign({}, options);\n    this._config = Object.assign({}, config);\n    this._name = config.name;\n    this._automaticDataCollectionEnabled = config.automaticDataCollectionEnabled;\n    this._container = container;\n    this.container.addComponent(new Component('app', () => this, \"PUBLIC\" /* ComponentType.PUBLIC */));\n  }\n\n  get automaticDataCollectionEnabled() {\n    this.checkDestroyed();\n    return this._automaticDataCollectionEnabled;\n  }\n  set automaticDataCollectionEnabled(val) {\n    this.checkDestroyed();\n    this._automaticDataCollectionEnabled = val;\n  }\n  get name() {\n    this.checkDestroyed();\n    return this._name;\n  }\n  get options() {\n    this.checkDestroyed();\n    return this._options;\n  }\n  get config() {\n    this.checkDestroyed();\n    return this._config;\n  }\n  get container() {\n    return this._container;\n  }\n  get isDeleted() {\n    return this._isDeleted;\n  }\n  set isDeleted(val) {\n    this._isDeleted = val;\n  }\n  /**\r\n   * This function will throw an Error if the App has already been deleted -\r\n   * use before performing API actions on the App.\r\n   */\n  checkDestroyed() {\n    if (this.isDeleted) {\n      throw ERROR_FACTORY.create(\"app-deleted\" /* AppError.APP_DELETED */, {\n        appName: this._name\n      });\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The current SDK version.\r\n *\r\n * @public\r\n */\nconst SDK_VERSION = version;\nfunction initializeApp(_options, rawConfig = {}) {\n  let options = _options;\n  if (typeof rawConfig !== 'object') {\n    const name = rawConfig;\n    rawConfig = {\n      name\n    };\n  }\n  const config = Object.assign({\n    name: DEFAULT_ENTRY_NAME,\n    automaticDataCollectionEnabled: false\n  }, rawConfig);\n  const name = config.name;\n  if (typeof name !== 'string' || !name) {\n    throw ERROR_FACTORY.create(\"bad-app-name\" /* AppError.BAD_APP_NAME */, {\n      appName: String(name)\n    });\n  }\n  options || (options = getDefaultAppConfig());\n  if (!options) {\n    throw ERROR_FACTORY.create(\"no-options\" /* AppError.NO_OPTIONS */);\n  }\n\n  const existingApp = _apps.get(name);\n  if (existingApp) {\n    // return the existing app if options and config deep equal the ones in the existing app.\n    if (deepEqual(options, existingApp.options) && deepEqual(config, existingApp.config)) {\n      return existingApp;\n    } else {\n      throw ERROR_FACTORY.create(\"duplicate-app\" /* AppError.DUPLICATE_APP */, {\n        appName: name\n      });\n    }\n  }\n  const container = new ComponentContainer(name);\n  for (const component of _components.values()) {\n    container.addComponent(component);\n  }\n  const newApp = new FirebaseAppImpl(options, config, container);\n  _apps.set(name, newApp);\n  return newApp;\n}\n/**\r\n * Retrieves a {@link @firebase/app#FirebaseApp} instance.\r\n *\r\n * When called with no arguments, the default app is returned. When an app name\r\n * is provided, the app corresponding to that name is returned.\r\n *\r\n * An exception is thrown if the app being retrieved has not yet been\r\n * initialized.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return the default app\r\n * const app = getApp();\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return a named app\r\n * const otherApp = getApp(\"otherApp\");\r\n * ```\r\n *\r\n * @param name - Optional name of the app to return. If no name is\r\n *   provided, the default is `\"[DEFAULT]\"`.\r\n *\r\n * @returns The app corresponding to the provided app name.\r\n *   If no app name is provided, the default app is returned.\r\n *\r\n * @public\r\n */\nfunction getApp(name = DEFAULT_ENTRY_NAME) {\n  const app = _apps.get(name);\n  if (!app && name === DEFAULT_ENTRY_NAME) {\n    return initializeApp();\n  }\n  if (!app) {\n    throw ERROR_FACTORY.create(\"no-app\" /* AppError.NO_APP */, {\n      appName: name\n    });\n  }\n  return app;\n}\n/**\r\n * A (read-only) array of all initialized apps.\r\n * @public\r\n */\nfunction getApps() {\n  return Array.from(_apps.values());\n}\n/**\r\n * Renders this app unusable and frees the resources of all associated\r\n * services.\r\n *\r\n * @example\r\n * ```javascript\r\n * deleteApp(app)\r\n *   .then(function() {\r\n *     console.log(\"App deleted successfully\");\r\n *   })\r\n *   .catch(function(error) {\r\n *     console.log(\"Error deleting app:\", error);\r\n *   });\r\n * ```\r\n *\r\n * @public\r\n */\nfunction deleteApp(_x) {\n  return _deleteApp.apply(this, arguments);\n}\n/**\r\n * Registers a library's name and version for platform logging purposes.\r\n * @param library - Name of 1p or 3p library (e.g. firestore, angularfire)\r\n * @param version - Current version of that library.\r\n * @param variant - Bundle variant, e.g., node, rn, etc.\r\n *\r\n * @public\r\n */\nfunction _deleteApp() {\n  _deleteApp = _asyncToGenerator(function* (app) {\n    const name = app.name;\n    if (_apps.has(name)) {\n      _apps.delete(name);\n      yield Promise.all(app.container.getProviders().map(provider => provider.delete()));\n      app.isDeleted = true;\n    }\n  });\n  return _deleteApp.apply(this, arguments);\n}\nfunction registerVersion(libraryKeyOrName, version, variant) {\n  var _a;\n  // TODO: We can use this check to whitelist strings when/if we set up\n  // a good whitelist system.\n  let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\n  if (variant) {\n    library += `-${variant}`;\n  }\n  const libraryMismatch = library.match(/\\s|\\//);\n  const versionMismatch = version.match(/\\s|\\//);\n  if (libraryMismatch || versionMismatch) {\n    const warning = [`Unable to register library \"${library}\" with version \"${version}\":`];\n    if (libraryMismatch) {\n      warning.push(`library name \"${library}\" contains illegal characters (whitespace or \"/\")`);\n    }\n    if (libraryMismatch && versionMismatch) {\n      warning.push('and');\n    }\n    if (versionMismatch) {\n      warning.push(`version name \"${version}\" contains illegal characters (whitespace or \"/\")`);\n    }\n    logger.warn(warning.join(' '));\n    return;\n  }\n  _registerComponent(new Component(`${library}-version`, () => ({\n    library,\n    version\n  }), \"VERSION\" /* ComponentType.VERSION */));\n}\n/**\r\n * Sets log handler for all Firebase SDKs.\r\n * @param logCallback - An optional custom log handler that executes user code whenever\r\n * the Firebase SDK makes a logging call.\r\n *\r\n * @public\r\n */\nfunction onLog(logCallback, options) {\n  if (logCallback !== null && typeof logCallback !== 'function') {\n    throw ERROR_FACTORY.create(\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */);\n  }\n\n  setUserLogHandler(logCallback, options);\n}\n/**\r\n * Sets log level for all Firebase SDKs.\r\n *\r\n * All of the log types above the current log level are captured (i.e. if\r\n * you set the log level to `info`, errors are logged, but `debug` and\r\n * `verbose` logs are not).\r\n *\r\n * @public\r\n */\nfunction setLogLevel(logLevel) {\n  setLogLevel$1(logLevel);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebase-heartbeat-database';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'firebase-heartbeat-store';\nlet dbPromise = null;\nfunction getDbPromise() {\n  if (!dbPromise) {\n    dbPromise = openDB(DB_NAME, DB_VERSION, {\n      upgrade: (db, oldVersion) => {\n        // We don't use 'break' in this switch statement, the fall-through\n        // behavior is what we want, because if there are multiple versions between\n        // the old version and the current version, we want ALL the migrations\n        // that correspond to those versions to run, not only the last one.\n        // eslint-disable-next-line default-case\n        switch (oldVersion) {\n          case 0:\n            db.createObjectStore(STORE_NAME);\n        }\n      }\n    }).catch(e => {\n      throw ERROR_FACTORY.create(\"idb-open\" /* AppError.IDB_OPEN */, {\n        originalErrorMessage: e.message\n      });\n    });\n  }\n  return dbPromise;\n}\nfunction readHeartbeatsFromIndexedDB(_x2) {\n  return _readHeartbeatsFromIndexedDB.apply(this, arguments);\n}\nfunction _readHeartbeatsFromIndexedDB() {\n  _readHeartbeatsFromIndexedDB = _asyncToGenerator(function* (app) {\n    try {\n      const db = yield getDbPromise();\n      return db.transaction(STORE_NAME).objectStore(STORE_NAME).get(computeKey(app));\n    } catch (e) {\n      if (e instanceof FirebaseError) {\n        logger.warn(e.message);\n      } else {\n        const idbGetError = ERROR_FACTORY.create(\"idb-get\" /* AppError.IDB_GET */, {\n          originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n        });\n        logger.warn(idbGetError.message);\n      }\n    }\n  });\n  return _readHeartbeatsFromIndexedDB.apply(this, arguments);\n}\nfunction writeHeartbeatsToIndexedDB(_x3, _x4) {\n  return _writeHeartbeatsToIndexedDB.apply(this, arguments);\n}\nfunction _writeHeartbeatsToIndexedDB() {\n  _writeHeartbeatsToIndexedDB = _asyncToGenerator(function* (app, heartbeatObject) {\n    try {\n      const db = yield getDbPromise();\n      const tx = db.transaction(STORE_NAME, 'readwrite');\n      const objectStore = tx.objectStore(STORE_NAME);\n      yield objectStore.put(heartbeatObject, computeKey(app));\n      return tx.done;\n    } catch (e) {\n      if (e instanceof FirebaseError) {\n        logger.warn(e.message);\n      } else {\n        const idbGetError = ERROR_FACTORY.create(\"idb-set\" /* AppError.IDB_WRITE */, {\n          originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n        });\n        logger.warn(idbGetError.message);\n      }\n    }\n  });\n  return _writeHeartbeatsToIndexedDB.apply(this, arguments);\n}\nfunction computeKey(app) {\n  return `${app.name}!${app.options.appId}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst MAX_HEADER_BYTES = 1024;\n// 30 days\nconst STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1000;\nclass HeartbeatServiceImpl {\n  constructor(container) {\n    this.container = container;\n    /**\r\n     * In-memory cache for heartbeats, used by getHeartbeatsHeader() to generate\r\n     * the header string.\r\n     * Stores one record per date. This will be consolidated into the standard\r\n     * format of one record per user agent string before being sent as a header.\r\n     * Populated from indexedDB when the controller is instantiated and should\r\n     * be kept in sync with indexedDB.\r\n     * Leave public for easier testing.\r\n     */\n    this._heartbeatsCache = null;\n    const app = this.container.getProvider('app').getImmediate();\n    this._storage = new HeartbeatStorageImpl(app);\n    this._heartbeatsCachePromise = this._storage.read().then(result => {\n      this._heartbeatsCache = result;\n      return result;\n    });\n  }\n  /**\r\n   * Called to report a heartbeat. The function will generate\r\n   * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it\r\n   * to IndexedDB.\r\n   * Note that we only store one heartbeat per day. So if a heartbeat for today is\r\n   * already logged, subsequent calls to this function in the same day will be ignored.\r\n   */\n  triggerHeartbeat() {\n    var _this = this;\n    return _asyncToGenerator(function* () {\n      const platformLogger = _this.container.getProvider('platform-logger').getImmediate();\n      // This is the \"Firebase user agent\" string from the platform logger\n      // service, not the browser user agent.\n      const agent = platformLogger.getPlatformInfoString();\n      const date = getUTCDateString();\n      if (_this._heartbeatsCache === null) {\n        _this._heartbeatsCache = yield _this._heartbeatsCachePromise;\n      }\n      // Do not store a heartbeat if one is already stored for this day\n      // or if a header has already been sent today.\n      if (_this._heartbeatsCache.lastSentHeartbeatDate === date || _this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\n        return;\n      } else {\n        // There is no entry for this date. Create one.\n        _this._heartbeatsCache.heartbeats.push({\n          date,\n          agent\n        });\n      }\n      // Remove entries older than 30 days.\n      _this._heartbeatsCache.heartbeats = _this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {\n        const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();\n        const now = Date.now();\n        return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;\n      });\n      return _this._storage.overwrite(_this._heartbeatsCache);\n    })();\n  }\n  /**\r\n   * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.\r\n   * It also clears all heartbeats from memory as well as in IndexedDB.\r\n   *\r\n   * NOTE: Consuming product SDKs should not send the header if this method\r\n   * returns an empty string.\r\n   */\n  getHeartbeatsHeader() {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      if (_this2._heartbeatsCache === null) {\n        yield _this2._heartbeatsCachePromise;\n      }\n      // If it's still null or the array is empty, there is no data to send.\n      if (_this2._heartbeatsCache === null || _this2._heartbeatsCache.heartbeats.length === 0) {\n        return '';\n      }\n      const date = getUTCDateString();\n      // Extract as many heartbeats from the cache as will fit under the size limit.\n      const {\n        heartbeatsToSend,\n        unsentEntries\n      } = extractHeartbeatsForHeader(_this2._heartbeatsCache.heartbeats);\n      const headerString = base64urlEncodeWithoutPadding(JSON.stringify({\n        version: 2,\n        heartbeats: heartbeatsToSend\n      }));\n      // Store last sent date to prevent another being logged/sent for the same day.\n      _this2._heartbeatsCache.lastSentHeartbeatDate = date;\n      if (unsentEntries.length > 0) {\n        // Store any unsent entries if they exist.\n        _this2._heartbeatsCache.heartbeats = unsentEntries;\n        // This seems more likely than emptying the array (below) to lead to some odd state\n        // since the cache isn't empty and this will be called again on the next request,\n        // and is probably safest if we await it.\n        yield _this2._storage.overwrite(_this2._heartbeatsCache);\n      } else {\n        _this2._heartbeatsCache.heartbeats = [];\n        // Do not wait for this, to reduce latency.\n        void _this2._storage.overwrite(_this2._heartbeatsCache);\n      }\n      return headerString;\n    })();\n  }\n}\nfunction getUTCDateString() {\n  const today = new Date();\n  // Returns date format 'YYYY-MM-DD'\n  return today.toISOString().substring(0, 10);\n}\nfunction extractHeartbeatsForHeader(heartbeatsCache, maxSize = MAX_HEADER_BYTES) {\n  // Heartbeats grouped by user agent in the standard format to be sent in\n  // the header.\n  const heartbeatsToSend = [];\n  // Single date format heartbeats that are not sent.\n  let unsentEntries = heartbeatsCache.slice();\n  for (const singleDateHeartbeat of heartbeatsCache) {\n    // Look for an existing entry with the same user agent.\n    const heartbeatEntry = heartbeatsToSend.find(hb => hb.agent === singleDateHeartbeat.agent);\n    if (!heartbeatEntry) {\n      // If no entry for this user agent exists, create one.\n      heartbeatsToSend.push({\n        agent: singleDateHeartbeat.agent,\n        dates: [singleDateHeartbeat.date]\n      });\n      if (countBytes(heartbeatsToSend) > maxSize) {\n        // If the header would exceed max size, remove the added heartbeat\n        // entry and stop adding to the header.\n        heartbeatsToSend.pop();\n        break;\n      }\n    } else {\n      heartbeatEntry.dates.push(singleDateHeartbeat.date);\n      // If the header would exceed max size, remove the added date\n      // and stop adding to the header.\n      if (countBytes(heartbeatsToSend) > maxSize) {\n        heartbeatEntry.dates.pop();\n        break;\n      }\n    }\n    // Pop unsent entry from queue. (Skipped if adding the entry exceeded\n    // quota and the loop breaks early.)\n    unsentEntries = unsentEntries.slice(1);\n  }\n  return {\n    heartbeatsToSend,\n    unsentEntries\n  };\n}\nclass HeartbeatStorageImpl {\n  constructor(app) {\n    this.app = app;\n    this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();\n  }\n  runIndexedDBEnvironmentCheck() {\n    return _asyncToGenerator(function* () {\n      if (!isIndexedDBAvailable()) {\n        return false;\n      } else {\n        return validateIndexedDBOpenable().then(() => true).catch(() => false);\n      }\n    })();\n  }\n  /**\r\n   * Read all heartbeats.\r\n   */\n  read() {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      const canUseIndexedDB = yield _this3._canUseIndexedDBPromise;\n      if (!canUseIndexedDB) {\n        return {\n          heartbeats: []\n        };\n      } else {\n        const idbHeartbeatObject = yield readHeartbeatsFromIndexedDB(_this3.app);\n        return idbHeartbeatObject || {\n          heartbeats: []\n        };\n      }\n    })();\n  }\n  // overwrite the storage with the provided heartbeats\n  overwrite(heartbeatsObject) {\n    var _this4 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      const canUseIndexedDB = yield _this4._canUseIndexedDBPromise;\n      if (!canUseIndexedDB) {\n        return;\n      } else {\n        const existingHeartbeatsObject = yield _this4.read();\n        return writeHeartbeatsToIndexedDB(_this4.app, {\n          lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\n          heartbeats: heartbeatsObject.heartbeats\n        });\n      }\n    })();\n  }\n  // add heartbeats\n  add(heartbeatsObject) {\n    var _this5 = this;\n    return _asyncToGenerator(function* () {\n      var _a;\n      const canUseIndexedDB = yield _this5._canUseIndexedDBPromise;\n      if (!canUseIndexedDB) {\n        return;\n      } else {\n        const existingHeartbeatsObject = yield _this5.read();\n        return writeHeartbeatsToIndexedDB(_this5.app, {\n          lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\n          heartbeats: [...existingHeartbeatsObject.heartbeats, ...heartbeatsObject.heartbeats]\n        });\n      }\n    })();\n  }\n}\n/**\r\n * Calculate bytes of a HeartbeatsByUserAgent array after being wrapped\r\n * in a platform logging header JSON object, stringified, and converted\r\n * to base 64.\r\n */\nfunction countBytes(heartbeatsCache) {\n  // base64 has a restricted set of characters, all of which should be 1 byte.\n  return base64urlEncodeWithoutPadding(\n  // heartbeatsCache wrapper properties\n  JSON.stringify({\n    version: 2,\n    heartbeats: heartbeatsCache\n  })).length;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction registerCoreComponents(variant) {\n  _registerComponent(new Component('platform-logger', container => new PlatformLoggerServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\n  _registerComponent(new Component('heartbeat', container => new HeartbeatServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\n  // Register `app` package.\n  registerVersion(name$o, version$1, variant);\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name$o, version$1, 'esm2017');\n  // Register platform SDK identifier (no version).\n  registerVersion('fire-js', '');\n}\n\n/**\r\n * Firebase App\r\n *\r\n * @remarks This package coordinates the communication between the different Firebase components\r\n * @packageDocumentation\r\n */\nregisterCoreComponents('');\nexport { SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cde5e8cfb340c4a441fe4b2af2c2a8729f163b1514279ab166ae48c6d7bd4ad5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cde5e8cfb340c4a441fe4b2af2c2a8729f163b1514279ab166ae48c6d7bd4ad5.json
deleted file mode 100644
index ac8992a1c55331f7b63781a80aeb3a323ba37842..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cde5e8cfb340c4a441fe4b2af2c2a8729f163b1514279ab166ae48c6d7bd4ad5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concatMap } from './concatMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMapTo(innerObservable, resultSelector) {\n  return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable);\n}\n//# sourceMappingURL=concatMapTo.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce24d71e3ea7af0d84fdbb7a69b2b030d2a024ab5de7cedc112fa808753eb931.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ce24d71e3ea7af0d84fdbb7a69b2b030d2a024ab5de7cedc112fa808753eb931.json
deleted file mode 100644
index b82dbf4915386d50bebfab4ba65b5f78e0792114..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce24d71e3ea7af0d84fdbb7a69b2b030d2a024ab5de7cedc112fa808753eb931.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nimport * as i2 from \"@angular/router\";\nfunction AppComponent_pre_116_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng generate component xyz\");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction AppComponent_pre_117_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng add @angular/material\");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction AppComponent_pre_118_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng add @angular/pwa\");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction AppComponent_pre_119_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng add _____\");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction AppComponent_pre_120_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng test\");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction AppComponent_pre_121_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"pre\");\n    i0.ɵɵtext(1, \"ng build\");\n    i0.ɵɵelementEnd();\n  }\n}\nexport let AppComponent = /*#__PURE__*/(() => {\n  class AppComponent {\n    constructor() {\n      this.title = 'takima-AR';\n    }\n  }\n  AppComponent.ɵfac = function AppComponent_Factory(t) {\n    return new (t || AppComponent)();\n  };\n  AppComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n    type: AppComponent,\n    selectors: [[\"app-root\"]],\n    decls: 152,\n    vars: 7,\n    consts: [[\"role\", \"banner\", 1, \"toolbar\"], [\"width\", \"40\", \"alt\", \"Angular Logo\", \"src\", \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==\"], [1, \"spacer\"], [\"aria-label\", \"Angular on twitter\", \"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://twitter.com/angular\", \"title\", \"Twitter\"], [\"id\", \"twitter-logo\", \"height\", \"24\", \"data-name\", \"Logo\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 400 400\"], [\"width\", \"400\", \"height\", \"400\", \"fill\", \"none\"], [\"d\", \"M153.62,301.59c94.34,0,145.94-78.16,145.94-145.94,0-2.22,0-4.43-.15-6.63A104.36,104.36,0,0,0,325,122.47a102.38,102.38,0,0,1-29.46,8.07,51.47,51.47,0,0,0,22.55-28.37,102.79,102.79,0,0,1-32.57,12.45,51.34,51.34,0,0,0-87.41,46.78A145.62,145.62,0,0,1,92.4,107.81a51.33,51.33,0,0,0,15.88,68.47A50.91,50.91,0,0,1,85,169.86c0,.21,0,.43,0,.65a51.31,51.31,0,0,0,41.15,50.28,51.21,51.21,0,0,1-23.16.88,51.35,51.35,0,0,0,47.92,35.62,102.92,102.92,0,0,1-63.7,22A104.41,104.41,0,0,1,75,278.55a145.21,145.21,0,0,0,78.62,23\", \"fill\", \"#fff\"], [\"aria-label\", \"Angular on YouTube\", \"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://youtube.com/angular\", \"title\", \"YouTube\"], [\"id\", \"youtube-logo\", \"height\", \"24\", \"width\", \"24\", \"data-name\", \"Logo\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 24 24\", \"fill\", \"#fff\"], [\"d\", \"M0 0h24v24H0V0z\", \"fill\", \"none\"], [\"d\", \"M21.58 7.19c-.23-.86-.91-1.54-1.77-1.77C18.25 5 12 5 12 5s-6.25 0-7.81.42c-.86.23-1.54.91-1.77 1.77C2 8.75 2 12 2 12s0 3.25.42 4.81c.23.86.91 1.54 1.77 1.77C5.75 19 12 19 12 19s6.25 0 7.81-.42c.86-.23 1.54-.91 1.77-1.77C22 15.25 22 12 22 12s0-3.25-.42-4.81zM10 15V9l5.2 3-5.2 3z\"], [\"role\", \"main\", 1, \"content\"], [1, \"card\", \"highlight-card\", \"card-small\"], [\"id\", \"rocket\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"101.678\", \"height\", \"101.678\", \"viewBox\", \"0 0 101.678 101.678\"], [\"id\", \"Group_83\", \"data-name\", \"Group 83\", \"transform\", \"translate(-141 -696)\"], [\"id\", \"Ellipse_8\", \"data-name\", \"Ellipse 8\", \"cx\", \"50.839\", \"cy\", \"50.839\", \"r\", \"50.839\", \"transform\", \"translate(141 696)\", \"fill\", \"#dd0031\"], [\"id\", \"Group_47\", \"data-name\", \"Group 47\", \"transform\", \"translate(165.185 720.185)\"], [\"id\", \"Path_33\", \"data-name\", \"Path 33\", \"d\", \"M3.4,42.615a3.084,3.084,0,0,0,3.553,3.553,21.419,21.419,0,0,0,12.215-6.107L9.511,30.4A21.419,21.419,0,0,0,3.4,42.615Z\", \"transform\", \"translate(0.371 3.363)\", \"fill\", \"#fff\"], [\"id\", \"Path_34\", \"data-name\", \"Path 34\", \"d\", \"M53.3,3.221A3.09,3.09,0,0,0,50.081,0,48.227,48.227,0,0,0,18.322,13.437c-6-1.666-14.991-1.221-18.322,7.218A33.892,33.892,0,0,1,9.439,25.1l-.333.666a3.013,3.013,0,0,0,.555,3.553L23.985,43.641a2.9,2.9,0,0,0,3.553.555l.666-.333A33.892,33.892,0,0,1,32.647,53.3c8.55-3.664,8.884-12.326,7.218-18.322A48.227,48.227,0,0,0,53.3,3.221ZM34.424,9.772a6.439,6.439,0,1,1,9.106,9.106,6.368,6.368,0,0,1-9.106,0A6.467,6.467,0,0,1,34.424,9.772Z\", \"transform\", \"translate(0 0.005)\", \"fill\", \"#fff\"], [\"id\", \"rocket-smoke\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"516.119\", \"height\", \"1083.632\", \"viewBox\", \"0 0 516.119 1083.632\"], [\"id\", \"Path_40\", \"data-name\", \"Path 40\", \"d\", \"M644.6,141S143.02,215.537,147.049,870.207s342.774,201.755,342.774,201.755S404.659,847.213,388.815,762.2c-27.116-145.51-11.551-384.124,271.9-609.1C671.15,139.365,644.6,141,644.6,141Z\", \"transform\", \"translate(-147.025 -140.939)\", \"fill\", \"#f5f5f5\"], [1, \"card-container\"], [\"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://angular.io/tutorial\", 1, \"card\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"24\", \"height\", \"24\", \"viewBox\", \"0 0 24 24\", 1, \"material-icons\"], [\"d\", \"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z\"], [\"d\", \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"], [\"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://angular.io/cli\", 1, \"card\"], [\"d\", \"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"], [\"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://material.angular.io\", 1, \"card\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"21.813\", \"height\", \"23.453\", \"viewBox\", \"0 0 179.2 192.7\", 2, \"margin-right\", \"8px\"], [\"fill\", \"#ffa726\", \"d\", \"M89.4 0 0 32l13.5 118.4 75.9 42.3 76-42.3L179.2 32 89.4 0z\"], [\"fill\", \"#fb8c00\", \"d\", \"M89.4 0v192.7l76-42.3L179.2 32 89.4 0z\"], [\"fill\", \"#ffe0b2\", \"d\", \"m102.9 146.3-63.3-30.5 36.3-22.4 63.7 30.6-36.7 22.3z\"], [\"fill\", \"#fff3e0\", \"d\", \"M102.9 122.8 39.6 92.2l36.3-22.3 63.7 30.6-36.7 22.3z\"], [\"fill\", \"#fff\", \"d\", \"M102.9 99.3 39.6 68.7l36.3-22.4 63.7 30.6-36.7 22.4z\"], [\"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://blog.angular.io/\", 1, \"card\"], [\"d\", \"M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z\"], [\"target\", \"_blank\", \"rel\", \"noopener\", \"href\", \"https://angular.io/devtools/\", 1, \"card\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"enable-background\", \"new 0 0 24 24\", \"height\", \"24px\", \"viewBox\", \"0 0 24 24\", \"width\", \"24px\", \"fill\", \"#000000\", 1, \"material-icons\"], [\"fill\", \"none\", \"height\", \"24\", \"width\", \"24\"], [\"d\", \"M14.73,13.31C15.52,12.24,16,10.93,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5C3,13.09,5.91,16,9.5,16 c1.43,0,2.74-0.48,3.81-1.27L19.59,21L21,19.59L14.73,13.31z M9.5,14C7.01,14,5,11.99,5,9.5S7.01,5,9.5,5S14,7.01,14,9.5 S11.99,14,9.5,14z\"], [\"points\", \"10.29,8.44 9.5,6 8.71,8.44 6.25,8.44 8.26,10.03 7.49,12.5 9.5,10.97 11.51,12.5 10.74,10.03 12.75,8.44\"], [\"type\", \"hidden\"], [\"selection\", \"\"], [\"tabindex\", \"0\", 1, \"card\", \"card-small\", 3, \"click\"], [\"d\", \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"], [1, \"terminal\", 3, \"ngSwitch\"], [4, \"ngSwitchDefault\"], [4, \"ngSwitchCase\"], [\"title\", \"Find a Local Meetup\", \"href\", \"https://www.meetup.com/find/?keywords=angular\", \"target\", \"_blank\", \"rel\", \"noopener\", 1, \"circle-link\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"24.607\", \"height\", \"23.447\", \"viewBox\", \"0 0 24.607 23.447\"], [\"id\", \"logo--mSwarm\", \"d\", \"M21.221,14.95A4.393,4.393,0,0,1,17.6,19.281a4.452,4.452,0,0,1-.8.069c-.09,0-.125.035-.154.117a2.939,2.939,0,0,1-2.506,2.091,2.868,2.868,0,0,1-2.248-.624.168.168,0,0,0-.245-.005,3.926,3.926,0,0,1-2.589.741,4.015,4.015,0,0,1-3.7-3.347,2.7,2.7,0,0,1-.043-.38c0-.106-.042-.146-.143-.166a3.524,3.524,0,0,1-1.516-.69A3.623,3.623,0,0,1,2.23,14.557a3.66,3.66,0,0,1,1.077-3.085.138.138,0,0,0,.026-.2,3.348,3.348,0,0,1-.451-1.821,3.46,3.46,0,0,1,2.749-3.28.44.44,0,0,0,.355-.281,5.072,5.072,0,0,1,3.863-3,5.028,5.028,0,0,1,3.555.666.31.31,0,0,0,.271.03A4.5,4.5,0,0,1,18.3,4.7a4.4,4.4,0,0,1,1.334,2.751,3.658,3.658,0,0,1,.022.706.131.131,0,0,0,.1.157,2.432,2.432,0,0,1,1.574,1.645,2.464,2.464,0,0,1-.7,2.616c-.065.064-.051.1-.014.166A4.321,4.321,0,0,1,21.221,14.95ZM13.4,14.607a2.09,2.09,0,0,0,1.409,1.982,4.7,4.7,0,0,0,1.275.221,1.807,1.807,0,0,0,.9-.151.542.542,0,0,0,.321-.545.558.558,0,0,0-.359-.534,1.2,1.2,0,0,0-.254-.078c-.262-.047-.526-.086-.787-.138a.674.674,0,0,1-.617-.75,3.394,3.394,0,0,1,.218-1.109c.217-.658.509-1.286.79-1.918a15.609,15.609,0,0,0,.745-1.86,1.95,1.95,0,0,0,.06-1.073,1.286,1.286,0,0,0-1.051-1.033,1.977,1.977,0,0,0-1.521.2.339.339,0,0,1-.446-.042c-.1-.092-.2-.189-.307-.284a1.214,1.214,0,0,0-1.643-.061,7.563,7.563,0,0,1-.614.512A.588.588,0,0,1,10.883,8c-.215-.115-.437-.215-.659-.316a2.153,2.153,0,0,0-.695-.248A2.091,2.091,0,0,0,7.541,8.562a9.915,9.915,0,0,0-.405.986c-.559,1.545-1.015,3.123-1.487,4.7a1.528,1.528,0,0,0,.634,1.777,1.755,1.755,0,0,0,1.5.211,1.35,1.35,0,0,0,.824-.858c.543-1.281,1.032-2.584,1.55-3.875.142-.355.28-.712.432-1.064a.548.548,0,0,1,.851-.24.622.622,0,0,1,.185.539,2.161,2.161,0,0,1-.181.621c-.337.852-.68,1.7-1.018,2.552a2.564,2.564,0,0,0-.173.528.624.624,0,0,0,.333.71,1.073,1.073,0,0,0,.814.034,1.22,1.22,0,0,0,.657-.655q.758-1.488,1.511-2.978.35-.687.709-1.37a1.073,1.073,0,0,1,.357-.434.43.43,0,0,1,.463-.016.373.373,0,0,1,.153.387.7.7,0,0,1-.057.236c-.065.157-.127.316-.2.469-.42.883-.846,1.763-1.262,2.648A2.463,2.463,0,0,0,13.4,14.607Zm5.888,6.508a1.09,1.09,0,0,0-2.179.006,1.09,1.09,0,0,0,2.179-.006ZM1.028,12.139a1.038,1.038,0,1,0,.01-2.075,1.038,1.038,0,0,0-.01,2.075ZM13.782.528a1.027,1.027,0,1,0-.011,2.055A1.027,1.027,0,0,0,13.782.528ZM22.21,6.95a.882.882,0,0,0-1.763.011A.882.882,0,0,0,22.21,6.95ZM4.153,4.439a.785.785,0,1,0,.787-.78A.766.766,0,0,0,4.153,4.439Zm8.221,18.22a.676.676,0,1,0-.677.666A.671.671,0,0,0,12.374,22.658ZM22.872,12.2a.674.674,0,0,0-.665.665.656.656,0,0,0,.655.643.634.634,0,0,0,.655-.644A.654.654,0,0,0,22.872,12.2ZM7.171-.123A.546.546,0,0,0,6.613.43a.553.553,0,1,0,1.106,0A.539.539,0,0,0,7.171-.123ZM24.119,9.234a.507.507,0,0,0-.493.488.494.494,0,0,0,.494.494.48.48,0,0,0,.487-.483A.491.491,0,0,0,24.119,9.234Zm-19.454,9.7a.5.5,0,0,0-.488-.488.491.491,0,0,0-.487.5.483.483,0,0,0,.491.479A.49.49,0,0,0,4.665,18.936Z\", \"transform\", \"translate(0 0.123)\", \"fill\", \"#f64060\"], [\"title\", \"Join the Conversation on Discord\", \"href\", \"https://discord.gg/angular\", \"target\", \"_blank\", \"rel\", \"noopener\", 1, \"circle-link\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"26\", \"height\", \"26\", \"viewBox\", \"0 0 245 240\"], [\"d\", \"M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zM140.9 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z\"], [\"d\", \"M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3-18.5 12.8 11.9 12.1 11.2 21.5 19V40.6c0-11.4-9.2-20.6-20.5-20.6zm-38.6 130.6s-3.6-4.3-6.6-8.1c13.1-3.7 18.1-11.9 18.1-11.9-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.5-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.7-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.3-1.8-1-2.8-1.7-2.8-1.7s4.8 8 17.5 11.8c-3 3.8-6.7 8.3-6.7 8.3-22.1-.7-30.5-15.2-30.5-15.2 0-32.2 14.4-58.3 14.4-58.3 14.4-10.8 28.1-10.5 28.1-10.5l1 1.2c-18 5.2-26.3 13.1-26.3 13.1s2.2-1.2 5.9-2.9c10.7-4.7 19.2-6 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.6 0 0-7.9-7.5-24.9-12.7l1.4-1.6s13.7-.3 28.1 10.5c0 0 14.4 26.1 14.4 58.3 0 0-8.5 14.5-30.6 15.2z\"], [\"href\", \"https://github.com/angular/angular\", \"target\", \"_blank\", \"rel\", \"noopener\"], [1, \"github-star-badge\"], [\"d\", \"M0 0h24v24H0z\", \"fill\", \"none\"], [\"d\", \"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"], [\"d\", \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\", \"fill\", \"#1976d2\"], [\"id\", \"clouds\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"2611.084\", \"height\", \"485.677\", \"viewBox\", \"0 0 2611.084 485.677\"], [\"id\", \"Path_39\", \"data-name\", \"Path 39\", \"d\", \"M2379.709,863.793c10-93-77-171-168-149-52-114-225-105-264,15-75,3-140,59-152,133-30,2.83-66.725,9.829-93.5,26.25-26.771-16.421-63.5-23.42-93.5-26.25-12-74-77-130-152-133-39-120-212-129-264-15-54.084-13.075-106.753,9.173-138.488,48.9-31.734-39.726-84.4-61.974-138.487-48.9-52-114-225-105-264,15a162.027,162.027,0,0,0-103.147,43.044c-30.633-45.365-87.1-72.091-145.206-58.044-52-114-225-105-264,15-75,3-140,59-152,133-53,5-127,23-130,83-2,42,35,72,70,86,49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33,61.112,8.015,113.854-5.72,150.492-29.764a165.62,165.62,0,0,0,110.861-3.236c47,94,178,113,251,33,31.385,4.116,60.563,2.495,86.487-3.311,25.924,5.806,55.1,7.427,86.488,3.311,73,80,204,61,251-33a165.625,165.625,0,0,0,120,0c51,13,108,15,157-5a147.188,147.188,0,0,0,33.5-18.694,147.217,147.217,0,0,0,33.5,18.694c49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33C2446.709,1093.793,2554.709,922.793,2379.709,863.793Z\", \"transform\", \"translate(142.69 -634.312)\", \"fill\", \"#eee\"]],\n    template: function AppComponent_Template(rf, ctx) {\n      if (rf & 1) {\n        const _r7 = i0.ɵɵgetCurrentView();\n        i0.ɵɵelementStart(0, \"div\", 0);\n        i0.ɵɵelement(1, \"img\", 1);\n        i0.ɵɵelementStart(2, \"span\");\n        i0.ɵɵtext(3, \"Welcome\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(4, \"div\", 2);\n        i0.ɵɵelementStart(5, \"a\", 3);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(6, \"svg\", 4);\n        i0.ɵɵelement(7, \"rect\", 5)(8, \"path\", 6);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(9, \"a\", 7);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(10, \"svg\", 8);\n        i0.ɵɵelement(11, \"path\", 9)(12, \"path\", 10);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(13, \"div\", 11)(14, \"div\", 12);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(15, \"svg\", 13)(16, \"title\");\n        i0.ɵɵtext(17, \"Rocket Ship\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(18, \"g\", 14);\n        i0.ɵɵelement(19, \"circle\", 15);\n        i0.ɵɵelementStart(20, \"g\", 16);\n        i0.ɵɵelement(21, \"path\", 17)(22, \"path\", 18);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(23, \"span\");\n        i0.ɵɵtext(24);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(25, \"svg\", 19)(26, \"title\");\n        i0.ɵɵtext(27, \"Rocket Ship Smoke\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(28, \"path\", 20);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(29, \"h2\");\n        i0.ɵɵtext(30, \"Resources\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(31, \"p\");\n        i0.ɵɵtext(32, \"Here are some links to help you get started:\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(33, \"div\", 21)(34, \"a\", 22);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(35, \"svg\", 23);\n        i0.ɵɵelement(36, \"path\", 24);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(37, \"span\");\n        i0.ɵɵtext(38, \"Learn Angular\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(39, \"svg\", 23);\n        i0.ɵɵelement(40, \"path\", 25);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(41, \"a\", 26);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(42, \"svg\", 23);\n        i0.ɵɵelement(43, \"path\", 27);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(44, \"span\");\n        i0.ɵɵtext(45, \"CLI Documentation\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(46, \"svg\", 23);\n        i0.ɵɵelement(47, \"path\", 25);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(48, \"a\", 28);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(49, \"svg\", 29);\n        i0.ɵɵelement(50, \"path\", 30)(51, \"path\", 31)(52, \"path\", 32)(53, \"path\", 33)(54, \"path\", 34);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(55, \"span\");\n        i0.ɵɵtext(56, \"Angular Material\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(57, \"svg\", 23);\n        i0.ɵɵelement(58, \"path\", 25);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(59, \"a\", 35);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(60, \"svg\", 23);\n        i0.ɵɵelement(61, \"path\", 36);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(62, \"span\");\n        i0.ɵɵtext(63, \"Angular Blog\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(64, \"svg\", 23);\n        i0.ɵɵelement(65, \"path\", 25);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(66, \"a\", 37);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(67, \"svg\", 38)(68, \"g\");\n        i0.ɵɵelement(69, \"rect\", 39);\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(70, \"g\")(71, \"g\");\n        i0.ɵɵelement(72, \"path\", 40)(73, \"polygon\", 41);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(74, \"span\");\n        i0.ɵɵtext(75, \"Angular DevTools\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(76, \"svg\", 23);\n        i0.ɵɵelement(77, \"path\", 25);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(78, \"h2\");\n        i0.ɵɵtext(79, \"Next Steps\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(80, \"p\");\n        i0.ɵɵtext(81, \"What do you want to do next with your app?\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(82, \"input\", 42, 43);\n        i0.ɵɵelementStart(84, \"div\", 21)(85, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_85_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"component\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(86, \"svg\", 23);\n        i0.ɵɵelement(87, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(88, \"span\");\n        i0.ɵɵtext(89, \"New Component\");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(90, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_90_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"material\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(91, \"svg\", 23);\n        i0.ɵɵelement(92, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(93, \"span\");\n        i0.ɵɵtext(94, \"Angular Material\");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(95, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_95_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"pwa\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(96, \"svg\", 23);\n        i0.ɵɵelement(97, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(98, \"span\");\n        i0.ɵɵtext(99, \"Add PWA Support\");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(100, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_100_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"dependency\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(101, \"svg\", 23);\n        i0.ɵɵelement(102, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(103, \"span\");\n        i0.ɵɵtext(104, \"Add Dependency\");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(105, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_105_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"test\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(106, \"svg\", 23);\n        i0.ɵɵelement(107, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(108, \"span\");\n        i0.ɵɵtext(109, \"Run and Watch Tests\");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(110, \"button\", 44);\n        i0.ɵɵlistener(\"click\", function AppComponent_Template_button_click_110_listener() {\n          i0.ɵɵrestoreView(_r7);\n          const _r0 = i0.ɵɵreference(83);\n          return i0.ɵɵresetView(_r0.value = \"build\");\n        });\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(111, \"svg\", 23);\n        i0.ɵɵelement(112, \"path\", 45);\n        i0.ɵɵelementEnd();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(113, \"span\");\n        i0.ɵɵtext(114, \"Build for Production\");\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵelementStart(115, \"div\", 46);\n        i0.ɵɵtemplate(116, AppComponent_pre_116_Template, 2, 0, \"pre\", 47);\n        i0.ɵɵtemplate(117, AppComponent_pre_117_Template, 2, 0, \"pre\", 48);\n        i0.ɵɵtemplate(118, AppComponent_pre_118_Template, 2, 0, \"pre\", 48);\n        i0.ɵɵtemplate(119, AppComponent_pre_119_Template, 2, 0, \"pre\", 48);\n        i0.ɵɵtemplate(120, AppComponent_pre_120_Template, 2, 0, \"pre\", 48);\n        i0.ɵɵtemplate(121, AppComponent_pre_121_Template, 2, 0, \"pre\", 48);\n        i0.ɵɵelementEnd();\n        i0.ɵɵelementStart(122, \"div\", 21)(123, \"a\", 49);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(124, \"svg\", 50)(125, \"title\");\n        i0.ɵɵtext(126, \"Meetup Logo\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(127, \"path\", 51);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(128, \"a\", 52);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(129, \"svg\", 53)(130, \"title\");\n        i0.ɵɵtext(131, \"Discord Logo\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(132, \"path\", 54)(133, \"path\", 55);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(134, \"footer\");\n        i0.ɵɵtext(135, \" Love Angular?\\u00A0 \");\n        i0.ɵɵelementStart(136, \"a\", 56);\n        i0.ɵɵtext(137, \" Give our repo a star. \");\n        i0.ɵɵelementStart(138, \"div\", 57);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(139, \"svg\", 23);\n        i0.ɵɵelement(140, \"path\", 58)(141, \"path\", 59);\n        i0.ɵɵelementEnd();\n        i0.ɵɵtext(142, \" Star \");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelementStart(143, \"a\", 56);\n        i0.ɵɵnamespaceSVG();\n        i0.ɵɵelementStart(144, \"svg\", 23);\n        i0.ɵɵelement(145, \"path\", 60)(146, \"path\", 58);\n        i0.ɵɵelementEnd()()();\n        i0.ɵɵelementStart(147, \"svg\", 61)(148, \"title\");\n        i0.ɵɵtext(149, \"Gray Clouds Background\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(150, \"path\", 62);\n        i0.ɵɵelementEnd()();\n        i0.ɵɵnamespaceHTML();\n        i0.ɵɵelement(151, \"router-outlet\");\n      }\n      if (rf & 2) {\n        const _r0 = i0.ɵɵreference(83);\n        i0.ɵɵadvance(24);\n        i0.ɵɵtextInterpolate1(\"\", ctx.title, \" app is running!\");\n        i0.ɵɵadvance(91);\n        i0.ɵɵproperty(\"ngSwitch\", _r0.value);\n        i0.ɵɵadvance(2);\n        i0.ɵɵproperty(\"ngSwitchCase\", \"material\");\n        i0.ɵɵadvance(1);\n        i0.ɵɵproperty(\"ngSwitchCase\", \"pwa\");\n        i0.ɵɵadvance(1);\n        i0.ɵɵproperty(\"ngSwitchCase\", \"dependency\");\n        i0.ɵɵadvance(1);\n        i0.ɵɵproperty(\"ngSwitchCase\", \"test\");\n        i0.ɵɵadvance(1);\n        i0.ɵɵproperty(\"ngSwitchCase\", \"build\");\n      }\n    },\n    dependencies: [i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i2.RouterOutlet],\n    styles: [\"[_nghost-%COMP%] {\\n    font-family: -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Helvetica, Arial, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\";\\n    font-size: 14px;\\n    color: #333;\\n    box-sizing: border-box;\\n    -webkit-font-smoothing: antialiased;\\n    -moz-osx-font-smoothing: grayscale;\\n  }\\n\\n  h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%] {\\n    margin: 8px 0;\\n  }\\n\\n  p[_ngcontent-%COMP%] {\\n    margin: 0;\\n  }\\n\\n  .spacer[_ngcontent-%COMP%] {\\n    flex: 1;\\n  }\\n\\n  .toolbar[_ngcontent-%COMP%] {\\n    position: absolute;\\n    top: 0;\\n    left: 0;\\n    right: 0;\\n    height: 60px;\\n    display: flex;\\n    align-items: center;\\n    background-color: #1976d2;\\n    color: white;\\n    font-weight: 600;\\n  }\\n\\n  .toolbar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%] {\\n    margin: 0 16px;\\n  }\\n\\n  .toolbar[_ngcontent-%COMP%]   #twitter-logo[_ngcontent-%COMP%] {\\n    height: 40px;\\n    margin: 0 8px;\\n  }\\n\\n  .toolbar[_ngcontent-%COMP%]   #youtube-logo[_ngcontent-%COMP%] {\\n    height: 40px;\\n    margin: 0 16px;\\n  }\\n\\n  .toolbar[_ngcontent-%COMP%]   #twitter-logo[_ngcontent-%COMP%]:hover, .toolbar[_ngcontent-%COMP%]   #youtube-logo[_ngcontent-%COMP%]:hover {\\n    opacity: 0.8;\\n  }\\n\\n  .content[_ngcontent-%COMP%] {\\n    display: flex;\\n    margin: 82px auto 32px;\\n    padding: 0 16px;\\n    max-width: 960px;\\n    flex-direction: column;\\n    align-items: center;\\n  }\\n\\n  svg.material-icons[_ngcontent-%COMP%] {\\n    height: 24px;\\n    width: auto;\\n  }\\n\\n  svg.material-icons[_ngcontent-%COMP%]:not(:last-child) {\\n    margin-right: 8px;\\n  }\\n\\n  .card[_ngcontent-%COMP%]   svg.material-icons[_ngcontent-%COMP%]   path[_ngcontent-%COMP%] {\\n    fill: #888;\\n  }\\n\\n  .card-container[_ngcontent-%COMP%] {\\n    display: flex;\\n    flex-wrap: wrap;\\n    justify-content: center;\\n    margin-top: 16px;\\n  }\\n\\n  .card[_ngcontent-%COMP%] {\\n    all: unset;\\n    border-radius: 4px;\\n    border: 1px solid #eee;\\n    background-color: #fafafa;\\n    height: 40px;\\n    width: 200px;\\n    margin: 0 8px 16px;\\n    padding: 16px;\\n    display: flex;\\n    flex-direction: row;\\n    justify-content: center;\\n    align-items: center;\\n    transition: all 0.2s ease-in-out;\\n    line-height: 24px;\\n  }\\n\\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(:last-child) {\\n    margin-right: 0;\\n  }\\n\\n  .card.card-small[_ngcontent-%COMP%] {\\n    height: 16px;\\n    width: 168px;\\n  }\\n\\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card) {\\n    cursor: pointer;\\n  }\\n\\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card):hover {\\n    transform: translateY(-3px);\\n    box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);\\n  }\\n\\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card):hover   .material-icons[_ngcontent-%COMP%]   path[_ngcontent-%COMP%] {\\n    fill: rgb(105, 103, 103);\\n  }\\n\\n  .card.highlight-card[_ngcontent-%COMP%] {\\n    background-color: #1976d2;\\n    color: white;\\n    font-weight: 600;\\n    border: none;\\n    width: auto;\\n    min-width: 30%;\\n    position: relative;\\n  }\\n\\n  .card.card.highlight-card[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\\n    margin-left: 60px;\\n  }\\n\\n  svg#rocket[_ngcontent-%COMP%] {\\n    width: 80px;\\n    position: absolute;\\n    left: -10px;\\n    top: -24px;\\n  }\\n\\n  svg#rocket-smoke[_ngcontent-%COMP%] {\\n    height: calc(100vh - 95px);\\n    position: absolute;\\n    top: 10px;\\n    right: 180px;\\n    z-index: -10;\\n  }\\n\\n  a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:hover {\\n    color: #1976d2;\\n    text-decoration: none;\\n  }\\n\\n  a[_ngcontent-%COMP%]:hover {\\n    color: #125699;\\n  }\\n\\n  .terminal[_ngcontent-%COMP%] {\\n    position: relative;\\n    width: 80%;\\n    max-width: 600px;\\n    border-radius: 6px;\\n    padding-top: 45px;\\n    margin-top: 8px;\\n    overflow: hidden;\\n    background-color: rgb(15, 15, 16);\\n  }\\n\\n  .terminal[_ngcontent-%COMP%]::before {\\n    content: \\\"\\\\2022 \\\\2022 \\\\2022\\\";\\n    position: absolute;\\n    top: 0;\\n    left: 0;\\n    height: 4px;\\n    background: rgb(58, 58, 58);\\n    color: #c2c3c4;\\n    width: 100%;\\n    font-size: 2rem;\\n    line-height: 0;\\n    padding: 14px 0;\\n    text-indent: 4px;\\n  }\\n\\n  .terminal[_ngcontent-%COMP%]   pre[_ngcontent-%COMP%] {\\n    font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;\\n    color: white;\\n    padding: 0 1rem 1rem;\\n    margin: 0;\\n  }\\n\\n  .circle-link[_ngcontent-%COMP%] {\\n    height: 40px;\\n    width: 40px;\\n    border-radius: 40px;\\n    margin: 8px;\\n    background-color: white;\\n    border: 1px solid #eeeeee;\\n    display: flex;\\n    justify-content: center;\\n    align-items: center;\\n    cursor: pointer;\\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\\n    transition: 1s ease-out;\\n  }\\n\\n  .circle-link[_ngcontent-%COMP%]:hover {\\n    transform: translateY(-0.25rem);\\n    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);\\n  }\\n\\n  footer[_ngcontent-%COMP%] {\\n    margin-top: 8px;\\n    display: flex;\\n    align-items: center;\\n    line-height: 20px;\\n  }\\n\\n  footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\\n    display: flex;\\n    align-items: center;\\n  }\\n\\n  .github-star-badge[_ngcontent-%COMP%] {\\n    color: #24292e;\\n    display: flex;\\n    align-items: center;\\n    font-size: 12px;\\n    padding: 3px 10px;\\n    border: 1px solid rgba(27,31,35,.2);\\n    border-radius: 3px;\\n    background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);\\n    margin-left: 4px;\\n    font-weight: 600;\\n  }\\n\\n  .github-star-badge[_ngcontent-%COMP%]:hover {\\n    background-image: linear-gradient(-180deg,#f0f3f6,#e6ebf1 90%);\\n    border-color: rgba(27,31,35,.35);\\n    background-position: -.5em;\\n  }\\n\\n  .github-star-badge[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%] {\\n    height: 16px;\\n    width: 16px;\\n    margin-right: 4px;\\n  }\\n\\n  svg#clouds[_ngcontent-%COMP%] {\\n    position: fixed;\\n    bottom: -160px;\\n    left: -230px;\\n    z-index: -10;\\n    width: 1920px;\\n  }\\n\\n  \\n  @media screen and (max-width: 767px) {\\n    .card-container[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%]:not(.circle-link), .terminal[_ngcontent-%COMP%] {\\n      width: 100%;\\n    }\\n\\n    .card[_ngcontent-%COMP%]:not(.highlight-card) {\\n      height: 16px;\\n      margin: 8px 0;\\n    }\\n\\n    .card.highlight-card[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\\n      margin-left: 72px;\\n    }\\n\\n    svg#rocket-smoke[_ngcontent-%COMP%] {\\n      right: 120px;\\n      transform: rotate(-5deg);\\n    }\\n  }\\n\\n  @media screen and (max-width: 575px) {\\n    svg#rocket-smoke[_ngcontent-%COMP%] {\\n      display: none;\\n      visibility: hidden;\\n    }\\n  }\"]\n  });\n  return AppComponent;\n})();","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2845d5e237850eae89d0d9ece55b9cd4119f7f5a054974f845798772914804.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2845d5e237850eae89d0d9ece55b9cd4119f7f5a054974f845798772914804.json
deleted file mode 100644
index 8134f46872cbf6bebd6443a312d256c3a5b42f6f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2845d5e237850eae89d0d9ece55b9cd4119f7f5a054974f845798772914804.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n  const buffer = [];\n  let active = 0;\n  let index = 0;\n  let isComplete = false;\n  const checkComplete = () => {\n    if (isComplete && !buffer.length && !active) {\n      subscriber.complete();\n    }\n  };\n  const outerNext = value => active < concurrent ? doInnerSub(value) : buffer.push(value);\n  const doInnerSub = value => {\n    expand && subscriber.next(value);\n    active++;\n    let innerComplete = false;\n    innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, innerValue => {\n      onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n      if (expand) {\n        outerNext(innerValue);\n      } else {\n        subscriber.next(innerValue);\n      }\n    }, () => {\n      innerComplete = true;\n    }, undefined, () => {\n      if (innerComplete) {\n        try {\n          active--;\n          while (buffer.length && active < concurrent) {\n            const bufferedValue = buffer.shift();\n            if (innerSubScheduler) {\n              executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n            } else {\n              doInnerSub(bufferedValue);\n            }\n          }\n          checkComplete();\n        } catch (err) {\n          subscriber.error(err);\n        }\n      }\n    }));\n  };\n  source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n    isComplete = true;\n    checkComplete();\n  }));\n  return () => {\n    additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n  };\n}\n//# sourceMappingURL=mergeInternals.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2cea1a3060ea234213a3adc33599d0ec2055cc705cc3b944941422433a1b77.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2cea1a3060ea234213a3adc33599d0ec2055cc705cc3b944941422433a1b77.json
deleted file mode 100644
index a9a9568ad77b7f5306dcb8096c4bbe240b3f6c5e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce2cea1a3060ea234213a3adc33599d0ec2055cc705cc3b944941422433a1b77.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subscription } from '../Subscription';\nexport const animationFrameProvider = {\n  schedule(callback) {\n    let request = requestAnimationFrame;\n    let cancel = cancelAnimationFrame;\n    const {\n      delegate\n    } = animationFrameProvider;\n    if (delegate) {\n      request = delegate.requestAnimationFrame;\n      cancel = delegate.cancelAnimationFrame;\n    }\n    const handle = request(timestamp => {\n      cancel = undefined;\n      callback(timestamp);\n    });\n    return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle));\n  },\n  requestAnimationFrame(...args) {\n    const {\n      delegate\n    } = animationFrameProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args);\n  },\n  cancelAnimationFrame(...args) {\n    const {\n      delegate\n    } = animationFrameProvider;\n    return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args);\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=animationFrameProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce66d15bdf89e07a01d10452d786daac412277dabe5e9cf009f7e66e4b061f40.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ce66d15bdf89e07a01d10452d786daac412277dabe5e9cf009f7e66e4b061f40.json
deleted file mode 100644
index 4f0174afdc712df8f8a2e6010ca1cbe48e911577..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ce66d15bdf89e07a01d10452d786daac412277dabe5e9cf009f7e66e4b061f40.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './isFunction';\nexport function hasLift(source) {\n  return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n  return source => {\n    if (hasLift(source)) {\n      return source.lift(function (liftedSource) {\n        try {\n          return init(liftedSource, this);\n        } catch (err) {\n          this.error(err);\n        }\n      });\n    }\n    throw new TypeError('Unable to lift unknown Observable type');\n  };\n}\n//# sourceMappingURL=lift.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/cffafdfa437022bf5ff3302062b27a2d36343bb2e0f5370b4814880159f61fe1.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/cffafdfa437022bf5ff3302062b27a2d36343bb2e0f5370b4814880159f61fe1.json
deleted file mode 100644
index 726488231b2e941140da9580b3edcc6d4e864935..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/cffafdfa437022bf5ff3302062b27a2d36343bb2e0f5370b4814880159f61fe1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from '../Observable';\nimport { EMPTY } from './empty';\nexport function range(start, count, scheduler) {\n  if (count == null) {\n    count = start;\n    start = 0;\n  }\n  if (count <= 0) {\n    return EMPTY;\n  }\n  const end = count + start;\n  return new Observable(scheduler ? subscriber => {\n    let n = start;\n    return scheduler.schedule(function () {\n      if (n < end) {\n        subscriber.next(n++);\n        this.schedule();\n      } else {\n        subscriber.complete();\n      }\n    });\n  } : subscriber => {\n    let n = start;\n    while (n < end && !subscriber.closed) {\n      subscriber.next(n++);\n    }\n    subscriber.complete();\n  });\n}\n//# sourceMappingURL=range.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d0c7057810e439115d8a1bd1aaed616a39e6dda50511a62b840f089f7236cb8a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d0c7057810e439115d8a1bd1aaed616a39e6dda50511a62b840f089f7236cb8a.json
deleted file mode 100644
index a9e9fc06263464babaaa74d5f5e404537b5b1fb0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d0c7057810e439115d8a1bd1aaed616a39e6dda50511a62b840f089f7236cb8a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { getApps as getApps$1, getApp as getApp$1, registerVersion as registerVersion$1, deleteApp as deleteApp$1, initializeApp as initializeApp$1, onLog as onLog$1, setLogLevel as setLogLevel$1 } from 'firebase/app';\nexport * from 'firebase/app';\nimport { timer, from } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject, NgZone, Injector } from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nclass FirebaseApp {\n  constructor(app) {\n    return app;\n  }\n}\nclass FirebaseApps {\n  constructor() {\n    return getApps$1();\n  }\n}\nconst firebaseApp$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(getApps$1())), /*#__PURE__*/distinct());\nfunction defaultFirebaseAppFactory(provided) {\n  // Use the provided app, if there is only one, otherwise fetch the default app\n  if (provided && provided.length === 1) {\n    return provided[0];\n  }\n  return new FirebaseApp(getApp$1());\n}\n// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by\n// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all\n// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved\nconst PROVIDED_FIREBASE_APPS = /*#__PURE__*/new InjectionToken('angularfire2._apps');\n// Injecting FirebaseApp will now only inject the default Firebase App\n// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App\n// from the reserved URL.\nconst DEFAULT_FIREBASE_APP_PROVIDER = {\n  provide: FirebaseApp,\n  useFactory: defaultFirebaseAppFactory,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nconst FIREBASE_APPS_PROVIDER = {\n  provide: FirebaseApps,\n  deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nfunction firebaseAppFactory(fn) {\n  return (zone, injector) => {\n    const app = zone.runOutsideAngular(() => fn(injector));\n    return new FirebaseApp(app);\n  };\n}\nlet FirebaseAppModule = /*#__PURE__*/(() => {\n  class FirebaseAppModule {\n    // tslint:disable-next-line:ban-types\n    constructor(platformId) {\n      registerVersion$1('angularfire', VERSION.full, 'core');\n      registerVersion$1('angularfire', VERSION.full, 'app');\n      registerVersion$1('angular', VERSION$1.full, platformId.toString());\n    }\n  }\n  FirebaseAppModule.ɵfac = function FirebaseAppModule_Factory(t) {\n    return new (t || FirebaseAppModule)(i0.ɵɵinject(PLATFORM_ID));\n  };\n  FirebaseAppModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: FirebaseAppModule\n  });\n  FirebaseAppModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    providers: [DEFAULT_FIREBASE_APP_PROVIDER, FIREBASE_APPS_PROVIDER]\n  });\n  return FirebaseAppModule;\n})();\n/*#__PURE__*/(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS\n// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside\n// is that DI for app name and options doesn't really make sense anymore.\nfunction provideFirebaseApp(fn, ...deps) {\n  return {\n    ngModule: FirebaseAppModule,\n    providers: [{\n      provide: PROVIDED_FIREBASE_APPS,\n      useFactory: firebaseAppFactory(fn),\n      multi: true,\n      deps: [NgZone, Injector, ɵAngularFireSchedulers, ...deps]\n    }]\n  };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst deleteApp = /*#__PURE__*/ɵzoneWrap(deleteApp$1, true);\nconst getApp = /*#__PURE__*/ɵzoneWrap(getApp$1, true);\nconst getApps = /*#__PURE__*/ɵzoneWrap(getApps$1, true);\nconst initializeApp = /*#__PURE__*/ɵzoneWrap(initializeApp$1, true);\nconst onLog = /*#__PURE__*/ɵzoneWrap(onLog$1, true);\nconst registerVersion = /*#__PURE__*/ɵzoneWrap(registerVersion$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FirebaseApp, FirebaseAppModule, FirebaseApps, deleteApp, firebaseApp$, getApp, getApps, initializeApp, onLog, provideFirebaseApp, registerVersion, setLogLevel };\n//# sourceMappingURL=angular-fire-app.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d1050bdb6beb0400d1802a5cc60025285f86b3bdd741887c30d9e68d4ac78e5f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d1050bdb6beb0400d1802a5cc60025285f86b3bdd741887c30d9e68d4ac78e5f.json
deleted file mode 100644
index 8cabed86a41384ba68762ddca17272258fc8d673..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d1050bdb6beb0400d1802a5cc60025285f86b3bdd741887c30d9e68d4ac78e5f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { zip } from '../observable/zip';\nimport { joinAllInternals } from './joinAllInternals';\nexport function zipAll(project) {\n  return joinAllInternals(zip, project);\n}\n//# sourceMappingURL=zipAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d16b48fd59dd494f19b5664143c9fcae3069f9a664779085c4991c35e5e1b2ff.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d16b48fd59dd494f19b5664143c9fcae3069f9a664779085c4991c35e5e1b2ff.json
deleted file mode 100644
index 669a05d63cb40937616b57ae8d068202119bcc23..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d16b48fd59dd494f19b5664143c9fcae3069f9a664779085c4991c35e5e1b2ff.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import * as __NgCli_bootstrap_1 from \"@angular/platform-browser\";\nimport { AppModule } from './app/app.module';\n__NgCli_bootstrap_1.platformBrowser().bootstrapModule(AppModule).catch(err => console.error(err));","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d3e47c0bebcc9d1c517b89d11287ef72b7cd50cae93c6b22ca7722b9bb071b8c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d3e47c0bebcc9d1c517b89d11287ef72b7cd50cae93c6b22ca7722b9bb071b8c.json
deleted file mode 100644
index 27b33f535ce235abc1417311d3a9f17499ace51f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d3e47c0bebcc9d1c517b89d11287ef72b7cd50cae93c6b22ca7722b9bb071b8c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n  return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d43c8d23fe92bf114aee3c2d109aab3625baf89b38a2221b9498376d224a355a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d43c8d23fe92bf114aee3c2d109aab3625baf89b38a2221b9498376d224a355a.json
deleted file mode 100644
index cfdef05cce0e8b522692521e65abfc99a3ba1243..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d43c8d23fe92bf114aee3c2d109aab3625baf89b38a2221b9498376d224a355a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport let Subject = /*#__PURE__*/(() => {\n  class Subject extends Observable {\n    constructor() {\n      super();\n      this.closed = false;\n      this.currentObservers = null;\n      this.observers = [];\n      this.isStopped = false;\n      this.hasError = false;\n      this.thrownError = null;\n    }\n    lift(operator) {\n      const subject = new AnonymousSubject(this, this);\n      subject.operator = operator;\n      return subject;\n    }\n    _throwIfClosed() {\n      if (this.closed) {\n        throw new ObjectUnsubscribedError();\n      }\n    }\n    next(value) {\n      errorContext(() => {\n        this._throwIfClosed();\n        if (!this.isStopped) {\n          if (!this.currentObservers) {\n            this.currentObservers = Array.from(this.observers);\n          }\n          for (const observer of this.currentObservers) {\n            observer.next(value);\n          }\n        }\n      });\n    }\n    error(err) {\n      errorContext(() => {\n        this._throwIfClosed();\n        if (!this.isStopped) {\n          this.hasError = this.isStopped = true;\n          this.thrownError = err;\n          const {\n            observers\n          } = this;\n          while (observers.length) {\n            observers.shift().error(err);\n          }\n        }\n      });\n    }\n    complete() {\n      errorContext(() => {\n        this._throwIfClosed();\n        if (!this.isStopped) {\n          this.isStopped = true;\n          const {\n            observers\n          } = this;\n          while (observers.length) {\n            observers.shift().complete();\n          }\n        }\n      });\n    }\n    unsubscribe() {\n      this.isStopped = this.closed = true;\n      this.observers = this.currentObservers = null;\n    }\n    get observed() {\n      var _a;\n      return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n    }\n    _trySubscribe(subscriber) {\n      this._throwIfClosed();\n      return super._trySubscribe(subscriber);\n    }\n    _subscribe(subscriber) {\n      this._throwIfClosed();\n      this._checkFinalizedStatuses(subscriber);\n      return this._innerSubscribe(subscriber);\n    }\n    _innerSubscribe(subscriber) {\n      const {\n        hasError,\n        isStopped,\n        observers\n      } = this;\n      if (hasError || isStopped) {\n        return EMPTY_SUBSCRIPTION;\n      }\n      this.currentObservers = null;\n      observers.push(subscriber);\n      return new Subscription(() => {\n        this.currentObservers = null;\n        arrRemove(observers, subscriber);\n      });\n    }\n    _checkFinalizedStatuses(subscriber) {\n      const {\n        hasError,\n        thrownError,\n        isStopped\n      } = this;\n      if (hasError) {\n        subscriber.error(thrownError);\n      } else if (isStopped) {\n        subscriber.complete();\n      }\n    }\n    asObservable() {\n      const observable = new Observable();\n      observable.source = this;\n      return observable;\n    }\n  }\n  Subject.create = (destination, source) => {\n    return new AnonymousSubject(destination, source);\n  };\n  return Subject;\n})();\nexport class AnonymousSubject extends Subject {\n  constructor(destination, source) {\n    super();\n    this.destination = destination;\n    this.source = source;\n  }\n  next(value) {\n    var _a, _b;\n    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n  }\n  error(err) {\n    var _a, _b;\n    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n  }\n  complete() {\n    var _a, _b;\n    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n  }\n  _subscribe(subscriber) {\n    var _a, _b;\n    return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n  }\n}\n//# sourceMappingURL=Subject.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d58df4762a4ff804081e06808ae0bcdd79fc4df1e2076958ed624de62b87675a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d58df4762a4ff804081e06808ae0bcdd79fc4df1e2076958ed624de62b87675a.json
deleted file mode 100644
index 53db980a867a98dc9cf8d9a10b878080118dcb09..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d58df4762a4ff804081e06808ae0bcdd79fc4df1e2076958ed624de62b87675a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncAction } from './AsyncAction';\nexport class QueueAction extends AsyncAction {\n  constructor(scheduler, work) {\n    super(scheduler, work);\n    this.scheduler = scheduler;\n    this.work = work;\n  }\n  schedule(state, delay = 0) {\n    if (delay > 0) {\n      return super.schedule(state, delay);\n    }\n    this.delay = delay;\n    this.state = state;\n    this.scheduler.flush(this);\n    return this;\n  }\n  execute(state, delay) {\n    return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n  }\n  requestAsyncId(scheduler, id, delay = 0) {\n    if (delay != null && delay > 0 || delay == null && this.delay > 0) {\n      return super.requestAsyncId(scheduler, id, delay);\n    }\n    scheduler.flush(this);\n    return 0;\n  }\n}\n//# sourceMappingURL=QueueAction.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d72b0fde3749871bc0d6ddb2fd54c85dde7a52b8d683720bb3d37a888dd1470f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d72b0fde3749871bc0d6ddb2fd54c85dde7a52b8d683720bb3d37a888dd1470f.json
deleted file mode 100644
index ebd2f8e2366fc042e30871f2c24cba598169788d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d72b0fde3749871bc0d6ddb2fd54c85dde7a52b8d683720bb3d37a888dd1470f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n  constructor(scheduler, work) {\n    super();\n  }\n  schedule(state, delay = 0) {\n    return this;\n  }\n}\n//# sourceMappingURL=Action.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d7e02c735ed237456562cf50496c66bc8672ae23c5cdb19fc7f983362bb0c37b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d7e02c735ed237456562cf50496c66bc8672ae23c5cdb19fc7f983362bb0c37b.json
deleted file mode 100644
index 929b57c60c0faa175969749f56677caecee1ec8e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d7e02c735ed237456562cf50496c66bc8672ae23c5cdb19fc7f983362bb0c37b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"\"use strict\";\n\nmodule.exports = function (i) {\n  return i[1];\n};","map":null,"metadata":{},"sourceType":"script","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d88d4206e7eae1dca9a347d4793a4e04628acfb2e98f2d0d94f1fce5443843da.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d88d4206e7eae1dca9a347d4793a4e04628acfb2e98f2d0d94f1fce5443843da.json
deleted file mode 100644
index 35b17c1beff989ea388e087dd53ed8b6892cb818..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d88d4206e7eae1dca9a347d4793a4e04628acfb2e98f2d0d94f1fce5443843da.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\nexport function retry(configOrCount = Infinity) {\n  let config;\n  if (configOrCount && typeof configOrCount === 'object') {\n    config = configOrCount;\n  } else {\n    config = {\n      count: configOrCount\n    };\n  }\n  const {\n    count = Infinity,\n    delay,\n    resetOnSuccess = false\n  } = config;\n  return count <= 0 ? identity : operate((source, subscriber) => {\n    let soFar = 0;\n    let innerSub;\n    const subscribeForRetry = () => {\n      let syncUnsub = false;\n      innerSub = source.subscribe(createOperatorSubscriber(subscriber, value => {\n        if (resetOnSuccess) {\n          soFar = 0;\n        }\n        subscriber.next(value);\n      }, undefined, err => {\n        if (soFar++ < count) {\n          const resub = () => {\n            if (innerSub) {\n              innerSub.unsubscribe();\n              innerSub = null;\n              subscribeForRetry();\n            } else {\n              syncUnsub = true;\n            }\n          };\n          if (delay != null) {\n            const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n            const notifierSubscriber = createOperatorSubscriber(subscriber, () => {\n              notifierSubscriber.unsubscribe();\n              resub();\n            }, () => {\n              subscriber.complete();\n            });\n            notifier.subscribe(notifierSubscriber);\n          } else {\n            resub();\n          }\n        } else {\n          subscriber.error(err);\n        }\n      }));\n      if (syncUnsub) {\n        innerSub.unsubscribe();\n        innerSub = null;\n        subscribeForRetry();\n      }\n    };\n    subscribeForRetry();\n  });\n}\n//# sourceMappingURL=retry.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d9a1647997be2f99c15b8f52eb7d411717018577114655da1cf53dd19d419554.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d9a1647997be2f99c15b8f52eb7d411717018577114655da1cf53dd19d419554.json
deleted file mode 100644
index 8eaa04c0e0f9d96edfabdb70ae321f3aaf718b90..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d9a1647997be2f99c15b8f52eb7d411717018577114655da1cf53dd19d419554.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipLast(skipCount) {\n  return skipCount <= 0 ? identity : operate((source, subscriber) => {\n    let ring = new Array(skipCount);\n    let seen = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const valueIndex = seen++;\n      if (valueIndex < skipCount) {\n        ring[valueIndex] = value;\n      } else {\n        const index = valueIndex % skipCount;\n        const oldValue = ring[index];\n        ring[index] = value;\n        subscriber.next(oldValue);\n      }\n    }));\n    return () => {\n      ring = null;\n    };\n  });\n}\n//# sourceMappingURL=skipLast.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/d9e9be23aa5786e6994816182df65febe1ec09f7901700c438c1d4b149be7363.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/d9e9be23aa5786e6994816182df65febe1ec09f7901700c438c1d4b149be7363.json
deleted file mode 100644
index 853af33ff9832b17b2af0ae31000c5fe8b5c5248..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/d9e9be23aa5786e6994816182df65febe1ec09f7901700c438c1d4b149be7363.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { getDownloadURL as getDownloadURL$1, getMetadata as getMetadata$1, uploadBytesResumable as uploadBytesResumable$1, uploadString as uploadString$1 } from 'firebase/storage';\nimport { Observable, from } from 'rxjs';\nimport { debounceTime, shareReplay, map } from 'rxjs/operators';\nfunction fromTask(task) {\n  return new Observable(function (subscriber) {\n    var progress = function (snap) {\n      return subscriber.next(snap);\n    };\n    var error = function (e) {\n      return subscriber.error(e);\n    };\n    var complete = function () {\n      return subscriber.complete();\n    };\n    // emit the current state of the task\n    progress(task.snapshot);\n    // emit progression of the task\n    var unsubscribeFromOnStateChanged = task.on('state_changed', progress);\n    // use the promise form of task, to get the last success snapshot\n    task.then(function (snapshot) {\n      progress(snapshot);\n      setTimeout(function () {\n        return complete();\n      }, 0);\n    }, function (e) {\n      progress(task.snapshot);\n      setTimeout(function () {\n        return error(e);\n      }, 0);\n    });\n    // the unsubscribe method returns by storage isn't typed in the\n    // way rxjs expects, Function vs () => void, so wrap it\n    return function unsubscribe() {\n      unsubscribeFromOnStateChanged();\n    };\n  }).pipe(\n  // since we're emitting first the current snapshot and then progression\n  // it's possible that we could double fire synchronously; namely when in\n  // a terminal state (success, error, canceled). Debounce to address.\n  debounceTime(0));\n}\nfunction getDownloadURL(ref) {\n  return from(getDownloadURL$1(ref));\n}\n// TODO: fix storage typing in firebase, then apply the same fix here\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMetadata(ref) {\n  return from(getMetadata$1(ref));\n}\n// MARK: Breaking change (renaming put to uploadBytesResumable)\nfunction uploadBytesResumable(ref, data, metadata) {\n  return new Observable(function (subscriber) {\n    var task = uploadBytesResumable$1(ref, data, metadata);\n    var subscription = fromTask(task).subscribe(subscriber);\n    return function unsubscribe() {\n      subscription.unsubscribe();\n      task.cancel();\n    };\n  }).pipe(shareReplay({\n    bufferSize: 1,\n    refCount: true\n  }));\n}\n// MARK: Breaking change (renaming put to uploadString)\nfunction uploadString(ref, data, format, metadata) {\n  return from(uploadString$1(ref, data, format, metadata));\n}\nfunction percentage(task) {\n  return fromTask(task).pipe(map(function (snapshot) {\n    return {\n      progress: snapshot.bytesTransferred / snapshot.totalBytes * 100,\n      snapshot: snapshot\n    };\n  }));\n}\nexport { fromTask, getDownloadURL, getMetadata, percentage, uploadBytesResumable, uploadString };\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/db2d62b3f8face3a966e705411b14a09ea48f0a6a11b8e0ee8d15f62a86e3a73.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/db2d62b3f8face3a966e705411b14a09ea48f0a6a11b8e0ee8d15f62a86e3a73.json
deleted file mode 100644
index 32830c047173a4bb94be7bdf12c91aec726d71e1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/db2d62b3f8face3a966e705411b14a09ea48f0a6a11b8e0ee8d15f62a86e3a73.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind = /*#__PURE__*/(() => {\n  (function (NotificationKind) {\n    NotificationKind[\"NEXT\"] = \"N\";\n    NotificationKind[\"ERROR\"] = \"E\";\n    NotificationKind[\"COMPLETE\"] = \"C\";\n  })(NotificationKind || (NotificationKind = {}));\n  return NotificationKind;\n})();\nexport class Notification {\n  constructor(kind, value, error) {\n    this.kind = kind;\n    this.value = value;\n    this.error = error;\n    this.hasValue = kind === 'N';\n  }\n  observe(observer) {\n    return observeNotification(this, observer);\n  }\n  do(nextHandler, errorHandler, completeHandler) {\n    const {\n      kind,\n      value,\n      error\n    } = this;\n    return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n  }\n  accept(nextOrObserver, error, complete) {\n    var _a;\n    return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete);\n  }\n  toObservable() {\n    const {\n      kind,\n      value,\n      error\n    } = this;\n    const result = kind === 'N' ? of(value) : kind === 'E' ? throwError(() => error) : kind === 'C' ? EMPTY : 0;\n    if (!result) {\n      throw new TypeError(`Unexpected notification kind ${kind}`);\n    }\n    return result;\n  }\n  static createNext(value) {\n    return new Notification('N', value);\n  }\n  static createError(err) {\n    return new Notification('E', undefined, err);\n  }\n  static createComplete() {\n    return Notification.completeNotification;\n  }\n}\nNotification.completeNotification = new Notification('C');\nexport function observeNotification(notification, observer) {\n  var _a, _b, _c;\n  const {\n    kind,\n    value,\n    error\n  } = notification;\n  if (typeof kind !== 'string') {\n    throw new TypeError('Invalid notification, missing \"kind\"');\n  }\n  kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n//# sourceMappingURL=Notification.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/dcacb11c340b1a811ad01356643ac22cbf76936542ba8138c568236ac5c2d74c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/dcacb11c340b1a811ad01356643ac22cbf76936542ba8138c568236ac5c2d74c.json
deleted file mode 100644
index 61811afe085f0fb546d4bfdd14a326753f1eac6f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/dcacb11c340b1a811ad01356643ac22cbf76936542ba8138c568236ac5c2d74c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';\nimport { ErrorFactory, FirebaseError, getModularInstance, calculateBackoffMillis, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nimport { Component } from '@firebase/component';\nimport { LogLevel, Logger } from '@firebase/logger';\nimport '@firebase/installations';\nconst name = \"@firebase/remote-config\";\nconst version = \"0.4.4\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Shims a minimal AbortSignal.\r\n *\r\n * <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects\r\n * of networking, such as retries. Firebase doesn't use AbortController enough to justify a\r\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\r\n * swapped out if/when we do.\r\n */\nclass RemoteConfigAbortSignal {\n  constructor() {\n    this.listeners = [];\n  }\n  addEventListener(listener) {\n    this.listeners.push(listener);\n  }\n  abort() {\n    this.listeners.forEach(listener => listener());\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RC_COMPONENT_NAME = 'remote-config';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERROR_DESCRIPTION_MAP = {\n  [\"registration-window\" /* ErrorCode.REGISTRATION_WINDOW */]: 'Undefined window object. This SDK only supports usage in a browser environment.',\n  [\"registration-project-id\" /* ErrorCode.REGISTRATION_PROJECT_ID */]: 'Undefined project identifier. Check Firebase app initialization.',\n  [\"registration-api-key\" /* ErrorCode.REGISTRATION_API_KEY */]: 'Undefined API key. Check Firebase app initialization.',\n  [\"registration-app-id\" /* ErrorCode.REGISTRATION_APP_ID */]: 'Undefined app identifier. Check Firebase app initialization.',\n  [\"storage-open\" /* ErrorCode.STORAGE_OPEN */]: 'Error thrown when opening storage. Original error: {$originalErrorMessage}.',\n  [\"storage-get\" /* ErrorCode.STORAGE_GET */]: 'Error thrown when reading from storage. Original error: {$originalErrorMessage}.',\n  [\"storage-set\" /* ErrorCode.STORAGE_SET */]: 'Error thrown when writing to storage. Original error: {$originalErrorMessage}.',\n  [\"storage-delete\" /* ErrorCode.STORAGE_DELETE */]: 'Error thrown when deleting from storage. Original error: {$originalErrorMessage}.',\n  [\"fetch-client-network\" /* ErrorCode.FETCH_NETWORK */]: 'Fetch client failed to connect to a network. Check Internet connection.' + ' Original error: {$originalErrorMessage}.',\n  [\"fetch-timeout\" /* ErrorCode.FETCH_TIMEOUT */]: 'The config fetch request timed out. ' + ' Configure timeout using \"fetchTimeoutMillis\" SDK setting.',\n  [\"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */]: 'The config fetch request timed out while in an exponential backoff state.' + ' Configure timeout using \"fetchTimeoutMillis\" SDK setting.' + ' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',\n  [\"fetch-client-parse\" /* ErrorCode.FETCH_PARSE */]: 'Fetch client could not parse response.' + ' Original error: {$originalErrorMessage}.',\n  [\"fetch-status\" /* ErrorCode.FETCH_STATUS */]: 'Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.',\n  [\"indexed-db-unavailable\" /* ErrorCode.INDEXED_DB_UNAVAILABLE */]: 'Indexed DB is not supported by current browser'\n};\nconst ERROR_FACTORY = new ErrorFactory('remoteconfig' /* service */, 'Remote Config' /* service name */, ERROR_DESCRIPTION_MAP);\n// Note how this is like typeof/instanceof, but for ErrorCode.\nfunction hasErrorCode(e, errorCode) {\n  return e instanceof FirebaseError && e.code.indexOf(errorCode) !== -1;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_VALUE_FOR_BOOLEAN = false;\nconst DEFAULT_VALUE_FOR_STRING = '';\nconst DEFAULT_VALUE_FOR_NUMBER = 0;\nconst BOOLEAN_TRUTHY_VALUES = ['1', 'true', 't', 'yes', 'y', 'on'];\nclass Value {\n  constructor(_source, _value = DEFAULT_VALUE_FOR_STRING) {\n    this._source = _source;\n    this._value = _value;\n  }\n  asString() {\n    return this._value;\n  }\n  asBoolean() {\n    if (this._source === 'static') {\n      return DEFAULT_VALUE_FOR_BOOLEAN;\n    }\n    return BOOLEAN_TRUTHY_VALUES.indexOf(this._value.toLowerCase()) >= 0;\n  }\n  asNumber() {\n    if (this._source === 'static') {\n      return DEFAULT_VALUE_FOR_NUMBER;\n    }\n    let num = Number(this._value);\n    if (isNaN(num)) {\n      num = DEFAULT_VALUE_FOR_NUMBER;\n    }\n    return num;\n  }\n  getSource() {\n    return this._source;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n *\r\n * @param app - The {@link @firebase/app#FirebaseApp} instance.\r\n * @returns A {@link RemoteConfig} instance.\r\n *\r\n * @public\r\n */\nfunction getRemoteConfig(app = getApp()) {\n  app = getModularInstance(app);\n  const rcProvider = _getProvider(app, RC_COMPONENT_NAME);\n  return rcProvider.getImmediate();\n}\n/**\r\n * Makes the last fetched config available to the getters.\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @returns A `Promise` which resolves to true if the current call activated the fetched configs.\r\n * If the fetched configs were already activated, the `Promise` will resolve to false.\r\n *\r\n * @public\r\n */\nfunction activate(_x) {\n  return _activate.apply(this, arguments);\n}\n/**\r\n * Ensures the last activated config are available to the getters.\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n *\r\n * @returns A `Promise` that resolves when the last activated config is available to the getters.\r\n * @public\r\n */\nfunction _activate() {\n  _activate = _asyncToGenerator(function* (remoteConfig) {\n    const rc = getModularInstance(remoteConfig);\n    const [lastSuccessfulFetchResponse, activeConfigEtag] = yield Promise.all([rc._storage.getLastSuccessfulFetchResponse(), rc._storage.getActiveConfigEtag()]);\n    if (!lastSuccessfulFetchResponse || !lastSuccessfulFetchResponse.config || !lastSuccessfulFetchResponse.eTag || lastSuccessfulFetchResponse.eTag === activeConfigEtag) {\n      // Either there is no successful fetched config, or is the same as current active\n      // config.\n      return false;\n    }\n    yield Promise.all([rc._storageCache.setActiveConfig(lastSuccessfulFetchResponse.config), rc._storage.setActiveConfigEtag(lastSuccessfulFetchResponse.eTag)]);\n    return true;\n  });\n  return _activate.apply(this, arguments);\n}\nfunction ensureInitialized(remoteConfig) {\n  const rc = getModularInstance(remoteConfig);\n  if (!rc._initializePromise) {\n    rc._initializePromise = rc._storageCache.loadFromStorage().then(() => {\n      rc._isInitializationComplete = true;\n    });\n  }\n  return rc._initializePromise;\n}\n/**\r\n * Fetches and caches configuration from the Remote Config service.\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @public\r\n */\nfunction fetchConfig(_x2) {\n  return _fetchConfig.apply(this, arguments);\n}\n/**\r\n * Gets all config.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @returns All config.\r\n *\r\n * @public\r\n */\nfunction _fetchConfig() {\n  _fetchConfig = _asyncToGenerator(function* (remoteConfig) {\n    const rc = getModularInstance(remoteConfig);\n    // Aborts the request after the given timeout, causing the fetch call to\n    // reject with an `AbortError`.\n    //\n    // <p>Aborting after the request completes is a no-op, so we don't need a\n    // corresponding `clearTimeout`.\n    //\n    // Locating abort logic here because:\n    // * it uses a developer setting (timeout)\n    // * it applies to all retries (like curl's max-time arg)\n    // * it is consistent with the Fetch API's signal input\n    const abortSignal = new RemoteConfigAbortSignal();\n    setTimeout( /*#__PURE__*/_asyncToGenerator(function* () {\n      // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\n      abortSignal.abort();\n    }), rc.settings.fetchTimeoutMillis);\n    // Catches *all* errors thrown by client so status can be set consistently.\n    try {\n      yield rc._client.fetch({\n        cacheMaxAgeMillis: rc.settings.minimumFetchIntervalMillis,\n        signal: abortSignal\n      });\n      yield rc._storageCache.setLastFetchStatus('success');\n    } catch (e) {\n      const lastFetchStatus = hasErrorCode(e, \"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */) ? 'throttle' : 'failure';\n      yield rc._storageCache.setLastFetchStatus(lastFetchStatus);\n      throw e;\n    }\n  });\n  return _fetchConfig.apply(this, arguments);\n}\nfunction getAll(remoteConfig) {\n  const rc = getModularInstance(remoteConfig);\n  return getAllKeys(rc._storageCache.getActiveConfig(), rc.defaultConfig).reduce((allConfigs, key) => {\n    allConfigs[key] = getValue(remoteConfig, key);\n    return allConfigs;\n  }, {});\n}\n/**\r\n * Gets the value for the given key as a boolean.\r\n *\r\n * Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @param key - The name of the parameter.\r\n *\r\n * @returns The value for the given key as a boolean.\r\n * @public\r\n */\nfunction getBoolean(remoteConfig, key) {\n  return getValue(getModularInstance(remoteConfig), key).asBoolean();\n}\n/**\r\n * Gets the value for the given key as a number.\r\n *\r\n * Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @param key - The name of the parameter.\r\n *\r\n * @returns The value for the given key as a number.\r\n *\r\n * @public\r\n */\nfunction getNumber(remoteConfig, key) {\n  return getValue(getModularInstance(remoteConfig), key).asNumber();\n}\n/**\r\n * Gets the value for the given key as a string.\r\n * Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @param key - The name of the parameter.\r\n *\r\n * @returns The value for the given key as a string.\r\n *\r\n * @public\r\n */\nfunction getString(remoteConfig, key) {\n  return getValue(getModularInstance(remoteConfig), key).asString();\n}\n/**\r\n * Gets the {@link Value} for the given key.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @param key - The name of the parameter.\r\n *\r\n * @returns The value for the given key.\r\n *\r\n * @public\r\n */\nfunction getValue(remoteConfig, key) {\n  const rc = getModularInstance(remoteConfig);\n  if (!rc._isInitializationComplete) {\n    rc._logger.debug(`A value was requested for key \"${key}\" before SDK initialization completed.` + ' Await on ensureInitialized if the intent was to get a previously activated value.');\n  }\n  const activeConfig = rc._storageCache.getActiveConfig();\n  if (activeConfig && activeConfig[key] !== undefined) {\n    return new Value('remote', activeConfig[key]);\n  } else if (rc.defaultConfig && rc.defaultConfig[key] !== undefined) {\n    return new Value('default', String(rc.defaultConfig[key]));\n  }\n  rc._logger.debug(`Returning static value for key \"${key}\".` + ' Define a default or remote value if this is unintentional.');\n  return new Value('static');\n}\n/**\r\n * Defines the log level to use.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n * @param logLevel - The log level to set.\r\n *\r\n * @public\r\n */\nfunction setLogLevel(remoteConfig, logLevel) {\n  const rc = getModularInstance(remoteConfig);\n  switch (logLevel) {\n    case 'debug':\n      rc._logger.logLevel = LogLevel.DEBUG;\n      break;\n    case 'silent':\n      rc._logger.logLevel = LogLevel.SILENT;\n      break;\n    default:\n      rc._logger.logLevel = LogLevel.ERROR;\n  }\n}\n/**\r\n * Dedupes and returns an array of all the keys of the received objects.\r\n */\nfunction getAllKeys(obj1 = {}, obj2 = {}) {\n  return Object.keys(Object.assign(Object.assign({}, obj1), obj2));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Implements the {@link RemoteConfigClient} abstraction with success response caching.\r\n *\r\n * <p>Comparable to the browser's Cache API for responses, but the Cache API requires a Service\r\n * Worker, which requires HTTPS, which would significantly complicate SDK installation. Also, the\r\n * Cache API doesn't support matching entries by time.\r\n */\nclass CachingClient {\n  constructor(client, storage, storageCache, logger) {\n    this.client = client;\n    this.storage = storage;\n    this.storageCache = storageCache;\n    this.logger = logger;\n  }\n  /**\r\n   * Returns true if the age of the cached fetched configs is less than or equal to\r\n   * {@link Settings#minimumFetchIntervalInSeconds}.\r\n   *\r\n   * <p>This is comparable to passing `headers = { 'Cache-Control': max-age <maxAge> }` to the\r\n   * native Fetch API.\r\n   *\r\n   * <p>Visible for testing.\r\n   */\n  isCachedDataFresh(cacheMaxAgeMillis, lastSuccessfulFetchTimestampMillis) {\n    // Cache can only be fresh if it's populated.\n    if (!lastSuccessfulFetchTimestampMillis) {\n      this.logger.debug('Config fetch cache check. Cache unpopulated.');\n      return false;\n    }\n    // Calculates age of cache entry.\n    const cacheAgeMillis = Date.now() - lastSuccessfulFetchTimestampMillis;\n    const isCachedDataFresh = cacheAgeMillis <= cacheMaxAgeMillis;\n    this.logger.debug('Config fetch cache check.' + ` Cache age millis: ${cacheAgeMillis}.` + ` Cache max age millis (minimumFetchIntervalMillis setting): ${cacheMaxAgeMillis}.` + ` Is cache hit: ${isCachedDataFresh}.`);\n    return isCachedDataFresh;\n  }\n  fetch(request) {\n    var _this = this;\n    return _asyncToGenerator(function* () {\n      // Reads from persisted storage to avoid cache miss if callers don't wait on initialization.\n      const [lastSuccessfulFetchTimestampMillis, lastSuccessfulFetchResponse] = yield Promise.all([_this.storage.getLastSuccessfulFetchTimestampMillis(), _this.storage.getLastSuccessfulFetchResponse()]);\n      // Exits early on cache hit.\n      if (lastSuccessfulFetchResponse && _this.isCachedDataFresh(request.cacheMaxAgeMillis, lastSuccessfulFetchTimestampMillis)) {\n        return lastSuccessfulFetchResponse;\n      }\n      // Deviates from pure decorator by not honoring a passed ETag since we don't have a public API\n      // that allows the caller to pass an ETag.\n      request.eTag = lastSuccessfulFetchResponse && lastSuccessfulFetchResponse.eTag;\n      // Falls back to service on cache miss.\n      const response = yield _this.client.fetch(request);\n      // Fetch throws for non-success responses, so success is guaranteed here.\n      const storageOperations = [\n      // Uses write-through cache for consistency with synchronous public API.\n      _this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];\n      if (response.status === 200) {\n        // Caches response only if it has changed, ie non-304 responses.\n        storageOperations.push(_this.storage.setLastSuccessfulFetchResponse(response));\n      }\n      yield Promise.all(storageOperations);\n      return response;\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Attempts to get the most accurate browser language setting.\r\n *\r\n * <p>Adapted from getUserLanguage in packages/auth/src/utils.js for TypeScript.\r\n *\r\n * <p>Defers default language specification to server logic for consistency.\r\n *\r\n * @param navigatorLanguage Enables tests to override read-only {@link NavigatorLanguage}.\r\n */\nfunction getUserLanguage(navigatorLanguage = navigator) {\n  return (\n    // Most reliable, but only supported in Chrome/Firefox.\n    navigatorLanguage.languages && navigatorLanguage.languages[0] ||\n    // Supported in most browsers, but returns the language of the browser\n    // UI, not the language set in browser settings.\n    navigatorLanguage.language\n    // Polyfill otherwise.\n  );\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Implements the Client abstraction for the Remote Config REST API.\r\n */\nclass RestClient {\n  constructor(firebaseInstallations, sdkVersion, namespace, projectId, apiKey, appId) {\n    this.firebaseInstallations = firebaseInstallations;\n    this.sdkVersion = sdkVersion;\n    this.namespace = namespace;\n    this.projectId = projectId;\n    this.apiKey = apiKey;\n    this.appId = appId;\n  }\n  /**\r\n   * Fetches from the Remote Config REST API.\r\n   *\r\n   * @throws a {@link ErrorCode.FETCH_NETWORK} error if {@link GlobalFetch#fetch} can't\r\n   * connect to the network.\r\n   * @throws a {@link ErrorCode.FETCH_PARSE} error if {@link Response#json} can't parse the\r\n   * fetch response.\r\n   * @throws a {@link ErrorCode.FETCH_STATUS} error if the service returns an HTTP error status.\r\n   */\n  fetch(request) {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      const [installationId, installationToken] = yield Promise.all([_this2.firebaseInstallations.getId(), _this2.firebaseInstallations.getToken()]);\n      const urlBase = window.FIREBASE_REMOTE_CONFIG_URL_BASE || 'https://firebaseremoteconfig.googleapis.com';\n      const url = `${urlBase}/v1/projects/${_this2.projectId}/namespaces/${_this2.namespace}:fetch?key=${_this2.apiKey}`;\n      const headers = {\n        'Content-Type': 'application/json',\n        'Content-Encoding': 'gzip',\n        // Deviates from pure decorator by not passing max-age header since we don't currently have\n        // service behavior using that header.\n        'If-None-Match': request.eTag || '*'\n      };\n      const requestBody = {\n        /* eslint-disable camelcase */\n        sdk_version: _this2.sdkVersion,\n        app_instance_id: installationId,\n        app_instance_id_token: installationToken,\n        app_id: _this2.appId,\n        language_code: getUserLanguage()\n        /* eslint-enable camelcase */\n      };\n\n      const options = {\n        method: 'POST',\n        headers,\n        body: JSON.stringify(requestBody)\n      };\n      // This logic isn't REST-specific, but shimming abort logic isn't worth another decorator.\n      const fetchPromise = fetch(url, options);\n      const timeoutPromise = new Promise((_resolve, reject) => {\n        // Maps async event listener to Promise API.\n        request.signal.addEventListener(() => {\n          // Emulates https://heycam.github.io/webidl/#aborterror\n          const error = new Error('The operation was aborted.');\n          error.name = 'AbortError';\n          reject(error);\n        });\n      });\n      let response;\n      try {\n        yield Promise.race([fetchPromise, timeoutPromise]);\n        response = yield fetchPromise;\n      } catch (originalError) {\n        let errorCode = \"fetch-client-network\" /* ErrorCode.FETCH_NETWORK */;\n        if ((originalError === null || originalError === void 0 ? void 0 : originalError.name) === 'AbortError') {\n          errorCode = \"fetch-timeout\" /* ErrorCode.FETCH_TIMEOUT */;\n        }\n\n        throw ERROR_FACTORY.create(errorCode, {\n          originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n        });\n      }\n      let status = response.status;\n      // Normalizes nullable header to optional.\n      const responseEtag = response.headers.get('ETag') || undefined;\n      let config;\n      let state;\n      // JSON parsing throws SyntaxError if the response body isn't a JSON string.\n      // Requesting application/json and checking for a 200 ensures there's JSON data.\n      if (response.status === 200) {\n        let responseBody;\n        try {\n          responseBody = yield response.json();\n        } catch (originalError) {\n          throw ERROR_FACTORY.create(\"fetch-client-parse\" /* ErrorCode.FETCH_PARSE */, {\n            originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n          });\n        }\n        config = responseBody['entries'];\n        state = responseBody['state'];\n      }\n      // Normalizes based on legacy state.\n      if (state === 'INSTANCE_STATE_UNSPECIFIED') {\n        status = 500;\n      } else if (state === 'NO_CHANGE') {\n        status = 304;\n      } else if (state === 'NO_TEMPLATE' || state === 'EMPTY_CONFIG') {\n        // These cases can be fixed remotely, so normalize to safe value.\n        config = {};\n      }\n      // Normalize to exception-based control flow for non-success cases.\n      // Encapsulates HTTP specifics in this class as much as possible. Status is still the best for\n      // differentiating success states (200 from 304; the state body param is undefined in a\n      // standard 304).\n      if (status !== 304 && status !== 200) {\n        throw ERROR_FACTORY.create(\"fetch-status\" /* ErrorCode.FETCH_STATUS */, {\n          httpStatus: status\n        });\n      }\n      return {\n        status,\n        eTag: responseEtag,\n        config\n      };\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Supports waiting on a backoff by:\r\n *\r\n * <ul>\r\n *   <li>Promisifying setTimeout, so we can set a timeout in our Promise chain</li>\r\n *   <li>Listening on a signal bus for abort events, just like the Fetch API</li>\r\n *   <li>Failing in the same way the Fetch API fails, so timing out a live request and a throttled\r\n *       request appear the same.</li>\r\n * </ul>\r\n *\r\n * <p>Visible for testing.\r\n */\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\n  return new Promise((resolve, reject) => {\n    // Derives backoff from given end time, normalizing negative numbers to zero.\n    const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\n    const timeout = setTimeout(resolve, backoffMillis);\n    // Adds listener, rather than sets onabort, because signal is a shared object.\n    signal.addEventListener(() => {\n      clearTimeout(timeout);\n      // If the request completes before this timeout, the rejection has no effect.\n      reject(ERROR_FACTORY.create(\"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */, {\n        throttleEndTimeMillis\n      }));\n    });\n  });\n}\n/**\r\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\r\n */\nfunction isRetriableError(e) {\n  if (!(e instanceof FirebaseError) || !e.customData) {\n    return false;\n  }\n  // Uses string index defined by ErrorData, which FirebaseError implements.\n  const httpStatus = Number(e.customData['httpStatus']);\n  return httpStatus === 429 || httpStatus === 500 || httpStatus === 503 || httpStatus === 504;\n}\n/**\r\n * Decorates a Client with retry logic.\r\n *\r\n * <p>Comparable to CachingClient, but uses backoff logic instead of cache max age and doesn't cache\r\n * responses (because the SDK has no use for error responses).\r\n */\nclass RetryingClient {\n  constructor(client, storage) {\n    this.client = client;\n    this.storage = storage;\n  }\n  fetch(request) {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      const throttleMetadata = (yield _this3.storage.getThrottleMetadata()) || {\n        backoffCount: 0,\n        throttleEndTimeMillis: Date.now()\n      };\n      return _this3.attemptFetch(request, throttleMetadata);\n    })();\n  }\n  /**\r\n   * A recursive helper for attempting a fetch request repeatedly.\r\n   *\r\n   * @throws any non-retriable errors.\r\n   */\n  attemptFetch(request, {\n    throttleEndTimeMillis,\n    backoffCount\n  }) {\n    var _this4 = this;\n    return _asyncToGenerator(function* () {\n      // Starts with a (potentially zero) timeout to support resumption from stored state.\n      // Ensures the throttle end time is honored if the last attempt timed out.\n      // Note the SDK will never make a request if the fetch timeout expires at this point.\n      yield setAbortableTimeout(request.signal, throttleEndTimeMillis);\n      try {\n        const response = yield _this4.client.fetch(request);\n        // Note the SDK only clears throttle state if response is success or non-retriable.\n        yield _this4.storage.deleteThrottleMetadata();\n        return response;\n      } catch (e) {\n        if (!isRetriableError(e)) {\n          throw e;\n        }\n        // Increments backoff state.\n        const throttleMetadata = {\n          throttleEndTimeMillis: Date.now() + calculateBackoffMillis(backoffCount),\n          backoffCount: backoffCount + 1\n        };\n        // Persists state.\n        yield _this4.storage.setThrottleMetadata(throttleMetadata);\n        return _this4.attemptFetch(request, throttleMetadata);\n      }\n    })();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_FETCH_TIMEOUT_MILLIS = 60 * 1000; // One minute\nconst DEFAULT_CACHE_MAX_AGE_MILLIS = 12 * 60 * 60 * 1000; // Twelve hours.\n/**\r\n * Encapsulates business logic mapping network and storage dependencies to the public SDK API.\r\n *\r\n * See {@link https://github.com/FirebasePrivate/firebase-js-sdk/blob/master/packages/firebase/index.d.ts|interface documentation} for method descriptions.\r\n */\nclass RemoteConfig {\n  constructor(\n  // Required by FirebaseServiceFactory interface.\n  app,\n  // JS doesn't support private yet\n  // (https://github.com/tc39/proposal-class-fields#private-fields), so we hint using an\n  // underscore prefix.\n  /**\r\n   * @internal\r\n   */\n  _client,\n  /**\r\n   * @internal\r\n   */\n  _storageCache,\n  /**\r\n   * @internal\r\n   */\n  _storage,\n  /**\r\n   * @internal\r\n   */\n  _logger) {\n    this.app = app;\n    this._client = _client;\n    this._storageCache = _storageCache;\n    this._storage = _storage;\n    this._logger = _logger;\n    /**\r\n     * Tracks completion of initialization promise.\r\n     * @internal\r\n     */\n    this._isInitializationComplete = false;\n    this.settings = {\n      fetchTimeoutMillis: DEFAULT_FETCH_TIMEOUT_MILLIS,\n      minimumFetchIntervalMillis: DEFAULT_CACHE_MAX_AGE_MILLIS\n    };\n    this.defaultConfig = {};\n  }\n  get fetchTimeMillis() {\n    return this._storageCache.getLastSuccessfulFetchTimestampMillis() || -1;\n  }\n  get lastFetchStatus() {\n    return this._storageCache.getLastFetchStatus() || 'no-fetch-yet';\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Converts an error event associated with a {@link IDBRequest} to a {@link FirebaseError}.\r\n */\nfunction toFirebaseError(event, errorCode) {\n  const originalError = event.target.error || undefined;\n  return ERROR_FACTORY.create(errorCode, {\n    originalErrorMessage: originalError && (originalError === null || originalError === void 0 ? void 0 : originalError.message)\n  });\n}\n/**\r\n * A general-purpose store keyed by app + namespace + {@link\r\n * ProjectNamespaceKeyFieldValue}.\r\n *\r\n * <p>The Remote Config SDK can be used with multiple app installations, and each app can interact\r\n * with multiple namespaces, so this store uses app (ID + name) and namespace as common parent keys\r\n * for a set of key-value pairs. See {@link Storage#createCompositeKey}.\r\n *\r\n * <p>Visible for testing.\r\n */\nconst APP_NAMESPACE_STORE = 'app_namespace_store';\nconst DB_NAME = 'firebase_remote_config';\nconst DB_VERSION = 1;\n// Visible for testing.\nfunction openDatabase() {\n  return new Promise((resolve, reject) => {\n    try {\n      const request = indexedDB.open(DB_NAME, DB_VERSION);\n      request.onerror = event => {\n        reject(toFirebaseError(event, \"storage-open\" /* ErrorCode.STORAGE_OPEN */));\n      };\n\n      request.onsuccess = event => {\n        resolve(event.target.result);\n      };\n      request.onupgradeneeded = event => {\n        const db = event.target.result;\n        // We don't use 'break' in this switch statement, the fall-through\n        // behavior is what we want, because if there are multiple versions between\n        // the old version and the current version, we want ALL the migrations\n        // that correspond to those versions to run, not only the last one.\n        // eslint-disable-next-line default-case\n        switch (event.oldVersion) {\n          case 0:\n            db.createObjectStore(APP_NAMESPACE_STORE, {\n              keyPath: 'compositeKey'\n            });\n        }\n      };\n    } catch (error) {\n      reject(ERROR_FACTORY.create(\"storage-open\" /* ErrorCode.STORAGE_OPEN */, {\n        originalErrorMessage: error === null || error === void 0 ? void 0 : error.message\n      }));\n    }\n  });\n}\n/**\r\n * Abstracts data persistence.\r\n */\nclass Storage {\n  /**\r\n   * @param appId enables storage segmentation by app (ID + name).\r\n   * @param appName enables storage segmentation by app (ID + name).\r\n   * @param namespace enables storage segmentation by namespace.\r\n   */\n  constructor(appId, appName, namespace, openDbPromise = openDatabase()) {\n    this.appId = appId;\n    this.appName = appName;\n    this.namespace = namespace;\n    this.openDbPromise = openDbPromise;\n  }\n  getLastFetchStatus() {\n    return this.get('last_fetch_status');\n  }\n  setLastFetchStatus(status) {\n    return this.set('last_fetch_status', status);\n  }\n  // This is comparable to a cache entry timestamp. If we need to expire other data, we could\n  // consider adding timestamp to all storage records and an optional max age arg to getters.\n  getLastSuccessfulFetchTimestampMillis() {\n    return this.get('last_successful_fetch_timestamp_millis');\n  }\n  setLastSuccessfulFetchTimestampMillis(timestamp) {\n    return this.set('last_successful_fetch_timestamp_millis', timestamp);\n  }\n  getLastSuccessfulFetchResponse() {\n    return this.get('last_successful_fetch_response');\n  }\n  setLastSuccessfulFetchResponse(response) {\n    return this.set('last_successful_fetch_response', response);\n  }\n  getActiveConfig() {\n    return this.get('active_config');\n  }\n  setActiveConfig(config) {\n    return this.set('active_config', config);\n  }\n  getActiveConfigEtag() {\n    return this.get('active_config_etag');\n  }\n  setActiveConfigEtag(etag) {\n    return this.set('active_config_etag', etag);\n  }\n  getThrottleMetadata() {\n    return this.get('throttle_metadata');\n  }\n  setThrottleMetadata(metadata) {\n    return this.set('throttle_metadata', metadata);\n  }\n  deleteThrottleMetadata() {\n    return this.delete('throttle_metadata');\n  }\n  get(key) {\n    var _this5 = this;\n    return _asyncToGenerator(function* () {\n      const db = yield _this5.openDbPromise;\n      return new Promise((resolve, reject) => {\n        const transaction = db.transaction([APP_NAMESPACE_STORE], 'readonly');\n        const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n        const compositeKey = _this5.createCompositeKey(key);\n        try {\n          const request = objectStore.get(compositeKey);\n          request.onerror = event => {\n            reject(toFirebaseError(event, \"storage-get\" /* ErrorCode.STORAGE_GET */));\n          };\n\n          request.onsuccess = event => {\n            const result = event.target.result;\n            if (result) {\n              resolve(result.value);\n            } else {\n              resolve(undefined);\n            }\n          };\n        } catch (e) {\n          reject(ERROR_FACTORY.create(\"storage-get\" /* ErrorCode.STORAGE_GET */, {\n            originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n          }));\n        }\n      });\n    })();\n  }\n  set(key, value) {\n    var _this6 = this;\n    return _asyncToGenerator(function* () {\n      const db = yield _this6.openDbPromise;\n      return new Promise((resolve, reject) => {\n        const transaction = db.transaction([APP_NAMESPACE_STORE], 'readwrite');\n        const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n        const compositeKey = _this6.createCompositeKey(key);\n        try {\n          const request = objectStore.put({\n            compositeKey,\n            value\n          });\n          request.onerror = event => {\n            reject(toFirebaseError(event, \"storage-set\" /* ErrorCode.STORAGE_SET */));\n          };\n\n          request.onsuccess = () => {\n            resolve();\n          };\n        } catch (e) {\n          reject(ERROR_FACTORY.create(\"storage-set\" /* ErrorCode.STORAGE_SET */, {\n            originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n          }));\n        }\n      });\n    })();\n  }\n  delete(key) {\n    var _this7 = this;\n    return _asyncToGenerator(function* () {\n      const db = yield _this7.openDbPromise;\n      return new Promise((resolve, reject) => {\n        const transaction = db.transaction([APP_NAMESPACE_STORE], 'readwrite');\n        const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n        const compositeKey = _this7.createCompositeKey(key);\n        try {\n          const request = objectStore.delete(compositeKey);\n          request.onerror = event => {\n            reject(toFirebaseError(event, \"storage-delete\" /* ErrorCode.STORAGE_DELETE */));\n          };\n\n          request.onsuccess = () => {\n            resolve();\n          };\n        } catch (e) {\n          reject(ERROR_FACTORY.create(\"storage-delete\" /* ErrorCode.STORAGE_DELETE */, {\n            originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n          }));\n        }\n      });\n    })();\n  }\n  // Facilitates composite key functionality (which is unsupported in IE).\n  createCompositeKey(key) {\n    return [this.appId, this.appName, this.namespace, key].join();\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * A memory cache layer over storage to support the SDK's synchronous read requirements.\r\n */\nclass StorageCache {\n  constructor(storage) {\n    this.storage = storage;\n  }\n  /**\r\n   * Memory-only getters\r\n   */\n  getLastFetchStatus() {\n    return this.lastFetchStatus;\n  }\n  getLastSuccessfulFetchTimestampMillis() {\n    return this.lastSuccessfulFetchTimestampMillis;\n  }\n  getActiveConfig() {\n    return this.activeConfig;\n  }\n  /**\r\n   * Read-ahead getter\r\n   */\n  loadFromStorage() {\n    var _this8 = this;\n    return _asyncToGenerator(function* () {\n      const lastFetchStatusPromise = _this8.storage.getLastFetchStatus();\n      const lastSuccessfulFetchTimestampMillisPromise = _this8.storage.getLastSuccessfulFetchTimestampMillis();\n      const activeConfigPromise = _this8.storage.getActiveConfig();\n      // Note:\n      // 1. we consistently check for undefined to avoid clobbering defined values\n      //   in memory\n      // 2. we defer awaiting to improve readability, as opposed to destructuring\n      //   a Promise.all result, for example\n      const lastFetchStatus = yield lastFetchStatusPromise;\n      if (lastFetchStatus) {\n        _this8.lastFetchStatus = lastFetchStatus;\n      }\n      const lastSuccessfulFetchTimestampMillis = yield lastSuccessfulFetchTimestampMillisPromise;\n      if (lastSuccessfulFetchTimestampMillis) {\n        _this8.lastSuccessfulFetchTimestampMillis = lastSuccessfulFetchTimestampMillis;\n      }\n      const activeConfig = yield activeConfigPromise;\n      if (activeConfig) {\n        _this8.activeConfig = activeConfig;\n      }\n    })();\n  }\n  /**\r\n   * Write-through setters\r\n   */\n  setLastFetchStatus(status) {\n    this.lastFetchStatus = status;\n    return this.storage.setLastFetchStatus(status);\n  }\n  setLastSuccessfulFetchTimestampMillis(timestampMillis) {\n    this.lastSuccessfulFetchTimestampMillis = timestampMillis;\n    return this.storage.setLastSuccessfulFetchTimestampMillis(timestampMillis);\n  }\n  setActiveConfig(activeConfig) {\n    this.activeConfig = activeConfig;\n    return this.storage.setActiveConfig(activeConfig);\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction registerRemoteConfig() {\n  _registerComponent(new Component(RC_COMPONENT_NAME, remoteConfigFactory, \"PUBLIC\" /* ComponentType.PUBLIC */).setMultipleInstances(true));\n  registerVersion(name, version);\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(name, version, 'esm2017');\n  function remoteConfigFactory(container, {\n    instanceIdentifier: namespace\n  }) {\n    /* Dependencies */\n    // getImmediate for FirebaseApp will always succeed\n    const app = container.getProvider('app').getImmediate();\n    // The following call will always succeed because rc has `import '@firebase/installations'`\n    const installations = container.getProvider('installations-internal').getImmediate();\n    // Guards against the SDK being used in non-browser environments.\n    if (typeof window === 'undefined') {\n      throw ERROR_FACTORY.create(\"registration-window\" /* ErrorCode.REGISTRATION_WINDOW */);\n    }\n    // Guards against the SDK being used when indexedDB is not available.\n    if (!isIndexedDBAvailable()) {\n      throw ERROR_FACTORY.create(\"indexed-db-unavailable\" /* ErrorCode.INDEXED_DB_UNAVAILABLE */);\n    }\n    // Normalizes optional inputs.\n    const {\n      projectId,\n      apiKey,\n      appId\n    } = app.options;\n    if (!projectId) {\n      throw ERROR_FACTORY.create(\"registration-project-id\" /* ErrorCode.REGISTRATION_PROJECT_ID */);\n    }\n\n    if (!apiKey) {\n      throw ERROR_FACTORY.create(\"registration-api-key\" /* ErrorCode.REGISTRATION_API_KEY */);\n    }\n\n    if (!appId) {\n      throw ERROR_FACTORY.create(\"registration-app-id\" /* ErrorCode.REGISTRATION_APP_ID */);\n    }\n\n    namespace = namespace || 'firebase';\n    const storage = new Storage(appId, app.name, namespace);\n    const storageCache = new StorageCache(storage);\n    const logger = new Logger(name);\n    // Sets ERROR as the default log level.\n    // See RemoteConfig#setLogLevel for corresponding normalization to ERROR log level.\n    logger.logLevel = LogLevel.ERROR;\n    const restClient = new RestClient(installations,\n    // Uses the JS SDK version, by which the RC package version can be deduced, if necessary.\n    SDK_VERSION, namespace, projectId, apiKey, appId);\n    const retryingClient = new RetryingClient(restClient, storage);\n    const cachingClient = new CachingClient(retryingClient, storage, storageCache, logger);\n    const remoteConfigInstance = new RemoteConfig(app, cachingClient, storageCache, storage, logger);\n    // Starts warming cache.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    ensureInitialized(remoteConfigInstance);\n    return remoteConfigInstance;\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// This API is put in a separate file, so we can stub fetchConfig and activate in tests.\n// It's not possible to stub standalone functions from the same module.\n/**\r\n *\r\n * Performs fetch and activate operations, as a convenience.\r\n *\r\n * @param remoteConfig - The {@link RemoteConfig} instance.\r\n *\r\n * @returns A `Promise` which resolves to true if the current call activated the fetched configs.\r\n * If the fetched configs were already activated, the `Promise` will resolve to false.\r\n *\r\n * @public\r\n */\nfunction fetchAndActivate(_x3) {\n  return _fetchAndActivate.apply(this, arguments);\n}\n/**\r\n * This method provides two different checks:\r\n *\r\n * 1. Check if IndexedDB exists in the browser environment.\r\n * 2. Check if the current browser context allows IndexedDB `open()` calls.\r\n *\r\n * @returns A `Promise` which resolves to true if a {@link RemoteConfig} instance\r\n * can be initialized in this environment, or false if it cannot.\r\n * @public\r\n */\nfunction _fetchAndActivate() {\n  _fetchAndActivate = _asyncToGenerator(function* (remoteConfig) {\n    remoteConfig = getModularInstance(remoteConfig);\n    yield fetchConfig(remoteConfig);\n    return activate(remoteConfig);\n  });\n  return _fetchAndActivate.apply(this, arguments);\n}\nfunction isSupported() {\n  return _isSupported.apply(this, arguments);\n}\n/**\r\n * Firebase Remote Config\r\n *\r\n * @packageDocumentation\r\n */\n/** register component and version */\nfunction _isSupported() {\n  _isSupported = _asyncToGenerator(function* () {\n    if (!isIndexedDBAvailable()) {\n      return false;\n    }\n    try {\n      const isDBOpenable = yield validateIndexedDBOpenable();\n      return isDBOpenable;\n    } catch (error) {\n      return false;\n    }\n  });\n  return _isSupported.apply(this, arguments);\n}\nregisterRemoteConfig();\nexport { activate, ensureInitialized, fetchAndActivate, fetchConfig, getAll, getBoolean, getNumber, getRemoteConfig, getString, getValue, isSupported, setLogLevel };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/dd581fae06d2ccd8950c367da3fe06daf10fb2053238f7a30d33959855502f79.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/dd581fae06d2ccd8950c367da3fe06daf10fb2053238f7a30d33959855502f79.json
deleted file mode 100644
index 445e10150b6c883cc66053825385c0d6807d086f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/dd581fae06d2ccd8950c367da3fe06daf10fb2053238f7a30d33959855502f79.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport const TimeoutError = createErrorClass(_super => function TimeoutErrorImpl(info = null) {\n  _super(this);\n  this.message = 'Timeout has occurred';\n  this.name = 'TimeoutError';\n  this.info = info;\n});\nexport function timeout(config, schedulerArg) {\n  const {\n    first,\n    each,\n    with: _with = timeoutErrorFactory,\n    scheduler = schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler,\n    meta = null\n  } = isValidDate(config) ? {\n    first: config\n  } : typeof config === 'number' ? {\n    each: config\n  } : config;\n  if (first == null && each == null) {\n    throw new TypeError('No timeout provided.');\n  }\n  return operate((source, subscriber) => {\n    let originalSourceSubscription;\n    let timerSubscription;\n    let lastValue = null;\n    let seen = 0;\n    const startTimer = delay => {\n      timerSubscription = executeSchedule(subscriber, scheduler, () => {\n        try {\n          originalSourceSubscription.unsubscribe();\n          innerFrom(_with({\n            meta,\n            lastValue,\n            seen\n          })).subscribe(subscriber);\n        } catch (err) {\n          subscriber.error(err);\n        }\n      }, delay);\n    };\n    originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, value => {\n      timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n      seen++;\n      subscriber.next(lastValue = value);\n      each > 0 && startTimer(each);\n    }, undefined, undefined, () => {\n      if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) {\n        timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n      }\n      lastValue = null;\n    }));\n    !seen && startTimer(first != null ? typeof first === 'number' ? first : +first - scheduler.now() : each);\n  });\n}\nfunction timeoutErrorFactory(info) {\n  throw new TimeoutError(info);\n}\n//# sourceMappingURL=timeout.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e1dfc2210ca51317b41364f6728d7be93b6bdefe1c482befcb5cbb958579e614.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e1dfc2210ca51317b41364f6728d7be93b6bdefe1c482befcb5cbb958579e614.json
deleted file mode 100644
index b3dfc0380e6ea9d64fab52f223e2ace37becdda2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e1dfc2210ca51317b41364f6728d7be93b6bdefe1c482befcb5cbb958579e614.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"let nextHandle = 1;\nlet resolved;\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n  if (handle in activeHandles) {\n    delete activeHandles[handle];\n    return true;\n  }\n  return false;\n}\nexport const Immediate = {\n  setImmediate(cb) {\n    const handle = nextHandle++;\n    activeHandles[handle] = true;\n    if (!resolved) {\n      resolved = Promise.resolve();\n    }\n    resolved.then(() => findAndClearHandle(handle) && cb());\n    return handle;\n  },\n  clearImmediate(handle) {\n    findAndClearHandle(handle);\n  }\n};\nexport const TestTools = {\n  pending() {\n    return Object.keys(activeHandles).length;\n  }\n};\n//# sourceMappingURL=Immediate.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e204eee5f039c189b74d4869fe5d863f643e04671ff18233746a85881d78b63a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e204eee5f039c189b74d4869fe5d863f643e04671ff18233746a85881d78b63a.json
deleted file mode 100644
index 16aa348c8c7f7f306df172181c8c9506f709fe60..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e204eee5f039c189b74d4869fe5d863f643e04671ff18233746a85881d78b63a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n  return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e34cb9ab6c02a1b8e6b77e15bf5e09635be8bf991bda34576266cf2ac77326d0.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e34cb9ab6c02a1b8e6b77e15bf5e09635be8bf991bda34576266cf2ac77326d0.json
deleted file mode 100644
index 760cd08c2866acec33d6e29cb1ba69344c5c9059..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e34cb9ab6c02a1b8e6b77e15bf5e09635be8bf991bda34576266cf2ac77326d0.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { defaultThrottleConfig, throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler = asyncScheduler, config = defaultThrottleConfig) {\n  const duration$ = timer(duration, scheduler);\n  return throttle(() => duration$, config);\n}\n//# sourceMappingURL=throttleTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b761d34fa2bd3729a8cdbce86687177d943951292da5ea98e6316b5d05bd5c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b761d34fa2bd3729a8cdbce86687177d943951292da5ea98e6316b5d05bd5c.json
deleted file mode 100644
index 9eb90637c0b3950ea6ed2fb3b9bfc38977d588b9..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b761d34fa2bd3729a8cdbce86687177d943951292da5ea98e6316b5d05bd5c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n  if (isFunction(options)) {\n    resultSelector = options;\n    options = undefined;\n  }\n  if (resultSelector) {\n    return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n  }\n  const [add, remove] = isEventTarget(target) ? eventTargetMethods.map(methodName => handler => target[methodName](eventName, handler, options)) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [];\n  if (!add) {\n    if (isArrayLike(target)) {\n      return mergeMap(subTarget => fromEvent(subTarget, eventName, options))(innerFrom(target));\n    }\n  }\n  if (!add) {\n    throw new TypeError('Invalid event target');\n  }\n  return new Observable(subscriber => {\n    const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n    add(handler);\n    return () => remove(handler);\n  });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n  return methodName => handler => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n  return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n  return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n  return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b9c03bcf6e48cb8a0a9f7184d12aaefddf72790268b1a90793c81bff834253.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b9c03bcf6e48cb8a0a9f7184d12aaefddf72790268b1a90793c81bff834253.json
deleted file mode 100644
index 8fd220da9d14557b68851b322dcba6586e169f12..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5b9c03bcf6e48cb8a0a9f7184d12aaefddf72790268b1a90793c81bff834253.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport let Observable = /*#__PURE__*/(() => {\n  class Observable {\n    constructor(subscribe) {\n      if (subscribe) {\n        this._subscribe = subscribe;\n      }\n    }\n    lift(operator) {\n      const observable = new Observable();\n      observable.source = this;\n      observable.operator = operator;\n      return observable;\n    }\n    subscribe(observerOrNext, error, complete) {\n      const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n      errorContext(() => {\n        const {\n          operator,\n          source\n        } = this;\n        subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber));\n      });\n      return subscriber;\n    }\n    _trySubscribe(sink) {\n      try {\n        return this._subscribe(sink);\n      } catch (err) {\n        sink.error(err);\n      }\n    }\n    forEach(next, promiseCtor) {\n      promiseCtor = getPromiseCtor(promiseCtor);\n      return new promiseCtor((resolve, reject) => {\n        const subscriber = new SafeSubscriber({\n          next: value => {\n            try {\n              next(value);\n            } catch (err) {\n              reject(err);\n              subscriber.unsubscribe();\n            }\n          },\n          error: reject,\n          complete: resolve\n        });\n        this.subscribe(subscriber);\n      });\n    }\n    _subscribe(subscriber) {\n      var _a;\n      return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n    }\n    [Symbol_observable]() {\n      return this;\n    }\n    pipe(...operations) {\n      return pipeFromArray(operations)(this);\n    }\n    toPromise(promiseCtor) {\n      promiseCtor = getPromiseCtor(promiseCtor);\n      return new promiseCtor((resolve, reject) => {\n        let value;\n        this.subscribe(x => value = x, err => reject(err), () => resolve(value));\n      });\n    }\n  }\n  Observable.create = subscribe => {\n    return new Observable(subscribe);\n  };\n  return Observable;\n})();\nfunction getPromiseCtor(promiseCtor) {\n  var _a;\n  return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n  return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n  return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);\n}\n//# sourceMappingURL=Observable.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5fdacfd506b1354031e93e9d114fc9da4d2bc93ad6471dd45c12f91f75cc15f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e5fdacfd506b1354031e93e9d114fc9da4d2bc93ad6471dd45c12f91f75cc15f.json
deleted file mode 100644
index 2c9115cb176ee943490c8d24623134caae0b9135..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e5fdacfd506b1354031e93e9d114fc9da4d2bc93ad6471dd45c12f91f75cc15f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n  return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n    let seen = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      if (++seen <= count) {\n        subscriber.next(value);\n        if (count <= seen) {\n          subscriber.complete();\n        }\n      }\n    }));\n  });\n}\n//# sourceMappingURL=take.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e747685078d929adef1616ee969e2ff30d8b4ad836c44cf3897d4edad29a4be5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e747685078d929adef1616ee969e2ff30d8b4ad836c44cf3897d4edad29a4be5.json
deleted file mode 100644
index 7a0b7c8229915877d7ec80a7b6fe1f1598bbb3d1..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e747685078d929adef1616ee969e2ff30d8b4ad836c44cf3897d4edad29a4be5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function identity(x) {\n  return x;\n}\n//# sourceMappingURL=identity.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e7c238db057e113aa45b11f9af763515e453040a7fcff9dfbf9ec46d53fdd8bf.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e7c238db057e113aa45b11f9af763515e453040a7fcff9dfbf9ec46d53fdd8bf.json
deleted file mode 100644
index fe2d0e1d7310acd9087e6393927d8beb585670a2..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e7c238db057e113aa45b11f9af763515e453040a7fcff9dfbf9ec46d53fdd8bf.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { concatAll } from './concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function concat(...args) {\n  const scheduler = popScheduler(args);\n  return operate((source, subscriber) => {\n    concatAll()(from([source, ...args], scheduler)).subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=concat.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/e8f8726202a7a14670a6b1b5e0921ae20c3c9863218460c172e988e200a1f367.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/e8f8726202a7a14670a6b1b5e0921ae20c3c9863218460c172e988e200a1f367.json
deleted file mode 100644
index f84af5bb9e24ea1ecb458afce538dd9b886bb49c..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/e8f8726202a7a14670a6b1b5e0921ae20c3c9863218460c172e988e200a1f367.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n  return operate((source, subscriber) => {\n    source.subscribe(createOperatorSubscriber(subscriber, noop));\n  });\n}\n//# sourceMappingURL=ignoreElements.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ec58a5ae353e97692c14df4ef590c46458e1a989d7aaa8828aa41bbcef004157.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ec58a5ae353e97692c14df4ef590c46458e1a989d7aaa8828aa41bbcef004157.json
deleted file mode 100644
index f39c5c743328a42633f7cd4624399aacdb2f80db..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ec58a5ae353e97692c14df4ef590c46458e1a989d7aaa8828aa41bbcef004157.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, {\n  blocked,\n  upgrade,\n  blocking,\n  terminated\n} = {}) {\n  const request = indexedDB.open(name, version);\n  const openPromise = wrap(request);\n  if (upgrade) {\n    request.addEventListener('upgradeneeded', event => {\n      upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n    });\n  }\n  if (blocked) request.addEventListener('blocked', () => blocked());\n  openPromise.then(db => {\n    if (terminated) db.addEventListener('close', () => terminated());\n    if (blocking) db.addEventListener('versionchange', () => blocking());\n  }).catch(() => {});\n  return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, {\n  blocked\n} = {}) {\n  const request = indexedDB.deleteDatabase(name);\n  if (blocked) request.addEventListener('blocked', () => blocked());\n  return wrap(request).then(() => undefined);\n}\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n  if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) {\n    return;\n  }\n  if (cachedMethods.get(prop)) return cachedMethods.get(prop);\n  const targetFuncName = prop.replace(/FromIndex$/, '');\n  const useIndex = prop !== targetFuncName;\n  const isWrite = writeMethods.includes(targetFuncName);\n  if (\n  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n  !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) {\n    return;\n  }\n  const method = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(function* (storeName, ...args) {\n      // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n      const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n      let target = tx.store;\n      if (useIndex) target = target.index(args.shift());\n      // Must reject if op rejects.\n      // If it's a write operation, must reject if tx.done rejects.\n      // Must reject with op rejection first.\n      // Must resolve with op value.\n      // Must handle both promises (no unhandled rejections)\n      return (yield Promise.all([target[targetFuncName](...args), isWrite && tx.done]))[0];\n    });\n    return function method(_x) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  cachedMethods.set(prop, method);\n  return method;\n}\nreplaceTraps(oldTraps => ({\n  ...oldTraps,\n  get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n  has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)\n}));\nexport { deleteDB, openDB };","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ecd951f8d05adc71f24ac0507fb4cf8c718d8d543edb60baeddc85c58ef5ea39.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ecd951f8d05adc71f24ac0507fb4cf8c718d8d543edb60baeddc85c58ef5ea39.json
deleted file mode 100644
index 8ea30ab9e4f62b86ae690e47cb73ed3520e6a52d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ecd951f8d05adc71f24ac0507fb4cf8c718d8d543edb60baeddc85c58ef5ea39.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { not } from '../util/not';\nimport { filter } from './filter';\nexport function partition(predicate, thisArg) {\n  return source => [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)];\n}\n//# sourceMappingURL=partition.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/eea8dbff1d4f34f0b0f45b34a5331682e8b4b50202da9ad443929d08b54ddb81.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/eea8dbff1d4f34f0b0f45b34a5331682e8b4b50202da9ad443929d08b54ddb81.json
deleted file mode 100644
index 786faa1b3f1ca1a8fcf9e8b28d37397ea5b10a51..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/eea8dbff1d4f34f0b0f45b34a5331682e8b4b50202da9ad443929d08b54ddb81.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { AsyncSubject } from '../AsyncSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishLast() {\n  return source => {\n    const subject = new AsyncSubject();\n    return new ConnectableObservable(source, () => subject);\n  };\n}\n//# sourceMappingURL=publishLast.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f0a3f079a1082c543c8c83ef7d1b24b8981c8f35508096fd91ef2d176213dac2.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f0a3f079a1082c543c8c83ef7d1b24b8981c8f35508096fd91ef2d176213dac2.json
deleted file mode 100644
index 40814eebb140d5b8a160c4fd67ba3d535844d8ea..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f0a3f079a1082c543c8c83ef7d1b24b8981c8f35508096fd91ef2d176213dac2.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { __spreadArray } from 'tslib';\nimport { onSnapshot, refEqual } from 'firebase/firestore';\nimport { Observable, pipe } from 'rxjs';\nimport { map, startWith, pairwise, filter, scan, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar DEFAULT_OPTIONS = {\n  includeMetadataChanges: false\n};\nfunction fromRef(ref, options) {\n  if (options === void 0) {\n    options = DEFAULT_OPTIONS;\n  }\n  /* eslint-enable @typescript-eslint/no-explicit-any */\n  return new Observable(function (subscriber) {\n    var unsubscribe = onSnapshot(ref, options, {\n      next: subscriber.next.bind(subscriber),\n      error: subscriber.error.bind(subscriber),\n      complete: subscriber.complete.bind(subscriber)\n    });\n    return {\n      unsubscribe: unsubscribe\n    };\n  });\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction doc(ref) {\n  return fromRef(ref, {\n    includeMetadataChanges: true\n  });\n}\n/**\n * Returns a stream of a document, mapped to its data payload and optionally the document ID\n * @param query\n */\nfunction docData(ref, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return doc(ref).pipe(map(function (snap) {\n    return snapToData(snap, options);\n  }));\n}\nfunction snapToData(snapshot, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  // TODO clean up the typings\n  var data = snapshot.data();\n  // match the behavior of the JS SDK when the snapshot doesn't exist\n  // it's possible with data converters too that the user didn't return an object\n  if (!snapshot.exists() || typeof data !== 'object' || data === null) {\n    return data;\n  }\n  if (options.idField) {\n    data[options.idField] = snapshot.id;\n  }\n  return data;\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ALL_EVENTS = ['added', 'modified', 'removed'];\n/**\n * Create an operator that determines if a the stream of document changes\n * are specified by the event filter. If the document change type is not\n * in specified events array, it will not be emitted.\n */\nvar filterEvents = function (events) {\n  return filter(function (changes) {\n    var hasChange = false;\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n      if (events && events.indexOf(change.type) >= 0) {\n        hasChange = true;\n        break;\n      }\n    }\n    return hasChange;\n  });\n};\n/**\n * Splice arguments on top of a sliced array, to break top-level ===\n * this is useful for change-detection\n */\nfunction sliceAndSplice(original, start, deleteCount) {\n  var args = [];\n  for (var _i = 3; _i < arguments.length; _i++) {\n    args[_i - 3] = arguments[_i];\n  }\n  var returnArray = original.slice();\n  returnArray.splice.apply(returnArray, __spreadArray([start, deleteCount], args));\n  return returnArray;\n}\n/**\n * Creates a new sorted array from a new change.\n * @param combined\n * @param change\n */\nfunction processIndividualChange(combined, change) {\n  switch (change.type) {\n    case 'added':\n      if (combined[change.newIndex] && refEqual(combined[change.newIndex].doc.ref, change.doc.ref)) ;else {\n        return sliceAndSplice(combined, change.newIndex, 0, change);\n      }\n      break;\n    case 'modified':\n      if (combined[change.oldIndex] == null || refEqual(combined[change.oldIndex].doc.ref, change.doc.ref)) {\n        // When an item changes position we first remove it\n        // and then add it's new position\n        if (change.oldIndex !== change.newIndex) {\n          var copiedArray = combined.slice();\n          copiedArray.splice(change.oldIndex, 1);\n          copiedArray.splice(change.newIndex, 0, change);\n          return copiedArray;\n        } else {\n          return sliceAndSplice(combined, change.newIndex, 1, change);\n        }\n      }\n      break;\n    case 'removed':\n      if (combined[change.oldIndex] && refEqual(combined[change.oldIndex].doc.ref, change.doc.ref)) {\n        return sliceAndSplice(combined, change.oldIndex, 1);\n      }\n      break;\n  }\n  return combined;\n}\n/**\n * Combines the total result set from the current set of changes from an incoming set\n * of changes.\n * @param current\n * @param changes\n * @param events\n */\nfunction processDocumentChanges(current, changes, events) {\n  if (events === void 0) {\n    events = ALL_EVENTS;\n  }\n  changes.forEach(function (change) {\n    // skip unwanted change types\n    if (events.indexOf(change.type) > -1) {\n      current = processIndividualChange(current, change);\n    }\n  });\n  return current;\n}\n/**\n * Create an operator that allows you to compare the current emission with\n * the prior, even on first emission (where prior is undefined).\n */\nvar windowwise = function () {\n  return pipe(startWith(undefined), pairwise());\n};\n/**\n * Given two snapshots does their metadata match?\n * @param a\n * @param b\n */\nvar metaDataEquals = function (a, b) {\n  return JSON.stringify(a.metadata) === JSON.stringify(b.metadata);\n};\n/**\n * Create an operator that filters out empty changes. We provide the\n * ability to filter on events, which means all changes can be filtered out.\n * This creates an empty array and would be incorrect to emit.\n */\nvar filterEmptyUnlessFirst = function () {\n  return pipe(windowwise(), filter(function (_a) {\n    var prior = _a[0],\n      current = _a[1];\n    return current.length > 0 || prior === undefined;\n  }), map(function (_a) {\n    _a[0];\n    var current = _a[1];\n    return current;\n  }));\n};\n/**\n * Return a stream of document changes on a query. These results are not in sort order but in\n * order of occurence.\n * @param query\n */\nfunction collectionChanges(query, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return fromRef(query, {\n    includeMetadataChanges: true\n  }).pipe(windowwise(), map(function (_a) {\n    var priorSnapshot = _a[0],\n      currentSnapshot = _a[1];\n    var docChanges = currentSnapshot.docChanges();\n    if (priorSnapshot && !metaDataEquals(priorSnapshot, currentSnapshot)) {\n      // the metadata has changed, docChanges() doesn't return metadata events, so let's\n      // do it ourselves by scanning over all the docs and seeing if the metadata has changed\n      // since either this docChanges() emission or the prior snapshot\n      currentSnapshot.docs.forEach(function (currentDocSnapshot, currentIndex) {\n        var currentDocChange = docChanges.find(function (c) {\n          return refEqual(c.doc.ref, currentDocSnapshot.ref);\n        });\n        if (currentDocChange) {\n          // if the doc is in the current changes and the metadata hasn't changed this doc\n          if (metaDataEquals(currentDocChange.doc, currentDocSnapshot)) {\n            return;\n          }\n        } else {\n          // if there is a prior doc and the metadata hasn't changed skip this doc\n          var priorDocSnapshot = priorSnapshot === null || priorSnapshot === void 0 ? void 0 : priorSnapshot.docs.find(function (d) {\n            return refEqual(d.ref, currentDocSnapshot.ref);\n          });\n          if (priorDocSnapshot && metaDataEquals(priorDocSnapshot, currentDocSnapshot)) {\n            return;\n          }\n        }\n        docChanges.push({\n          oldIndex: currentIndex,\n          newIndex: currentIndex,\n          type: 'modified',\n          doc: currentDocSnapshot\n        });\n      });\n    }\n    return docChanges;\n  }), filterEvents(options.events || ALL_EVENTS), filterEmptyUnlessFirst());\n}\n/**\n * Return a stream of document snapshots on a query. These results are in sort order.\n * @param query\n */\nfunction collection(query) {\n  return fromRef(query, {\n    includeMetadataChanges: true\n  }).pipe(map(function (changes) {\n    return changes.docs;\n  }));\n}\n/**\n * Return a stream of document changes on a query. These results are in sort order.\n * @param query\n */\nfunction sortedChanges(query, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return collectionChanges(query, options).pipe(scan(function (current, changes) {\n    return processDocumentChanges(current, changes, options.events);\n  }, []), distinctUntilChanged());\n}\n/**\n * Create a stream of changes as they occur it time. This method is similar\n * to docChanges() but it collects each event in an array over time.\n */\nfunction auditTrail(query, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return collectionChanges(query, options).pipe(scan(function (current, action) {\n    return __spreadArray(__spreadArray([], current), action);\n  }, []));\n}\n/**\n * Returns a stream of documents mapped to their data payload, and optionally the document ID\n * @param query\n */\nfunction collectionData(query, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return collection(query).pipe(map(function (arr) {\n    return arr.map(function (snap) {\n      return snapToData(snap, options);\n    });\n  }));\n}\nexport { auditTrail, collection, collectionChanges, collectionData, doc, docData, fromRef, snapToData, sortedChanges };\n//# sourceMappingURL=index.esm.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f1a8b95d1a03ccc24de9be26a753062874e1ce918a6f094376ece46a08d688dc.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f1a8b95d1a03ccc24de9be26a753062874e1ce918a6f094376ece46a08d688dc.json
deleted file mode 100644
index 31a829197242d52cdf3fe0c923e644372859134f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f1a8b95d1a03ccc24de9be26a753062874e1ce918a6f094376ece46a08d688dc.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n  constructor(SchedulerAction, now = Scheduler.now) {\n    super(SchedulerAction, now);\n    this.actions = [];\n    this._active = false;\n  }\n  flush(action) {\n    const {\n      actions\n    } = this;\n    if (this._active) {\n      actions.push(action);\n      return;\n    }\n    let error;\n    this._active = true;\n    do {\n      if (error = action.execute(action.state, action.delay)) {\n        break;\n      }\n    } while (action = actions.shift());\n    this._active = false;\n    if (error) {\n      while (action = actions.shift()) {\n        action.unsubscribe();\n      }\n      throw error;\n    }\n  }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f29bb9fef7abd4eb6ed50913033cee07cfb2a90522c13ec91dfe36ff38fda171.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f29bb9fef7abd4eb6ed50913033cee07cfb2a90522c13ec91dfe36ff38fda171.json
deleted file mode 100644
index 5e7055202f3e2ff335a6c98030cd9470c5d6703a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f29bb9fef7abd4eb6ed50913033cee07cfb2a90522c13ec91dfe36ff38fda171.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n  return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f30a5fcc4f25644687eb86132468235b5a7432ac3d0bd7cbd0408a7b7b8b207c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f30a5fcc4f25644687eb86132468235b5a7432ac3d0bd7cbd0408a7b7b8b207c.json
deleted file mode 100644
index 6f3e83540d30089aee1bcb3af9e18ac9f80a8495..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f30a5fcc4f25644687eb86132468235b5a7432ac3d0bd7cbd0408a7b7b8b207c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { merge } from './merge';\nexport function mergeWith(...otherSources) {\n  return merge(...otherSources);\n}\n//# sourceMappingURL=mergeWith.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3418faae52c5f83fe88225b83109d202961b844793631ec8bd047bf6673887f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f3418faae52c5f83fe88225b83109d202961b844793631ec8bd047bf6673887f.json
deleted file mode 100644
index a076e8806857b45c3afd65aebecbc2c075d4f536..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3418faae52c5f83fe88225b83109d202961b844793631ec8bd047bf6673887f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { exhaustMap } from './exhaustMap';\nimport { identity } from '../util/identity';\nexport function exhaustAll() {\n  return exhaustMap(identity);\n}\n//# sourceMappingURL=exhaustAll.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3809be9047324ffd6af670de8c39e985b6e60215f7e9c9e2847807d34f172f8.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f3809be9047324ffd6af670de8c39e985b6e60215f7e9c9e2847807d34f172f8.json
deleted file mode 100644
index aef6ebaa7ffb1aa3bcf430086605134018b0ba00..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3809be9047324ffd6af670de8c39e985b6e60215f7e9c9e2847807d34f172f8.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { RouterModule } from '@angular/router';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/router\";\nconst routes = [];\nexport let AppRoutingModule = /*#__PURE__*/(() => {\n  class AppRoutingModule {}\n  AppRoutingModule.ɵfac = function AppRoutingModule_Factory(t) {\n    return new (t || AppRoutingModule)();\n  };\n  AppRoutingModule.ɵmod = /*@__PURE__*/i0.ɵɵdefineNgModule({\n    type: AppRoutingModule\n  });\n  AppRoutingModule.ɵinj = /*@__PURE__*/i0.ɵɵdefineInjector({\n    imports: [RouterModule.forRoot(routes), RouterModule]\n  });\n  return AppRoutingModule;\n})();","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f38cb129bf5f4c1e2152506dc741a7c74d9ad512880323768dd2850b8f596ce3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f38cb129bf5f4c1e2152506dc741a7c74d9ad512880323768dd2850b8f596ce3.json
deleted file mode 100644
index 86b0212b7a4618cd606b9ead5a6e86ee146ffa66..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f38cb129bf5f4c1e2152506dc741a7c74d9ad512880323768dd2850b8f596ce3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _registerComponent, registerVersion, _getProvider, getApp, _removeServiceInstance, SDK_VERSION } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { FirebaseError, createMockUserToken, getModularInstance, deepEqual, getDefaultEmulatorHostnameAndPort, getUA, isIndexedDBAvailable, isSafari } from '@firebase/util';\nimport { XhrIo, EventType, ErrorCode, createWebChannelTransport, getStatEventTarget, FetchXmlHttpFactory, WebChannel, Event, Stat } from '@firebase/webchannel-wrapper';\nconst P = \"@firebase/firestore\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Simple wrapper around a nullable UID. Mostly exists to make code more\n * readable.\n */\nclass v {\n  constructor(t) {\n    this.uid = t;\n  }\n  isAuthenticated() {\n    return null != this.uid;\n  }\n  /**\n   * Returns a key representing this user, suitable for inclusion in a\n   * dictionary.\n   */\n  toKey() {\n    return this.isAuthenticated() ? \"uid:\" + this.uid : \"anonymous-user\";\n  }\n  isEqual(t) {\n    return t.uid === this.uid;\n  }\n}\n\n/** A user with a null UID. */\nv.UNAUTHENTICATED = new v(null),\n// TODO(mikelehen): Look into getting a proper uid-equivalent for\n// non-FirebaseAuth providers.\nv.GOOGLE_CREDENTIALS = new v(\"google-credentials-uid\"), v.FIRST_PARTY = new v(\"first-party-uid\"), v.MOCK_USER = new v(\"mock-user\");\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nlet b = \"9.18.0\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst V = new Logger(\"@firebase/firestore\");\n\n// Helper methods are needed because variables can't be exported as read/write\nfunction S() {\n  return V.logLevel;\n}\n\n/**\n * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).\n *\n * @param logLevel - The verbosity you set for activity and error logging. Can\n *   be any of the following values:\n *\n *   <ul>\n *     <li>`debug` for the most verbose logging level, primarily for\n *     debugging.</li>\n *     <li>`error` to log errors only.</li>\n *     <li><code>`silent` to turn off logging.</li>\n *   </ul>\n */\nfunction D(t) {\n  V.setLogLevel(t);\n}\nfunction C(t, ...e) {\n  if (V.logLevel <= LogLevel.DEBUG) {\n    const n = e.map(k);\n    V.debug(`Firestore (${b}): ${t}`, ...n);\n  }\n}\nfunction x(t, ...e) {\n  if (V.logLevel <= LogLevel.ERROR) {\n    const n = e.map(k);\n    V.error(`Firestore (${b}): ${t}`, ...n);\n  }\n}\n\n/**\n * @internal\n */\nfunction N(t, ...e) {\n  if (V.logLevel <= LogLevel.WARN) {\n    const n = e.map(k);\n    V.warn(`Firestore (${b}): ${t}`, ...n);\n  }\n}\n\n/**\n * Converts an additional log parameter to a string representation.\n */\nfunction k(t) {\n  if (\"string\" == typeof t) return t;\n  try {\n    return e = t, JSON.stringify(e);\n  } catch (e) {\n    // Converting to JSON failed, just log the object directly\n    return t;\n  }\n  /**\n  * @license\n  * Copyright 2020 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */\n  /** Formats an object as a JSON string, suitable for logging. */\n  var e;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Unconditionally fails, throwing an Error with the given message.\n * Messages are stripped in production builds.\n *\n * Returns `never` and can be used in expressions:\n * @example\n * let futureVar = fail('not implemented yet');\n */\nfunction $(t = \"Unexpected state\") {\n  // Log the failure in addition to throw an exception, just in case the\n  // exception is swallowed.\n  const e = `FIRESTORE (${b}) INTERNAL ASSERTION FAILED: ` + t;\n  // NOTE: We don't use FirestoreError here because these are internal failures\n  // that cannot be handled by the user. (Also it would create a circular\n  // dependency between the error and assert modules which doesn't work.)\n  throw x(e), new Error(e);\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * Messages are stripped in production builds.\n */\nfunction M(t, e) {\n  t || $();\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * The code of callsites invoking this function are stripped out in production\n * builds. Any side-effects of code within the debugAssert() invocation will not\n * happen in this case.\n *\n * @internal\n */\nfunction O(t, e) {\n  t || $();\n}\n\n/**\n * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an\n * instance of `T` before casting.\n */\nfunction F(t,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n  return t;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst B = {\n  // Causes are copied from:\n  // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n  /** Not an error; returned on success. */\n  OK: \"ok\",\n  /** The operation was cancelled (typically by the caller). */\n  CANCELLED: \"cancelled\",\n  /** Unknown error or an error from a different error domain. */\n  UNKNOWN: \"unknown\",\n  /**\n   * Client specified an invalid argument. Note that this differs from\n   * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are\n   * problematic regardless of the state of the system (e.g., a malformed file\n   * name).\n   */\n  INVALID_ARGUMENT: \"invalid-argument\",\n  /**\n   * Deadline expired before operation could complete. For operations that\n   * change the state of the system, this error may be returned even if the\n   * operation has completed successfully. For example, a successful response\n   * from a server could have been delayed long enough for the deadline to\n   * expire.\n   */\n  DEADLINE_EXCEEDED: \"deadline-exceeded\",\n  /** Some requested entity (e.g., file or directory) was not found. */\n  NOT_FOUND: \"not-found\",\n  /**\n   * Some entity that we attempted to create (e.g., file or directory) already\n   * exists.\n   */\n  ALREADY_EXISTS: \"already-exists\",\n  /**\n   * The caller does not have permission to execute the specified operation.\n   * PERMISSION_DENIED must not be used for rejections caused by exhausting\n   * some resource (use RESOURCE_EXHAUSTED instead for those errors).\n   * PERMISSION_DENIED must not be used if the caller can not be identified\n   * (use UNAUTHENTICATED instead for those errors).\n   */\n  PERMISSION_DENIED: \"permission-denied\",\n  /**\n   * The request does not have valid authentication credentials for the\n   * operation.\n   */\n  UNAUTHENTICATED: \"unauthenticated\",\n  /**\n   * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n   * entire file system is out of space.\n   */\n  RESOURCE_EXHAUSTED: \"resource-exhausted\",\n  /**\n   * Operation was rejected because the system is not in a state required for\n   * the operation's execution. For example, directory to be deleted may be\n   * non-empty, an rmdir operation is applied to a non-directory, etc.\n   *\n   * A litmus test that may help a service implementor in deciding\n   * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:\n   *  (a) Use UNAVAILABLE if the client can retry just the failing call.\n   *  (b) Use ABORTED if the client should retry at a higher-level\n   *      (e.g., restarting a read-modify-write sequence).\n   *  (c) Use FAILED_PRECONDITION if the client should not retry until\n   *      the system state has been explicitly fixed. E.g., if an \"rmdir\"\n   *      fails because the directory is non-empty, FAILED_PRECONDITION\n   *      should be returned since the client should not retry unless\n   *      they have first fixed up the directory by deleting files from it.\n   *  (d) Use FAILED_PRECONDITION if the client performs conditional\n   *      REST Get/Update/Delete on a resource and the resource on the\n   *      server does not match the condition. E.g., conflicting\n   *      read-modify-write on the same resource.\n   */\n  FAILED_PRECONDITION: \"failed-precondition\",\n  /**\n   * The operation was aborted, typically due to a concurrency issue like\n   * sequencer check failures, transaction aborts, etc.\n   *\n   * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n   * and UNAVAILABLE.\n   */\n  ABORTED: \"aborted\",\n  /**\n   * Operation was attempted past the valid range. E.g., seeking or reading\n   * past end of file.\n   *\n   * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed\n   * if the system state changes. For example, a 32-bit file system will\n   * generate INVALID_ARGUMENT if asked to read at an offset that is not in the\n   * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from\n   * an offset past the current file size.\n   *\n   * There is a fair bit of overlap between FAILED_PRECONDITION and\n   * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)\n   * when it applies so that callers who are iterating through a space can\n   * easily look for an OUT_OF_RANGE error to detect when they are done.\n   */\n  OUT_OF_RANGE: \"out-of-range\",\n  /** Operation is not implemented or not supported/enabled in this service. */\n  UNIMPLEMENTED: \"unimplemented\",\n  /**\n   * Internal errors. Means some invariants expected by underlying System has\n   * been broken. If you see one of these errors, Something is very broken.\n   */\n  INTERNAL: \"internal\",\n  /**\n   * The service is currently unavailable. This is a most likely a transient\n   * condition and may be corrected by retrying with a backoff.\n   *\n   * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n   * and UNAVAILABLE.\n   */\n  UNAVAILABLE: \"unavailable\",\n  /** Unrecoverable data loss or corruption. */\n  DATA_LOSS: \"data-loss\"\n};\n\n/** An error returned by a Firestore operation. */\nclass L extends FirebaseError {\n  /** @hideconstructor */\n  constructor(\n  /**\n   * The backend error code associated with this error.\n   */\n  t,\n  /**\n   * A custom error description.\n   */\n  e) {\n    super(t, e), this.code = t, this.message = e,\n    // HACK: We write a toString property directly because Error is not a real\n    // class and so inheritance does not work correctly. We could alternatively\n    // do the same \"back-door inheritance\" trick that FirebaseError does.\n    this.toString = () => `${this.name}: [code=${this.code}]: ${this.message}`;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass q {\n  constructor() {\n    this.promise = new Promise((t, e) => {\n      this.resolve = t, this.reject = e;\n    });\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass U {\n  constructor(t, e) {\n    this.user = e, this.type = \"OAuth\", this.headers = new Map(), this.headers.set(\"Authorization\", `Bearer ${t}`);\n  }\n}\n\n/**\n * A CredentialsProvider that always yields an empty token.\n * @internal\n */\nclass K {\n  getToken() {\n    return Promise.resolve(null);\n  }\n  invalidateToken() {}\n  start(t, e) {\n    // Fire with initial user.\n    t.enqueueRetryable(() => e(v.UNAUTHENTICATED));\n  }\n  shutdown() {}\n}\n\n/**\n * A CredentialsProvider that always returns a constant token. Used for\n * emulator token mocking.\n */\nclass G {\n  constructor(t) {\n    this.token = t,\n    /**\n     * Stores the listener registered with setChangeListener()\n     * This isn't actually necessary since the UID never changes, but we use this\n     * to verify the listen contract is adhered to in tests.\n     */\n    this.changeListener = null;\n  }\n  getToken() {\n    return Promise.resolve(this.token);\n  }\n  invalidateToken() {}\n  start(t, e) {\n    this.changeListener = e,\n    // Fire with initial user.\n    t.enqueueRetryable(() => e(this.token.user));\n  }\n  shutdown() {\n    this.changeListener = null;\n  }\n}\nclass Q {\n  constructor(t) {\n    this.t = t, /** Tracks the current User. */\n    this.currentUser = v.UNAUTHENTICATED,\n    /**\n     * Counter used to detect if the token changed while a getToken request was\n     * outstanding.\n     */\n    this.i = 0, this.forceRefresh = !1, this.auth = null;\n  }\n  start(t, e) {\n    var _this = this;\n    let n = this.i;\n    // A change listener that prevents double-firing for the same token change.\n    const s = t => this.i !== n ? (n = this.i, e(t)) : Promise.resolve();\n    // A promise that can be waited on to block on the next token change.\n    // This promise is re-created after each change.\n    let i = new q();\n    this.o = () => {\n      this.i++, this.currentUser = this.u(), i.resolve(), i = new q(), t.enqueueRetryable(() => s(this.currentUser));\n    };\n    const r = () => {\n        const e = i;\n        t.enqueueRetryable( /*#__PURE__*/_asyncToGenerator(function* () {\n          yield e.promise, yield s(_this.currentUser);\n        }));\n      },\n      o = t => {\n        C(\"FirebaseAuthCredentialsProvider\", \"Auth detected\"), this.auth = t, this.auth.addAuthTokenListener(this.o), r();\n      };\n    this.t.onInit(t => o(t)),\n    // Our users can initialize Auth right after Firestore, so we give it\n    // a chance to register itself with the component framework before we\n    // determine whether to start up in unauthenticated mode.\n    setTimeout(() => {\n      if (!this.auth) {\n        const t = this.t.getImmediate({\n          optional: !0\n        });\n        t ? o(t) : (\n        // If auth is still not available, proceed with `null` user\n        C(\"FirebaseAuthCredentialsProvider\", \"Auth not yet detected\"), i.resolve(), i = new q());\n      }\n    }, 0), r();\n  }\n  getToken() {\n    // Take note of the current value of the tokenCounter so that this method\n    // can fail (with an ABORTED error) if there is a token change while the\n    // request is outstanding.\n    const t = this.i,\n      e = this.forceRefresh;\n    return this.forceRefresh = !1, this.auth ? this.auth.getToken(e).then(e =>\n    // Cancel the request since the token changed while the request was\n    // outstanding so the response is potentially for a previous user (which\n    // user, we can't be sure).\n    this.i !== t ? (C(\"FirebaseAuthCredentialsProvider\", \"getToken aborted due to token change.\"), this.getToken()) : e ? (M(\"string\" == typeof e.accessToken), new U(e.accessToken, this.currentUser)) : null) : Promise.resolve(null);\n  }\n  invalidateToken() {\n    this.forceRefresh = !0;\n  }\n  shutdown() {\n    this.auth && this.auth.removeAuthTokenListener(this.o);\n  }\n  // Auth.getUid() can return null even with a user logged in. It is because\n  // getUid() is synchronous, but the auth code populating Uid is asynchronous.\n  // This method should only be called in the AuthTokenListener callback\n  // to guarantee to get the actual user.\n  u() {\n    const t = this.auth && this.auth.getUid();\n    return M(null === t || \"string\" == typeof t), new v(t);\n  }\n}\n\n/*\n * FirstPartyToken provides a fresh token each time its value\n * is requested, because if the token is too old, requests will be rejected.\n * Technically this may no longer be necessary since the SDK should gracefully\n * recover from unauthenticated errors (see b/33147818 for context), but it's\n * safer to keep the implementation as-is.\n */\nclass j {\n  constructor(t, e, n, s) {\n    this.h = t, this.l = e, this.m = n, this.g = s, this.type = \"FirstParty\", this.user = v.FIRST_PARTY, this.p = new Map();\n  }\n  /** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */\n  I() {\n    return this.g ? this.g() : (\n    // Make sure this really is a Gapi client.\n    M(!(\"object\" != typeof this.h || null === this.h || !this.h.auth || !this.h.auth.getAuthHeaderValueForFirstParty)), this.h.auth.getAuthHeaderValueForFirstParty([]));\n  }\n  get headers() {\n    this.p.set(\"X-Goog-AuthUser\", this.l);\n    // Use array notation to prevent minification\n    const t = this.I();\n    return t && this.p.set(\"Authorization\", t), this.m && this.p.set(\"X-Goog-Iam-Authorization-Token\", this.m), this.p;\n  }\n}\n\n/*\n * Provides user credentials required for the Firestore JavaScript SDK\n * to authenticate the user, using technique that is only available\n * to applications hosted by Google.\n */\nclass z {\n  constructor(t, e, n, s) {\n    this.h = t, this.l = e, this.m = n, this.g = s;\n  }\n  getToken() {\n    return Promise.resolve(new j(this.h, this.l, this.m, this.g));\n  }\n  start(t, e) {\n    // Fire with initial uid.\n    t.enqueueRetryable(() => e(v.FIRST_PARTY));\n  }\n  shutdown() {}\n  invalidateToken() {}\n}\nclass W {\n  constructor(t) {\n    this.value = t, this.type = \"AppCheck\", this.headers = new Map(), t && t.length > 0 && this.headers.set(\"x-firebase-appcheck\", this.value);\n  }\n}\nclass H {\n  constructor(t) {\n    this.T = t, this.forceRefresh = !1, this.appCheck = null, this.A = null;\n  }\n  start(t, e) {\n    const n = t => {\n      null != t.error && C(\"FirebaseAppCheckTokenProvider\", `Error getting App Check token; using placeholder token instead. Error: ${t.error.message}`);\n      const n = t.token !== this.A;\n      return this.A = t.token, C(\"FirebaseAppCheckTokenProvider\", `Received ${n ? \"new\" : \"existing\"} token.`), n ? e(t.token) : Promise.resolve();\n    };\n    this.o = e => {\n      t.enqueueRetryable(() => n(e));\n    };\n    const s = t => {\n      C(\"FirebaseAppCheckTokenProvider\", \"AppCheck detected\"), this.appCheck = t, this.appCheck.addTokenListener(this.o);\n    };\n    this.T.onInit(t => s(t)),\n    // Our users can initialize AppCheck after Firestore, so we give it\n    // a chance to register itself with the component framework.\n    setTimeout(() => {\n      if (!this.appCheck) {\n        const t = this.T.getImmediate({\n          optional: !0\n        });\n        t ? s(t) :\n        // If AppCheck is still not available, proceed without it.\n        C(\"FirebaseAppCheckTokenProvider\", \"AppCheck not yet detected\");\n      }\n    }, 0);\n  }\n  getToken() {\n    const t = this.forceRefresh;\n    return this.forceRefresh = !1, this.appCheck ? this.appCheck.getToken(t).then(t => t ? (M(\"string\" == typeof t.token), this.A = t.token, new W(t.token)) : null) : Promise.resolve(null);\n  }\n  invalidateToken() {\n    this.forceRefresh = !0;\n  }\n  shutdown() {\n    this.appCheck && this.appCheck.removeTokenListener(this.o);\n  }\n}\n\n/**\n * An AppCheck token provider that always yields an empty token.\n * @internal\n */\nclass J {\n  getToken() {\n    return Promise.resolve(new W(\"\"));\n  }\n  invalidateToken() {}\n  start(t, e) {}\n  shutdown() {}\n}\n\n/**\n * Builds a CredentialsProvider depending on the type of\n * the credentials passed in.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Generates `nBytes` of random bytes.\n *\n * If `nBytes < 0` , an error will be thrown.\n */\nfunction Y(t) {\n  // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.\n  const e =\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    \"undefined\" != typeof self && (self.crypto || self.msCrypto),\n    n = new Uint8Array(t);\n  if (e && \"function\" == typeof e.getRandomValues) e.getRandomValues(n);else\n    // Falls back to Math.random\n    for (let e = 0; e < t; e++) n[e] = Math.floor(256 * Math.random());\n  return n;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Z {\n  static R() {\n    // Alphanumeric characters\n    const t = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\",\n      e = Math.floor(256 / t.length) * t.length;\n    // The largest byte value that is a multiple of `char.length`.\n    let n = \"\";\n    for (; n.length < 20;) {\n      const s = Y(40);\n      for (let i = 0; i < s.length; ++i)\n      // Only accept values that are [0, maxMultiple), this ensures they can\n      // be evenly mapped to indices of `chars` via a modulo operation.\n      n.length < 20 && s[i] < e && (n += t.charAt(s[i] % t.length));\n    }\n    return n;\n  }\n}\nfunction X(t, e) {\n  return t < e ? -1 : t > e ? 1 : 0;\n}\n\n/** Helper to compare arrays using isEqual(). */\nfunction tt(t, e, n) {\n  return t.length === e.length && t.every((t, s) => n(t, e[s]));\n}\n\n/**\n * Returns the immediate lexicographically-following string. This is useful to\n * construct an inclusive range for indexeddb iterators.\n */\nfunction et(t) {\n  // Return the input string, with an additional NUL byte appended.\n  return t + \"\\0\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// The earliest date supported by Firestore timestamps (0001-01-01T00:00:00Z).\n/**\n * A `Timestamp` represents a point in time independent of any time zone or\n * calendar, represented as seconds and fractions of seconds at nanosecond\n * resolution in UTC Epoch time.\n *\n * It is encoded using the Proleptic Gregorian Calendar which extends the\n * Gregorian calendar backwards to year one. It is encoded assuming all minutes\n * are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second\n * table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59.999999999Z.\n *\n * For examples and further specifications, refer to the\n * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.\n */\nclass nt {\n  /**\n   * Creates a new timestamp.\n   *\n   * @param seconds - The number of seconds of UTC time since Unix epoch\n   *     1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n   *     9999-12-31T23:59:59Z inclusive.\n   * @param nanoseconds - The non-negative fractions of a second at nanosecond\n   *     resolution. Negative second values with fractions must still have\n   *     non-negative nanoseconds values that count forward in time. Must be\n   *     from 0 to 999,999,999 inclusive.\n   */\n  constructor(\n  /**\n   * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.\n   */\n  t,\n  /**\n   * The fractions of a second at nanosecond resolution.*\n   */\n  e) {\n    if (this.seconds = t, this.nanoseconds = e, e < 0) throw new L(B.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + e);\n    if (e >= 1e9) throw new L(B.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + e);\n    if (t < -62135596800) throw new L(B.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + t);\n    // This will break in the year 10,000.\n    if (t >= 253402300800) throw new L(B.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + t);\n  }\n  /**\n   * Creates a new timestamp with the current date, with millisecond precision.\n   *\n   * @returns a new timestamp representing the current date.\n   */\n  static now() {\n    return nt.fromMillis(Date.now());\n  }\n  /**\n   * Creates a new timestamp from the given date.\n   *\n   * @param date - The date to initialize the `Timestamp` from.\n   * @returns A new `Timestamp` representing the same point in time as the given\n   *     date.\n   */\n  static fromDate(t) {\n    return nt.fromMillis(t.getTime());\n  }\n  /**\n   * Creates a new timestamp from the given number of milliseconds.\n   *\n   * @param milliseconds - Number of milliseconds since Unix epoch\n   *     1970-01-01T00:00:00Z.\n   * @returns A new `Timestamp` representing the same point in time as the given\n   *     number of milliseconds.\n   */\n  static fromMillis(t) {\n    const e = Math.floor(t / 1e3),\n      n = Math.floor(1e6 * (t - 1e3 * e));\n    return new nt(e, n);\n  }\n  /**\n   * Converts a `Timestamp` to a JavaScript `Date` object. This conversion\n   * causes a loss of precision since `Date` objects only support millisecond\n   * precision.\n   *\n   * @returns JavaScript `Date` object representing the same point in time as\n   *     this `Timestamp`, with millisecond precision.\n   */\n  toDate() {\n    return new Date(this.toMillis());\n  }\n  /**\n   * Converts a `Timestamp` to a numeric timestamp (in milliseconds since\n   * epoch). This operation causes a loss of precision.\n   *\n   * @returns The point in time corresponding to this timestamp, represented as\n   *     the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.\n   */\n  toMillis() {\n    return 1e3 * this.seconds + this.nanoseconds / 1e6;\n  }\n  _compareTo(t) {\n    return this.seconds === t.seconds ? X(this.nanoseconds, t.nanoseconds) : X(this.seconds, t.seconds);\n  }\n  /**\n   * Returns true if this `Timestamp` is equal to the provided one.\n   *\n   * @param other - The `Timestamp` to compare against.\n   * @returns true if this `Timestamp` is equal to the provided one.\n   */\n  isEqual(t) {\n    return t.seconds === this.seconds && t.nanoseconds === this.nanoseconds;\n  }\n  /** Returns a textual representation of this `Timestamp`. */\n  toString() {\n    return \"Timestamp(seconds=\" + this.seconds + \", nanoseconds=\" + this.nanoseconds + \")\";\n  }\n  /** Returns a JSON-serializable representation of this `Timestamp`. */\n  toJSON() {\n    return {\n      seconds: this.seconds,\n      nanoseconds: this.nanoseconds\n    };\n  }\n  /**\n   * Converts this object to a primitive string, which allows `Timestamp` objects\n   * to be compared using the `>`, `<=`, `>=` and `>` operators.\n   */\n  valueOf() {\n    // This method returns a string of the form <seconds>.<nanoseconds> where\n    // <seconds> is translated to have a non-negative value and both <seconds>\n    // and <nanoseconds> are left-padded with zeroes to be a consistent length.\n    // Strings with this format then have a lexiographical ordering that matches\n    // the expected ordering. The <seconds> translation is done to avoid having\n    // a leading negative sign (i.e. a leading '-' character) in its string\n    // representation, which would affect its lexiographical ordering.\n    const t = this.seconds - -62135596800;\n    // Note: Up to 12 decimal digits are required to represent all valid\n    // 'seconds' values.\n    return String(t).padStart(12, \"0\") + \".\" + String(this.nanoseconds).padStart(9, \"0\");\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A version of a document in Firestore. This corresponds to the version\n * timestamp, such as update_time or read_time.\n */\nclass st {\n  constructor(t) {\n    this.timestamp = t;\n  }\n  static fromTimestamp(t) {\n    return new st(t);\n  }\n  static min() {\n    return new st(new nt(0, 0));\n  }\n  static max() {\n    return new st(new nt(253402300799, 999999999));\n  }\n  compareTo(t) {\n    return this.timestamp._compareTo(t.timestamp);\n  }\n  isEqual(t) {\n    return this.timestamp.isEqual(t.timestamp);\n  }\n  /** Returns a number representation of the version for use in spec tests. */\n  toMicroseconds() {\n    // Convert to microseconds.\n    return 1e6 * this.timestamp.seconds + this.timestamp.nanoseconds / 1e3;\n  }\n  toString() {\n    return \"SnapshotVersion(\" + this.timestamp.toString() + \")\";\n  }\n  toTimestamp() {\n    return this.timestamp;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Path represents an ordered sequence of string segments.\n */\nclass it {\n  constructor(t, e, n) {\n    void 0 === e ? e = 0 : e > t.length && $(), void 0 === n ? n = t.length - e : n > t.length - e && $(), this.segments = t, this.offset = e, this.len = n;\n  }\n  get length() {\n    return this.len;\n  }\n  isEqual(t) {\n    return 0 === it.comparator(this, t);\n  }\n  child(t) {\n    const e = this.segments.slice(this.offset, this.limit());\n    return t instanceof it ? t.forEach(t => {\n      e.push(t);\n    }) : e.push(t), this.construct(e);\n  }\n  /** The index of one past the last segment of the path. */\n  limit() {\n    return this.offset + this.length;\n  }\n  popFirst(t) {\n    return t = void 0 === t ? 1 : t, this.construct(this.segments, this.offset + t, this.length - t);\n  }\n  popLast() {\n    return this.construct(this.segments, this.offset, this.length - 1);\n  }\n  firstSegment() {\n    return this.segments[this.offset];\n  }\n  lastSegment() {\n    return this.get(this.length - 1);\n  }\n  get(t) {\n    return this.segments[this.offset + t];\n  }\n  isEmpty() {\n    return 0 === this.length;\n  }\n  isPrefixOf(t) {\n    if (t.length < this.length) return !1;\n    for (let e = 0; e < this.length; e++) if (this.get(e) !== t.get(e)) return !1;\n    return !0;\n  }\n  isImmediateParentOf(t) {\n    if (this.length + 1 !== t.length) return !1;\n    for (let e = 0; e < this.length; e++) if (this.get(e) !== t.get(e)) return !1;\n    return !0;\n  }\n  forEach(t) {\n    for (let e = this.offset, n = this.limit(); e < n; e++) t(this.segments[e]);\n  }\n  toArray() {\n    return this.segments.slice(this.offset, this.limit());\n  }\n  static comparator(t, e) {\n    const n = Math.min(t.length, e.length);\n    for (let s = 0; s < n; s++) {\n      const n = t.get(s),\n        i = e.get(s);\n      if (n < i) return -1;\n      if (n > i) return 1;\n    }\n    return t.length < e.length ? -1 : t.length > e.length ? 1 : 0;\n  }\n}\n\n/**\n * A slash-separated path for navigating resources (documents and collections)\n * within Firestore.\n *\n * @internal\n */\nclass rt extends it {\n  construct(t, e, n) {\n    return new rt(t, e, n);\n  }\n  canonicalString() {\n    // NOTE: The client is ignorant of any path segments containing escape\n    // sequences (e.g. __id123__) and just passes them through raw (they exist\n    // for legacy reasons and should not be used frequently).\n    return this.toArray().join(\"/\");\n  }\n  toString() {\n    return this.canonicalString();\n  }\n  /**\n   * Creates a resource path from the given slash-delimited string. If multiple\n   * arguments are provided, all components are combined. Leading and trailing\n   * slashes from all components are ignored.\n   */\n  static fromString(...t) {\n    // NOTE: The client is ignorant of any path segments containing escape\n    // sequences (e.g. __id123__) and just passes them through raw (they exist\n    // for legacy reasons and should not be used frequently).\n    const e = [];\n    for (const n of t) {\n      if (n.indexOf(\"//\") >= 0) throw new L(B.INVALID_ARGUMENT, `Invalid segment (${n}). Paths must not contain // in them.`);\n      // Strip leading and traling slashed.\n      e.push(...n.split(\"/\").filter(t => t.length > 0));\n    }\n    return new rt(e);\n  }\n  static emptyPath() {\n    return new rt([]);\n  }\n}\nconst ot = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n\n/**\n * A dot-separated path for navigating sub-objects within a document.\n * @internal\n */\nclass ut extends it {\n  construct(t, e, n) {\n    return new ut(t, e, n);\n  }\n  /**\n   * Returns true if the string could be used as a segment in a field path\n   * without escaping.\n   */\n  static isValidIdentifier(t) {\n    return ot.test(t);\n  }\n  canonicalString() {\n    return this.toArray().map(t => (t = t.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\"), ut.isValidIdentifier(t) || (t = \"`\" + t + \"`\"), t)).join(\".\");\n  }\n  toString() {\n    return this.canonicalString();\n  }\n  /**\n   * Returns true if this field references the key of a document.\n   */\n  isKeyField() {\n    return 1 === this.length && \"__name__\" === this.get(0);\n  }\n  /**\n   * The field designating the key of a document.\n   */\n  static keyField() {\n    return new ut([\"__name__\"]);\n  }\n  /**\n   * Parses a field string from the given server-formatted string.\n   *\n   * - Splitting the empty string is not allowed (for now at least).\n   * - Empty segments within the string (e.g. if there are two consecutive\n   *   separators) are not allowed.\n   *\n   * TODO(b/37244157): we should make this more strict. Right now, it allows\n   * non-identifier path components, even if they aren't escaped.\n   */\n  static fromServerFormat(t) {\n    const e = [];\n    let n = \"\",\n      s = 0;\n    const i = () => {\n      if (0 === n.length) throw new L(B.INVALID_ARGUMENT, `Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);\n      e.push(n), n = \"\";\n    };\n    let r = !1;\n    for (; s < t.length;) {\n      const e = t[s];\n      if (\"\\\\\" === e) {\n        if (s + 1 === t.length) throw new L(B.INVALID_ARGUMENT, \"Path has trailing escape character: \" + t);\n        const e = t[s + 1];\n        if (\"\\\\\" !== e && \".\" !== e && \"`\" !== e) throw new L(B.INVALID_ARGUMENT, \"Path has invalid escape sequence: \" + t);\n        n += e, s += 2;\n      } else \"`\" === e ? (r = !r, s++) : \".\" !== e || r ? (n += e, s++) : (i(), s++);\n    }\n    if (i(), r) throw new L(B.INVALID_ARGUMENT, \"Unterminated ` in path: \" + t);\n    return new ut(e);\n  }\n  static emptyPath() {\n    return new ut([]);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @internal\n */\nclass ct {\n  constructor(t) {\n    this.path = t;\n  }\n  static fromPath(t) {\n    return new ct(rt.fromString(t));\n  }\n  static fromName(t) {\n    return new ct(rt.fromString(t).popFirst(5));\n  }\n  static empty() {\n    return new ct(rt.emptyPath());\n  }\n  get collectionGroup() {\n    return this.path.popLast().lastSegment();\n  }\n  /** Returns true if the document is in the specified collectionId. */\n  hasCollectionId(t) {\n    return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;\n  }\n  /** Returns the collection group (i.e. the name of the parent collection) for this key. */\n  getCollectionGroup() {\n    return this.path.get(this.path.length - 2);\n  }\n  /** Returns the fully qualified path to the parent collection. */\n  getCollectionPath() {\n    return this.path.popLast();\n  }\n  isEqual(t) {\n    return null !== t && 0 === rt.comparator(this.path, t.path);\n  }\n  toString() {\n    return this.path.toString();\n  }\n  static comparator(t, e) {\n    return rt.comparator(t.path, e.path);\n  }\n  static isDocumentKey(t) {\n    return t.length % 2 == 0;\n  }\n  /**\n   * Creates and returns a new document key with the given segments.\n   *\n   * @param segments - The segments of the path to the document\n   * @returns A new instance of DocumentKey\n   */\n  static fromSegments(t) {\n    return new ct(new rt(t.slice()));\n  }\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The initial mutation batch id for each index. Gets updated during index\n * backfill.\n */\n/**\n * An index definition for field indexes in Firestore.\n *\n * Every index is associated with a collection. The definition contains a list\n * of fields and their index kind (which can be `ASCENDING`, `DESCENDING` or\n * `CONTAINS` for ArrayContains/ArrayContainsAny queries).\n *\n * Unlike the backend, the SDK does not differentiate between collection or\n * collection group-scoped indices. Every index can be used for both single\n * collection and collection group queries.\n */\nclass at {\n  constructor(\n  /**\n   * The index ID. Returns -1 if the index ID is not available (e.g. the index\n   * has not yet been persisted).\n   */\n  t, /** The collection ID this index applies to. */\n  e, /** The field segments for this index. */\n  n, /** Shows how up-to-date the index is for the current user. */\n  s) {\n    this.indexId = t, this.collectionGroup = e, this.fields = n, this.indexState = s;\n  }\n}\n\n/** An ID for an index that has not yet been added to persistence.  */\n/** Returns the ArrayContains/ArrayContainsAny segment for this index. */\nfunction ht(t) {\n  return t.fields.find(t => 2 /* IndexKind.CONTAINS */ === t.kind);\n}\n\n/** Returns all directional (ascending/descending) segments for this index. */\nfunction lt(t) {\n  return t.fields.filter(t => 2 /* IndexKind.CONTAINS */ !== t.kind);\n}\n\n/**\n * Returns the order of the document key component for the given index.\n *\n * PORTING NOTE: This is only used in the Web IndexedDb implementation.\n */\n/**\n * Compares indexes by collection group and segments. Ignores update time and\n * index ID.\n */\nfunction ft(t, e) {\n  let n = X(t.collectionGroup, e.collectionGroup);\n  if (0 !== n) return n;\n  for (let s = 0; s < Math.min(t.fields.length, e.fields.length); ++s) if (n = _t(t.fields[s], e.fields[s]), 0 !== n) return n;\n  return X(t.fields.length, e.fields.length);\n}\n\n/** Returns a debug representation of the field index */\nat.UNKNOWN_ID = -1;\n\n/** An index component consisting of field path and index type.  */\nclass dt {\n  constructor( /** The field path of the component. */\n  t, /** The fields sorting order. */\n  e) {\n    this.fieldPath = t, this.kind = e;\n  }\n}\nfunction _t(t, e) {\n  const n = ut.comparator(t.fieldPath, e.fieldPath);\n  return 0 !== n ? n : X(t.kind, e.kind);\n}\n\n/**\n * Stores the \"high water mark\" that indicates how updated the Index is for the\n * current user.\n */\nclass wt {\n  constructor(\n  /**\n   * Indicates when the index was last updated (relative to other indexes).\n   */\n  t, /** The the latest indexed read time, document and batch id. */\n  e) {\n    this.sequenceNumber = t, this.offset = e;\n  }\n  /** The state of an index that has not yet been backfilled. */\n  static empty() {\n    return new wt(0, yt.min());\n  }\n}\n\n/**\n * Creates an offset that matches all documents with a read time higher than\n * `readTime`.\n */\nfunction mt(t, e) {\n  // We want to create an offset that matches all documents with a read time\n  // greater than the provided read time. To do so, we technically need to\n  // create an offset for `(readTime, MAX_DOCUMENT_KEY)`. While we could use\n  // Unicode codepoints to generate MAX_DOCUMENT_KEY, it is much easier to use\n  // `(readTime + 1, DocumentKey.empty())` since `> DocumentKey.empty()` matches\n  // all valid document IDs.\n  const n = t.toTimestamp().seconds,\n    s = t.toTimestamp().nanoseconds + 1,\n    i = st.fromTimestamp(1e9 === s ? new nt(n + 1, 0) : new nt(n, s));\n  return new yt(i, ct.empty(), e);\n}\n\n/** Creates a new offset based on the provided document. */\nfunction gt(t) {\n  return new yt(t.readTime, t.key, -1);\n}\n\n/**\n * Stores the latest read time, document and batch ID that were processed for an\n * index.\n */\nclass yt {\n  constructor(\n  /**\n   * The latest read time version that has been indexed by Firestore for this\n   * field index.\n   */\n  t,\n  /**\n   * The key of the last document that was indexed for this query. Use\n   * `DocumentKey.empty()` if no document has been indexed.\n   */\n  e,\n  /*\n   * The largest mutation batch id that's been processed by Firestore.\n   */\n  n) {\n    this.readTime = t, this.documentKey = e, this.largestBatchId = n;\n  }\n  /** Returns an offset that sorts before all regular offsets. */\n  static min() {\n    return new yt(st.min(), ct.empty(), -1);\n  }\n  /** Returns an offset that sorts after all regular offsets. */\n  static max() {\n    return new yt(st.max(), ct.empty(), -1);\n  }\n}\nfunction pt(t, e) {\n  let n = t.readTime.compareTo(e.readTime);\n  return 0 !== n ? n : (n = ct.comparator(t.documentKey, e.documentKey), 0 !== n ? n : X(t.largestBatchId, e.largestBatchId));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst It = \"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.\";\n\n/**\n * A base class representing a persistence transaction, encapsulating both the\n * transaction's sequence numbers as well as a list of onCommitted listeners.\n *\n * When you call Persistence.runTransaction(), it will create a transaction and\n * pass it to your callback. You then pass it to any method that operates\n * on persistence.\n */\nclass Tt {\n  constructor() {\n    this.onCommittedListeners = [];\n  }\n  addOnCommittedListener(t) {\n    this.onCommittedListeners.push(t);\n  }\n  raiseOnCommittedEvent() {\n    this.onCommittedListeners.forEach(t => t());\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Verifies the error thrown by a LocalStore operation. If a LocalStore\n * operation fails because the primary lease has been taken by another client,\n * we ignore the error (the persistence layer will immediately call\n * `applyPrimaryLease` to propagate the primary state change). All other errors\n * are re-thrown.\n *\n * @param err - An error returned by a LocalStore operation.\n * @returns A Promise that resolves after we recovered, or the original error.\n */\nfunction Et(_x) {\n  return _Et.apply(this, arguments);\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * PersistencePromise is essentially a re-implementation of Promise except\n * it has a .next() method instead of .then() and .next() and .catch() callbacks\n * are executed synchronously when a PersistencePromise resolves rather than\n * asynchronously (Promise implementations use setImmediate() or similar).\n *\n * This is necessary to interoperate with IndexedDB which will automatically\n * commit transactions if control is returned to the event loop without\n * synchronously initiating another operation on the transaction.\n *\n * NOTE: .then() and .catch() only allow a single consumer, unlike normal\n * Promises.\n */\nfunction _Et() {\n  _Et = _asyncToGenerator(function* (t) {\n    if (t.code !== B.FAILED_PRECONDITION || t.message !== It) throw t;\n    C(\"LocalStore\", \"Unexpectedly lost primary lease\");\n  });\n  return _Et.apply(this, arguments);\n}\nclass At {\n  constructor(t) {\n    // NOTE: next/catchCallback will always point to our own wrapper functions,\n    // not the user's raw next() or catch() callbacks.\n    this.nextCallback = null, this.catchCallback = null,\n    // When the operation resolves, we'll set result or error and mark isDone.\n    this.result = void 0, this.error = void 0, this.isDone = !1,\n    // Set to true when .then() or .catch() are called and prevents additional\n    // chaining.\n    this.callbackAttached = !1, t(t => {\n      this.isDone = !0, this.result = t, this.nextCallback &&\n      // value should be defined unless T is Void, but we can't express\n      // that in the type system.\n      this.nextCallback(t);\n    }, t => {\n      this.isDone = !0, this.error = t, this.catchCallback && this.catchCallback(t);\n    });\n  }\n  catch(t) {\n    return this.next(void 0, t);\n  }\n  next(t, e) {\n    return this.callbackAttached && $(), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(e, this.error) : this.wrapSuccess(t, this.result) : new At((n, s) => {\n      this.nextCallback = e => {\n        this.wrapSuccess(t, e).next(n, s);\n      }, this.catchCallback = t => {\n        this.wrapFailure(e, t).next(n, s);\n      };\n    });\n  }\n  toPromise() {\n    return new Promise((t, e) => {\n      this.next(t, e);\n    });\n  }\n  wrapUserFunction(t) {\n    try {\n      const e = t();\n      return e instanceof At ? e : At.resolve(e);\n    } catch (t) {\n      return At.reject(t);\n    }\n  }\n  wrapSuccess(t, e) {\n    return t ? this.wrapUserFunction(() => t(e)) : At.resolve(e);\n  }\n  wrapFailure(t, e) {\n    return t ? this.wrapUserFunction(() => t(e)) : At.reject(e);\n  }\n  static resolve(t) {\n    return new At((e, n) => {\n      e(t);\n    });\n  }\n  static reject(t) {\n    return new At((e, n) => {\n      n(t);\n    });\n  }\n  static waitFor(\n  // Accept all Promise types in waitFor().\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  t) {\n    return new At((e, n) => {\n      let s = 0,\n        i = 0,\n        r = !1;\n      t.forEach(t => {\n        ++s, t.next(() => {\n          ++i, r && i === s && e();\n        }, t => n(t));\n      }), r = !0, i === s && e();\n    });\n  }\n  /**\n   * Given an array of predicate functions that asynchronously evaluate to a\n   * boolean, implements a short-circuiting `or` between the results. Predicates\n   * will be evaluated until one of them returns `true`, then stop. The final\n   * result will be whether any of them returned `true`.\n   */\n  static or(t) {\n    let e = At.resolve(!1);\n    for (const n of t) e = e.next(t => t ? At.resolve(t) : n());\n    return e;\n  }\n  static forEach(t, e) {\n    const n = [];\n    return t.forEach((t, s) => {\n      n.push(e.call(this, t, s));\n    }), this.waitFor(n);\n  }\n  /**\n   * Concurrently map all array elements through asynchronous function.\n   */\n  static mapArray(t, e) {\n    return new At((n, s) => {\n      const i = t.length,\n        r = new Array(i);\n      let o = 0;\n      for (let u = 0; u < i; u++) {\n        const c = u;\n        e(t[c]).next(t => {\n          r[c] = t, ++o, o === i && n(r);\n        }, t => s(t));\n      }\n    });\n  }\n  /**\n   * An alternative to recursive PersistencePromise calls, that avoids\n   * potential memory problems from unbounded chains of promises.\n   *\n   * The `action` will be called repeatedly while `condition` is true.\n   */\n  static doWhile(t, e) {\n    return new At((n, s) => {\n      const i = () => {\n        !0 === t() ? e().next(() => {\n          i();\n        }, s) : n();\n      };\n      i();\n    });\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by SimpleDb.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Wraps an IDBTransaction and exposes a store() method to get a handle to a\n * specific object store.\n */\nclass Rt {\n  constructor(t, e) {\n    this.action = t, this.transaction = e, this.aborted = !1,\n    /**\n     * A `Promise` that resolves with the result of the IndexedDb transaction.\n     */\n    this.P = new q(), this.transaction.oncomplete = () => {\n      this.P.resolve();\n    }, this.transaction.onabort = () => {\n      e.error ? this.P.reject(new bt(t, e.error)) : this.P.resolve();\n    }, this.transaction.onerror = e => {\n      const n = xt(e.target.error);\n      this.P.reject(new bt(t, n));\n    };\n  }\n  static open(t, e, n, s) {\n    try {\n      return new Rt(e, t.transaction(s, n));\n    } catch (t) {\n      throw new bt(e, t);\n    }\n  }\n  get v() {\n    return this.P.promise;\n  }\n  abort(t) {\n    t && this.P.reject(t), this.aborted || (C(\"SimpleDb\", \"Aborting transaction:\", t ? t.message : \"Client-initiated abort\"), this.aborted = !0, this.transaction.abort());\n  }\n  V() {\n    // If the browser supports V3 IndexedDB, we invoke commit() explicitly to\n    // speed up index DB processing if the event loop remains blocks.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const t = this.transaction;\n    this.aborted || \"function\" != typeof t.commit || t.commit();\n  }\n  /**\n   * Returns a SimpleDbStore<KeyType, ValueType> for the specified store. All\n   * operations performed on the SimpleDbStore happen within the context of this\n   * transaction and it cannot be used anymore once the transaction is\n   * completed.\n   *\n   * Note that we can't actually enforce that the KeyType and ValueType are\n   * correct, but they allow type safety through the rest of the consuming code.\n   */\n  store(t) {\n    const e = this.transaction.objectStore(t);\n    return new St(e);\n  }\n}\n\n/**\n * Provides a wrapper around IndexedDb with a simplified interface that uses\n * Promise-like return values to chain operations. Real promises cannot be used\n * since .then() continuations are executed asynchronously (e.g. via\n * .setImmediate), which would cause IndexedDB to end the transaction.\n * See PersistencePromise for more details.\n */\nclass Pt {\n  /*\n   * Creates a new SimpleDb wrapper for IndexedDb database `name`.\n   *\n   * Note that `version` must not be a downgrade. IndexedDB does not support\n   * downgrading the schema version. We currently do not support any way to do\n   * versioning outside of IndexedDB's versioning mechanism, as only\n   * version-upgrade transactions are allowed to do things like create\n   * objectstores.\n   */\n  constructor(t, e, n) {\n    this.name = t, this.version = e, this.S = n;\n    // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n    // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n    // whatever reason it's much harder to hit after 12.2 so we only proactively\n    // log on 12.2.\n    12.2 === Pt.D(getUA()) && x(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n  }\n  /** Deletes the specified database. */\n  static delete(t) {\n    return C(\"SimpleDb\", \"Removing database:\", t), Dt(window.indexedDB.deleteDatabase(t)).toPromise();\n  }\n  /** Returns true if IndexedDB is available in the current environment. */\n  static C() {\n    if (!isIndexedDBAvailable()) return !1;\n    if (Pt.N()) return !0;\n    // We extensively use indexed array values and compound keys,\n    // which IE and Edge do not support. However, they still have indexedDB\n    // defined on the window, so we need to check for them here and make sure\n    // to return that persistence is not enabled for those browsers.\n    // For tracking support of this feature, see here:\n    // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/\n    // Check the UA string to find out the browser.\n    const t = getUA(),\n      e = Pt.D(t),\n      n = 0 < e && e < 10,\n      s = Pt.k(t),\n      i = 0 < s && s < 4.5;\n    // IE 10\n    // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n    // IE 11\n    // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n    // Edge\n    // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,\n    // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n    // iOS Safari: Disable for users running iOS version < 10.\n    return !(t.indexOf(\"MSIE \") > 0 || t.indexOf(\"Trident/\") > 0 || t.indexOf(\"Edge/\") > 0 || n || i);\n  }\n  /**\n   * Returns true if the backing IndexedDB store is the Node IndexedDBShim\n   * (see https://github.com/axemclion/IndexedDBShim).\n   */\n  static N() {\n    var t;\n    return \"undefined\" != typeof process && \"YES\" === (null === (t = process.env) || void 0 === t ? void 0 : t.$);\n  }\n  /** Helper to get a typed SimpleDbStore from a transaction. */\n  static M(t, e) {\n    return t.store(e);\n  }\n  // visible for testing\n  /** Parse User Agent to determine iOS version. Returns -1 if not found. */\n  static D(t) {\n    const e = t.match(/i(?:phone|pad|pod) os ([\\d_]+)/i),\n      n = e ? e[1].split(\"_\").slice(0, 2).join(\".\") : \"-1\";\n    return Number(n);\n  }\n  // visible for testing\n  /** Parse User Agent to determine Android version. Returns -1 if not found. */\n  static k(t) {\n    const e = t.match(/Android ([\\d.]+)/i),\n      n = e ? e[1].split(\".\").slice(0, 2).join(\".\") : \"-1\";\n    return Number(n);\n  }\n  /**\n   * Opens the specified database, creating or upgrading it if necessary.\n   */\n  O(t) {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      return _this2.db || (C(\"SimpleDb\", \"Opening database:\", _this2.name), _this2.db = yield new Promise((e, n) => {\n        // TODO(mikelehen): Investigate browser compatibility.\n        // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB\n        // suggests IE9 and older WebKit browsers handle upgrade\n        // differently. They expect setVersion, as described here:\n        // https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeRequest/setVersion\n        const s = indexedDB.open(_this2.name, _this2.version);\n        s.onsuccess = t => {\n          const n = t.target.result;\n          e(n);\n        }, s.onblocked = () => {\n          n(new bt(t, \"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed.\"));\n        }, s.onerror = e => {\n          const s = e.target.error;\n          \"VersionError\" === s.name ? n(new L(B.FAILED_PRECONDITION, \"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.\")) : \"InvalidStateError\" === s.name ? n(new L(B.FAILED_PRECONDITION, \"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: \" + s)) : n(new bt(t, s));\n        }, s.onupgradeneeded = t => {\n          C(\"SimpleDb\", 'Database \"' + _this2.name + '\" requires upgrade from version:', t.oldVersion);\n          const e = t.target.result;\n          _this2.S.F(e, s.transaction, t.oldVersion, _this2.version).next(() => {\n            C(\"SimpleDb\", \"Database upgrade to version \" + _this2.version + \" complete\");\n          });\n        };\n      })), _this2.B && (_this2.db.onversionchange = t => _this2.B(t)), _this2.db;\n    })();\n  }\n  L(t) {\n    this.B = t, this.db && (this.db.onversionchange = e => t(e));\n  }\n  runTransaction(t, e, n, s) {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      const i = \"readonly\" === e;\n      let r = 0;\n      for (;;) {\n        ++r;\n        try {\n          _this3.db = yield _this3.O(t);\n          const e = Rt.open(_this3.db, t, i ? \"readonly\" : \"readwrite\", n),\n            r = s(e).next(t => (e.V(), t)).catch(t => (\n            // Abort the transaction if there was an error.\n            e.abort(t), At.reject(t))).toPromise();\n          // As noted above, errors are propagated by aborting the transaction. So\n          // we swallow any error here to avoid the browser logging it as unhandled.\n          return r.catch(() => {}), // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to\n          // fire), but still return the original transactionFnResult back to the\n          // caller.\n          yield e.v, r;\n        } catch (t) {\n          const e = t,\n            n = \"FirebaseError\" !== e.name && r < 3;\n          // TODO(schmidt-sebastian): We could probably be smarter about this and\n          // not retry exceptions that are likely unrecoverable (such as quota\n          // exceeded errors).\n          // Note: We cannot use an instanceof check for FirestoreException, since the\n          // exception is wrapped in a generic error by our async/await handling.\n          if (C(\"SimpleDb\", \"Transaction failed with error:\", e.message, \"Retrying:\", n), _this3.close(), !n) return Promise.reject(e);\n        }\n      }\n    })();\n  }\n  close() {\n    this.db && this.db.close(), this.db = void 0;\n  }\n}\n\n/**\n * A controller for iterating over a key range or index. It allows an iterate\n * callback to delete the currently-referenced object, or jump to a new key\n * within the key range or index.\n */\nclass vt {\n  constructor(t) {\n    this.q = t, this.U = !1, this.K = null;\n  }\n  get isDone() {\n    return this.U;\n  }\n  get G() {\n    return this.K;\n  }\n  set cursor(t) {\n    this.q = t;\n  }\n  /**\n   * This function can be called to stop iteration at any point.\n   */\n  done() {\n    this.U = !0;\n  }\n  /**\n   * This function can be called to skip to that next key, which could be\n   * an index or a primary key.\n   */\n  j(t) {\n    this.K = t;\n  }\n  /**\n   * Delete the current cursor value from the object store.\n   *\n   * NOTE: You CANNOT do this with a keysOnly query.\n   */\n  delete() {\n    return Dt(this.q.delete());\n  }\n}\n\n/** An error that wraps exceptions that thrown during IndexedDB execution. */\nclass bt extends L {\n  constructor(t, e) {\n    super(B.UNAVAILABLE, `IndexedDB transaction '${t}' failed: ${e}`), this.name = \"IndexedDbTransactionError\";\n  }\n}\n\n/** Verifies whether `e` is an IndexedDbTransactionError. */\nfunction Vt(t) {\n  // Use name equality, as instanceof checks on errors don't work with errors\n  // that wrap other errors.\n  return \"IndexedDbTransactionError\" === t.name;\n}\n\n/**\n * A wrapper around an IDBObjectStore providing an API that:\n *\n * 1) Has generic KeyType / ValueType parameters to provide strongly-typed\n * methods for acting against the object store.\n * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every\n * method return a PersistencePromise instead.\n * 3) Provides a higher-level API to avoid needing to do excessive wrapping of\n * intermediate IndexedDB types (IDBCursorWithValue, etc.)\n */\nclass St {\n  constructor(t) {\n    this.store = t;\n  }\n  put(t, e) {\n    let n;\n    return void 0 !== e ? (C(\"SimpleDb\", \"PUT\", this.store.name, t, e), n = this.store.put(e, t)) : (C(\"SimpleDb\", \"PUT\", this.store.name, \"<auto-key>\", t), n = this.store.put(t)), Dt(n);\n  }\n  /**\n   * Adds a new value into an Object Store and returns the new key. Similar to\n   * IndexedDb's `add()`, this method will fail on primary key collisions.\n   *\n   * @param value - The object to write.\n   * @returns The key of the value to add.\n   */\n  add(t) {\n    C(\"SimpleDb\", \"ADD\", this.store.name, t, t);\n    return Dt(this.store.add(t));\n  }\n  /**\n   * Gets the object with the specified key from the specified store, or null\n   * if no object exists with the specified key.\n   *\n   * @key The key of the object to get.\n   * @returns The object with the specified key or null if no object exists.\n   */\n  get(t) {\n    // We're doing an unsafe cast to ValueType.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    return Dt(this.store.get(t)).next(e => (\n    // Normalize nonexistence to null.\n    void 0 === e && (e = null), C(\"SimpleDb\", \"GET\", this.store.name, t, e), e));\n  }\n  delete(t) {\n    C(\"SimpleDb\", \"DELETE\", this.store.name, t);\n    return Dt(this.store.delete(t));\n  }\n  /**\n   * If we ever need more of the count variants, we can add overloads. For now,\n   * all we need is to count everything in a store.\n   *\n   * Returns the number of rows in the store.\n   */\n  count() {\n    C(\"SimpleDb\", \"COUNT\", this.store.name);\n    return Dt(this.store.count());\n  }\n  W(t, e) {\n    const n = this.options(t, e);\n    // Use `getAll()` if the browser supports IndexedDB v3, as it is roughly\n    // 20% faster. Unfortunately, getAll() does not support custom indices.\n    if (n.index || \"function\" != typeof this.store.getAll) {\n      const t = this.cursor(n),\n        e = [];\n      return this.H(t, (t, n) => {\n        e.push(n);\n      }).next(() => e);\n    }\n    {\n      const t = this.store.getAll(n.range);\n      return new At((e, n) => {\n        t.onerror = t => {\n          n(t.target.error);\n        }, t.onsuccess = t => {\n          e(t.target.result);\n        };\n      });\n    }\n  }\n  /**\n   * Loads the first `count` elements from the provided index range. Loads all\n   * elements if no limit is provided.\n   */\n  J(t, e) {\n    const n = this.store.getAll(t, null === e ? void 0 : e);\n    return new At((t, e) => {\n      n.onerror = t => {\n        e(t.target.error);\n      }, n.onsuccess = e => {\n        t(e.target.result);\n      };\n    });\n  }\n  Y(t, e) {\n    C(\"SimpleDb\", \"DELETE ALL\", this.store.name);\n    const n = this.options(t, e);\n    n.Z = !1;\n    const s = this.cursor(n);\n    return this.H(s, (t, e, n) => n.delete());\n  }\n  X(t, e) {\n    let n;\n    e ? n = t : (n = {}, e = t);\n    const s = this.cursor(n);\n    return this.H(s, e);\n  }\n  /**\n   * Iterates over a store, but waits for the given callback to complete for\n   * each entry before iterating the next entry. This allows the callback to do\n   * asynchronous work to determine if this iteration should continue.\n   *\n   * The provided callback should return `true` to continue iteration, and\n   * `false` otherwise.\n   */\n  tt(t) {\n    const e = this.cursor({});\n    return new At((n, s) => {\n      e.onerror = t => {\n        const e = xt(t.target.error);\n        s(e);\n      }, e.onsuccess = e => {\n        const s = e.target.result;\n        s ? t(s.primaryKey, s.value).next(t => {\n          t ? s.continue() : n();\n        }) : n();\n      };\n    });\n  }\n  H(t, e) {\n    const n = [];\n    return new At((s, i) => {\n      t.onerror = t => {\n        i(t.target.error);\n      }, t.onsuccess = t => {\n        const i = t.target.result;\n        if (!i) return void s();\n        const r = new vt(i),\n          o = e(i.primaryKey, i.value, r);\n        if (o instanceof At) {\n          const t = o.catch(t => (r.done(), At.reject(t)));\n          n.push(t);\n        }\n        r.isDone ? s() : null === r.G ? i.continue() : i.continue(r.G);\n      };\n    }).next(() => At.waitFor(n));\n  }\n  options(t, e) {\n    let n;\n    return void 0 !== t && (\"string\" == typeof t ? n = t : e = t), {\n      index: n,\n      range: e\n    };\n  }\n  cursor(t) {\n    let e = \"next\";\n    if (t.reverse && (e = \"prev\"), t.index) {\n      const n = this.store.index(t.index);\n      return t.Z ? n.openKeyCursor(t.range, e) : n.openCursor(t.range, e);\n    }\n    return this.store.openCursor(t.range, e);\n  }\n}\n\n/**\n * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror\n * handlers to resolve / reject the PersistencePromise as appropriate.\n */\nfunction Dt(t) {\n  return new At((e, n) => {\n    t.onsuccess = t => {\n      const n = t.target.result;\n      e(n);\n    }, t.onerror = t => {\n      const e = xt(t.target.error);\n      n(e);\n    };\n  });\n}\n\n// Guard so we only report the error once.\nlet Ct = !1;\nfunction xt(t) {\n  const e = Pt.D(getUA());\n  if (e >= 12.2 && e < 13) {\n    const e = \"An internal error was encountered in the Indexed Database server\";\n    if (t.message.indexOf(e) >= 0) {\n      // Wrap error in a more descriptive one.\n      const t = new L(\"internal\", `IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);\n      return Ct || (Ct = !0,\n      // Throw a global exception outside of this promise chain, for the user to\n      // potentially catch.\n      setTimeout(() => {\n        throw t;\n      }, 0)), t;\n    }\n  }\n  return t;\n}\n\n/** This class is responsible for the scheduling of Index Backfiller. */\nclass Nt {\n  constructor(t, e) {\n    this.asyncQueue = t, this.et = e, this.task = null;\n  }\n  start() {\n    this.nt(15e3);\n  }\n  stop() {\n    this.task && (this.task.cancel(), this.task = null);\n  }\n  get started() {\n    return null !== this.task;\n  }\n  nt(t) {\n    var _this4 = this;\n    C(\"IndexBackiller\", `Scheduled in ${t}ms`), this.task = this.asyncQueue.enqueueAfterDelay(\"index_backfill\" /* TimerId.IndexBackfill */, t, /*#__PURE__*/_asyncToGenerator(function* () {\n      _this4.task = null;\n      try {\n        C(\"IndexBackiller\", `Documents written: ${yield _this4.et.st()}`);\n      } catch (t) {\n        Vt(t) ? C(\"IndexBackiller\", \"Ignoring IndexedDB error during index backfill: \", t) : yield Et(t);\n      }\n      yield _this4.nt(6e4);\n    }));\n  }\n}\n\n/** Implements the steps for backfilling indexes. */\nclass kt {\n  constructor(\n  /**\n   * LocalStore provides access to IndexManager and LocalDocumentView.\n   * These properties will update when the user changes. Consequently,\n   * making a local copy of IndexManager and LocalDocumentView will require\n   * updates over time. The simpler solution is to rely on LocalStore to have\n   * an up-to-date references to IndexManager and LocalDocumentStore.\n   */\n  t, e) {\n    this.localStore = t, this.persistence = e;\n  }\n  st(t = 50) {\n    var _this5 = this;\n    return _asyncToGenerator(function* () {\n      return _this5.persistence.runTransaction(\"Backfill Indexes\", \"readwrite-primary\", e => _this5.it(e, t));\n    })();\n  }\n  /** Writes index entries until the cap is reached. Returns the number of documents processed. */\n  it(t, e) {\n    const n = new Set();\n    let s = e,\n      i = !0;\n    return At.doWhile(() => !0 === i && s > 0, () => this.localStore.indexManager.getNextCollectionGroupToUpdate(t).next(e => {\n      if (null !== e && !n.has(e)) return C(\"IndexBackiller\", `Processing collection: ${e}`), this.rt(t, e, s).next(t => {\n        s -= t, n.add(e);\n      });\n      i = !1;\n    })).next(() => e - s);\n  }\n  /**\n   * Writes entries for the provided collection group. Returns the number of documents processed.\n   */\n  rt(t, e, n) {\n    // Use the earliest offset of all field indexes to query the local cache.\n    return this.localStore.indexManager.getMinOffsetFromCollectionGroup(t, e).next(s => this.localStore.localDocuments.getNextDocuments(t, e, s, n).next(n => {\n      const i = n.changes;\n      return this.localStore.indexManager.updateIndexEntries(t, i).next(() => this.ot(s, n)).next(n => (C(\"IndexBackiller\", `Updating offset: ${n}`), this.localStore.indexManager.updateCollectionGroup(t, e, n))).next(() => i.size);\n    }));\n  }\n  /** Returns the next offset based on the provided documents. */\n  ot(t, e) {\n    let n = t;\n    return e.changes.forEach((t, e) => {\n      const s = gt(e);\n      pt(s, n) > 0 && (n = s);\n    }), new yt(n.readTime, n.documentKey, Math.max(e.batchId, t.largestBatchId));\n  }\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * `ListenSequence` is a monotonic sequence. It is initialized with a minimum value to\n * exceed. All subsequent calls to next will return increasing values. If provided with a\n * `SequenceNumberSyncer`, it will additionally bump its next value when told of a new value, as\n * well as write out sequence numbers that it produces via `next()`.\n */\nlet $t = /*#__PURE__*/(() => {\n  class $t {\n    constructor(t, e) {\n      this.previousValue = t, e && (e.sequenceNumberHandler = t => this.ut(t), this.ct = t => e.writeSequenceNumber(t));\n    }\n    ut(t) {\n      return this.previousValue = Math.max(t, this.previousValue), this.previousValue;\n    }\n    next() {\n      const t = ++this.previousValue;\n      return this.ct && this.ct(t), t;\n    }\n  }\n  $t.at = -1;\n\n  /**\n   * @license\n   * Copyright 2022 Google LLC\n   *\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\n   * you may not use this file except in compliance with the License.\n   * You may obtain a copy of the License at\n   *\n   *   http://www.apache.org/licenses/LICENSE-2.0\n   *\n   * Unless required by applicable law or agreed to in writing, software\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   * See the License for the specific language governing permissions and\n   * limitations under the License.\n   */\n  return $t;\n})();\nconst Mt = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;\n\n/**\n * An alias for aggregation results.\n * @internal\n */\nclass Ot {\n  /**\n   * @internal\n   * @param alias Un-escaped alias representation\n   */\n  constructor(t) {\n    this.alias = t;\n  }\n  /**\n   * Returns true if the string could be used as an alias.\n   */\n  static ht(t) {\n    return Mt.test(t);\n  }\n  /**\n   * Return an escaped and quoted string representation of the alias.\n   */\n  canonicalString() {\n    let t = this.alias.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\");\n    return Ot.ht(t) || (t = \"`\" + t + \"`\"), t;\n  }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Concrete implementation of the Aggregate type.\n */\nclass Ft {\n  constructor(t, e, n) {\n    this.alias = t, this.lt = e, this.fieldPath = n;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Bt {\n  /**\n   * Constructs a DatabaseInfo using the provided host, databaseId and\n   * persistenceKey.\n   *\n   * @param databaseId - The database to use.\n   * @param appId - The Firebase App Id.\n   * @param persistenceKey - A unique identifier for this Firestore's local\n   * storage (used in conjunction with the databaseId).\n   * @param host - The Firestore backend host to connect to.\n   * @param ssl - Whether to use SSL when connecting.\n   * @param forceLongPolling - Whether to use the forceLongPolling option\n   * when using WebChannel as the network transport.\n   * @param autoDetectLongPolling - Whether to use the detectBufferingProxy\n   * option when using WebChannel as the network transport.\n   * @param useFetchStreams Whether to use the Fetch API instead of\n   * XMLHTTPRequest\n   */\n  constructor(t, e, n, s, i, r, o, u) {\n    this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = s, this.ssl = i, this.forceLongPolling = r, this.autoDetectLongPolling = o, this.useFetchStreams = u;\n  }\n}\n\n/** The default database name for a project. */\n/**\n * Represents the database ID a Firestore client is associated with.\n * @internal\n */\nclass Lt {\n  constructor(t, e) {\n    this.projectId = t, this.database = e || \"(default)\";\n  }\n  static empty() {\n    return new Lt(\"\", \"\");\n  }\n  get isDefaultDatabase() {\n    return \"(default)\" === this.database;\n  }\n  isEqual(t) {\n    return t instanceof Lt && t.projectId === this.projectId && t.database === this.database;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction qt(t) {\n  let e = 0;\n  for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;\n  return e;\n}\nfunction Ut(t, e) {\n  for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);\n}\nfunction Kt(t) {\n  for (const e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;\n  return !0;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Sentinel value that sorts before any Mutation Batch ID. */\n/**\n * Returns whether a variable is either undefined or null.\n */\nfunction Gt(t) {\n  return null == t;\n}\n\n/** Returns whether the value represents -0. */\nfunction Qt(t) {\n  // Detect if the value is -0.0. Based on polyfill from\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n  return 0 === t && 1 / t == -1 / 0;\n}\n\n/**\n * Returns whether a value is an integer and in the safe integer range\n * @param value - The value to test for being an integer and in the safe range\n */\nfunction jt(t) {\n  return \"number\" == typeof t && Number.isInteger(t) && !Qt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An error encountered while decoding base64 string.\n */\nclass zt extends Error {\n  constructor() {\n    super(...arguments), this.name = \"Base64DecodeError\";\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Converts a Base64 encoded string to a binary string. */\n/** True if and only if the Base64 conversion functions are available. */\nfunction Wt() {\n  return \"undefined\" != typeof atob;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Immutable class that represents a \"proto\" byte string.\n *\n * Proto byte strings can either be Base64-encoded strings or Uint8Arrays when\n * sent on the wire. This class abstracts away this differentiation by holding\n * the proto byte string in a common class that must be converted into a string\n * before being sent as a proto.\n * @internal\n */\nclass Ht {\n  constructor(t) {\n    this.binaryString = t;\n  }\n  static fromBase64String(t) {\n    const e = function (t) {\n      try {\n        return atob(t);\n      } catch (t) {\n        throw t instanceof DOMException ? new zt(\"Invalid base64 string: \" + t) : t;\n      }\n    }\n    /** Converts a binary string to a Base64 encoded string. */(t);\n    return new Ht(e);\n  }\n  static fromUint8Array(t) {\n    // TODO(indexing); Remove the copy of the byte string here as this method\n    // is frequently called during indexing.\n    const e =\n    /**\n    * Helper function to convert an Uint8array to a binary string.\n    */\n    function (t) {\n      let e = \"\";\n      for (let n = 0; n < t.length; ++n) e += String.fromCharCode(t[n]);\n      return e;\n    }\n    /**\n    * Helper function to convert a binary string to an Uint8Array.\n    */(t);\n    return new Ht(e);\n  }\n  [Symbol.iterator]() {\n    let t = 0;\n    return {\n      next: () => t < this.binaryString.length ? {\n        value: this.binaryString.charCodeAt(t++),\n        done: !1\n      } : {\n        value: void 0,\n        done: !0\n      }\n    };\n  }\n  toBase64() {\n    return t = this.binaryString, btoa(t);\n    var t;\n  }\n  toUint8Array() {\n    return function (t) {\n      const e = new Uint8Array(t.length);\n      for (let n = 0; n < t.length; n++) e[n] = t.charCodeAt(n);\n      return e;\n    }\n    /**\n    * @license\n    * Copyright 2020 Google LLC\n    *\n    * Licensed under the Apache License, Version 2.0 (the \"License\");\n    * you may not use this file except in compliance with the License.\n    * You may obtain a copy of the License at\n    *\n    *   http://www.apache.org/licenses/LICENSE-2.0\n    *\n    * Unless required by applicable law or agreed to in writing, software\n    * distributed under the License is distributed on an \"AS IS\" BASIS,\n    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    * See the License for the specific language governing permissions and\n    * limitations under the License.\n    */\n    // A RegExp matching ISO 8601 UTC timestamps with optional fraction.\n    (this.binaryString);\n  }\n  approximateByteSize() {\n    return 2 * this.binaryString.length;\n  }\n  compareTo(t) {\n    return X(this.binaryString, t.binaryString);\n  }\n  isEqual(t) {\n    return this.binaryString === t.binaryString;\n  }\n}\nHt.EMPTY_BYTE_STRING = new Ht(\"\");\nconst Jt = new RegExp(/^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.(\\d+))?Z$/);\n\n/**\n * Converts the possible Proto values for a timestamp value into a \"seconds and\n * nanos\" representation.\n */\nfunction Yt(t) {\n  // The json interface (for the browser) will return an iso timestamp string,\n  // while the proto js library (for node) will return a\n  // google.protobuf.Timestamp instance.\n  if (M(!!t), \"string\" == typeof t) {\n    // The date string can have higher precision (nanos) than the Date class\n    // (millis), so we do some custom parsing here.\n    // Parse the nanos right out of the string.\n    let e = 0;\n    const n = Jt.exec(t);\n    if (M(!!n), n[1]) {\n      // Pad the fraction out to 9 digits (nanos).\n      let t = n[1];\n      t = (t + \"000000000\").substr(0, 9), e = Number(t);\n    }\n    // Parse the date to get the seconds.\n    const s = new Date(t);\n    return {\n      seconds: Math.floor(s.getTime() / 1e3),\n      nanos: e\n    };\n  }\n  return {\n    seconds: Zt(t.seconds),\n    nanos: Zt(t.nanos)\n  };\n}\n\n/**\n * Converts the possible Proto types for numbers into a JavaScript number.\n * Returns 0 if the value is not numeric.\n */\nfunction Zt(t) {\n  // TODO(bjornick): Handle int64 greater than 53 bits.\n  return \"number\" == typeof t ? t : \"string\" == typeof t ? Number(t) : 0;\n}\n\n/** Converts the possible Proto types for Blobs into a ByteString. */\nfunction Xt(t) {\n  return \"string\" == typeof t ? Ht.fromBase64String(t) : Ht.fromUint8Array(t);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a locally-applied ServerTimestamp.\n *\n * Server Timestamps are backed by MapValues that contain an internal field\n * `__type__` with a value of `server_timestamp`. The previous value and local\n * write time are stored in its `__previous_value__` and `__local_write_time__`\n * fields respectively.\n *\n * Notes:\n * - ServerTimestampValue instances are created as the result of applying a\n *   transform. They can only exist in the local view of a document. Therefore\n *   they do not need to be parsed or serialized.\n * - When evaluated locally (e.g. for snapshot.data()), they by default\n *   evaluate to `null`. This behavior can be configured by passing custom\n *   FieldValueOptions to value().\n * - With respect to other ServerTimestampValues, they sort by their\n *   localWriteTime.\n */\nfunction te(t) {\n  var e, n;\n  return \"server_timestamp\" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);\n}\n\n/**\n * Creates a new ServerTimestamp proto value (using the internal format).\n */\n/**\n * Returns the value of the field before this ServerTimestamp was set.\n *\n * Preserving the previous values allows the user to display the last resoled\n * value until the backend responds with the timestamp.\n */\nfunction ee(t) {\n  const e = t.mapValue.fields.__previous_value__;\n  return te(e) ? ee(e) : e;\n}\n\n/**\n * Returns the local time at which this timestamp was first set.\n */\nfunction ne(t) {\n  const e = Yt(t.mapValue.fields.__local_write_time__.timestampValue);\n  return new nt(e.seconds, e.nanos);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst se = {\n    mapValue: {\n      fields: {\n        __type__: {\n          stringValue: \"__max__\"\n        }\n      }\n    }\n  },\n  ie = {\n    nullValue: \"NULL_VALUE\"\n  };\n\n/** Extracts the backend's type order for the provided value. */\nfunction re(t) {\n  return \"nullValue\" in t ? 0 /* TypeOrder.NullValue */ : \"booleanValue\" in t ? 1 /* TypeOrder.BooleanValue */ : \"integerValue\" in t || \"doubleValue\" in t ? 2 /* TypeOrder.NumberValue */ : \"timestampValue\" in t ? 3 /* TypeOrder.TimestampValue */ : \"stringValue\" in t ? 5 /* TypeOrder.StringValue */ : \"bytesValue\" in t ? 6 /* TypeOrder.BlobValue */ : \"referenceValue\" in t ? 7 /* TypeOrder.RefValue */ : \"geoPointValue\" in t ? 8 /* TypeOrder.GeoPointValue */ : \"arrayValue\" in t ? 9 /* TypeOrder.ArrayValue */ : \"mapValue\" in t ? te(t) ? 4 /* TypeOrder.ServerTimestampValue */ : pe(t) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : $();\n}\n\n/** Tests `left` and `right` for equality based on the backend semantics. */\nfunction oe(t, e) {\n  if (t === e) return !0;\n  const n = re(t);\n  if (n !== re(e)) return !1;\n  switch (n) {\n    case 0 /* TypeOrder.NullValue */:\n    case 9007199254740991 /* TypeOrder.MaxValue */:\n      return !0;\n    case 1 /* TypeOrder.BooleanValue */:\n      return t.booleanValue === e.booleanValue;\n    case 4 /* TypeOrder.ServerTimestampValue */:\n      return ne(t).isEqual(ne(e));\n    case 3 /* TypeOrder.TimestampValue */:\n      return function (t, e) {\n        if (\"string\" == typeof t.timestampValue && \"string\" == typeof e.timestampValue && t.timestampValue.length === e.timestampValue.length)\n          // Use string equality for ISO 8601 timestamps\n          return t.timestampValue === e.timestampValue;\n        const n = Yt(t.timestampValue),\n          s = Yt(e.timestampValue);\n        return n.seconds === s.seconds && n.nanos === s.nanos;\n      }(t, e);\n    case 5 /* TypeOrder.StringValue */:\n      return t.stringValue === e.stringValue;\n    case 6 /* TypeOrder.BlobValue */:\n      return function (t, e) {\n        return Xt(t.bytesValue).isEqual(Xt(e.bytesValue));\n      }(t, e);\n    case 7 /* TypeOrder.RefValue */:\n      return t.referenceValue === e.referenceValue;\n    case 8 /* TypeOrder.GeoPointValue */:\n      return function (t, e) {\n        return Zt(t.geoPointValue.latitude) === Zt(e.geoPointValue.latitude) && Zt(t.geoPointValue.longitude) === Zt(e.geoPointValue.longitude);\n      }(t, e);\n    case 2 /* TypeOrder.NumberValue */:\n      return function (t, e) {\n        if (\"integerValue\" in t && \"integerValue\" in e) return Zt(t.integerValue) === Zt(e.integerValue);\n        if (\"doubleValue\" in t && \"doubleValue\" in e) {\n          const n = Zt(t.doubleValue),\n            s = Zt(e.doubleValue);\n          return n === s ? Qt(n) === Qt(s) : isNaN(n) && isNaN(s);\n        }\n        return !1;\n      }(t, e);\n    case 9 /* TypeOrder.ArrayValue */:\n      return tt(t.arrayValue.values || [], e.arrayValue.values || [], oe);\n    case 10 /* TypeOrder.ObjectValue */:\n      return function (t, e) {\n        const n = t.mapValue.fields || {},\n          s = e.mapValue.fields || {};\n        if (qt(n) !== qt(s)) return !1;\n        for (const t in n) if (n.hasOwnProperty(t) && (void 0 === s[t] || !oe(n[t], s[t]))) return !1;\n        return !0;\n      }\n      /** Returns true if the ArrayValue contains the specified element. */(t, e);\n    default:\n      return $();\n  }\n}\nfunction ue(t, e) {\n  return void 0 !== (t.values || []).find(t => oe(t, e));\n}\nfunction ce(t, e) {\n  if (t === e) return 0;\n  const n = re(t),\n    s = re(e);\n  if (n !== s) return X(n, s);\n  switch (n) {\n    case 0 /* TypeOrder.NullValue */:\n    case 9007199254740991 /* TypeOrder.MaxValue */:\n      return 0;\n    case 1 /* TypeOrder.BooleanValue */:\n      return X(t.booleanValue, e.booleanValue);\n    case 2 /* TypeOrder.NumberValue */:\n      return function (t, e) {\n        const n = Zt(t.integerValue || t.doubleValue),\n          s = Zt(e.integerValue || e.doubleValue);\n        return n < s ? -1 : n > s ? 1 : n === s ? 0 :\n        // one or both are NaN.\n        isNaN(n) ? isNaN(s) ? 0 : -1 : 1;\n      }(t, e);\n    case 3 /* TypeOrder.TimestampValue */:\n      return ae(t.timestampValue, e.timestampValue);\n    case 4 /* TypeOrder.ServerTimestampValue */:\n      return ae(ne(t), ne(e));\n    case 5 /* TypeOrder.StringValue */:\n      return X(t.stringValue, e.stringValue);\n    case 6 /* TypeOrder.BlobValue */:\n      return function (t, e) {\n        const n = Xt(t),\n          s = Xt(e);\n        return n.compareTo(s);\n      }(t.bytesValue, e.bytesValue);\n    case 7 /* TypeOrder.RefValue */:\n      return function (t, e) {\n        const n = t.split(\"/\"),\n          s = e.split(\"/\");\n        for (let t = 0; t < n.length && t < s.length; t++) {\n          const e = X(n[t], s[t]);\n          if (0 !== e) return e;\n        }\n        return X(n.length, s.length);\n      }(t.referenceValue, e.referenceValue);\n    case 8 /* TypeOrder.GeoPointValue */:\n      return function (t, e) {\n        const n = X(Zt(t.latitude), Zt(e.latitude));\n        if (0 !== n) return n;\n        return X(Zt(t.longitude), Zt(e.longitude));\n      }(t.geoPointValue, e.geoPointValue);\n    case 9 /* TypeOrder.ArrayValue */:\n      return function (t, e) {\n        const n = t.values || [],\n          s = e.values || [];\n        for (let t = 0; t < n.length && t < s.length; ++t) {\n          const e = ce(n[t], s[t]);\n          if (e) return e;\n        }\n        return X(n.length, s.length);\n      }(t.arrayValue, e.arrayValue);\n    case 10 /* TypeOrder.ObjectValue */:\n      return function (t, e) {\n        if (t === se.mapValue && e === se.mapValue) return 0;\n        if (t === se.mapValue) return 1;\n        if (e === se.mapValue) return -1;\n        const n = t.fields || {},\n          s = Object.keys(n),\n          i = e.fields || {},\n          r = Object.keys(i);\n        // Even though MapValues are likely sorted correctly based on their insertion\n        // order (e.g. when received from the backend), local modifications can bring\n        // elements out of order. We need to re-sort the elements to ensure that\n        // canonical IDs are independent of insertion order.\n        s.sort(), r.sort();\n        for (let t = 0; t < s.length && t < r.length; ++t) {\n          const e = X(s[t], r[t]);\n          if (0 !== e) return e;\n          const o = ce(n[s[t]], i[r[t]]);\n          if (0 !== o) return o;\n        }\n        return X(s.length, r.length);\n      }\n      /**\n      * Generates the canonical ID for the provided field value (as used in Target\n      * serialization).\n      */(t.mapValue, e.mapValue);\n    default:\n      throw $();\n  }\n}\nfunction ae(t, e) {\n  if (\"string\" == typeof t && \"string\" == typeof e && t.length === e.length) return X(t, e);\n  const n = Yt(t),\n    s = Yt(e),\n    i = X(n.seconds, s.seconds);\n  return 0 !== i ? i : X(n.nanos, s.nanos);\n}\nfunction he(t) {\n  return le(t);\n}\nfunction le(t) {\n  return \"nullValue\" in t ? \"null\" : \"booleanValue\" in t ? \"\" + t.booleanValue : \"integerValue\" in t ? \"\" + t.integerValue : \"doubleValue\" in t ? \"\" + t.doubleValue : \"timestampValue\" in t ? function (t) {\n    const e = Yt(t);\n    return `time(${e.seconds},${e.nanos})`;\n  }(t.timestampValue) : \"stringValue\" in t ? t.stringValue : \"bytesValue\" in t ? Xt(t.bytesValue).toBase64() : \"referenceValue\" in t ? (n = t.referenceValue, ct.fromName(n).toString()) : \"geoPointValue\" in t ? `geo(${(e = t.geoPointValue).latitude},${e.longitude})` : \"arrayValue\" in t ? function (t) {\n    let e = \"[\",\n      n = !0;\n    for (const s of t.values || []) n ? n = !1 : e += \",\", e += le(s);\n    return e + \"]\";\n  }\n  /** Returns a reference value for the provided database and key. */(t.arrayValue) : \"mapValue\" in t ? function (t) {\n    // Iteration order in JavaScript is not guaranteed. To ensure that we generate\n    // matching canonical IDs for identical maps, we need to sort the keys.\n    const e = Object.keys(t.fields || {}).sort();\n    let n = \"{\",\n      s = !0;\n    for (const i of e) s ? s = !1 : n += \",\", n += `${i}:${le(t.fields[i])}`;\n    return n + \"}\";\n  }(t.mapValue) : $();\n  var e, n;\n}\nfunction fe(t, e) {\n  return {\n    referenceValue: `projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`\n  };\n}\n\n/** Returns true if `value` is an IntegerValue . */\nfunction de(t) {\n  return !!t && \"integerValue\" in t;\n}\n\n/** Returns true if `value` is a DoubleValue. */\n/** Returns true if `value` is an ArrayValue. */\nfunction _e(t) {\n  return !!t && \"arrayValue\" in t;\n}\n\n/** Returns true if `value` is a NullValue. */\nfunction we(t) {\n  return !!t && \"nullValue\" in t;\n}\n\n/** Returns true if `value` is NaN. */\nfunction me(t) {\n  return !!t && \"doubleValue\" in t && isNaN(Number(t.doubleValue));\n}\n\n/** Returns true if `value` is a MapValue. */\nfunction ge(t) {\n  return !!t && \"mapValue\" in t;\n}\n\n/** Creates a deep copy of `source`. */\nfunction ye(t) {\n  if (t.geoPointValue) return {\n    geoPointValue: Object.assign({}, t.geoPointValue)\n  };\n  if (t.timestampValue && \"object\" == typeof t.timestampValue) return {\n    timestampValue: Object.assign({}, t.timestampValue)\n  };\n  if (t.mapValue) {\n    const e = {\n      mapValue: {\n        fields: {}\n      }\n    };\n    return Ut(t.mapValue.fields, (t, n) => e.mapValue.fields[t] = ye(n)), e;\n  }\n  if (t.arrayValue) {\n    const e = {\n      arrayValue: {\n        values: []\n      }\n    };\n    for (let n = 0; n < (t.arrayValue.values || []).length; ++n) e.arrayValue.values[n] = ye(t.arrayValue.values[n]);\n    return e;\n  }\n  return Object.assign({}, t);\n}\n\n/** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */\nfunction pe(t) {\n  return \"__max__\" === (((t.mapValue || {}).fields || {}).__type__ || {}).stringValue;\n}\n\n/** Returns the lowest value for the given value type (inclusive). */\nfunction Ie(t) {\n  return \"nullValue\" in t ? ie : \"booleanValue\" in t ? {\n    booleanValue: !1\n  } : \"integerValue\" in t || \"doubleValue\" in t ? {\n    doubleValue: NaN\n  } : \"timestampValue\" in t ? {\n    timestampValue: {\n      seconds: Number.MIN_SAFE_INTEGER\n    }\n  } : \"stringValue\" in t ? {\n    stringValue: \"\"\n  } : \"bytesValue\" in t ? {\n    bytesValue: \"\"\n  } : \"referenceValue\" in t ? fe(Lt.empty(), ct.empty()) : \"geoPointValue\" in t ? {\n    geoPointValue: {\n      latitude: -90,\n      longitude: -180\n    }\n  } : \"arrayValue\" in t ? {\n    arrayValue: {}\n  } : \"mapValue\" in t ? {\n    mapValue: {}\n  } : $();\n}\n\n/** Returns the largest value for the given value type (exclusive). */\nfunction Te(t) {\n  return \"nullValue\" in t ? {\n    booleanValue: !1\n  } : \"booleanValue\" in t ? {\n    doubleValue: NaN\n  } : \"integerValue\" in t || \"doubleValue\" in t ? {\n    timestampValue: {\n      seconds: Number.MIN_SAFE_INTEGER\n    }\n  } : \"timestampValue\" in t ? {\n    stringValue: \"\"\n  } : \"stringValue\" in t ? {\n    bytesValue: \"\"\n  } : \"bytesValue\" in t ? fe(Lt.empty(), ct.empty()) : \"referenceValue\" in t ? {\n    geoPointValue: {\n      latitude: -90,\n      longitude: -180\n    }\n  } : \"geoPointValue\" in t ? {\n    arrayValue: {}\n  } : \"arrayValue\" in t ? {\n    mapValue: {}\n  } : \"mapValue\" in t ? se : $();\n}\nfunction Ee(t, e) {\n  const n = ce(t.value, e.value);\n  return 0 !== n ? n : t.inclusive && !e.inclusive ? -1 : !t.inclusive && e.inclusive ? 1 : 0;\n}\nfunction Ae(t, e) {\n  const n = ce(t.value, e.value);\n  return 0 !== n ? n : t.inclusive && !e.inclusive ? 1 : !t.inclusive && e.inclusive ? -1 : 0;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a bound of a query.\n *\n * The bound is specified with the given components representing a position and\n * whether it's just before or just after the position (relative to whatever the\n * query order is).\n *\n * The position represents a logical index position for a query. It's a prefix\n * of values for the (potentially implicit) order by clauses of a query.\n *\n * Bound provides a function to determine whether a document comes before or\n * after a bound. This is influenced by whether the position is just before or\n * just after the provided values.\n */\nclass Re {\n  constructor(t, e) {\n    this.position = t, this.inclusive = e;\n  }\n}\nfunction Pe(t, e, n) {\n  let s = 0;\n  for (let i = 0; i < t.position.length; i++) {\n    const r = e[i],\n      o = t.position[i];\n    if (r.field.isKeyField()) s = ct.comparator(ct.fromName(o.referenceValue), n.key);else {\n      s = ce(o, n.data.field(r.field));\n    }\n    if (\"desc\" /* Direction.DESCENDING */ === r.dir && (s *= -1), 0 !== s) break;\n  }\n  return s;\n}\n\n/**\n * Returns true if a document sorts after a bound using the provided sort\n * order.\n */\nfunction ve(t, e) {\n  if (null === t) return null === e;\n  if (null === e) return !1;\n  if (t.inclusive !== e.inclusive || t.position.length !== e.position.length) return !1;\n  for (let n = 0; n < t.position.length; n++) {\n    if (!oe(t.position[n], e.position[n])) return !1;\n  }\n  return !0;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass be {}\nclass Ve extends be {\n  constructor(t, e, n) {\n    super(), this.field = t, this.op = e, this.value = n;\n  }\n  /**\n   * Creates a filter based on the provided arguments.\n   */\n  static create(t, e, n) {\n    return t.isKeyField() ? \"in\" /* Operator.IN */ === e || \"not-in\" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, n) : new Fe(t, e, n) : \"array-contains\" /* Operator.ARRAY_CONTAINS */ === e ? new Ue(t, n) : \"in\" /* Operator.IN */ === e ? new Ke(t, n) : \"not-in\" /* Operator.NOT_IN */ === e ? new Ge(t, n) : \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new Qe(t, n) : new Ve(t, e, n);\n  }\n  static createKeyFieldInFilter(t, e, n) {\n    return \"in\" /* Operator.IN */ === e ? new Be(t, n) : new Le(t, n);\n  }\n  matches(t) {\n    const e = t.data.field(this.field);\n    // Types do not have to match in NOT_EQUAL filters.\n    return \"!=\" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(ce(e, this.value)) : null !== e && re(this.value) === re(e) && this.matchesComparison(ce(e, this.value));\n    // Only compare types with matching backend order (such as double and int).\n  }\n\n  matchesComparison(t) {\n    switch (this.op) {\n      case \"<\" /* Operator.LESS_THAN */:\n        return t < 0;\n      case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n        return t <= 0;\n      case \"==\" /* Operator.EQUAL */:\n        return 0 === t;\n      case \"!=\" /* Operator.NOT_EQUAL */:\n        return 0 !== t;\n      case \">\" /* Operator.GREATER_THAN */:\n        return t > 0;\n      case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n        return t >= 0;\n      default:\n        return $();\n    }\n  }\n  isInequality() {\n    return [\"<\" /* Operator.LESS_THAN */, \"<=\" /* Operator.LESS_THAN_OR_EQUAL */, \">\" /* Operator.GREATER_THAN */, \">=\" /* Operator.GREATER_THAN_OR_EQUAL */, \"!=\" /* Operator.NOT_EQUAL */, \"not-in\" /* Operator.NOT_IN */].indexOf(this.op) >= 0;\n  }\n  getFlattenedFilters() {\n    return [this];\n  }\n  getFilters() {\n    return [this];\n  }\n  getFirstInequalityField() {\n    return this.isInequality() ? this.field : null;\n  }\n}\nclass Se extends be {\n  constructor(t, e) {\n    super(), this.filters = t, this.op = e, this.ft = null;\n  }\n  /**\n   * Creates a filter based on the provided arguments.\n   */\n  static create(t, e) {\n    return new Se(t, e);\n  }\n  matches(t) {\n    return De(this) ? void 0 === this.filters.find(e => !e.matches(t)) : void 0 !== this.filters.find(e => e.matches(t));\n  }\n  getFlattenedFilters() {\n    return null !== this.ft || (this.ft = this.filters.reduce((t, e) => t.concat(e.getFlattenedFilters()), [])), this.ft;\n  }\n  // Returns a mutable copy of `this.filters`\n  getFilters() {\n    return Object.assign([], this.filters);\n  }\n  getFirstInequalityField() {\n    const t = this.dt(t => t.isInequality());\n    return null !== t ? t.field : null;\n  }\n  // Performs a depth-first search to find and return the first FieldFilter in the composite filter\n  // that satisfies the predicate. Returns `null` if none of the FieldFilters satisfy the\n  // predicate.\n  dt(t) {\n    for (const e of this.getFlattenedFilters()) if (t(e)) return e;\n    return null;\n  }\n}\nfunction De(t) {\n  return \"and\" /* CompositeOperator.AND */ === t.op;\n}\nfunction Ce(t) {\n  return \"or\" /* CompositeOperator.OR */ === t.op;\n}\n\n/**\n * Returns true if this filter is a conjunction of field filters only. Returns false otherwise.\n */\nfunction xe(t) {\n  return Ne(t) && De(t);\n}\n\n/**\n * Returns true if this filter does not contain any composite filters. Returns false otherwise.\n */\nfunction Ne(t) {\n  for (const e of t.filters) if (e instanceof Se) return !1;\n  return !0;\n}\nfunction ke(t) {\n  if (t instanceof Ve)\n    // TODO(b/29183165): Technically, this won't be unique if two values have\n    // the same description, such as the int 3 and the string \"3\". So we should\n    // add the types in here somehow, too.\n    return t.field.canonicalString() + t.op.toString() + he(t.value);\n  if (xe(t))\n    // Older SDK versions use an implicit AND operation between their filters.\n    // In the new SDK versions, the developer may use an explicit AND filter.\n    // To stay consistent with the old usages, we add a special case to ensure\n    // the canonical ID for these two are the same. For example:\n    // `col.whereEquals(\"a\", 1).whereEquals(\"b\", 2)` should have the same\n    // canonical ID as `col.where(and(equals(\"a\",1), equals(\"b\",2)))`.\n    return t.filters.map(t => ke(t)).join(\",\");\n  {\n    // filter instanceof CompositeFilter\n    const e = t.filters.map(t => ke(t)).join(\",\");\n    return `${t.op}(${e})`;\n  }\n}\nfunction $e(t, e) {\n  return t instanceof Ve ? function (t, e) {\n    return e instanceof Ve && t.op === e.op && t.field.isEqual(e.field) && oe(t.value, e.value);\n  }(t, e) : t instanceof Se ? function (t, e) {\n    if (e instanceof Se && t.op === e.op && t.filters.length === e.filters.length) {\n      return t.filters.reduce((t, n, s) => t && $e(n, e.filters[s]), !0);\n    }\n    return !1;\n  }\n  /**\n  * Returns a new composite filter that contains all filter from\n  * `compositeFilter` plus all the given filters in `otherFilters`.\n  */(t, e) : void $();\n}\nfunction Me(t, e) {\n  const n = t.filters.concat(e);\n  return Se.create(n, t.op);\n}\n\n/** Returns a debug description for `filter`. */\nfunction Oe(t) {\n  return t instanceof Ve ? function (t) {\n    return `${t.field.canonicalString()} ${t.op} ${he(t.value)}`;\n  }\n  /** Filter that matches on key fields (i.e. '__name__'). */(t) : t instanceof Se ? function (t) {\n    return t.op.toString() + \" {\" + t.getFilters().map(Oe).join(\" ,\") + \"}\";\n  }(t) : \"Filter\";\n}\nclass Fe extends Ve {\n  constructor(t, e, n) {\n    super(t, e, n), this.key = ct.fromName(n.referenceValue);\n  }\n  matches(t) {\n    const e = ct.comparator(t.key, this.key);\n    return this.matchesComparison(e);\n  }\n}\n\n/** Filter that matches on key fields within an array. */\nclass Be extends Ve {\n  constructor(t, e) {\n    super(t, \"in\" /* Operator.IN */, e), this.keys = qe(\"in\" /* Operator.IN */, e);\n  }\n  matches(t) {\n    return this.keys.some(e => e.isEqual(t.key));\n  }\n}\n\n/** Filter that matches on key fields not present within an array. */\nclass Le extends Ve {\n  constructor(t, e) {\n    super(t, \"not-in\" /* Operator.NOT_IN */, e), this.keys = qe(\"not-in\" /* Operator.NOT_IN */, e);\n  }\n  matches(t) {\n    return !this.keys.some(e => e.isEqual(t.key));\n  }\n}\nfunction qe(t, e) {\n  var n;\n  return ((null === (n = e.arrayValue) || void 0 === n ? void 0 : n.values) || []).map(t => ct.fromName(t.referenceValue));\n}\n\n/** A Filter that implements the array-contains operator. */\nclass Ue extends Ve {\n  constructor(t, e) {\n    super(t, \"array-contains\" /* Operator.ARRAY_CONTAINS */, e);\n  }\n  matches(t) {\n    const e = t.data.field(this.field);\n    return _e(e) && ue(e.arrayValue, this.value);\n  }\n}\n\n/** A Filter that implements the IN operator. */\nclass Ke extends Ve {\n  constructor(t, e) {\n    super(t, \"in\" /* Operator.IN */, e);\n  }\n  matches(t) {\n    const e = t.data.field(this.field);\n    return null !== e && ue(this.value.arrayValue, e);\n  }\n}\n\n/** A Filter that implements the not-in operator. */\nclass Ge extends Ve {\n  constructor(t, e) {\n    super(t, \"not-in\" /* Operator.NOT_IN */, e);\n  }\n  matches(t) {\n    if (ue(this.value.arrayValue, {\n      nullValue: \"NULL_VALUE\"\n    })) return !1;\n    const e = t.data.field(this.field);\n    return null !== e && !ue(this.value.arrayValue, e);\n  }\n}\n\n/** A Filter that implements the array-contains-any operator. */\nclass Qe extends Ve {\n  constructor(t, e) {\n    super(t, \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */, e);\n  }\n  matches(t) {\n    const e = t.data.field(this.field);\n    return !(!_e(e) || !e.arrayValue.values) && e.arrayValue.values.some(t => ue(this.value.arrayValue, t));\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ordering on a field, in some Direction. Direction defaults to ASCENDING.\n */\nclass je {\n  constructor(t, e = \"asc\" /* Direction.ASCENDING */) {\n    this.field = t, this.dir = e;\n  }\n}\nfunction ze(t, e) {\n  return t.dir === e.dir && t.field.isEqual(e.field);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// An immutable sorted map implementation, based on a Left-leaning Red-Black\n// tree.\nclass We {\n  constructor(t, e) {\n    this.comparator = t, this.root = e || Je.EMPTY;\n  }\n  // Returns a copy of the map, with the specified key/value added or replaced.\n  insert(t, e) {\n    return new We(this.comparator, this.root.insert(t, e, this.comparator).copy(null, null, Je.BLACK, null, null));\n  }\n  // Returns a copy of the map, with the specified key removed.\n  remove(t) {\n    return new We(this.comparator, this.root.remove(t, this.comparator).copy(null, null, Je.BLACK, null, null));\n  }\n  // Returns the value of the node with the given key, or null.\n  get(t) {\n    let e = this.root;\n    for (; !e.isEmpty();) {\n      const n = this.comparator(t, e.key);\n      if (0 === n) return e.value;\n      n < 0 ? e = e.left : n > 0 && (e = e.right);\n    }\n    return null;\n  }\n  // Returns the index of the element in this sorted map, or -1 if it doesn't\n  // exist.\n  indexOf(t) {\n    // Number of nodes that were pruned when descending right\n    let e = 0,\n      n = this.root;\n    for (; !n.isEmpty();) {\n      const s = this.comparator(t, n.key);\n      if (0 === s) return e + n.left.size;\n      s < 0 ? n = n.left : (\n      // Count all nodes left of the node plus the node itself\n      e += n.left.size + 1, n = n.right);\n    }\n    // Node not found\n    return -1;\n  }\n  isEmpty() {\n    return this.root.isEmpty();\n  }\n  // Returns the total number of nodes in the map.\n  get size() {\n    return this.root.size;\n  }\n  // Returns the minimum key in the map.\n  minKey() {\n    return this.root.minKey();\n  }\n  // Returns the maximum key in the map.\n  maxKey() {\n    return this.root.maxKey();\n  }\n  // Traverses the map in key order and calls the specified action function\n  // for each key/value pair. If action returns true, traversal is aborted.\n  // Returns the first truthy value returned by action, or the last falsey\n  // value returned by action.\n  inorderTraversal(t) {\n    return this.root.inorderTraversal(t);\n  }\n  forEach(t) {\n    this.inorderTraversal((e, n) => (t(e, n), !1));\n  }\n  toString() {\n    const t = [];\n    return this.inorderTraversal((e, n) => (t.push(`${e}:${n}`), !1)), `{${t.join(\", \")}}`;\n  }\n  // Traverses the map in reverse key order and calls the specified action\n  // function for each key/value pair. If action returns true, traversal is\n  // aborted.\n  // Returns the first truthy value returned by action, or the last falsey\n  // value returned by action.\n  reverseTraversal(t) {\n    return this.root.reverseTraversal(t);\n  }\n  // Returns an iterator over the SortedMap.\n  getIterator() {\n    return new He(this.root, null, this.comparator, !1);\n  }\n  getIteratorFrom(t) {\n    return new He(this.root, t, this.comparator, !1);\n  }\n  getReverseIterator() {\n    return new He(this.root, null, this.comparator, !0);\n  }\n  getReverseIteratorFrom(t) {\n    return new He(this.root, t, this.comparator, !0);\n  }\n}\n\n// end SortedMap\n// An iterator over an LLRBNode.\nclass He {\n  constructor(t, e, n, s) {\n    this.isReverse = s, this.nodeStack = [];\n    let i = 1;\n    for (; !t.isEmpty();) if (i = e ? n(t.key, e) : 1,\n    // flip the comparison if we're going in reverse\n    e && s && (i *= -1), i < 0)\n      // This node is less than our start key. ignore it\n      t = this.isReverse ? t.left : t.right;else {\n      if (0 === i) {\n        // This node is exactly equal to our start key. Push it on the stack,\n        // but stop iterating;\n        this.nodeStack.push(t);\n        break;\n      }\n      // This node is greater than our start key, add it to the stack and move\n      // to the next one\n      this.nodeStack.push(t), t = this.isReverse ? t.right : t.left;\n    }\n  }\n  getNext() {\n    let t = this.nodeStack.pop();\n    const e = {\n      key: t.key,\n      value: t.value\n    };\n    if (this.isReverse) for (t = t.left; !t.isEmpty();) this.nodeStack.push(t), t = t.right;else for (t = t.right; !t.isEmpty();) this.nodeStack.push(t), t = t.left;\n    return e;\n  }\n  hasNext() {\n    return this.nodeStack.length > 0;\n  }\n  peek() {\n    if (0 === this.nodeStack.length) return null;\n    const t = this.nodeStack[this.nodeStack.length - 1];\n    return {\n      key: t.key,\n      value: t.value\n    };\n  }\n}\n\n// end SortedMapIterator\n// Represents a node in a Left-leaning Red-Black tree.\nclass Je {\n  constructor(t, e, n, s, i) {\n    this.key = t, this.value = e, this.color = null != n ? n : Je.RED, this.left = null != s ? s : Je.EMPTY, this.right = null != i ? i : Je.EMPTY, this.size = this.left.size + 1 + this.right.size;\n  }\n  // Returns a copy of the current node, optionally replacing pieces of it.\n  copy(t, e, n, s, i) {\n    return new Je(null != t ? t : this.key, null != e ? e : this.value, null != n ? n : this.color, null != s ? s : this.left, null != i ? i : this.right);\n  }\n  isEmpty() {\n    return !1;\n  }\n  // Traverses the tree in key order and calls the specified action function\n  // for each node. If action returns true, traversal is aborted.\n  // Returns the first truthy value returned by action, or the last falsey\n  // value returned by action.\n  inorderTraversal(t) {\n    return this.left.inorderTraversal(t) || t(this.key, this.value) || this.right.inorderTraversal(t);\n  }\n  // Traverses the tree in reverse key order and calls the specified action\n  // function for each node. If action returns true, traversal is aborted.\n  // Returns the first truthy value returned by action, or the last falsey\n  // value returned by action.\n  reverseTraversal(t) {\n    return this.right.reverseTraversal(t) || t(this.key, this.value) || this.left.reverseTraversal(t);\n  }\n  // Returns the minimum node in the tree.\n  min() {\n    return this.left.isEmpty() ? this : this.left.min();\n  }\n  // Returns the maximum key in the tree.\n  minKey() {\n    return this.min().key;\n  }\n  // Returns the maximum key in the tree.\n  maxKey() {\n    return this.right.isEmpty() ? this.key : this.right.maxKey();\n  }\n  // Returns new tree, with the key/value added.\n  insert(t, e, n) {\n    let s = this;\n    const i = n(t, s.key);\n    return s = i < 0 ? s.copy(null, null, null, s.left.insert(t, e, n), null) : 0 === i ? s.copy(null, e, null, null, null) : s.copy(null, null, null, null, s.right.insert(t, e, n)), s.fixUp();\n  }\n  removeMin() {\n    if (this.left.isEmpty()) return Je.EMPTY;\n    let t = this;\n    return t.left.isRed() || t.left.left.isRed() || (t = t.moveRedLeft()), t = t.copy(null, null, null, t.left.removeMin(), null), t.fixUp();\n  }\n  // Returns new tree, with the specified item removed.\n  remove(t, e) {\n    let n,\n      s = this;\n    if (e(t, s.key) < 0) s.left.isEmpty() || s.left.isRed() || s.left.left.isRed() || (s = s.moveRedLeft()), s = s.copy(null, null, null, s.left.remove(t, e), null);else {\n      if (s.left.isRed() && (s = s.rotateRight()), s.right.isEmpty() || s.right.isRed() || s.right.left.isRed() || (s = s.moveRedRight()), 0 === e(t, s.key)) {\n        if (s.right.isEmpty()) return Je.EMPTY;\n        n = s.right.min(), s = s.copy(n.key, n.value, null, null, s.right.removeMin());\n      }\n      s = s.copy(null, null, null, null, s.right.remove(t, e));\n    }\n    return s.fixUp();\n  }\n  isRed() {\n    return this.color;\n  }\n  // Returns new tree after performing any needed rotations.\n  fixUp() {\n    let t = this;\n    return t.right.isRed() && !t.left.isRed() && (t = t.rotateLeft()), t.left.isRed() && t.left.left.isRed() && (t = t.rotateRight()), t.left.isRed() && t.right.isRed() && (t = t.colorFlip()), t;\n  }\n  moveRedLeft() {\n    let t = this.colorFlip();\n    return t.right.left.isRed() && (t = t.copy(null, null, null, null, t.right.rotateRight()), t = t.rotateLeft(), t = t.colorFlip()), t;\n  }\n  moveRedRight() {\n    let t = this.colorFlip();\n    return t.left.left.isRed() && (t = t.rotateRight(), t = t.colorFlip()), t;\n  }\n  rotateLeft() {\n    const t = this.copy(null, null, Je.RED, null, this.right.left);\n    return this.right.copy(null, null, this.color, t, null);\n  }\n  rotateRight() {\n    const t = this.copy(null, null, Je.RED, this.left.right, null);\n    return this.left.copy(null, null, this.color, null, t);\n  }\n  colorFlip() {\n    const t = this.left.copy(null, null, !this.left.color, null, null),\n      e = this.right.copy(null, null, !this.right.color, null, null);\n    return this.copy(null, null, !this.color, t, e);\n  }\n  // For testing.\n  checkMaxDepth() {\n    const t = this.check();\n    return Math.pow(2, t) <= this.size + 1;\n  }\n  // In a balanced RB tree, the black-depth (number of black nodes) from root to\n  // leaves is equal on both sides.  This function verifies that or asserts.\n  check() {\n    if (this.isRed() && this.left.isRed()) throw $();\n    if (this.right.isRed()) throw $();\n    const t = this.left.check();\n    if (t !== this.right.check()) throw $();\n    return t + (this.isRed() ? 0 : 1);\n  }\n}\n\n// end LLRBNode\n// Empty node is shared between all LLRB trees.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nJe.EMPTY = null, Je.RED = !0, Je.BLACK = !1;\n\n// end LLRBEmptyNode\nJe.EMPTY = new\n// Represents an empty node (a leaf node in the Red-Black Tree).\nclass {\n  constructor() {\n    this.size = 0;\n  }\n  get key() {\n    throw $();\n  }\n  get value() {\n    throw $();\n  }\n  get color() {\n    throw $();\n  }\n  get left() {\n    throw $();\n  }\n  get right() {\n    throw $();\n  }\n  // Returns a copy of the current node.\n  copy(t, e, n, s, i) {\n    return this;\n  }\n  // Returns a copy of the tree, with the specified key/value added.\n  insert(t, e, n) {\n    return new Je(t, e);\n  }\n  // Returns a copy of the tree, with the specified key removed.\n  remove(t, e) {\n    return this;\n  }\n  isEmpty() {\n    return !0;\n  }\n  inorderTraversal(t) {\n    return !1;\n  }\n  reverseTraversal(t) {\n    return !1;\n  }\n  minKey() {\n    return null;\n  }\n  maxKey() {\n    return null;\n  }\n  isRed() {\n    return !1;\n  }\n  // For testing.\n  checkMaxDepth() {\n    return !0;\n  }\n  check() {\n    return 0;\n  }\n}();\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * SortedSet is an immutable (copy-on-write) collection that holds elements\n * in order specified by the provided comparator.\n *\n * NOTE: if provided comparator returns 0 for two elements, we consider them to\n * be equal!\n */\nclass Ye {\n  constructor(t) {\n    this.comparator = t, this.data = new We(this.comparator);\n  }\n  has(t) {\n    return null !== this.data.get(t);\n  }\n  first() {\n    return this.data.minKey();\n  }\n  last() {\n    return this.data.maxKey();\n  }\n  get size() {\n    return this.data.size;\n  }\n  indexOf(t) {\n    return this.data.indexOf(t);\n  }\n  /** Iterates elements in order defined by \"comparator\" */\n  forEach(t) {\n    this.data.inorderTraversal((e, n) => (t(e), !1));\n  }\n  /** Iterates over `elem`s such that: range[0] &lt;= elem &lt; range[1]. */\n  forEachInRange(t, e) {\n    const n = this.data.getIteratorFrom(t[0]);\n    for (; n.hasNext();) {\n      const s = n.getNext();\n      if (this.comparator(s.key, t[1]) >= 0) return;\n      e(s.key);\n    }\n  }\n  /**\n   * Iterates over `elem`s such that: start &lt;= elem until false is returned.\n   */\n  forEachWhile(t, e) {\n    let n;\n    for (n = void 0 !== e ? this.data.getIteratorFrom(e) : this.data.getIterator(); n.hasNext();) {\n      if (!t(n.getNext().key)) return;\n    }\n  }\n  /** Finds the least element greater than or equal to `elem`. */\n  firstAfterOrEqual(t) {\n    const e = this.data.getIteratorFrom(t);\n    return e.hasNext() ? e.getNext().key : null;\n  }\n  getIterator() {\n    return new Ze(this.data.getIterator());\n  }\n  getIteratorFrom(t) {\n    return new Ze(this.data.getIteratorFrom(t));\n  }\n  /** Inserts or updates an element */\n  add(t) {\n    return this.copy(this.data.remove(t).insert(t, !0));\n  }\n  /** Deletes an element */\n  delete(t) {\n    return this.has(t) ? this.copy(this.data.remove(t)) : this;\n  }\n  isEmpty() {\n    return this.data.isEmpty();\n  }\n  unionWith(t) {\n    let e = this;\n    // Make sure `result` always refers to the larger one of the two sets.\n    return e.size < t.size && (e = t, t = this), t.forEach(t => {\n      e = e.add(t);\n    }), e;\n  }\n  isEqual(t) {\n    if (!(t instanceof Ye)) return !1;\n    if (this.size !== t.size) return !1;\n    const e = this.data.getIterator(),\n      n = t.data.getIterator();\n    for (; e.hasNext();) {\n      const t = e.getNext().key,\n        s = n.getNext().key;\n      if (0 !== this.comparator(t, s)) return !1;\n    }\n    return !0;\n  }\n  toArray() {\n    const t = [];\n    return this.forEach(e => {\n      t.push(e);\n    }), t;\n  }\n  toString() {\n    const t = [];\n    return this.forEach(e => t.push(e)), \"SortedSet(\" + t.toString() + \")\";\n  }\n  copy(t) {\n    const e = new Ye(this.comparator);\n    return e.data = t, e;\n  }\n}\nclass Ze {\n  constructor(t) {\n    this.iter = t;\n  }\n  getNext() {\n    return this.iter.getNext().key;\n  }\n  hasNext() {\n    return this.iter.hasNext();\n  }\n}\n\n/**\n * Compares two sorted sets for equality using their natural ordering. The\n * method computes the intersection and invokes `onAdd` for every element that\n * is in `after` but not `before`. `onRemove` is invoked for every element in\n * `before` but missing from `after`.\n *\n * The method creates a copy of both `before` and `after` and runs in O(n log\n * n), where n is the size of the two lists.\n *\n * @param before - The elements that exist in the original set.\n * @param after - The elements to diff against the original set.\n * @param comparator - The comparator for the elements in before and after.\n * @param onAdd - A function to invoke for every element that is part of `\n * after` but not `before`.\n * @param onRemove - A function to invoke for every element that is part of\n * `before` but not `after`.\n */\n/**\n * Returns the next element from the iterator or `undefined` if none available.\n */\nfunction Xe(t) {\n  return t.hasNext() ? t.getNext() : void 0;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a set of fields that can be used to partially patch a document.\n * FieldMask is used in conjunction with ObjectValue.\n * Examples:\n *   foo - Overwrites foo entirely with the provided value. If foo is not\n *         present in the companion ObjectValue, the field is deleted.\n *   foo.bar - Overwrites only the field bar of the object foo.\n *             If foo is not an object, foo is replaced with an object\n *             containing foo\n */\nclass tn {\n  constructor(t) {\n    this.fields = t,\n    // TODO(dimond): validation of FieldMask\n    // Sort the field mask to support `FieldMask.isEqual()` and assert below.\n    t.sort(ut.comparator);\n  }\n  static empty() {\n    return new tn([]);\n  }\n  /**\n   * Returns a new FieldMask object that is the result of adding all the given\n   * fields paths to this field mask.\n   */\n  unionWith(t) {\n    let e = new Ye(ut.comparator);\n    for (const t of this.fields) e = e.add(t);\n    for (const n of t) e = e.add(n);\n    return new tn(e.toArray());\n  }\n  /**\n   * Verifies that `fieldPath` is included by at least one field in this field\n   * mask.\n   *\n   * This is an O(n) operation, where `n` is the size of the field mask.\n   */\n  covers(t) {\n    for (const e of this.fields) if (e.isPrefixOf(t)) return !0;\n    return !1;\n  }\n  isEqual(t) {\n    return tt(this.fields, t.fields, (t, e) => t.isEqual(e));\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ObjectValue represents a MapValue in the Firestore Proto and offers the\n * ability to add and remove fields (via the ObjectValueBuilder).\n */\nclass en {\n  constructor(t) {\n    this.value = t;\n  }\n  static empty() {\n    return new en({\n      mapValue: {}\n    });\n  }\n  /**\n   * Returns the value at the given path or null.\n   *\n   * @param path - the path to search\n   * @returns The value at the path or null if the path is not set.\n   */\n  field(t) {\n    if (t.isEmpty()) return this.value;\n    {\n      let e = this.value;\n      for (let n = 0; n < t.length - 1; ++n) if (e = (e.mapValue.fields || {})[t.get(n)], !ge(e)) return null;\n      return e = (e.mapValue.fields || {})[t.lastSegment()], e || null;\n    }\n  }\n  /**\n   * Sets the field to the provided value.\n   *\n   * @param path - The field path to set.\n   * @param value - The value to set.\n   */\n  set(t, e) {\n    this.getFieldsMap(t.popLast())[t.lastSegment()] = ye(e);\n  }\n  /**\n   * Sets the provided fields to the provided values.\n   *\n   * @param data - A map of fields to values (or null for deletes).\n   */\n  setAll(t) {\n    let e = ut.emptyPath(),\n      n = {},\n      s = [];\n    t.forEach((t, i) => {\n      if (!e.isImmediateParentOf(i)) {\n        // Insert the accumulated changes at this parent location\n        const t = this.getFieldsMap(e);\n        this.applyChanges(t, n, s), n = {}, s = [], e = i.popLast();\n      }\n      t ? n[i.lastSegment()] = ye(t) : s.push(i.lastSegment());\n    });\n    const i = this.getFieldsMap(e);\n    this.applyChanges(i, n, s);\n  }\n  /**\n   * Removes the field at the specified path. If there is no field at the\n   * specified path, nothing is changed.\n   *\n   * @param path - The field path to remove.\n   */\n  delete(t) {\n    const e = this.field(t.popLast());\n    ge(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];\n  }\n  isEqual(t) {\n    return oe(this.value, t.value);\n  }\n  /**\n   * Returns the map that contains the leaf element of `path`. If the parent\n   * entry does not yet exist, or if it is not a map, a new map will be created.\n   */\n  getFieldsMap(t) {\n    let e = this.value;\n    e.mapValue.fields || (e.mapValue = {\n      fields: {}\n    });\n    for (let n = 0; n < t.length; ++n) {\n      let s = e.mapValue.fields[t.get(n)];\n      ge(s) && s.mapValue.fields || (s = {\n        mapValue: {\n          fields: {}\n        }\n      }, e.mapValue.fields[t.get(n)] = s), e = s;\n    }\n    return e.mapValue.fields;\n  }\n  /**\n   * Modifies `fieldsMap` by adding, replacing or deleting the specified\n   * entries.\n   */\n  applyChanges(t, e, n) {\n    Ut(e, (e, n) => t[e] = n);\n    for (const e of n) delete t[e];\n  }\n  clone() {\n    return new en(ye(this.value));\n  }\n}\n\n/**\n * Returns a FieldMask built from all fields in a MapValue.\n */\nfunction nn(t) {\n  const e = [];\n  return Ut(t.fields, (t, n) => {\n    const s = new ut([t]);\n    if (ge(n)) {\n      const t = nn(n.mapValue).fields;\n      if (0 === t.length)\n        // Preserve the empty map by adding it to the FieldMask.\n        e.push(s);else\n        // For nested and non-empty ObjectValues, add the FieldPath of the\n        // leaf nodes.\n        for (const n of t) e.push(s.child(n));\n    } else\n      // For nested and non-empty ObjectValues, add the FieldPath of the leaf\n      // nodes.\n      e.push(s);\n  }), new tn(e);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a document in Firestore with a key, version, data and whether it\n * has local mutations applied to it.\n *\n * Documents can transition between states via `convertToFoundDocument()`,\n * `convertToNoDocument()` and `convertToUnknownDocument()`. If a document does\n * not transition to one of these states even after all mutations have been\n * applied, `isValidDocument()` returns false and the document should be removed\n * from all views.\n */\nclass sn {\n  constructor(t, e, n, s, i, r, o) {\n    this.key = t, this.documentType = e, this.version = n, this.readTime = s, this.createTime = i, this.data = r, this.documentState = o;\n  }\n  /**\n   * Creates a document with no known version or data, but which can serve as\n   * base document for mutations.\n   */\n  static newInvalidDocument(t) {\n    return new sn(t, 0 /* DocumentType.INVALID */, /* version */st.min(), /* readTime */st.min(), /* createTime */st.min(), en.empty(), 0 /* DocumentState.SYNCED */);\n  }\n  /**\n   * Creates a new document that is known to exist with the given data at the\n   * given version.\n   */\n  static newFoundDocument(t, e, n, s) {\n    return new sn(t, 1 /* DocumentType.FOUND_DOCUMENT */, /* version */e, /* readTime */st.min(), /* createTime */n, s, 0 /* DocumentState.SYNCED */);\n  }\n  /** Creates a new document that is known to not exist at the given version. */\n  static newNoDocument(t, e) {\n    return new sn(t, 2 /* DocumentType.NO_DOCUMENT */, /* version */e, /* readTime */st.min(), /* createTime */st.min(), en.empty(), 0 /* DocumentState.SYNCED */);\n  }\n  /**\n   * Creates a new document that is known to exist at the given version but\n   * whose data is not known (e.g. a document that was updated without a known\n   * base document).\n   */\n  static newUnknownDocument(t, e) {\n    return new sn(t, 3 /* DocumentType.UNKNOWN_DOCUMENT */, /* version */e, /* readTime */st.min(), /* createTime */st.min(), en.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);\n  }\n  /**\n   * Changes the document type to indicate that it exists and that its version\n   * and data are known.\n   */\n  convertToFoundDocument(t, e) {\n    // If a document is switching state from being an invalid or deleted\n    // document to a valid (FOUND_DOCUMENT) document, either due to receiving an\n    // update from Watch or due to applying a local set mutation on top\n    // of a deleted document, our best guess about its createTime would be the\n    // version at which the document transitioned to a FOUND_DOCUMENT.\n    return !this.createTime.isEqual(st.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t), this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */, this.data = e, this.documentState = 0 /* DocumentState.SYNCED */, this;\n  }\n  /**\n   * Changes the document type to indicate that it doesn't exist at the given\n   * version.\n   */\n  convertToNoDocument(t) {\n    return this.version = t, this.documentType = 2 /* DocumentType.NO_DOCUMENT */, this.data = en.empty(), this.documentState = 0 /* DocumentState.SYNCED */, this;\n  }\n  /**\n   * Changes the document type to indicate that it exists at a given version but\n   * that its data is not known (e.g. a document that was updated without a known\n   * base document).\n   */\n  convertToUnknownDocument(t) {\n    return this.version = t, this.documentType = 3 /* DocumentType.UNKNOWN_DOCUMENT */, this.data = en.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */, this;\n  }\n  setHasCommittedMutations() {\n    return this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */, this;\n  }\n  setHasLocalMutations() {\n    return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */, this.version = st.min(), this;\n  }\n  setReadTime(t) {\n    return this.readTime = t, this;\n  }\n  get hasLocalMutations() {\n    return 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ === this.documentState;\n  }\n  get hasCommittedMutations() {\n    return 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ === this.documentState;\n  }\n  get hasPendingWrites() {\n    return this.hasLocalMutations || this.hasCommittedMutations;\n  }\n  isValidDocument() {\n    return 0 /* DocumentType.INVALID */ !== this.documentType;\n  }\n  isFoundDocument() {\n    return 1 /* DocumentType.FOUND_DOCUMENT */ === this.documentType;\n  }\n  isNoDocument() {\n    return 2 /* DocumentType.NO_DOCUMENT */ === this.documentType;\n  }\n  isUnknownDocument() {\n    return 3 /* DocumentType.UNKNOWN_DOCUMENT */ === this.documentType;\n  }\n  isEqual(t) {\n    return t instanceof sn && this.key.isEqual(t.key) && this.version.isEqual(t.version) && this.documentType === t.documentType && this.documentState === t.documentState && this.data.isEqual(t.data);\n  }\n  mutableCopy() {\n    return new sn(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);\n  }\n  toString() {\n    return `Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`;\n  }\n}\n\n/**\n * Compares the value for field `field` in the provided documents. Throws if\n * the field does not exist in both documents.\n */\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Visible for testing\nclass rn {\n  constructor(t, e = null, n = [], s = [], i = null, r = null, o = null) {\n    this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = s, this.limit = i, this.startAt = r, this.endAt = o, this._t = null;\n  }\n}\n\n/**\n * Initializes a Target with a path and optional additional query constraints.\n * Path must currently be empty if this is a collection group query.\n *\n * NOTE: you should always construct `Target` from `Query.toTarget` instead of\n * using this factory method, because `Query` provides an implicit `orderBy`\n * property.\n */\nfunction on(t, e = null, n = [], s = [], i = null, r = null, o = null) {\n  return new rn(t, e, n, s, i, r, o);\n}\nfunction un(t) {\n  const e = F(t);\n  if (null === e._t) {\n    let t = e.path.canonicalString();\n    null !== e.collectionGroup && (t += \"|cg:\" + e.collectionGroup), t += \"|f:\", t += e.filters.map(t => ke(t)).join(\",\"), t += \"|ob:\", t += e.orderBy.map(t => function (t) {\n      // TODO(b/29183165): Make this collision robust.\n      return t.field.canonicalString() + t.dir;\n    }(t)).join(\",\"), Gt(e.limit) || (t += \"|l:\", t += e.limit), e.startAt && (t += \"|lb:\", t += e.startAt.inclusive ? \"b:\" : \"a:\", t += e.startAt.position.map(t => he(t)).join(\",\")), e.endAt && (t += \"|ub:\", t += e.endAt.inclusive ? \"a:\" : \"b:\", t += e.endAt.position.map(t => he(t)).join(\",\")), e._t = t;\n  }\n  return e._t;\n}\nfunction cn(t, e) {\n  if (t.limit !== e.limit) return !1;\n  if (t.orderBy.length !== e.orderBy.length) return !1;\n  for (let n = 0; n < t.orderBy.length; n++) if (!ze(t.orderBy[n], e.orderBy[n])) return !1;\n  if (t.filters.length !== e.filters.length) return !1;\n  for (let n = 0; n < t.filters.length; n++) if (!$e(t.filters[n], e.filters[n])) return !1;\n  return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!ve(t.startAt, e.startAt) && ve(t.endAt, e.endAt);\n}\nfunction an(t) {\n  return ct.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;\n}\n\n/** Returns the field filters that target the given field path. */\nfunction hn(t, e) {\n  return t.filters.filter(t => t instanceof Ve && t.field.isEqual(e));\n}\n\n/**\n * Returns the values that are used in ARRAY_CONTAINS or ARRAY_CONTAINS_ANY\n * filters. Returns `null` if there are no such filters.\n */\n/**\n * Returns the value to use as the lower bound for ascending index segment at\n * the provided `fieldPath` (or the upper bound for an descending segment).\n */\nfunction ln(t, e, n) {\n  let s = ie,\n    i = !0;\n  // Process all filters to find a value for the current field segment\n  for (const n of hn(t, e)) {\n    let t = ie,\n      e = !0;\n    switch (n.op) {\n      case \"<\" /* Operator.LESS_THAN */:\n      case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n        t = Ie(n.value);\n        break;\n      case \"==\" /* Operator.EQUAL */:\n      case \"in\" /* Operator.IN */:\n      case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n        t = n.value;\n        break;\n      case \">\" /* Operator.GREATER_THAN */:\n        t = n.value, e = !1;\n        break;\n      case \"!=\" /* Operator.NOT_EQUAL */:\n      case \"not-in\" /* Operator.NOT_IN */:\n        t = ie;\n      // Remaining filters cannot be used as lower bounds.\n    }\n\n    Ee({\n      value: s,\n      inclusive: i\n    }, {\n      value: t,\n      inclusive: e\n    }) < 0 && (s = t, i = e);\n  }\n  // If there is an additional bound, compare the values against the existing\n  // range to see if we can narrow the scope.\n  if (null !== n) for (let r = 0; r < t.orderBy.length; ++r) {\n    if (t.orderBy[r].field.isEqual(e)) {\n      const t = n.position[r];\n      Ee({\n        value: s,\n        inclusive: i\n      }, {\n        value: t,\n        inclusive: n.inclusive\n      }) < 0 && (s = t, i = n.inclusive);\n      break;\n    }\n  }\n  return {\n    value: s,\n    inclusive: i\n  };\n}\n\n/**\n * Returns the value to use as the upper bound for ascending index segment at\n * the provided `fieldPath` (or the lower bound for a descending segment).\n */\nfunction fn(t, e, n) {\n  let s = se,\n    i = !0;\n  // Process all filters to find a value for the current field segment\n  for (const n of hn(t, e)) {\n    let t = se,\n      e = !0;\n    switch (n.op) {\n      case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n      case \">\" /* Operator.GREATER_THAN */:\n        t = Te(n.value), e = !1;\n        break;\n      case \"==\" /* Operator.EQUAL */:\n      case \"in\" /* Operator.IN */:\n      case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n        t = n.value;\n        break;\n      case \"<\" /* Operator.LESS_THAN */:\n        t = n.value, e = !1;\n        break;\n      case \"!=\" /* Operator.NOT_EQUAL */:\n      case \"not-in\" /* Operator.NOT_IN */:\n        t = se;\n      // Remaining filters cannot be used as upper bounds.\n    }\n\n    Ae({\n      value: s,\n      inclusive: i\n    }, {\n      value: t,\n      inclusive: e\n    }) > 0 && (s = t, i = e);\n  }\n  // If there is an additional bound, compare the values against the existing\n  // range to see if we can narrow the scope.\n  if (null !== n) for (let r = 0; r < t.orderBy.length; ++r) {\n    if (t.orderBy[r].field.isEqual(e)) {\n      const t = n.position[r];\n      Ae({\n        value: s,\n        inclusive: i\n      }, {\n        value: t,\n        inclusive: n.inclusive\n      }) > 0 && (s = t, i = n.inclusive);\n      break;\n    }\n  }\n  return {\n    value: s,\n    inclusive: i\n  };\n}\n\n/** Returns the number of segments of a perfect index for this target. */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Query encapsulates all the query attributes we support in the SDK. It can\n * be run against the LocalStore, as well as be converted to a `Target` to\n * query the RemoteStore results.\n *\n * Visible for testing.\n */\nclass dn {\n  /**\n   * Initializes a Query with a path and optional additional query constraints.\n   * Path must currently be empty if this is a collection group query.\n   */\n  constructor(t, e = null, n = [], s = [], i = null, r = \"F\" /* LimitType.First */, o = null, u = null) {\n    this.path = t, this.collectionGroup = e, this.explicitOrderBy = n, this.filters = s, this.limit = i, this.limitType = r, this.startAt = o, this.endAt = u, this.wt = null,\n    // The corresponding `Target` of this `Query` instance.\n    this.gt = null, this.startAt, this.endAt;\n  }\n}\n\n/** Creates a new Query instance with the options provided. */\nfunction _n(t, e, n, s, i, r, o, u) {\n  return new dn(t, e, n, s, i, r, o, u);\n}\n\n/** Creates a new Query for a query that matches all documents at `path` */\nfunction wn(t) {\n  return new dn(t);\n}\n\n/**\n * Helper to convert a collection group query into a collection query at a\n * specific path. This is used when executing collection group queries, since\n * we have to split the query into a set of collection queries at multiple\n * paths.\n */\n/**\n * Returns true if this query does not specify any query constraints that\n * could remove results.\n */\nfunction mn(t) {\n  return 0 === t.filters.length && null === t.limit && null == t.startAt && null == t.endAt && (0 === t.explicitOrderBy.length || 1 === t.explicitOrderBy.length && t.explicitOrderBy[0].field.isKeyField());\n}\nfunction gn(t) {\n  return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;\n}\nfunction yn(t) {\n  for (const e of t.filters) {\n    const t = e.getFirstInequalityField();\n    if (null !== t) return t;\n  }\n  return null;\n}\n\n/**\n * Creates a new Query for a collection group query that matches all documents\n * within the provided collection group.\n */\n/**\n * Returns whether the query matches a collection group rather than a specific\n * collection.\n */\nfunction pn(t) {\n  return null !== t.collectionGroup;\n}\n\n/**\n * Returns the implicit order by constraint that is used to execute the Query,\n * which can be different from the order by constraints the user provided (e.g.\n * the SDK and backend always orders by `__name__`).\n */\nfunction In(t) {\n  const e = F(t);\n  if (null === e.wt) {\n    e.wt = [];\n    const t = yn(e),\n      n = gn(e);\n    if (null !== t && null === n)\n      // In order to implicitly add key ordering, we must also add the\n      // inequality filter field for it to be a valid query.\n      // Note that the default inequality field and key ordering is ascending.\n      t.isKeyField() || e.wt.push(new je(t)), e.wt.push(new je(ut.keyField(), \"asc\" /* Direction.ASCENDING */));else {\n      let t = !1;\n      for (const n of e.explicitOrderBy) e.wt.push(n), n.field.isKeyField() && (t = !0);\n      if (!t) {\n        // The order of the implicit key ordering always matches the last\n        // explicit order by\n        const t = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : \"asc\" /* Direction.ASCENDING */;\n        e.wt.push(new je(ut.keyField(), t));\n      }\n    }\n  }\n  return e.wt;\n}\n\n/**\n * Converts this `Query` instance to it's corresponding `Target` representation.\n */\nfunction Tn(t) {\n  const e = F(t);\n  if (!e.gt) if (\"F\" /* LimitType.First */ === e.limitType) e.gt = on(e.path, e.collectionGroup, In(e), e.filters, e.limit, e.startAt, e.endAt);else {\n    // Flip the orderBy directions since we want the last results\n    const t = [];\n    for (const n of In(e)) {\n      const e = \"desc\" /* Direction.DESCENDING */ === n.dir ? \"asc\" /* Direction.ASCENDING */ : \"desc\" /* Direction.DESCENDING */;\n      t.push(new je(n.field, e));\n    }\n    // We need to swap the cursors to match the now-flipped query ordering.\n    const n = e.endAt ? new Re(e.endAt.position, e.endAt.inclusive) : null,\n      s = e.startAt ? new Re(e.startAt.position, e.startAt.inclusive) : null;\n    // Now return as a LimitType.First query.\n    e.gt = on(e.path, e.collectionGroup, t, e.filters, e.limit, n, s);\n  }\n  return e.gt;\n}\nfunction En(t, e) {\n  e.getFirstInequalityField(), yn(t);\n  const n = t.filters.concat([e]);\n  return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);\n}\nfunction An(t, e, n) {\n  return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);\n}\nfunction Rn(t, e) {\n  return cn(Tn(t), Tn(e)) && t.limitType === e.limitType;\n}\n\n// TODO(b/29183165): This is used to get a unique string from a query to, for\n// example, use as a dictionary key, but the implementation is subject to\n// collisions. Make it collision-free.\nfunction Pn(t) {\n  return `${un(Tn(t))}|lt:${t.limitType}`;\n}\nfunction vn(t) {\n  return `Query(target=${function (t) {\n    let e = t.path.canonicalString();\n    return null !== t.collectionGroup && (e += \" collectionGroup=\" + t.collectionGroup), t.filters.length > 0 && (e += `, filters: [${t.filters.map(t => Oe(t)).join(\", \")}]`), Gt(t.limit) || (e += \", limit: \" + t.limit), t.orderBy.length > 0 && (e += `, orderBy: [${t.orderBy.map(t => function (t) {\n      return `${t.field.canonicalString()} (${t.dir})`;\n    }(t)).join(\", \")}]`), t.startAt && (e += \", startAt: \", e += t.startAt.inclusive ? \"b:\" : \"a:\", e += t.startAt.position.map(t => he(t)).join(\",\")), t.endAt && (e += \", endAt: \", e += t.endAt.inclusive ? \"a:\" : \"b:\", e += t.endAt.position.map(t => he(t)).join(\",\")), `Target(${e})`;\n  }(Tn(t))}; limitType=${t.limitType})`;\n}\n\n/** Returns whether `doc` matches the constraints of `query`. */\nfunction bn(t, e) {\n  return e.isFoundDocument() && function (t, e) {\n    const n = e.key.path;\n    return null !== t.collectionGroup ? e.key.hasCollectionId(t.collectionGroup) && t.path.isPrefixOf(n) : ct.isDocumentKey(t.path) ? t.path.isEqual(n) : t.path.isImmediateParentOf(n);\n  }\n  /**\n  * A document must have a value for every ordering clause in order to show up\n  * in the results.\n  */(t, e) && function (t, e) {\n    // We must use `queryOrderBy()` to get the list of all orderBys (both implicit and explicit).\n    // Note that for OR queries, orderBy applies to all disjunction terms and implicit orderBys must\n    // be taken into account. For example, the query \"a > 1 || b==1\" has an implicit \"orderBy a\" due\n    // to the inequality, and is evaluated as \"a > 1 orderBy a || b==1 orderBy a\".\n    // A document with content of {b:1} matches the filters, but does not match the orderBy because\n    // it's missing the field 'a'.\n    for (const n of In(t))\n    // order by key always matches\n    if (!n.field.isKeyField() && null === e.data.field(n.field)) return !1;\n    return !0;\n  }(t, e) && function (t, e) {\n    for (const n of t.filters) if (!n.matches(e)) return !1;\n    return !0;\n  }\n  /** Makes sure a document is within the bounds, if provided. */(t, e) && function (t, e) {\n    if (t.startAt && !\n    /**\n    * Returns true if a document sorts before a bound using the provided sort\n    * order.\n    */\n    function (t, e, n) {\n      const s = Pe(t, e, n);\n      return t.inclusive ? s <= 0 : s < 0;\n    }(t.startAt, In(t), e)) return !1;\n    if (t.endAt && !function (t, e, n) {\n      const s = Pe(t, e, n);\n      return t.inclusive ? s >= 0 : s > 0;\n    }(t.endAt, In(t), e)) return !1;\n    return !0;\n  }\n  /**\n  * Returns the collection group that this query targets.\n  *\n  * PORTING NOTE: This is only used in the Web SDK to facilitate multi-tab\n  * synchronization for query results.\n  */(t, e);\n}\nfunction Vn(t) {\n  return t.collectionGroup || (t.path.length % 2 == 1 ? t.path.lastSegment() : t.path.get(t.path.length - 2));\n}\n\n/**\n * Returns a new comparator function that can be used to compare two documents\n * based on the Query's ordering constraint.\n */\nfunction Sn(t) {\n  return (e, n) => {\n    let s = !1;\n    for (const i of In(t)) {\n      const t = Dn(i, e, n);\n      if (0 !== t) return t;\n      s = s || i.field.isKeyField();\n    }\n    return 0;\n  };\n}\nfunction Dn(t, e, n) {\n  const s = t.field.isKeyField() ? ct.comparator(e.key, n.key) : function (t, e, n) {\n    const s = e.data.field(t),\n      i = n.data.field(t);\n    return null !== s && null !== i ? ce(s, i) : $();\n  }(t.field, e, n);\n  switch (t.dir) {\n    case \"asc\" /* Direction.ASCENDING */:\n      return s;\n    case \"desc\" /* Direction.DESCENDING */:\n      return -1 * s;\n    default:\n      return $();\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns an DoubleValue for `value` that is encoded based the serializer's\n * `useProto3Json` setting.\n */\nfunction Cn(t, e) {\n  if (t.yt) {\n    if (isNaN(e)) return {\n      doubleValue: \"NaN\"\n    };\n    if (e === 1 / 0) return {\n      doubleValue: \"Infinity\"\n    };\n    if (e === -1 / 0) return {\n      doubleValue: \"-Infinity\"\n    };\n  }\n  return {\n    doubleValue: Qt(e) ? \"-0\" : e\n  };\n}\n\n/**\n * Returns an IntegerValue for `value`.\n */\nfunction xn(t) {\n  return {\n    integerValue: \"\" + t\n  };\n}\n\n/**\n * Returns a value for a number that's appropriate to put into a proto.\n * The return value is an IntegerValue if it can safely represent the value,\n * otherwise a DoubleValue is returned.\n */\nfunction Nn(t, e) {\n  return jt(e) ? xn(e) : Cn(t, e);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Used to represent a field transform on a mutation. */\nclass kn {\n  constructor() {\n    // Make sure that the structural type of `TransformOperation` is unique.\n    // See https://github.com/microsoft/TypeScript/issues/5451\n    this._ = void 0;\n  }\n}\n\n/**\n * Computes the local transform result against the provided `previousValue`,\n * optionally using the provided localWriteTime.\n */\nfunction $n(t, e, n) {\n  return t instanceof Fn ? function (t, e) {\n    const n = {\n      fields: {\n        __type__: {\n          stringValue: \"server_timestamp\"\n        },\n        __local_write_time__: {\n          timestampValue: {\n            seconds: t.seconds,\n            nanos: t.nanoseconds\n          }\n        }\n      }\n    };\n    return e && (n.fields.__previous_value__ = e), {\n      mapValue: n\n    };\n  }(n, e) : t instanceof Bn ? Ln(t, e) : t instanceof qn ? Un(t, e) : function (t, e) {\n    // PORTING NOTE: Since JavaScript's integer arithmetic is limited to 53 bit\n    // precision and resolves overflows by reducing precision, we do not\n    // manually cap overflows at 2^63.\n    const n = On(t, e),\n      s = Gn(n) + Gn(t.It);\n    return de(n) && de(t.It) ? xn(s) : Cn(t.Tt, s);\n  }(t, e);\n}\n\n/**\n * Computes a final transform result after the transform has been acknowledged\n * by the server, potentially using the server-provided transformResult.\n */\nfunction Mn(t, e, n) {\n  // The server just sends null as the transform result for array operations,\n  // so we have to calculate a result the same as we do for local\n  // applications.\n  return t instanceof Bn ? Ln(t, e) : t instanceof qn ? Un(t, e) : n;\n}\n\n/**\n * If this transform operation is not idempotent, returns the base value to\n * persist for this transform. If a base value is returned, the transform\n * operation is always applied to this base value, even if document has\n * already been updated.\n *\n * Base values provide consistent behavior for non-idempotent transforms and\n * allow us to return the same latency-compensated value even if the backend\n * has already applied the transform operation. The base value is null for\n * idempotent transforms, as they can be re-played even if the backend has\n * already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent transforms.\n */\nfunction On(t, e) {\n  return t instanceof Kn ? de(n = e) || function (t) {\n    return !!t && \"doubleValue\" in t;\n  }\n  /** Returns true if `value` is either an IntegerValue or a DoubleValue. */(n) ? e : {\n    integerValue: 0\n  } : null;\n  var n;\n}\n\n/** Transforms a value into a server-generated timestamp. */\nclass Fn extends kn {}\n\n/** Transforms an array value via a union operation. */\nclass Bn extends kn {\n  constructor(t) {\n    super(), this.elements = t;\n  }\n}\nfunction Ln(t, e) {\n  const n = Qn(e);\n  for (const e of t.elements) n.some(t => oe(t, e)) || n.push(e);\n  return {\n    arrayValue: {\n      values: n\n    }\n  };\n}\n\n/** Transforms an array value via a remove operation. */\nclass qn extends kn {\n  constructor(t) {\n    super(), this.elements = t;\n  }\n}\nfunction Un(t, e) {\n  let n = Qn(e);\n  for (const e of t.elements) n = n.filter(t => !oe(t, e));\n  return {\n    arrayValue: {\n      values: n\n    }\n  };\n}\n\n/**\n * Implements the backend semantics for locally computed NUMERIC_ADD (increment)\n * transforms. Converts all field values to integers or doubles, but unlike the\n * backend does not cap integer values at 2^63. Instead, JavaScript number\n * arithmetic is used and precision loss can occur for values greater than 2^53.\n */\nclass Kn extends kn {\n  constructor(t, e) {\n    super(), this.Tt = t, this.It = e;\n  }\n}\nfunction Gn(t) {\n  return Zt(t.integerValue || t.doubleValue);\n}\nfunction Qn(t) {\n  return _e(t) && t.arrayValue.values ? t.arrayValue.values.slice() : [];\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A field path and the TransformOperation to perform upon it. */\nclass jn {\n  constructor(t, e) {\n    this.field = t, this.transform = e;\n  }\n}\nfunction zn(t, e) {\n  return t.field.isEqual(e.field) && function (t, e) {\n    return t instanceof Bn && e instanceof Bn || t instanceof qn && e instanceof qn ? tt(t.elements, e.elements, oe) : t instanceof Kn && e instanceof Kn ? oe(t.It, e.It) : t instanceof Fn && e instanceof Fn;\n  }(t.transform, e.transform);\n}\n\n/** The result of successfully applying a mutation to the backend. */\nclass Wn {\n  constructor(\n  /**\n   * The version at which the mutation was committed:\n   *\n   * - For most operations, this is the updateTime in the WriteResult.\n   * - For deletes, the commitTime of the WriteResponse (because deletes are\n   *   not stored and have no updateTime).\n   *\n   * Note that these versions can be different: No-op writes will not change\n   * the updateTime even though the commitTime advances.\n   */\n  t,\n  /**\n   * The resulting fields returned from the backend after a mutation\n   * containing field transforms has been committed. Contains one FieldValue\n   * for each FieldTransform that was in the mutation.\n   *\n   * Will be empty if the mutation did not contain any field transforms.\n   */\n  e) {\n    this.version = t, this.transformResults = e;\n  }\n}\n\n/**\n * Encodes a precondition for a mutation. This follows the model that the\n * backend accepts with the special case of an explicit \"empty\" precondition\n * (meaning no precondition).\n */\nclass Hn {\n  constructor(t, e) {\n    this.updateTime = t, this.exists = e;\n  }\n  /** Creates a new empty Precondition. */\n  static none() {\n    return new Hn();\n  }\n  /** Creates a new Precondition with an exists flag. */\n  static exists(t) {\n    return new Hn(void 0, t);\n  }\n  /** Creates a new Precondition based on a version a document exists at. */\n  static updateTime(t) {\n    return new Hn(t);\n  }\n  /** Returns whether this Precondition is empty. */\n  get isNone() {\n    return void 0 === this.updateTime && void 0 === this.exists;\n  }\n  isEqual(t) {\n    return this.exists === t.exists && (this.updateTime ? !!t.updateTime && this.updateTime.isEqual(t.updateTime) : !t.updateTime);\n  }\n}\n\n/** Returns true if the preconditions is valid for the given document. */\nfunction Jn(t, e) {\n  return void 0 !== t.updateTime ? e.isFoundDocument() && e.version.isEqual(t.updateTime) : void 0 === t.exists || t.exists === e.isFoundDocument();\n}\n\n/**\n * A mutation describes a self-contained change to a document. Mutations can\n * create, replace, delete, and update subsets of documents.\n *\n * Mutations not only act on the value of the document but also its version.\n *\n * For local mutations (mutations that haven't been committed yet), we preserve\n * the existing version for Set and Patch mutations. For Delete mutations, we\n * reset the version to 0.\n *\n * Here's the expected transition table.\n *\n * MUTATION           APPLIED TO            RESULTS IN\n *\n * SetMutation        Document(v3)          Document(v3)\n * SetMutation        NoDocument(v3)        Document(v0)\n * SetMutation        InvalidDocument(v0)   Document(v0)\n * PatchMutation      Document(v3)          Document(v3)\n * PatchMutation      NoDocument(v3)        NoDocument(v3)\n * PatchMutation      InvalidDocument(v0)   UnknownDocument(v3)\n * DeleteMutation     Document(v3)          NoDocument(v0)\n * DeleteMutation     NoDocument(v3)        NoDocument(v0)\n * DeleteMutation     InvalidDocument(v0)   NoDocument(v0)\n *\n * For acknowledged mutations, we use the updateTime of the WriteResponse as\n * the resulting version for Set and Patch mutations. As deletes have no\n * explicit update time, we use the commitTime of the WriteResponse for\n * Delete mutations.\n *\n * If a mutation is acknowledged by the backend but fails the precondition check\n * locally, we transition to an `UnknownDocument` and rely on Watch to send us\n * the updated version.\n *\n * Field transforms are used only with Patch and Set Mutations. We use the\n * `updateTransforms` message to store transforms, rather than the `transforms`s\n * messages.\n *\n * ## Subclassing Notes\n *\n * Every type of mutation needs to implement its own applyToRemoteDocument() and\n * applyToLocalView() to implement the actual behavior of applying the mutation\n * to some source document (see `setMutationApplyToRemoteDocument()` for an\n * example).\n */\nclass Yn {}\n\n/**\n * A utility method to calculate a `Mutation` representing the overlay from the\n * final state of the document, and a `FieldMask` representing the fields that\n * are mutated by the local mutations.\n */\nfunction Zn(t, e) {\n  if (!t.hasLocalMutations || e && 0 === e.fields.length) return null;\n  // mask is null when sets or deletes are applied to the current document.\n  if (null === e) return t.isNoDocument() ? new cs(t.key, Hn.none()) : new ss(t.key, t.data, Hn.none());\n  {\n    const n = t.data,\n      s = en.empty();\n    let i = new Ye(ut.comparator);\n    for (let t of e.fields) if (!i.has(t)) {\n      let e = n.field(t);\n      // If we are deleting a nested field, we take the immediate parent as\n      // the mask used to construct the resulting mutation.\n      // Justification: Nested fields can create parent fields implicitly. If\n      // only a leaf entry is deleted in later mutations, the parent field\n      // should still remain, but we may have lost this information.\n      // Consider mutation (foo.bar 1), then mutation (foo.bar delete()).\n      // This leaves the final result (foo, {}). Despite the fact that `doc`\n      // has the correct result, `foo` is not in `mask`, and the resulting\n      // mutation would miss `foo`.\n      null === e && t.length > 1 && (t = t.popLast(), e = n.field(t)), null === e ? s.delete(t) : s.set(t, e), i = i.add(t);\n    }\n    return new is(t.key, s, new tn(i.toArray()), Hn.none());\n  }\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing a\n * new remote document. If the input document doesn't match the expected state\n * (e.g. it is invalid or outdated), the document type may transition to\n * unknown.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n *     invalid document if the client has no knowledge of the pre-mutation state\n *     of the document.\n * @param mutationResult - The result of applying the mutation from the backend.\n */\nfunction Xn(t, e, n) {\n  t instanceof ss ? function (t, e, n) {\n    // Unlike setMutationApplyToLocalView, if we're applying a mutation to a\n    // remote document the server has accepted the mutation so the precondition\n    // must have held.\n    const s = t.value.clone(),\n      i = os(t.fieldTransforms, e, n.transformResults);\n    s.setAll(i), e.convertToFoundDocument(n.version, s).setHasCommittedMutations();\n  }(t, e, n) : t instanceof is ? function (t, e, n) {\n    if (!Jn(t.precondition, e))\n      // Since the mutation was not rejected, we know that the precondition\n      // matched on the backend. We therefore must not have the expected version\n      // of the document in our cache and convert to an UnknownDocument with a\n      // known updateTime.\n      return void e.convertToUnknownDocument(n.version);\n    const s = os(t.fieldTransforms, e, n.transformResults),\n      i = e.data;\n    i.setAll(rs(t)), i.setAll(s), e.convertToFoundDocument(n.version, i).setHasCommittedMutations();\n  }(t, e, n) : function (t, e, n) {\n    // Unlike applyToLocalView, if we're applying a mutation to a remote\n    // document the server has accepted the mutation so the precondition must\n    // have held.\n    e.convertToNoDocument(n.version).setHasCommittedMutations();\n  }(0, e, n);\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing\n * the new local view of a document. If the input document doesn't match the\n * expected state, the document is not modified.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n *     invalid document if the client has no knowledge of the pre-mutation state\n *     of the document.\n * @param previousMask - The fields that have been updated before applying this mutation.\n * @param localWriteTime - A timestamp indicating the local write time of the\n *     batch this mutation is a part of.\n * @returns A `FieldMask` representing the fields that are changed by applying this mutation.\n */\nfunction ts(t, e, n, s) {\n  return t instanceof ss ? function (t, e, n, s) {\n    if (!Jn(t.precondition, e))\n      // The mutation failed to apply (e.g. a document ID created with add()\n      // caused a name collision).\n      return n;\n    const i = t.value.clone(),\n      r = us(t.fieldTransforms, s, e);\n    return i.setAll(r), e.convertToFoundDocument(e.version, i).setHasLocalMutations(), null;\n    // SetMutation overwrites all fields.\n  }\n  /**\n  * A mutation that modifies fields of the document at the given key with the\n  * given values. The values are applied through a field mask:\n  *\n  *  * When a field is in both the mask and the values, the corresponding field\n  *    is updated.\n  *  * When a field is in neither the mask nor the values, the corresponding\n  *    field is unmodified.\n  *  * When a field is in the mask but not in the values, the corresponding field\n  *    is deleted.\n  *  * When a field is not in the mask but is in the values, the values map is\n  *    ignored.\n  */(t, e, n, s) : t instanceof is ? function (t, e, n, s) {\n    if (!Jn(t.precondition, e)) return n;\n    const i = us(t.fieldTransforms, s, e),\n      r = e.data;\n    if (r.setAll(rs(t)), r.setAll(i), e.convertToFoundDocument(e.version, r).setHasLocalMutations(), null === n) return null;\n    return n.unionWith(t.fieldMask.fields).unionWith(t.fieldTransforms.map(t => t.field));\n  }\n  /**\n  * Returns a FieldPath/Value map with the content of the PatchMutation.\n  */(t, e, n, s) : function (t, e, n) {\n    if (Jn(t.precondition, e)) return e.convertToNoDocument(e.version).setHasLocalMutations(), null;\n    return n;\n  }\n  /**\n  * A mutation that verifies the existence of the document at the given key with\n  * the provided precondition.\n  *\n  * The `verify` operation is only used in Transactions, and this class serves\n  * primarily to facilitate serialization into protos.\n  */(t, e, n);\n}\n\n/**\n * If this mutation is not idempotent, returns the base value to persist with\n * this mutation. If a base value is returned, the mutation is always applied\n * to this base value, even if document has already been updated.\n *\n * The base value is a sparse object that consists of only the document\n * fields for which this mutation contains a non-idempotent transformation\n * (e.g. a numeric increment). The provided value guarantees consistent\n * behavior for non-idempotent transforms and allow us to return the same\n * latency-compensated value even if the backend has already applied the\n * mutation. The base value is null for idempotent mutations, as they can be\n * re-played even if the backend has already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent mutations.\n */\nfunction es(t, e) {\n  let n = null;\n  for (const s of t.fieldTransforms) {\n    const t = e.data.field(s.field),\n      i = On(s.transform, t || null);\n    null != i && (null === n && (n = en.empty()), n.set(s.field, i));\n  }\n  return n || null;\n}\nfunction ns(t, e) {\n  return t.type === e.type && !!t.key.isEqual(e.key) && !!t.precondition.isEqual(e.precondition) && !!function (t, e) {\n    return void 0 === t && void 0 === e || !(!t || !e) && tt(t, e, (t, e) => zn(t, e));\n  }(t.fieldTransforms, e.fieldTransforms) && (0 /* MutationType.Set */ === t.type ? t.value.isEqual(e.value) : 1 /* MutationType.Patch */ !== t.type || t.data.isEqual(e.data) && t.fieldMask.isEqual(e.fieldMask));\n}\n\n/**\n * A mutation that creates or replaces the document at the given key with the\n * object value contents.\n */\nclass ss extends Yn {\n  constructor(t, e, n, s = []) {\n    super(), this.key = t, this.value = e, this.precondition = n, this.fieldTransforms = s, this.type = 0 /* MutationType.Set */;\n  }\n\n  getFieldMask() {\n    return null;\n  }\n}\nclass is extends Yn {\n  constructor(t, e, n, s, i = []) {\n    super(), this.key = t, this.data = e, this.fieldMask = n, this.precondition = s, this.fieldTransforms = i, this.type = 1 /* MutationType.Patch */;\n  }\n\n  getFieldMask() {\n    return this.fieldMask;\n  }\n}\nfunction rs(t) {\n  const e = new Map();\n  return t.fieldMask.fields.forEach(n => {\n    if (!n.isEmpty()) {\n      const s = t.data.field(n);\n      e.set(n, s);\n    }\n  }), e;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use after a mutation\n * containing transforms has been acknowledged by the server.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param mutableDocument - The current state of the document after applying all\n * previous mutations.\n * @param serverTransformResults - The transform results received by the server.\n * @returns The transform results list.\n */\nfunction os(t, e, n) {\n  const s = new Map();\n  M(t.length === n.length);\n  for (let i = 0; i < n.length; i++) {\n    const r = t[i],\n      o = r.transform,\n      u = e.data.field(r.field);\n    s.set(r.field, Mn(o, u, n[i]));\n  }\n  return s;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use when applying a\n * transform locally.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param localWriteTime - The local time of the mutation (used to\n *     generate ServerTimestampValues).\n * @param mutableDocument - The document to apply transforms on.\n * @returns The transform results list.\n */\nfunction us(t, e, n) {\n  const s = new Map();\n  for (const i of t) {\n    const t = i.transform,\n      r = n.data.field(i.field);\n    s.set(i.field, $n(t, r, e));\n  }\n  return s;\n}\n\n/** A mutation that deletes the document at the given key. */\nclass cs extends Yn {\n  constructor(t, e) {\n    super(), this.key = t, this.precondition = e, this.type = 2 /* MutationType.Delete */, this.fieldTransforms = [];\n  }\n  getFieldMask() {\n    return null;\n  }\n}\nclass as extends Yn {\n  constructor(t, e) {\n    super(), this.key = t, this.precondition = e, this.type = 3 /* MutationType.Verify */, this.fieldTransforms = [];\n  }\n  getFieldMask() {\n    return null;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass hs {\n  // TODO(b/33078163): just use simplest form of existence filter for now\n  constructor(t) {\n    this.count = t;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Error Codes describing the different ways GRPC can fail. These are copied\n * directly from GRPC's sources here:\n *\n * https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n *\n * Important! The names of these identifiers matter because the string forms\n * are used for reverse lookups from the webchannel stream. Do NOT change the\n * names of these identifiers or change this into a const enum.\n */\nvar ls, fs;\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a non-write operation.\n *\n * See isPermanentWriteError for classifying write errors.\n */\nfunction ds(t) {\n  switch (t) {\n    default:\n      return $();\n    case B.CANCELLED:\n    case B.UNKNOWN:\n    case B.DEADLINE_EXCEEDED:\n    case B.RESOURCE_EXHAUSTED:\n    case B.INTERNAL:\n    case B.UNAVAILABLE:\n    // Unauthenticated means something went wrong with our token and we need\n    // to retry with new credentials which will happen automatically.\n    case B.UNAUTHENTICATED:\n      return !1;\n    case B.INVALID_ARGUMENT:\n    case B.NOT_FOUND:\n    case B.ALREADY_EXISTS:\n    case B.PERMISSION_DENIED:\n    case B.FAILED_PRECONDITION:\n    // Aborted might be retried in some scenarios, but that is dependant on\n    // the context and should handled individually by the calling code.\n    // See https://cloud.google.com/apis/design/errors.\n    case B.ABORTED:\n    case B.OUT_OF_RANGE:\n    case B.UNIMPLEMENTED:\n    case B.DATA_LOSS:\n      return !0;\n  }\n}\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a write operation.\n *\n * Write operations must be handled specially because as of b/119437764, ABORTED\n * errors on the write stream should be retried too (even though ABORTED errors\n * are not generally retryable).\n *\n * Note that during the initial handshake on the write stream an ABORTED error\n * signals that we should discard our stream token (i.e. it is permanent). This\n * means a handshake error should be classified with isPermanentError, above.\n */\n/**\n * Maps an error Code from GRPC status code number, like 0, 1, or 14. These\n * are not the same as HTTP status codes.\n *\n * @returns The Code equivalent to the given GRPC status code. Fails if there\n *     is no match.\n */\nfunction _s(t) {\n  if (void 0 === t)\n    // This shouldn't normally happen, but in certain error cases (like trying\n    // to send invalid proto messages) we may get an error with no GRPC code.\n    return x(\"GRPC error has no .code\"), B.UNKNOWN;\n  switch (t) {\n    case ls.OK:\n      return B.OK;\n    case ls.CANCELLED:\n      return B.CANCELLED;\n    case ls.UNKNOWN:\n      return B.UNKNOWN;\n    case ls.DEADLINE_EXCEEDED:\n      return B.DEADLINE_EXCEEDED;\n    case ls.RESOURCE_EXHAUSTED:\n      return B.RESOURCE_EXHAUSTED;\n    case ls.INTERNAL:\n      return B.INTERNAL;\n    case ls.UNAVAILABLE:\n      return B.UNAVAILABLE;\n    case ls.UNAUTHENTICATED:\n      return B.UNAUTHENTICATED;\n    case ls.INVALID_ARGUMENT:\n      return B.INVALID_ARGUMENT;\n    case ls.NOT_FOUND:\n      return B.NOT_FOUND;\n    case ls.ALREADY_EXISTS:\n      return B.ALREADY_EXISTS;\n    case ls.PERMISSION_DENIED:\n      return B.PERMISSION_DENIED;\n    case ls.FAILED_PRECONDITION:\n      return B.FAILED_PRECONDITION;\n    case ls.ABORTED:\n      return B.ABORTED;\n    case ls.OUT_OF_RANGE:\n      return B.OUT_OF_RANGE;\n    case ls.UNIMPLEMENTED:\n      return B.UNIMPLEMENTED;\n    case ls.DATA_LOSS:\n      return B.DATA_LOSS;\n    default:\n      return $();\n  }\n}\n\n/**\n * Converts an HTTP response's error status to the equivalent error code.\n *\n * @param status - An HTTP error response status (\"FAILED_PRECONDITION\",\n * \"UNKNOWN\", etc.)\n * @returns The equivalent Code. Non-matching responses are mapped to\n *     Code.UNKNOWN.\n */\n(fs = ls || (ls = {}))[fs.OK = 0] = \"OK\", fs[fs.CANCELLED = 1] = \"CANCELLED\", fs[fs.UNKNOWN = 2] = \"UNKNOWN\", fs[fs.INVALID_ARGUMENT = 3] = \"INVALID_ARGUMENT\", fs[fs.DEADLINE_EXCEEDED = 4] = \"DEADLINE_EXCEEDED\", fs[fs.NOT_FOUND = 5] = \"NOT_FOUND\", fs[fs.ALREADY_EXISTS = 6] = \"ALREADY_EXISTS\", fs[fs.PERMISSION_DENIED = 7] = \"PERMISSION_DENIED\", fs[fs.UNAUTHENTICATED = 16] = \"UNAUTHENTICATED\", fs[fs.RESOURCE_EXHAUSTED = 8] = \"RESOURCE_EXHAUSTED\", fs[fs.FAILED_PRECONDITION = 9] = \"FAILED_PRECONDITION\", fs[fs.ABORTED = 10] = \"ABORTED\", fs[fs.OUT_OF_RANGE = 11] = \"OUT_OF_RANGE\", fs[fs.UNIMPLEMENTED = 12] = \"UNIMPLEMENTED\", fs[fs.INTERNAL = 13] = \"INTERNAL\", fs[fs.UNAVAILABLE = 14] = \"UNAVAILABLE\", fs[fs.DATA_LOSS = 15] = \"DATA_LOSS\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A map implementation that uses objects as keys. Objects must have an\n * associated equals function and must be immutable. Entries in the map are\n * stored together with the key being produced from the mapKeyFn. This map\n * automatically handles collisions of keys.\n */\nclass ws {\n  constructor(t, e) {\n    this.mapKeyFn = t, this.equalsFn = e,\n    /**\n     * The inner map for a key/value pair. Due to the possibility of collisions we\n     * keep a list of entries that we do a linear search through to find an actual\n     * match. Note that collisions should be rare, so we still expect near\n     * constant time lookups in practice.\n     */\n    this.inner = {}, /** The number of entries stored in the map */\n    this.innerSize = 0;\n  }\n  /** Get a value for this key, or undefined if it does not exist. */\n  get(t) {\n    const e = this.mapKeyFn(t),\n      n = this.inner[e];\n    if (void 0 !== n) for (const [e, s] of n) if (this.equalsFn(e, t)) return s;\n  }\n  has(t) {\n    return void 0 !== this.get(t);\n  }\n  /** Put this key and value in the map. */\n  set(t, e) {\n    const n = this.mapKeyFn(t),\n      s = this.inner[n];\n    if (void 0 === s) return this.inner[n] = [[t, e]], void this.innerSize++;\n    for (let n = 0; n < s.length; n++) if (this.equalsFn(s[n][0], t))\n      // This is updating an existing entry and does not increase `innerSize`.\n      return void (s[n] = [t, e]);\n    s.push([t, e]), this.innerSize++;\n  }\n  /**\n   * Remove this key from the map. Returns a boolean if anything was deleted.\n   */\n  delete(t) {\n    const e = this.mapKeyFn(t),\n      n = this.inner[e];\n    if (void 0 === n) return !1;\n    for (let s = 0; s < n.length; s++) if (this.equalsFn(n[s][0], t)) return 1 === n.length ? delete this.inner[e] : n.splice(s, 1), this.innerSize--, !0;\n    return !1;\n  }\n  forEach(t) {\n    Ut(this.inner, (e, n) => {\n      for (const [e, s] of n) t(e, s);\n    });\n  }\n  isEmpty() {\n    return Kt(this.inner);\n  }\n  size() {\n    return this.innerSize;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ms = new We(ct.comparator);\nfunction gs() {\n  return ms;\n}\nconst ys = new We(ct.comparator);\nfunction ps(...t) {\n  let e = ys;\n  for (const n of t) e = e.insert(n.key, n);\n  return e;\n}\nfunction Is(t) {\n  let e = ys;\n  return t.forEach((t, n) => e = e.insert(t, n.overlayedDocument)), e;\n}\nfunction Ts() {\n  return As();\n}\nfunction Es() {\n  return As();\n}\nfunction As() {\n  return new ws(t => t.toString(), (t, e) => t.isEqual(e));\n}\nconst Rs = new We(ct.comparator);\nconst Ps = new Ye(ct.comparator);\nfunction vs(...t) {\n  let e = Ps;\n  for (const n of t) e = e.add(n);\n  return e;\n}\nconst bs = new Ye(X);\nfunction Vs() {\n  return bs;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An event from the RemoteStore. It is split into targetChanges (changes to the\n * state or the set of documents in our watched targets) and documentUpdates\n * (changes to the actual documents).\n */\nclass Ss {\n  constructor(\n  /**\n   * The snapshot version this event brings us up to, or MIN if not set.\n   */\n  t,\n  /**\n   * A map from target to changes to the target. See TargetChange.\n   */\n  e,\n  /**\n   * A set of targets that is known to be inconsistent. Listens for these\n   * targets should be re-established without resume tokens.\n   */\n  n,\n  /**\n   * A set of which documents have changed or been deleted, along with the\n   * doc's new values (if not deleted).\n   */\n  s,\n  /**\n   * A set of which document updates are due only to limbo resolution targets.\n   */\n  i) {\n    this.snapshotVersion = t, this.targetChanges = e, this.targetMismatches = n, this.documentUpdates = s, this.resolvedLimboDocuments = i;\n  }\n  /**\n   * HACK: Views require RemoteEvents in order to determine whether the view is\n   * CURRENT, but secondary tabs don't receive remote events. So this method is\n   * used to create a synthesized RemoteEvent that can be used to apply a\n   * CURRENT status change to a View, for queries executed in a different tab.\n   */\n  // PORTING NOTE: Multi-tab only\n  static createSynthesizedRemoteEventForCurrentChange(t, e, n) {\n    const s = new Map();\n    return s.set(t, Ds.createSynthesizedTargetChangeForCurrentChange(t, e, n)), new Ss(st.min(), s, Vs(), gs(), vs());\n  }\n}\n\n/**\n * A TargetChange specifies the set of changes for a specific target as part of\n * a RemoteEvent. These changes track which documents are added, modified or\n * removed, as well as the target's resume token and whether the target is\n * marked CURRENT.\n * The actual changes *to* documents are not part of the TargetChange since\n * documents may be part of multiple targets.\n */\nclass Ds {\n  constructor(\n  /**\n   * An opaque, server-assigned token that allows watching a query to be resumed\n   * after disconnecting without retransmitting all the data that matches the\n   * query. The resume token essentially identifies a point in time from which\n   * the server should resume sending results.\n   */\n  t,\n  /**\n   * The \"current\" (synced) status of this target. Note that \"current\"\n   * has special meaning in the RPC protocol that implies that a target is\n   * both up-to-date and consistent with the rest of the watch stream.\n   */\n  e,\n  /**\n   * The set of documents that were newly assigned to this target as part of\n   * this remote event.\n   */\n  n,\n  /**\n   * The set of documents that were already assigned to this target but received\n   * an update during this remote event.\n   */\n  s,\n  /**\n   * The set of documents that were removed from this target as part of this\n   * remote event.\n   */\n  i) {\n    this.resumeToken = t, this.current = e, this.addedDocuments = n, this.modifiedDocuments = s, this.removedDocuments = i;\n  }\n  /**\n   * This method is used to create a synthesized TargetChanges that can be used to\n   * apply a CURRENT status change to a View (for queries executed in a different\n   * tab) or for new queries (to raise snapshots with correct CURRENT status).\n   */\n  static createSynthesizedTargetChangeForCurrentChange(t, e, n) {\n    return new Ds(n, e, vs(), vs(), vs());\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a changed document and a list of target ids to which this change\n * applies.\n *\n * If document has been deleted NoDocument will be provided.\n */\nclass Cs {\n  constructor( /** The new document applies to all of these targets. */\n  t, /** The new document is removed from all of these targets. */\n  e, /** The key of the document for this change. */\n  n,\n  /**\n   * The new document or NoDocument if it was deleted. Is null if the\n   * document went out of view without the server sending a new document.\n   */\n  s) {\n    this.Et = t, this.removedTargetIds = e, this.key = n, this.At = s;\n  }\n}\nclass xs {\n  constructor(t, e) {\n    this.targetId = t, this.Rt = e;\n  }\n}\nclass Ns {\n  constructor( /** What kind of change occurred to the watch target. */\n  t, /** The target IDs that were added/removed/set. */\n  e,\n  /**\n   * An opaque, server-assigned token that allows watching a target to be\n   * resumed after disconnecting without retransmitting all the data that\n   * matches the target. The resume token essentially identifies a point in\n   * time from which the server should resume sending results.\n   */\n  n = Ht.EMPTY_BYTE_STRING\n  /** An RPC error indicating why the watch failed. */, s = null) {\n    this.state = t, this.targetIds = e, this.resumeToken = n, this.cause = s;\n  }\n}\n\n/** Tracks the internal state of a Watch target. */\nclass ks {\n  constructor() {\n    /**\n     * The number of pending responses (adds or removes) that we are waiting on.\n     * We only consider targets active that have no pending responses.\n     */\n    this.Pt = 0,\n    /**\n     * Keeps track of the document changes since the last raised snapshot.\n     *\n     * These changes are continuously updated as we receive document updates and\n     * always reflect the current set of changes against the last issued snapshot.\n     */\n    this.vt = Os(), /** See public getters for explanations of these fields. */\n    this.bt = Ht.EMPTY_BYTE_STRING, this.Vt = !1,\n    /**\n     * Whether this target state should be included in the next snapshot. We\n     * initialize to true so that newly-added targets are included in the next\n     * RemoteEvent.\n     */\n    this.St = !0;\n  }\n  /**\n   * Whether this target has been marked 'current'.\n   *\n   * 'Current' has special meaning in the RPC protocol: It implies that the\n   * Watch backend has sent us all changes up to the point at which the target\n   * was added and that the target is consistent with the rest of the watch\n   * stream.\n   */\n  get current() {\n    return this.Vt;\n  }\n  /** The last resume token sent to us for this target. */\n  get resumeToken() {\n    return this.bt;\n  }\n  /** Whether this target has pending target adds or target removes. */\n  get Dt() {\n    return 0 !== this.Pt;\n  }\n  /** Whether we have modified any state that should trigger a snapshot. */\n  get Ct() {\n    return this.St;\n  }\n  /**\n   * Applies the resume token to the TargetChange, but only when it has a new\n   * value. Empty resumeTokens are discarded.\n   */\n  xt(t) {\n    t.approximateByteSize() > 0 && (this.St = !0, this.bt = t);\n  }\n  /**\n   * Creates a target change from the current set of changes.\n   *\n   * To reset the document changes after raising this snapshot, call\n   * `clearPendingChanges()`.\n   */\n  Nt() {\n    let t = vs(),\n      e = vs(),\n      n = vs();\n    return this.vt.forEach((s, i) => {\n      switch (i) {\n        case 0 /* ChangeType.Added */:\n          t = t.add(s);\n          break;\n        case 2 /* ChangeType.Modified */:\n          e = e.add(s);\n          break;\n        case 1 /* ChangeType.Removed */:\n          n = n.add(s);\n          break;\n        default:\n          $();\n      }\n    }), new Ds(this.bt, this.Vt, t, e, n);\n  }\n  /**\n   * Resets the document changes and sets `hasPendingChanges` to false.\n   */\n  kt() {\n    this.St = !1, this.vt = Os();\n  }\n  $t(t, e) {\n    this.St = !0, this.vt = this.vt.insert(t, e);\n  }\n  Mt(t) {\n    this.St = !0, this.vt = this.vt.remove(t);\n  }\n  Ot() {\n    this.Pt += 1;\n  }\n  Ft() {\n    this.Pt -= 1;\n  }\n  Bt() {\n    this.St = !0, this.Vt = !0;\n  }\n}\n\n/**\n * A helper class to accumulate watch changes into a RemoteEvent.\n */\nclass $s {\n  constructor(t) {\n    this.Lt = t, /** The internal state of all tracked targets. */\n    this.qt = new Map(), /** Keeps track of the documents to update since the last raised snapshot. */\n    this.Ut = gs(), /** A mapping of document keys to their set of target IDs. */\n    this.Kt = Ms(),\n    /**\n     * A list of targets with existence filter mismatches. These targets are\n     * known to be inconsistent and their listens needs to be re-established by\n     * RemoteStore.\n     */\n    this.Gt = new Ye(X);\n  }\n  /**\n   * Processes and adds the DocumentWatchChange to the current set of changes.\n   */\n  Qt(t) {\n    for (const e of t.Et) t.At && t.At.isFoundDocument() ? this.jt(e, t.At) : this.zt(e, t.key, t.At);\n    for (const e of t.removedTargetIds) this.zt(e, t.key, t.At);\n  }\n  /** Processes and adds the WatchTargetChange to the current set of changes. */\n  Wt(t) {\n    this.forEachTarget(t, e => {\n      const n = this.Ht(e);\n      switch (t.state) {\n        case 0 /* WatchTargetChangeState.NoChange */:\n          this.Jt(e) && n.xt(t.resumeToken);\n          break;\n        case 1 /* WatchTargetChangeState.Added */:\n          // We need to decrement the number of pending acks needed from watch\n          // for this targetId.\n          n.Ft(), n.Dt ||\n          // We have a freshly added target, so we need to reset any state\n          // that we had previously. This can happen e.g. when remove and add\n          // back a target for existence filter mismatches.\n          n.kt(), n.xt(t.resumeToken);\n          break;\n        case 2 /* WatchTargetChangeState.Removed */:\n          // We need to keep track of removed targets to we can post-filter and\n          // remove any target changes.\n          // We need to decrement the number of pending acks needed from watch\n          // for this targetId.\n          n.Ft(), n.Dt || this.removeTarget(e);\n          break;\n        case 3 /* WatchTargetChangeState.Current */:\n          this.Jt(e) && (n.Bt(), n.xt(t.resumeToken));\n          break;\n        case 4 /* WatchTargetChangeState.Reset */:\n          this.Jt(e) && (\n          // Reset the target and synthesizes removes for all existing\n          // documents. The backend will re-add any documents that still\n          // match the target before it sends the next global snapshot.\n          this.Yt(e), n.xt(t.resumeToken));\n          break;\n        default:\n          $();\n      }\n    });\n  }\n  /**\n   * Iterates over all targetIds that the watch change applies to: either the\n   * targetIds explicitly listed in the change or the targetIds of all currently\n   * active targets.\n   */\n  forEachTarget(t, e) {\n    t.targetIds.length > 0 ? t.targetIds.forEach(e) : this.qt.forEach((t, n) => {\n      this.Jt(n) && e(n);\n    });\n  }\n  /**\n   * Handles existence filters and synthesizes deletes for filter mismatches.\n   * Targets that are invalidated by filter mismatches are added to\n   * `pendingTargetResets`.\n   */\n  Zt(t) {\n    const e = t.targetId,\n      n = t.Rt.count,\n      s = this.Xt(e);\n    if (s) {\n      const t = s.target;\n      if (an(t)) {\n        if (0 === n) {\n          // The existence filter told us the document does not exist. We deduce\n          // that this document does not exist and apply a deleted document to\n          // our updates. Without applying this deleted document there might be\n          // another query that will raise this document as part of a snapshot\n          // until it is resolved, essentially exposing inconsistency between\n          // queries.\n          const n = new ct(t.path);\n          this.zt(e, n, sn.newNoDocument(n, st.min()));\n        } else M(1 === n);\n      } else {\n        this.te(e) !== n && (\n        // Existence filter mismatch: We reset the mapping and raise a new\n        // snapshot with `isFromCache:true`.\n        this.Yt(e), this.Gt = this.Gt.add(e));\n      }\n    }\n  }\n  /**\n   * Converts the currently accumulated state into a remote event at the\n   * provided snapshot version. Resets the accumulated changes before returning.\n   */\n  ee(t) {\n    const e = new Map();\n    this.qt.forEach((n, s) => {\n      const i = this.Xt(s);\n      if (i) {\n        if (n.current && an(i.target)) {\n          // Document queries for document that don't exist can produce an empty\n          // result set. To update our local cache, we synthesize a document\n          // delete if we have not previously received the document. This\n          // resolves the limbo state of the document, removing it from\n          // limboDocumentRefs.\n          // TODO(dimond): Ideally we would have an explicit lookup target\n          // instead resulting in an explicit delete message and we could\n          // remove this special logic.\n          const e = new ct(i.target.path);\n          null !== this.Ut.get(e) || this.ne(s, e) || this.zt(s, e, sn.newNoDocument(e, t));\n        }\n        n.Ct && (e.set(s, n.Nt()), n.kt());\n      }\n    });\n    let n = vs();\n    // We extract the set of limbo-only document updates as the GC logic\n    // special-cases documents that do not appear in the target cache.\n\n    // TODO(gsoltis): Expand on this comment once GC is available in the JS\n    // client.\n    this.Kt.forEach((t, e) => {\n      let s = !0;\n      e.forEachWhile(t => {\n        const e = this.Xt(t);\n        return !e || 2 /* TargetPurpose.LimboResolution */ === e.purpose || (s = !1, !1);\n      }), s && (n = n.add(t));\n    }), this.Ut.forEach((e, n) => n.setReadTime(t));\n    const s = new Ss(t, e, this.Gt, this.Ut, n);\n    return this.Ut = gs(), this.Kt = Ms(), this.Gt = new Ye(X), s;\n  }\n  /**\n   * Adds the provided document to the internal list of document updates and\n   * its document key to the given target's mapping.\n   */\n  // Visible for testing.\n  jt(t, e) {\n    if (!this.Jt(t)) return;\n    const n = this.ne(t, e.key) ? 2 /* ChangeType.Modified */ : 0 /* ChangeType.Added */;\n    this.Ht(t).$t(e.key, n), this.Ut = this.Ut.insert(e.key, e), this.Kt = this.Kt.insert(e.key, this.se(e.key).add(t));\n  }\n  /**\n   * Removes the provided document from the target mapping. If the\n   * document no longer matches the target, but the document's state is still\n   * known (e.g. we know that the document was deleted or we received the change\n   * that caused the filter mismatch), the new document can be provided\n   * to update the remote document cache.\n   */\n  // Visible for testing.\n  zt(t, e, n) {\n    if (!this.Jt(t)) return;\n    const s = this.Ht(t);\n    this.ne(t, e) ? s.$t(e, 1 /* ChangeType.Removed */) :\n    // The document may have entered and left the target before we raised a\n    // snapshot, so we can just ignore the change.\n    s.Mt(e), this.Kt = this.Kt.insert(e, this.se(e).delete(t)), n && (this.Ut = this.Ut.insert(e, n));\n  }\n  removeTarget(t) {\n    this.qt.delete(t);\n  }\n  /**\n   * Returns the current count of documents in the target. This includes both\n   * the number of documents that the LocalStore considers to be part of the\n   * target as well as any accumulated changes.\n   */\n  te(t) {\n    const e = this.Ht(t).Nt();\n    return this.Lt.getRemoteKeysForTarget(t).size + e.addedDocuments.size - e.removedDocuments.size;\n  }\n  /**\n   * Increment the number of acks needed from watch before we can consider the\n   * server to be 'in-sync' with the client's active targets.\n   */\n  Ot(t) {\n    this.Ht(t).Ot();\n  }\n  Ht(t) {\n    let e = this.qt.get(t);\n    return e || (e = new ks(), this.qt.set(t, e)), e;\n  }\n  se(t) {\n    let e = this.Kt.get(t);\n    return e || (e = new Ye(X), this.Kt = this.Kt.insert(t, e)), e;\n  }\n  /**\n   * Verifies that the user is still interested in this target (by calling\n   * `getTargetDataForTarget()`) and that we are not waiting for pending ADDs\n   * from watch.\n   */\n  Jt(t) {\n    const e = null !== this.Xt(t);\n    return e || C(\"WatchChangeAggregator\", \"Detected inactive target\", t), e;\n  }\n  /**\n   * Returns the TargetData for an active target (i.e. a target that the user\n   * is still interested in that has no outstanding target change requests).\n   */\n  Xt(t) {\n    const e = this.qt.get(t);\n    return e && e.Dt ? null : this.Lt.ie(t);\n  }\n  /**\n   * Resets the state of a Watch target to its initial state (e.g. sets\n   * 'current' to false, clears the resume token and removes its target mapping\n   * from all documents).\n   */\n  Yt(t) {\n    this.qt.set(t, new ks());\n    this.Lt.getRemoteKeysForTarget(t).forEach(e => {\n      this.zt(t, e, /*updatedDocument=*/null);\n    });\n  }\n  /**\n   * Returns whether the LocalStore considers the document to be part of the\n   * specified target.\n   */\n  ne(t, e) {\n    return this.Lt.getRemoteKeysForTarget(t).has(e);\n  }\n}\nfunction Ms() {\n  return new We(ct.comparator);\n}\nfunction Os() {\n  return new We(ct.comparator);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Fs = (() => {\n    const t = {\n      asc: \"ASCENDING\",\n      desc: \"DESCENDING\"\n    };\n    return t;\n  })(),\n  Bs = (() => {\n    const t = {\n      \"<\": \"LESS_THAN\",\n      \"<=\": \"LESS_THAN_OR_EQUAL\",\n      \">\": \"GREATER_THAN\",\n      \">=\": \"GREATER_THAN_OR_EQUAL\",\n      \"==\": \"EQUAL\",\n      \"!=\": \"NOT_EQUAL\",\n      \"array-contains\": \"ARRAY_CONTAINS\",\n      in: \"IN\",\n      \"not-in\": \"NOT_IN\",\n      \"array-contains-any\": \"ARRAY_CONTAINS_ANY\"\n    };\n    return t;\n  })(),\n  Ls = (() => {\n    const t = {\n      and: \"AND\",\n      or: \"OR\"\n    };\n    return t;\n  })();\n\n/**\n * This class generates JsonObject values for the Datastore API suitable for\n * sending to either GRPC stub methods or via the JSON/HTTP REST API.\n *\n * The serializer supports both Protobuf.js and Proto3 JSON formats. By\n * setting `useProto3Json` to true, the serializer will use the Proto3 JSON\n * format.\n *\n * For a description of the Proto3 JSON format check\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n *\n * TODO(klimt): We can remove the databaseId argument if we keep the full\n * resource name in documents.\n */\nclass qs {\n  constructor(t, e) {\n    this.databaseId = t, this.yt = e;\n  }\n}\n\n/**\n * Returns a value for a Date that's appropriate to put into a proto.\n */\nfunction Us(t, e) {\n  if (t.yt) {\n    return `${new Date(1e3 * e.seconds).toISOString().replace(/\\.\\d*/, \"\").replace(\"Z\", \"\")}.${(\"000000000\" + e.nanoseconds).slice(-9)}Z`;\n  }\n  return {\n    seconds: \"\" + e.seconds,\n    nanos: e.nanoseconds\n  };\n}\n\n/**\n * Returns a value for bytes that's appropriate to put in a proto.\n *\n * Visible for testing.\n */\nfunction Ks(t, e) {\n  return t.yt ? e.toBase64() : e.toUint8Array();\n}\n\n/**\n * Returns a ByteString based on the proto string value.\n */\nfunction Gs(t, e) {\n  return Us(t, e.toTimestamp());\n}\nfunction Qs(t) {\n  return M(!!t), st.fromTimestamp(function (t) {\n    const e = Yt(t);\n    return new nt(e.seconds, e.nanos);\n  }(t));\n}\nfunction js(t, e) {\n  return function (t) {\n    return new rt([\"projects\", t.projectId, \"databases\", t.database]);\n  }(t).child(\"documents\").child(e).canonicalString();\n}\nfunction zs(t) {\n  const e = rt.fromString(t);\n  return M(pi(e)), e;\n}\nfunction Ws(t, e) {\n  return js(t.databaseId, e.path);\n}\nfunction Hs(t, e) {\n  const n = zs(e);\n  if (n.get(1) !== t.databaseId.projectId) throw new L(B.INVALID_ARGUMENT, \"Tried to deserialize key from different project: \" + n.get(1) + \" vs \" + t.databaseId.projectId);\n  if (n.get(3) !== t.databaseId.database) throw new L(B.INVALID_ARGUMENT, \"Tried to deserialize key from different database: \" + n.get(3) + \" vs \" + t.databaseId.database);\n  return new ct(Xs(n));\n}\nfunction Js(t, e) {\n  return js(t.databaseId, e);\n}\nfunction Ys(t) {\n  const e = zs(t);\n  // In v1beta1 queries for collections at the root did not have a trailing\n  // \"/documents\". In v1 all resource paths contain \"/documents\". Preserve the\n  // ability to read the v1beta1 form for compatibility with queries persisted\n  // in the local target cache.\n  return 4 === e.length ? rt.emptyPath() : Xs(e);\n}\nfunction Zs(t) {\n  return new rt([\"projects\", t.databaseId.projectId, \"databases\", t.databaseId.database]).canonicalString();\n}\nfunction Xs(t) {\n  return M(t.length > 4 && \"documents\" === t.get(4)), t.popFirst(5);\n}\n\n/** Creates a Document proto from key and fields (but no create/update time) */\nfunction ti(t, e, n) {\n  return {\n    name: Ws(t, e),\n    fields: n.value.mapValue.fields\n  };\n}\nfunction ei(t, e, n) {\n  const s = Hs(t, e.name),\n    i = Qs(e.updateTime),\n    r = e.createTime ? Qs(e.createTime) : st.min(),\n    o = new en({\n      mapValue: {\n        fields: e.fields\n      }\n    }),\n    u = sn.newFoundDocument(s, i, r, o);\n  return n && u.setHasCommittedMutations(), n ? u.setHasCommittedMutations() : u;\n}\nfunction ni(t, e) {\n  return \"found\" in e ? function (t, e) {\n    M(!!e.found), e.found.name, e.found.updateTime;\n    const n = Hs(t, e.found.name),\n      s = Qs(e.found.updateTime),\n      i = e.found.createTime ? Qs(e.found.createTime) : st.min(),\n      r = new en({\n        mapValue: {\n          fields: e.found.fields\n        }\n      });\n    return sn.newFoundDocument(n, s, i, r);\n  }(t, e) : \"missing\" in e ? function (t, e) {\n    M(!!e.missing), M(!!e.readTime);\n    const n = Hs(t, e.missing),\n      s = Qs(e.readTime);\n    return sn.newNoDocument(n, s);\n  }(t, e) : $();\n}\nfunction si(t, e) {\n  let n;\n  if (\"targetChange\" in e) {\n    e.targetChange;\n    // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'\n    // if unset\n    const s = function (t) {\n        return \"NO_CHANGE\" === t ? 0 /* WatchTargetChangeState.NoChange */ : \"ADD\" === t ? 1 /* WatchTargetChangeState.Added */ : \"REMOVE\" === t ? 2 /* WatchTargetChangeState.Removed */ : \"CURRENT\" === t ? 3 /* WatchTargetChangeState.Current */ : \"RESET\" === t ? 4 /* WatchTargetChangeState.Reset */ : $();\n      }(e.targetChange.targetChangeType || \"NO_CHANGE\"),\n      i = e.targetChange.targetIds || [],\n      r = function (t, e) {\n        return t.yt ? (M(void 0 === e || \"string\" == typeof e), Ht.fromBase64String(e || \"\")) : (M(void 0 === e || e instanceof Uint8Array), Ht.fromUint8Array(e || new Uint8Array()));\n      }(t, e.targetChange.resumeToken),\n      o = e.targetChange.cause,\n      u = o && function (t) {\n        const e = void 0 === t.code ? B.UNKNOWN : _s(t.code);\n        return new L(e, t.message || \"\");\n      }\n      /**\n      * Returns a value for a number (or null) that's appropriate to put into\n      * a google.protobuf.Int32Value proto.\n      * DO NOT USE THIS FOR ANYTHING ELSE.\n      * This method cheats. It's typed as returning \"number\" because that's what\n      * our generated proto interfaces say Int32Value must be. But GRPC actually\n      * expects a { value: <number> } struct.\n      */(o);\n    n = new Ns(s, i, r, u || null);\n  } else if (\"documentChange\" in e) {\n    e.documentChange;\n    const s = e.documentChange;\n    s.document, s.document.name, s.document.updateTime;\n    const i = Hs(t, s.document.name),\n      r = Qs(s.document.updateTime),\n      o = s.document.createTime ? Qs(s.document.createTime) : st.min(),\n      u = new en({\n        mapValue: {\n          fields: s.document.fields\n        }\n      }),\n      c = sn.newFoundDocument(i, r, o, u),\n      a = s.targetIds || [],\n      h = s.removedTargetIds || [];\n    n = new Cs(a, h, c.key, c);\n  } else if (\"documentDelete\" in e) {\n    e.documentDelete;\n    const s = e.documentDelete;\n    s.document;\n    const i = Hs(t, s.document),\n      r = s.readTime ? Qs(s.readTime) : st.min(),\n      o = sn.newNoDocument(i, r),\n      u = s.removedTargetIds || [];\n    n = new Cs([], u, o.key, o);\n  } else if (\"documentRemove\" in e) {\n    e.documentRemove;\n    const s = e.documentRemove;\n    s.document;\n    const i = Hs(t, s.document),\n      r = s.removedTargetIds || [];\n    n = new Cs([], r, i, null);\n  } else {\n    if (!(\"filter\" in e)) return $();\n    {\n      e.filter;\n      const t = e.filter;\n      t.targetId;\n      const s = t.count || 0,\n        i = new hs(s),\n        r = t.targetId;\n      n = new xs(r, i);\n    }\n  }\n  return n;\n}\nfunction ii(t, e) {\n  let n;\n  if (e instanceof ss) n = {\n    update: ti(t, e.key, e.value)\n  };else if (e instanceof cs) n = {\n    delete: Ws(t, e.key)\n  };else if (e instanceof is) n = {\n    update: ti(t, e.key, e.data),\n    updateMask: yi(e.fieldMask)\n  };else {\n    if (!(e instanceof as)) return $();\n    n = {\n      verify: Ws(t, e.key)\n    };\n  }\n  return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map(t => function (t, e) {\n    const n = e.transform;\n    if (n instanceof Fn) return {\n      fieldPath: e.field.canonicalString(),\n      setToServerValue: \"REQUEST_TIME\"\n    };\n    if (n instanceof Bn) return {\n      fieldPath: e.field.canonicalString(),\n      appendMissingElements: {\n        values: n.elements\n      }\n    };\n    if (n instanceof qn) return {\n      fieldPath: e.field.canonicalString(),\n      removeAllFromArray: {\n        values: n.elements\n      }\n    };\n    if (n instanceof Kn) return {\n      fieldPath: e.field.canonicalString(),\n      increment: n.It\n    };\n    throw $();\n  }(0, t))), e.precondition.isNone || (n.currentDocument = function (t, e) {\n    return void 0 !== e.updateTime ? {\n      updateTime: Gs(t, e.updateTime)\n    } : void 0 !== e.exists ? {\n      exists: e.exists\n    } : $();\n  }(t, e.precondition)), n;\n}\nfunction ri(t, e) {\n  const n = e.currentDocument ? function (t) {\n      return void 0 !== t.updateTime ? Hn.updateTime(Qs(t.updateTime)) : void 0 !== t.exists ? Hn.exists(t.exists) : Hn.none();\n    }(e.currentDocument) : Hn.none(),\n    s = e.updateTransforms ? e.updateTransforms.map(e => function (t, e) {\n      let n = null;\n      if (\"setToServerValue\" in e) M(\"REQUEST_TIME\" === e.setToServerValue), n = new Fn();else if (\"appendMissingElements\" in e) {\n        const t = e.appendMissingElements.values || [];\n        n = new Bn(t);\n      } else if (\"removeAllFromArray\" in e) {\n        const t = e.removeAllFromArray.values || [];\n        n = new qn(t);\n      } else \"increment\" in e ? n = new Kn(t, e.increment) : $();\n      const s = ut.fromServerFormat(e.fieldPath);\n      return new jn(s, n);\n    }(t, e)) : [];\n  if (e.update) {\n    e.update.name;\n    const i = Hs(t, e.update.name),\n      r = new en({\n        mapValue: {\n          fields: e.update.fields\n        }\n      });\n    if (e.updateMask) {\n      const t = function (t) {\n        const e = t.fieldPaths || [];\n        return new tn(e.map(t => ut.fromServerFormat(t)));\n      }(e.updateMask);\n      return new is(i, r, t, n, s);\n    }\n    return new ss(i, r, n, s);\n  }\n  if (e.delete) {\n    const s = Hs(t, e.delete);\n    return new cs(s, n);\n  }\n  if (e.verify) {\n    const s = Hs(t, e.verify);\n    return new as(s, n);\n  }\n  return $();\n}\nfunction oi(t, e) {\n  return t && t.length > 0 ? (M(void 0 !== e), t.map(t => function (t, e) {\n    // NOTE: Deletes don't have an updateTime.\n    let n = t.updateTime ? Qs(t.updateTime) : Qs(e);\n    return n.isEqual(st.min()) && (\n    // The Firestore Emulator currently returns an update time of 0 for\n    // deletes of non-existing documents (rather than null). This breaks the\n    // test \"get deleted doc while offline with source=cache\" as NoDocuments\n    // with version 0 are filtered by IndexedDb's RemoteDocumentCache.\n    // TODO(#2149): Remove this when Emulator is fixed\n    n = Qs(e)), new Wn(n, t.transformResults || []);\n  }(t, e))) : [];\n}\nfunction ui(t, e) {\n  return {\n    documents: [Js(t, e.path)]\n  };\n}\nfunction ci(t, e) {\n  // Dissect the path into parent, collectionId, and optional key filter.\n  const n = {\n      structuredQuery: {}\n    },\n    s = e.path;\n  null !== e.collectionGroup ? (n.parent = Js(t, s), n.structuredQuery.from = [{\n    collectionId: e.collectionGroup,\n    allDescendants: !0\n  }]) : (n.parent = Js(t, s.popLast()), n.structuredQuery.from = [{\n    collectionId: s.lastSegment()\n  }]);\n  const i = function (t) {\n    if (0 === t.length) return;\n    return gi(Se.create(t, \"and\" /* CompositeOperator.AND */));\n  }(e.filters);\n  i && (n.structuredQuery.where = i);\n  const r = function (t) {\n    if (0 === t.length) return;\n    return t.map(t =>\n    // visible for testing\n    function (t) {\n      return {\n        field: wi(t.field),\n        direction: fi(t.dir)\n      };\n    }(t));\n  }(e.orderBy);\n  r && (n.structuredQuery.orderBy = r);\n  const o = function (t, e) {\n    return t.yt || Gt(e) ? e : {\n      value: e\n    };\n  }\n  /**\n  * Returns a number (or null) from a google.protobuf.Int32Value proto.\n  */(t, e.limit);\n  var u;\n  return null !== o && (n.structuredQuery.limit = o), e.startAt && (n.structuredQuery.startAt = {\n    before: (u = e.startAt).inclusive,\n    values: u.position\n  }), e.endAt && (n.structuredQuery.endAt = function (t) {\n    return {\n      before: !t.inclusive,\n      values: t.position\n    };\n  }(e.endAt)), n;\n}\nfunction ai(t) {\n  let e = Ys(t.parent);\n  const n = t.structuredQuery,\n    s = n.from ? n.from.length : 0;\n  let i = null;\n  if (s > 0) {\n    M(1 === s);\n    const t = n.from[0];\n    t.allDescendants ? i = t.collectionId : e = e.child(t.collectionId);\n  }\n  let r = [];\n  n.where && (r = function (t) {\n    const e = li(t);\n    if (e instanceof Se && xe(e)) return e.getFilters();\n    return [e];\n  }(n.where));\n  let o = [];\n  n.orderBy && (o = n.orderBy.map(t => function (t) {\n    return new je(mi(t.field),\n    // visible for testing\n    function (t) {\n      switch (t) {\n        case \"ASCENDING\":\n          return \"asc\" /* Direction.ASCENDING */;\n\n        case \"DESCENDING\":\n          return \"desc\" /* Direction.DESCENDING */;\n\n        default:\n          return;\n      }\n    }\n    // visible for testing\n    (t.direction));\n  }\n  // visible for testing\n  (t)));\n  let u = null;\n  n.limit && (u = function (t) {\n    let e;\n    return e = \"object\" == typeof t ? t.value : t, Gt(e) ? null : e;\n  }(n.limit));\n  let c = null;\n  n.startAt && (c = function (t) {\n    const e = !!t.before,\n      n = t.values || [];\n    return new Re(n, e);\n  }(n.startAt));\n  let a = null;\n  return n.endAt && (a = function (t) {\n    const e = !t.before,\n      n = t.values || [];\n    return new Re(n, e);\n  }\n  // visible for testing\n  (n.endAt)), _n(e, i, o, r, u, \"F\" /* LimitType.First */, c, a);\n}\nfunction hi(t, e) {\n  const n = function (t, e) {\n    switch (e) {\n      case 0 /* TargetPurpose.Listen */:\n        return null;\n      case 1 /* TargetPurpose.ExistenceFilterMismatch */:\n        return \"existence-filter-mismatch\";\n      case 2 /* TargetPurpose.LimboResolution */:\n        return \"limbo-document\";\n      default:\n        return $();\n    }\n  }(0, e.purpose);\n  return null == n ? null : {\n    \"goog-listen-tags\": n\n  };\n}\nfunction li(t) {\n  return void 0 !== t.unaryFilter ? function (t) {\n    switch (t.unaryFilter.op) {\n      case \"IS_NAN\":\n        const e = mi(t.unaryFilter.field);\n        return Ve.create(e, \"==\" /* Operator.EQUAL */, {\n          doubleValue: NaN\n        });\n      case \"IS_NULL\":\n        const n = mi(t.unaryFilter.field);\n        return Ve.create(n, \"==\" /* Operator.EQUAL */, {\n          nullValue: \"NULL_VALUE\"\n        });\n      case \"IS_NOT_NAN\":\n        const s = mi(t.unaryFilter.field);\n        return Ve.create(s, \"!=\" /* Operator.NOT_EQUAL */, {\n          doubleValue: NaN\n        });\n      case \"IS_NOT_NULL\":\n        const i = mi(t.unaryFilter.field);\n        return Ve.create(i, \"!=\" /* Operator.NOT_EQUAL */, {\n          nullValue: \"NULL_VALUE\"\n        });\n      default:\n        return $();\n    }\n  }(t) : void 0 !== t.fieldFilter ? function (t) {\n    return Ve.create(mi(t.fieldFilter.field), function (t) {\n      switch (t) {\n        case \"EQUAL\":\n          return \"==\" /* Operator.EQUAL */;\n\n        case \"NOT_EQUAL\":\n          return \"!=\" /* Operator.NOT_EQUAL */;\n\n        case \"GREATER_THAN\":\n          return \">\" /* Operator.GREATER_THAN */;\n\n        case \"GREATER_THAN_OR_EQUAL\":\n          return \">=\" /* Operator.GREATER_THAN_OR_EQUAL */;\n\n        case \"LESS_THAN\":\n          return \"<\" /* Operator.LESS_THAN */;\n\n        case \"LESS_THAN_OR_EQUAL\":\n          return \"<=\" /* Operator.LESS_THAN_OR_EQUAL */;\n\n        case \"ARRAY_CONTAINS\":\n          return \"array-contains\" /* Operator.ARRAY_CONTAINS */;\n\n        case \"IN\":\n          return \"in\" /* Operator.IN */;\n\n        case \"NOT_IN\":\n          return \"not-in\" /* Operator.NOT_IN */;\n\n        case \"ARRAY_CONTAINS_ANY\":\n          return \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */;\n\n        default:\n          return $();\n      }\n    }(t.fieldFilter.op), t.fieldFilter.value);\n  }(t) : void 0 !== t.compositeFilter ? function (t) {\n    return Se.create(t.compositeFilter.filters.map(t => li(t)), function (t) {\n      switch (t) {\n        case \"AND\":\n          return \"and\" /* CompositeOperator.AND */;\n\n        case \"OR\":\n          return \"or\" /* CompositeOperator.OR */;\n\n        default:\n          return $();\n      }\n    }(t.compositeFilter.op));\n  }(t) : $();\n}\nfunction fi(t) {\n  return Fs[t];\n}\nfunction di(t) {\n  return Bs[t];\n}\nfunction _i(t) {\n  return Ls[t];\n}\nfunction wi(t) {\n  return {\n    fieldPath: t.canonicalString()\n  };\n}\nfunction mi(t) {\n  return ut.fromServerFormat(t.fieldPath);\n}\nfunction gi(t) {\n  return t instanceof Ve ? function (t) {\n    if (\"==\" /* Operator.EQUAL */ === t.op) {\n      if (me(t.value)) return {\n        unaryFilter: {\n          field: wi(t.field),\n          op: \"IS_NAN\"\n        }\n      };\n      if (we(t.value)) return {\n        unaryFilter: {\n          field: wi(t.field),\n          op: \"IS_NULL\"\n        }\n      };\n    } else if (\"!=\" /* Operator.NOT_EQUAL */ === t.op) {\n      if (me(t.value)) return {\n        unaryFilter: {\n          field: wi(t.field),\n          op: \"IS_NOT_NAN\"\n        }\n      };\n      if (we(t.value)) return {\n        unaryFilter: {\n          field: wi(t.field),\n          op: \"IS_NOT_NULL\"\n        }\n      };\n    }\n    return {\n      fieldFilter: {\n        field: wi(t.field),\n        op: di(t.op),\n        value: t.value\n      }\n    };\n  }(t) : t instanceof Se ? function (t) {\n    const e = t.getFilters().map(t => gi(t));\n    if (1 === e.length) return e[0];\n    return {\n      compositeFilter: {\n        op: _i(t.op),\n        filters: e\n      }\n    };\n  }(t) : $();\n}\nfunction yi(t) {\n  const e = [];\n  return t.fields.forEach(t => e.push(t.canonicalString())), {\n    fieldPaths: e\n  };\n}\nfunction pi(t) {\n  // Resource names have at least 4 components (project ID, database ID)\n  return t.length >= 4 && \"projects\" === t.get(0) && \"databases\" === t.get(2);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Encodes a resource path into a IndexedDb-compatible string form.\n */\nfunction Ii(t) {\n  let e = \"\";\n  for (let n = 0; n < t.length; n++) e.length > 0 && (e = Ei(e)), e = Ti(t.get(n), e);\n  return Ei(e);\n}\n\n/** Encodes a single segment of a resource path into the given result */\nfunction Ti(t, e) {\n  let n = e;\n  const s = t.length;\n  for (let e = 0; e < s; e++) {\n    const s = t.charAt(e);\n    switch (s) {\n      case \"\\0\":\n        n += \"\u0001\u0010\";\n        break;\n      case \"\u0001\":\n        n += \"\u0001\u0011\";\n        break;\n      default:\n        n += s;\n    }\n  }\n  return n;\n}\n\n/** Encodes a path separator into the given result */\nfunction Ei(t) {\n  return t + \"\u0001\u0001\";\n}\n\n/**\n * Decodes the given IndexedDb-compatible string form of a resource path into\n * a ResourcePath instance. Note that this method is not suitable for use with\n * decoding resource names from the server; those are One Platform format\n * strings.\n */\nfunction Ai(t) {\n  // Event the empty path must encode as a path of at least length 2. A path\n  // with exactly 2 must be the empty path.\n  const e = t.length;\n  if (M(e >= 2), 2 === e) return M(\"\u0001\" === t.charAt(0) && \"\u0001\" === t.charAt(1)), rt.emptyPath();\n  // Escape characters cannot exist past the second-to-last position in the\n  // source value.\n  const n = e - 2,\n    s = [];\n  let i = \"\";\n  for (let r = 0; r < e;) {\n    // The last two characters of a valid encoded path must be a separator, so\n    // there must be an end to this segment.\n    const e = t.indexOf(\"\u0001\", r);\n    (e < 0 || e > n) && $();\n    switch (t.charAt(e + 1)) {\n      case \"\u0001\":\n        const n = t.substring(r, e);\n        let o;\n        0 === i.length ?\n        // Avoid copying for the common case of a segment that excludes \\0\n        // and \\001\n        o = n : (i += n, o = i, i = \"\"), s.push(o);\n        break;\n      case \"\u0010\":\n        i += t.substring(r, e), i += \"\\0\";\n        break;\n      case \"\u0011\":\n        // The escape character can be used in the output to encode itself.\n        i += t.substring(r, e + 1);\n        break;\n      default:\n        $();\n    }\n    r = e + 2;\n  }\n  return new rt(s);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Ri = [\"userId\", \"batchId\"];\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Name of the IndexedDb object store.\n *\n * Note that the name 'owner' is chosen to ensure backwards compatibility with\n * older clients that only supported single locked access to the persistence\n * layer.\n */\n/**\n * Creates a [userId, encodedPath] key for use in the DbDocumentMutations\n * index to iterate over all at document mutations for a given path or lower.\n */\nfunction Pi(t, e) {\n  return [t, Ii(e)];\n}\n\n/**\n * Creates a full index key of [userId, encodedPath, batchId] for inserting\n * and deleting into the DbDocumentMutations index.\n */\nfunction vi(t, e, n) {\n  return [t, Ii(e), n];\n}\n\n/**\n * Because we store all the useful information for this store in the key,\n * there is no useful information to store as the value. The raw (unencoded)\n * path cannot be stored because IndexedDb doesn't store prototype\n * information.\n */\nconst bi = {},\n  Vi = [\"prefixPath\", \"collectionGroup\", \"readTime\", \"documentId\"],\n  Si = [\"prefixPath\", \"collectionGroup\", \"documentId\"],\n  Di = [\"collectionGroup\", \"readTime\", \"prefixPath\", \"documentId\"],\n  Ci = [\"canonicalId\", \"targetId\"],\n  xi = [\"targetId\", \"path\"],\n  Ni = [\"path\", \"targetId\"],\n  ki = [\"collectionId\", \"parent\"],\n  $i = [\"indexId\", \"uid\"],\n  Mi = [\"uid\", \"sequenceNumber\"],\n  Oi = [\"indexId\", \"uid\", \"arrayValue\", \"directionalValue\", \"orderedDocumentKey\", \"documentKey\"],\n  Fi = [\"indexId\", \"uid\", \"orderedDocumentKey\"],\n  Bi = [\"userId\", \"collectionPath\", \"documentId\"],\n  Li = [\"userId\", \"collectionPath\", \"largestBatchId\"],\n  qi = [\"userId\", \"collectionGroup\", \"largestBatchId\"],\n  Ui = [...[...[...[...[\"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocuments\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\"], \"clientMetadata\"], \"remoteDocumentGlobal\"], \"collectionParents\"], \"bundles\", \"namedQueries\"],\n  Ki = [...Ui, \"documentOverlays\"],\n  Gi = [\"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocumentsV14\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\", \"clientMetadata\", \"remoteDocumentGlobal\", \"collectionParents\", \"bundles\", \"namedQueries\", \"documentOverlays\"],\n  Qi = Gi,\n  ji = [...Qi, \"indexConfiguration\", \"indexState\", \"indexEntries\"];\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass zi extends Tt {\n  constructor(t, e) {\n    super(), this.re = t, this.currentSequenceNumber = e;\n  }\n}\nfunction Wi(t, e) {\n  const n = F(t);\n  return Pt.M(n.re, e);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A batch of mutations that will be sent as one unit to the backend.\n */\nclass Hi {\n  /**\n   * @param batchId - The unique ID of this mutation batch.\n   * @param localWriteTime - The original write time of this mutation.\n   * @param baseMutations - Mutations that are used to populate the base\n   * values when this mutation is applied locally. This can be used to locally\n   * overwrite values that are persisted in the remote document cache. Base\n   * mutations are never sent to the backend.\n   * @param mutations - The user-provided mutations in this mutation batch.\n   * User-provided mutations are applied both locally and remotely on the\n   * backend.\n   */\n  constructor(t, e, n, s) {\n    this.batchId = t, this.localWriteTime = e, this.baseMutations = n, this.mutations = s;\n  }\n  /**\n   * Applies all the mutations in this MutationBatch to the specified document\n   * to compute the state of the remote document\n   *\n   * @param document - The document to apply mutations to.\n   * @param batchResult - The result of applying the MutationBatch to the\n   * backend.\n   */\n  applyToRemoteDocument(t, e) {\n    const n = e.mutationResults;\n    for (let e = 0; e < this.mutations.length; e++) {\n      const s = this.mutations[e];\n      if (s.key.isEqual(t.key)) {\n        Xn(s, t, n[e]);\n      }\n    }\n  }\n  /**\n   * Computes the local view of a document given all the mutations in this\n   * batch.\n   *\n   * @param document - The document to apply mutations to.\n   * @param mutatedFields - Fields that have been updated before applying this mutation batch.\n   * @returns A `FieldMask` representing all the fields that are mutated.\n   */\n  applyToLocalView(t, e) {\n    // First, apply the base state. This allows us to apply non-idempotent\n    // transform against a consistent set of values.\n    for (const n of this.baseMutations) n.key.isEqual(t.key) && (e = ts(n, t, e, this.localWriteTime));\n    // Second, apply all user-provided mutations.\n    for (const n of this.mutations) n.key.isEqual(t.key) && (e = ts(n, t, e, this.localWriteTime));\n    return e;\n  }\n  /**\n   * Computes the local view for all provided documents given the mutations in\n   * this batch. Returns a `DocumentKey` to `Mutation` map which can be used to\n   * replace all the mutation applications.\n   */\n  applyToLocalDocumentSet(t, e) {\n    // TODO(mrschmidt): This implementation is O(n^2). If we apply the mutations\n    // directly (as done in `applyToLocalView()`), we can reduce the complexity\n    // to O(n).\n    const n = Es();\n    return this.mutations.forEach(s => {\n      const i = t.get(s.key),\n        r = i.overlayedDocument;\n      // TODO(mutabledocuments): This method should take a MutableDocumentMap\n      // and we should remove this cast.\n      let o = this.applyToLocalView(r, i.mutatedFields);\n      // Set mutatedFields to null if the document is only from local mutations.\n      // This creates a Set or Delete mutation, instead of trying to create a\n      // patch mutation as the overlay.\n      o = e.has(s.key) ? null : o;\n      const u = Zn(r, o);\n      null !== u && n.set(s.key, u), r.isValidDocument() || r.convertToNoDocument(st.min());\n    }), n;\n  }\n  keys() {\n    return this.mutations.reduce((t, e) => t.add(e.key), vs());\n  }\n  isEqual(t) {\n    return this.batchId === t.batchId && tt(this.mutations, t.mutations, (t, e) => ns(t, e)) && tt(this.baseMutations, t.baseMutations, (t, e) => ns(t, e));\n  }\n}\n\n/** The result of applying a mutation batch to the backend. */\nclass Ji {\n  constructor(t, e, n,\n  /**\n   * A pre-computed mapping from each mutated document to the resulting\n   * version.\n   */\n  s) {\n    this.batch = t, this.commitVersion = e, this.mutationResults = n, this.docVersions = s;\n  }\n  /**\n   * Creates a new MutationBatchResult for the given batch and results. There\n   * must be one result for each mutation in the batch. This static factory\n   * caches a document=&gt;version mapping (docVersions).\n   */\n  static from(t, e, n) {\n    M(t.mutations.length === n.length);\n    let s = Rs;\n    const i = t.mutations;\n    for (let t = 0; t < i.length; t++) s = s.insert(i[t].key, n[t].version);\n    return new Ji(t, e, n, s);\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Representation of an overlay computed by Firestore.\n *\n * Holds information about a mutation and the largest batch id in Firestore when\n * the mutation was created.\n */\nclass Yi {\n  constructor(t, e) {\n    this.largestBatchId = t, this.mutation = e;\n  }\n  getKey() {\n    return this.mutation.key;\n  }\n  isEqual(t) {\n    return null !== t && this.mutation === t.mutation;\n  }\n  toString() {\n    return `Overlay{\\n      largestBatchId: ${this.largestBatchId},\\n      mutation: ${this.mutation.toString()}\\n    }`;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable set of metadata that the local store tracks for each target.\n */\nclass Zi {\n  constructor( /** The target being listened to. */\n  t,\n  /**\n   * The target ID to which the target corresponds; Assigned by the\n   * LocalStore for user listens and by the SyncEngine for limbo watches.\n   */\n  e, /** The purpose of the target. */\n  n,\n  /**\n   * The sequence number of the last transaction during which this target data\n   * was modified.\n   */\n  s, /** The latest snapshot version seen for this target. */\n  i = st.min()\n  /**\n   * The maximum snapshot version at which the associated view\n   * contained no limbo documents.\n   */, r = st.min()\n  /**\n   * An opaque, server-assigned token that allows watching a target to be\n   * resumed after disconnecting without retransmitting all the data that\n   * matches the target. The resume token essentially identifies a point in\n   * time from which the server should resume sending results.\n   */, o = Ht.EMPTY_BYTE_STRING) {\n    this.target = t, this.targetId = e, this.purpose = n, this.sequenceNumber = s, this.snapshotVersion = i, this.lastLimboFreeSnapshotVersion = r, this.resumeToken = o;\n  }\n  /** Creates a new target data instance with an updated sequence number. */\n  withSequenceNumber(t) {\n    return new Zi(this.target, this.targetId, this.purpose, t, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken);\n  }\n  /**\n   * Creates a new target data instance with an updated resume token and\n   * snapshot version.\n   */\n  withResumeToken(t, e) {\n    return new Zi(this.target, this.targetId, this.purpose, this.sequenceNumber, e, this.lastLimboFreeSnapshotVersion, t);\n  }\n  /**\n   * Creates a new target data instance with an updated last limbo free\n   * snapshot version number.\n   */\n  withLastLimboFreeSnapshotVersion(t) {\n    return new Zi(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, t, this.resumeToken);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Serializer for values stored in the LocalStore. */\nclass Xi {\n  constructor(t) {\n    this.oe = t;\n  }\n}\n\n/** Decodes a remote document from storage locally to a Document. */\nfunction tr(t, e) {\n  let n;\n  if (e.document) n = ei(t.oe, e.document, !!e.hasCommittedMutations);else if (e.noDocument) {\n    const t = ct.fromSegments(e.noDocument.path),\n      s = ir(e.noDocument.readTime);\n    n = sn.newNoDocument(t, s), e.hasCommittedMutations && n.setHasCommittedMutations();\n  } else {\n    if (!e.unknownDocument) return $();\n    {\n      const t = ct.fromSegments(e.unknownDocument.path),\n        s = ir(e.unknownDocument.version);\n      n = sn.newUnknownDocument(t, s);\n    }\n  }\n  return e.readTime && n.setReadTime(function (t) {\n    const e = new nt(t[0], t[1]);\n    return st.fromTimestamp(e);\n  }(e.readTime)), n;\n}\n\n/** Encodes a document for storage locally. */\nfunction er(t, e) {\n  const n = e.key,\n    s = {\n      prefixPath: n.getCollectionPath().popLast().toArray(),\n      collectionGroup: n.collectionGroup,\n      documentId: n.path.lastSegment(),\n      readTime: nr(e.readTime),\n      hasCommittedMutations: e.hasCommittedMutations\n    };\n  if (e.isFoundDocument()) s.document = function (t, e) {\n    return {\n      name: Ws(t, e.key),\n      fields: e.data.value.mapValue.fields,\n      updateTime: Us(t, e.version.toTimestamp()),\n      createTime: Us(t, e.createTime.toTimestamp())\n    };\n  }(t.oe, e);else if (e.isNoDocument()) s.noDocument = {\n    path: n.path.toArray(),\n    readTime: sr(e.version)\n  };else {\n    if (!e.isUnknownDocument()) return $();\n    s.unknownDocument = {\n      path: n.path.toArray(),\n      version: sr(e.version)\n    };\n  }\n  return s;\n}\nfunction nr(t) {\n  const e = t.toTimestamp();\n  return [e.seconds, e.nanoseconds];\n}\nfunction sr(t) {\n  const e = t.toTimestamp();\n  return {\n    seconds: e.seconds,\n    nanoseconds: e.nanoseconds\n  };\n}\nfunction ir(t) {\n  const e = new nt(t.seconds, t.nanoseconds);\n  return st.fromTimestamp(e);\n}\n\n/** Encodes a batch of mutations into a DbMutationBatch for local storage. */\n/** Decodes a DbMutationBatch into a MutationBatch */\nfunction rr(t, e) {\n  const n = (e.baseMutations || []).map(e => ri(t.oe, e));\n  // Squash old transform mutations into existing patch or set mutations.\n  // The replacement of representing `transforms` with `update_transforms`\n  // on the SDK means that old `transform` mutations stored in IndexedDB need\n  // to be updated to `update_transforms`.\n  // TODO(b/174608374): Remove this code once we perform a schema migration.\n  for (let t = 0; t < e.mutations.length - 1; ++t) {\n    const n = e.mutations[t];\n    if (t + 1 < e.mutations.length && void 0 !== e.mutations[t + 1].transform) {\n      const s = e.mutations[t + 1];\n      n.updateTransforms = s.transform.fieldTransforms, e.mutations.splice(t + 1, 1), ++t;\n    }\n  }\n  const s = e.mutations.map(e => ri(t.oe, e)),\n    i = nt.fromMillis(e.localWriteTimeMs);\n  return new Hi(e.batchId, i, n, s);\n}\n\n/** Decodes a DbTarget into TargetData */\nfunction or(t) {\n  const e = ir(t.readTime),\n    n = void 0 !== t.lastLimboFreeSnapshotVersion ? ir(t.lastLimboFreeSnapshotVersion) : st.min();\n  let s;\n  var i;\n  return void 0 !== t.query.documents ? (M(1 === (i = t.query).documents.length), s = Tn(wn(Ys(i.documents[0])))) : s = function (t) {\n    return Tn(ai(t));\n  }(t.query), new Zi(s, t.targetId, 0 /* TargetPurpose.Listen */, t.lastListenSequenceNumber, e, n, Ht.fromBase64String(t.resumeToken));\n}\n\n/** Encodes TargetData into a DbTarget for storage locally. */\nfunction ur(t, e) {\n  const n = sr(e.snapshotVersion),\n    s = sr(e.lastLimboFreeSnapshotVersion);\n  let i;\n  i = an(e.target) ? ui(t.oe, e.target) : ci(t.oe, e.target);\n  // We can't store the resumeToken as a ByteString in IndexedDb, so we\n  // convert it to a base64 string for storage.\n  const r = e.resumeToken.toBase64();\n  // lastListenSequenceNumber is always 0 until we do real GC.\n  return {\n    targetId: e.targetId,\n    canonicalId: un(e.target),\n    readTime: n,\n    resumeToken: r,\n    lastListenSequenceNumber: e.sequenceNumber,\n    lastLimboFreeSnapshotVersion: s,\n    query: i\n  };\n}\n\n/**\n * A helper function for figuring out what kind of query has been stored.\n */\n/**\n * Encodes a `BundledQuery` from bundle proto to a Query object.\n *\n * This reconstructs the original query used to build the bundle being loaded,\n * including features exists only in SDKs (for example: limit-to-last).\n */\nfunction cr(t) {\n  const e = ai({\n    parent: t.parent,\n    structuredQuery: t.structuredQuery\n  });\n  return \"LAST\" === t.limitType ? An(e, e.limit, \"L\" /* LimitType.Last */) : e;\n}\n\n/** Encodes a NamedQuery proto object to a NamedQuery model object. */\n/** Encodes a DbDocumentOverlay object to an Overlay model object. */\nfunction ar(t, e) {\n  return new Yi(e.largestBatchId, ri(t.oe, e.overlayMutation));\n}\n\n/** Decodes an Overlay model object into a DbDocumentOverlay object. */\n/**\n * Returns the DbDocumentOverlayKey corresponding to the given user and\n * document key.\n */\nfunction hr(t, e) {\n  const n = e.path.lastSegment();\n  return [t, Ii(e.path.popLast()), n];\n}\nfunction lr(t, e, n, s) {\n  return {\n    indexId: t,\n    uid: e.uid || \"\",\n    sequenceNumber: n,\n    readTime: sr(s.readTime),\n    documentKey: Ii(s.documentKey.path),\n    largestBatchId: s.largestBatchId\n  };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass fr {\n  getBundleMetadata(t, e) {\n    return dr(t).get(e).next(t => {\n      if (t) return {\n        id: (e = t).bundleId,\n        createTime: ir(e.createTime),\n        version: e.version\n      };\n      /** Encodes a DbBundle to a BundleMetadata object. */\n      var e;\n      /** Encodes a BundleMetadata to a DbBundle. */\n    });\n  }\n\n  saveBundleMetadata(t, e) {\n    return dr(t).put({\n      bundleId: (n = e).id,\n      createTime: sr(Qs(n.createTime)),\n      version: n.version\n    });\n    var n;\n    /** Encodes a DbNamedQuery to a NamedQuery. */\n  }\n  getNamedQuery(t, e) {\n    return _r(t).get(e).next(t => {\n      if (t) return {\n        name: (e = t).name,\n        query: cr(e.bundledQuery),\n        readTime: ir(e.readTime)\n      };\n      var e;\n      /** Encodes a NamedQuery from a bundle proto to a DbNamedQuery. */\n    });\n  }\n\n  saveNamedQuery(t, e) {\n    return _r(t).put(function (t) {\n      return {\n        name: t.name,\n        readTime: sr(Qs(t.readTime)),\n        bundledQuery: t.bundledQuery\n      };\n    }(e));\n  }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the bundles object store.\n */\nfunction dr(t) {\n  return Wi(t, \"bundles\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the namedQueries object store.\n */\nfunction _r(t) {\n  return Wi(t, \"namedQueries\");\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implementation of DocumentOverlayCache using IndexedDb.\n */\nclass wr {\n  /**\n   * @param serializer - The document serializer.\n   * @param userId - The userId for which we are accessing overlays.\n   */\n  constructor(t, e) {\n    this.Tt = t, this.userId = e;\n  }\n  static ue(t, e) {\n    const n = e.uid || \"\";\n    return new wr(t, n);\n  }\n  getOverlay(t, e) {\n    return mr(t).get(hr(this.userId, e)).next(t => t ? ar(this.Tt, t) : null);\n  }\n  getOverlays(t, e) {\n    const n = Ts();\n    return At.forEach(e, e => this.getOverlay(t, e).next(t => {\n      null !== t && n.set(e, t);\n    })).next(() => n);\n  }\n  saveOverlays(t, e, n) {\n    const s = [];\n    return n.forEach((n, i) => {\n      const r = new Yi(e, i);\n      s.push(this.ce(t, r));\n    }), At.waitFor(s);\n  }\n  removeOverlaysForBatchId(t, e, n) {\n    const s = new Set();\n    // Get the set of unique collection paths.\n    e.forEach(t => s.add(Ii(t.getCollectionPath())));\n    const i = [];\n    return s.forEach(e => {\n      const s = IDBKeyRange.bound([this.userId, e, n], [this.userId, e, n + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n      i.push(mr(t).Y(\"collectionPathOverlayIndex\", s));\n    }), At.waitFor(i);\n  }\n  getOverlaysForCollection(t, e, n) {\n    const s = Ts(),\n      i = Ii(e),\n      r = IDBKeyRange.bound([this.userId, i, n], [this.userId, i, Number.POSITIVE_INFINITY], /*lowerOpen=*/!0);\n    return mr(t).W(\"collectionPathOverlayIndex\", r).next(t => {\n      for (const e of t) {\n        const t = ar(this.Tt, e);\n        s.set(t.getKey(), t);\n      }\n      return s;\n    });\n  }\n  getOverlaysForCollectionGroup(t, e, n, s) {\n    const i = Ts();\n    let r;\n    // We want batch IDs larger than `sinceBatchId`, and so the lower bound\n    // is not inclusive.\n    const o = IDBKeyRange.bound([this.userId, e, n], [this.userId, e, Number.POSITIVE_INFINITY], /*lowerOpen=*/!0);\n    return mr(t).X({\n      index: \"collectionGroupOverlayIndex\",\n      range: o\n    }, (t, e, n) => {\n      // We do not want to return partial batch overlays, even if the size\n      // of the result set exceeds the given `count` argument. Therefore, we\n      // continue to aggregate results even after the result size exceeds\n      // `count` if there are more overlays from the `currentBatchId`.\n      const o = ar(this.Tt, e);\n      i.size() < s || o.largestBatchId === r ? (i.set(o.getKey(), o), r = o.largestBatchId) : n.done();\n    }).next(() => i);\n  }\n  ce(t, e) {\n    return mr(t).put(function (t, e, n) {\n      const [s, i, r] = hr(e, n.mutation.key);\n      return {\n        userId: e,\n        collectionPath: i,\n        documentId: r,\n        collectionGroup: n.mutation.key.getCollectionGroup(),\n        largestBatchId: n.largestBatchId,\n        overlayMutation: ii(t.oe, n.mutation)\n      };\n    }(this.Tt, this.userId, e));\n  }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document overlay object store.\n */\nfunction mr(t) {\n  return Wi(t, \"documentOverlays\");\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Note: This code is copied from the backend. Code that is not used by\n// Firestore was removed.\n/** Firestore index value writer.  */\nclass gr {\n  constructor() {}\n  // The write methods below short-circuit writing terminators for values\n  // containing a (terminating) truncated value.\n  // As an example, consider the resulting encoding for:\n  // [\"bar\", [2, \"foo\"]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TERM, TERM, TERM)\n  // [\"bar\", [2, truncated(\"foo\")]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TRUNC)\n  // [\"bar\", truncated([\"foo\"])] -> (STRING, \"bar\", TERM, ARRAY. STRING, \"foo\", TERM, TRUNC)\n  /** Writes an index value.  */\n  ae(t, e) {\n    this.he(t, e),\n    // Write separator to split index values\n    // (see go/firestore-storage-format#encodings).\n    e.le();\n  }\n  he(t, e) {\n    if (\"nullValue\" in t) this.fe(e, 5);else if (\"booleanValue\" in t) this.fe(e, 10), e.de(t.booleanValue ? 1 : 0);else if (\"integerValue\" in t) this.fe(e, 15), e.de(Zt(t.integerValue));else if (\"doubleValue\" in t) {\n      const n = Zt(t.doubleValue);\n      isNaN(n) ? this.fe(e, 13) : (this.fe(e, 15), Qt(n) ?\n      // -0.0, 0 and 0.0 are all considered the same\n      e.de(0) : e.de(n));\n    } else if (\"timestampValue\" in t) {\n      const n = t.timestampValue;\n      this.fe(e, 20), \"string\" == typeof n ? e._e(n) : (e._e(`${n.seconds || \"\"}`), e.de(n.nanos || 0));\n    } else if (\"stringValue\" in t) this.we(t.stringValue, e), this.me(e);else if (\"bytesValue\" in t) this.fe(e, 30), e.ge(Xt(t.bytesValue)), this.me(e);else if (\"referenceValue\" in t) this.ye(t.referenceValue, e);else if (\"geoPointValue\" in t) {\n      const n = t.geoPointValue;\n      this.fe(e, 45), e.de(n.latitude || 0), e.de(n.longitude || 0);\n    } else \"mapValue\" in t ? pe(t) ? this.fe(e, Number.MAX_SAFE_INTEGER) : (this.pe(t.mapValue, e), this.me(e)) : \"arrayValue\" in t ? (this.Ie(t.arrayValue, e), this.me(e)) : $();\n  }\n  we(t, e) {\n    this.fe(e, 25), this.Te(t, e);\n  }\n  Te(t, e) {\n    e._e(t);\n  }\n  pe(t, e) {\n    const n = t.fields || {};\n    this.fe(e, 55);\n    for (const t of Object.keys(n)) this.we(t, e), this.he(n[t], e);\n  }\n  Ie(t, e) {\n    const n = t.values || [];\n    this.fe(e, 50);\n    for (const t of n) this.he(t, e);\n  }\n  ye(t, e) {\n    this.fe(e, 37);\n    ct.fromName(t).path.forEach(t => {\n      this.fe(e, 60), this.Te(t, e);\n    });\n  }\n  fe(t, e) {\n    t.de(e);\n  }\n  me(t) {\n    // While the SDK does not implement truncation, the truncation marker is\n    // used to terminate all variable length values (which are strings, bytes,\n    // references, arrays and maps).\n    t.de(2);\n  }\n}\ngr.Ee = new gr();\n\n/**\n * Counts the number of zeros in a byte.\n *\n * Visible for testing.\n */\nfunction yr(t) {\n  if (0 === t) return 8;\n  let e = 0;\n  return t >> 4 == 0 && (\n  // Test if the first four bits are zero.\n  e += 4, t <<= 4), t >> 6 == 0 && (\n  // Test if the first two (or next two) bits are zero.\n  e += 2, t <<= 2), t >> 7 == 0 && (\n  // Test if the remaining bit is zero.\n  e += 1), e;\n}\n\n/** Counts the number of leading zeros in the given byte array. */\n/**\n * Returns the number of bytes required to store \"value\". Leading zero bytes\n * are skipped.\n */\nfunction pr(t) {\n  // This is just the number of bytes for the unsigned representation of the number.\n  const e = 64 - function (t) {\n    let e = 0;\n    for (let n = 0; n < 8; ++n) {\n      const s = yr(255 & t[n]);\n      if (e += s, 8 !== s) break;\n    }\n    return e;\n  }(t);\n  return Math.ceil(e / 8);\n}\n\n/**\n * OrderedCodeWriter is a minimal-allocation implementation of the writing\n * behavior defined by the backend.\n *\n * The code is ported from its Java counterpart.\n */\nclass Ir {\n  constructor() {\n    this.buffer = new Uint8Array(1024), this.position = 0;\n  }\n  Ae(t) {\n    const e = t[Symbol.iterator]();\n    let n = e.next();\n    for (; !n.done;) this.Re(n.value), n = e.next();\n    this.Pe();\n  }\n  ve(t) {\n    const e = t[Symbol.iterator]();\n    let n = e.next();\n    for (; !n.done;) this.be(n.value), n = e.next();\n    this.Ve();\n  }\n  /** Writes utf8 bytes into this byte sequence, ascending. */\n  Se(t) {\n    for (const e of t) {\n      const t = e.charCodeAt(0);\n      if (t < 128) this.Re(t);else if (t < 2048) this.Re(960 | t >>> 6), this.Re(128 | 63 & t);else if (e < \"\\ud800\" || \"\\udbff\" < e) this.Re(480 | t >>> 12), this.Re(128 | 63 & t >>> 6), this.Re(128 | 63 & t);else {\n        const t = e.codePointAt(0);\n        this.Re(240 | t >>> 18), this.Re(128 | 63 & t >>> 12), this.Re(128 | 63 & t >>> 6), this.Re(128 | 63 & t);\n      }\n    }\n    this.Pe();\n  }\n  /** Writes utf8 bytes into this byte sequence, descending */\n  De(t) {\n    for (const e of t) {\n      const t = e.charCodeAt(0);\n      if (t < 128) this.be(t);else if (t < 2048) this.be(960 | t >>> 6), this.be(128 | 63 & t);else if (e < \"\\ud800\" || \"\\udbff\" < e) this.be(480 | t >>> 12), this.be(128 | 63 & t >>> 6), this.be(128 | 63 & t);else {\n        const t = e.codePointAt(0);\n        this.be(240 | t >>> 18), this.be(128 | 63 & t >>> 12), this.be(128 | 63 & t >>> 6), this.be(128 | 63 & t);\n      }\n    }\n    this.Ve();\n  }\n  Ce(t) {\n    // Values are encoded with a single byte length prefix, followed by the\n    // actual value in big-endian format with leading 0 bytes dropped.\n    const e = this.xe(t),\n      n = pr(e);\n    this.Ne(1 + n), this.buffer[this.position++] = 255 & n;\n    // Write the length\n    for (let t = e.length - n; t < e.length; ++t) this.buffer[this.position++] = 255 & e[t];\n  }\n  ke(t) {\n    // Values are encoded with a single byte length prefix, followed by the\n    // inverted value in big-endian format with leading 0 bytes dropped.\n    const e = this.xe(t),\n      n = pr(e);\n    this.Ne(1 + n), this.buffer[this.position++] = ~(255 & n);\n    // Write the length\n    for (let t = e.length - n; t < e.length; ++t) this.buffer[this.position++] = ~(255 & e[t]);\n  }\n  /**\n   * Writes the \"infinity\" byte sequence that sorts after all other byte\n   * sequences written in ascending order.\n   */\n  $e() {\n    this.Me(255), this.Me(255);\n  }\n  /**\n   * Writes the \"infinity\" byte sequence that sorts before all other byte\n   * sequences written in descending order.\n   */\n  Oe() {\n    this.Fe(255), this.Fe(255);\n  }\n  /**\n   * Resets the buffer such that it is the same as when it was newly\n   * constructed.\n   */\n  reset() {\n    this.position = 0;\n  }\n  seed(t) {\n    this.Ne(t.length), this.buffer.set(t, this.position), this.position += t.length;\n  }\n  /** Makes a copy of the encoded bytes in this buffer.  */\n  Be() {\n    return this.buffer.slice(0, this.position);\n  }\n  /**\n   * Encodes `val` into an encoding so that the order matches the IEEE 754\n   * floating-point comparison results with the following exceptions:\n   *   -0.0 < 0.0\n   *   all non-NaN < NaN\n   *   NaN = NaN\n   */\n  xe(t) {\n    const e = /** Converts a JavaScript number to a byte array (using big endian encoding). */\n      function (t) {\n        const e = new DataView(new ArrayBuffer(8));\n        return e.setFloat64(0, t, /* littleEndian= */!1), new Uint8Array(e.buffer);\n      }(t),\n      n = 0 != (128 & e[0]);\n    // Check if the first bit is set. We use a bit mask since value[0] is\n    // encoded as a number from 0 to 255.\n    // Revert the two complement to get natural ordering\n    e[0] ^= n ? 255 : 128;\n    for (let t = 1; t < e.length; ++t) e[t] ^= n ? 255 : 0;\n    return e;\n  }\n  /** Writes a single byte ascending to the buffer. */\n  Re(t) {\n    const e = 255 & t;\n    0 === e ? (this.Me(0), this.Me(255)) : 255 === e ? (this.Me(255), this.Me(0)) : this.Me(e);\n  }\n  /** Writes a single byte descending to the buffer.  */\n  be(t) {\n    const e = 255 & t;\n    0 === e ? (this.Fe(0), this.Fe(255)) : 255 === e ? (this.Fe(255), this.Fe(0)) : this.Fe(t);\n  }\n  Pe() {\n    this.Me(0), this.Me(1);\n  }\n  Ve() {\n    this.Fe(0), this.Fe(1);\n  }\n  Me(t) {\n    this.Ne(1), this.buffer[this.position++] = t;\n  }\n  Fe(t) {\n    this.Ne(1), this.buffer[this.position++] = ~t;\n  }\n  Ne(t) {\n    const e = t + this.position;\n    if (e <= this.buffer.length) return;\n    // Try doubling.\n    let n = 2 * this.buffer.length;\n    // Still not big enough? Just allocate the right size.\n    n < e && (n = e);\n    // Create the new buffer.\n    const s = new Uint8Array(n);\n    s.set(this.buffer),\n    // copy old data\n    this.buffer = s;\n  }\n}\nclass Tr {\n  constructor(t) {\n    this.Le = t;\n  }\n  ge(t) {\n    this.Le.Ae(t);\n  }\n  _e(t) {\n    this.Le.Se(t);\n  }\n  de(t) {\n    this.Le.Ce(t);\n  }\n  le() {\n    this.Le.$e();\n  }\n}\nclass Er {\n  constructor(t) {\n    this.Le = t;\n  }\n  ge(t) {\n    this.Le.ve(t);\n  }\n  _e(t) {\n    this.Le.De(t);\n  }\n  de(t) {\n    this.Le.ke(t);\n  }\n  le() {\n    this.Le.Oe();\n  }\n}\n\n/**\n * Implements `DirectionalIndexByteEncoder` using `OrderedCodeWriter` for the\n * actual encoding.\n */\nclass Ar {\n  constructor() {\n    this.Le = new Ir(), this.qe = new Tr(this.Le), this.Ue = new Er(this.Le);\n  }\n  seed(t) {\n    this.Le.seed(t);\n  }\n  Ke(t) {\n    return 0 /* IndexKind.ASCENDING */ === t ? this.qe : this.Ue;\n  }\n  Be() {\n    return this.Le.Be();\n  }\n  reset() {\n    this.Le.reset();\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Represents an index entry saved by the SDK in persisted storage. */\nclass Rr {\n  constructor(t, e, n, s) {\n    this.indexId = t, this.documentKey = e, this.arrayValue = n, this.directionalValue = s;\n  }\n  /**\n   * Returns an IndexEntry entry that sorts immediately after the current\n   * directional value.\n   */\n  Ge() {\n    const t = this.directionalValue.length,\n      e = 0 === t || 255 === this.directionalValue[t - 1] ? t + 1 : t,\n      n = new Uint8Array(e);\n    return n.set(this.directionalValue, 0), e !== t ? n.set([0], this.directionalValue.length) : ++n[n.length - 1], new Rr(this.indexId, this.documentKey, this.arrayValue, n);\n  }\n}\nfunction Pr(t, e) {\n  let n = t.indexId - e.indexId;\n  return 0 !== n ? n : (n = vr(t.arrayValue, e.arrayValue), 0 !== n ? n : (n = vr(t.directionalValue, e.directionalValue), 0 !== n ? n : ct.comparator(t.documentKey, e.documentKey)));\n}\nfunction vr(t, e) {\n  for (let n = 0; n < t.length && n < e.length; ++n) {\n    const s = t[n] - e[n];\n    if (0 !== s) return s;\n  }\n  return t.length - e.length;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A light query planner for Firestore.\n *\n * This class matches a `FieldIndex` against a Firestore Query `Target`. It\n * determines whether a given index can be used to serve the specified target.\n *\n * The following table showcases some possible index configurations:\n *\n * Query                                               | Index\n * -----------------------------------------------------------------------------\n * where('a', '==', 'a').where('b', '==', 'b')         | a ASC, b DESC\n * where('a', '==', 'a').where('b', '==', 'b')         | a ASC\n * where('a', '==', 'a').where('b', '==', 'b')         | b DESC\n * where('a', '>=', 'a').orderBy('a')                  | a ASC\n * where('a', '>=', 'a').orderBy('a', 'desc')          | a DESC\n * where('a', '>=', 'a').orderBy('a').orderBy('b')     | a ASC, b ASC\n * where('a', '>=', 'a').orderBy('a').orderBy('b')     | a ASC\n * where('a', 'array-contains', 'a').orderBy('b')      | a CONTAINS, b ASCENDING\n * where('a', 'array-contains', 'a').orderBy('b')      | a CONTAINS\n */\nclass br {\n  constructor(t) {\n    this.collectionId = null != t.collectionGroup ? t.collectionGroup : t.path.lastSegment(), this.Qe = t.orderBy, this.je = [];\n    for (const e of t.filters) {\n      const t = e;\n      t.isInequality() ? this.ze = t : this.je.push(t);\n    }\n  }\n  /**\n   * Returns whether the index can be used to serve the TargetIndexMatcher's\n   * target.\n   *\n   * An index is considered capable of serving the target when:\n   * - The target uses all index segments for its filters and orderBy clauses.\n   *   The target can have additional filter and orderBy clauses, but not\n   *   fewer.\n   * - If an ArrayContains/ArrayContainsAnyfilter is used, the index must also\n   *   have a corresponding `CONTAINS` segment.\n   * - All directional index segments can be mapped to the target as a series of\n   *   equality filters, a single inequality filter and a series of orderBy\n   *   clauses.\n   * - The segments that represent the equality filters may appear out of order.\n   * - The optional segment for the inequality filter must appear after all\n   *   equality segments.\n   * - The segments that represent that orderBy clause of the target must appear\n   *   in order after all equality and inequality segments. Single orderBy\n   *   clauses cannot be skipped, but a continuous orderBy suffix may be\n   *   omitted.\n   */\n  We(t) {\n    M(t.collectionGroup === this.collectionId);\n    // If there is an array element, find a matching filter.\n    const e = ht(t);\n    if (void 0 !== e && !this.He(e)) return !1;\n    const n = lt(t);\n    let s = 0,\n      i = 0;\n    // Process all equalities first. Equalities can appear out of order.\n    for (; s < n.length && this.He(n[s]); ++s);\n    // If we already have processed all segments, all segments are used to serve\n    // the equality filters and we do not need to map any segments to the\n    // target's inequality and orderBy clauses.\n    if (s === n.length) return !0;\n    // If there is an inequality filter, the next segment must match both the\n    // filter and the first orderBy clause.\n    if (void 0 !== this.ze) {\n      const t = n[s];\n      if (!this.Je(this.ze, t) || !this.Ye(this.Qe[i++], t)) return !1;\n      ++s;\n    }\n    // All remaining segments need to represent the prefix of the target's\n    // orderBy.\n    for (; s < n.length; ++s) {\n      const t = n[s];\n      if (i >= this.Qe.length || !this.Ye(this.Qe[i++], t)) return !1;\n    }\n    return !0;\n  }\n  He(t) {\n    for (const e of this.je) if (this.Je(e, t)) return !0;\n    return !1;\n  }\n  Je(t, e) {\n    if (void 0 === t || !t.field.isEqual(e.fieldPath)) return !1;\n    const n = \"array-contains\" /* Operator.ARRAY_CONTAINS */ === t.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === t.op;\n    return 2 /* IndexKind.CONTAINS */ === e.kind === n;\n  }\n  Ye(t, e) {\n    return !!t.field.isEqual(e.fieldPath) && (0 /* IndexKind.ASCENDING */ === e.kind && \"asc\" /* Direction.ASCENDING */ === t.dir || 1 /* IndexKind.DESCENDING */ === e.kind && \"desc\" /* Direction.DESCENDING */ === t.dir);\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides utility functions that help with boolean logic transformations needed for handling\n * complex filters used in queries.\n */\n/**\n * The `in` filter is only a syntactic sugar over a disjunction of equalities. For instance: `a in\n * [1,2,3]` is in fact `a==1 || a==2 || a==3`. This method expands any `in` filter in the given\n * input into a disjunction of equality filters and returns the expanded filter.\n */\nfunction Vr(t) {\n  var e, n;\n  if (M(t instanceof Ve || t instanceof Se), t instanceof Ve) {\n    if (t instanceof Ke) {\n      const s = (null === (n = null === (e = t.value.arrayValue) || void 0 === e ? void 0 : e.values) || void 0 === n ? void 0 : n.map(e => Ve.create(t.field, \"==\" /* Operator.EQUAL */, e))) || [];\n      return Se.create(s, \"or\" /* CompositeOperator.OR */);\n    }\n    // We have reached other kinds of field filters.\n    return t;\n  }\n  // We have a composite filter.\n  const s = t.filters.map(t => Vr(t));\n  return Se.create(s, t.op);\n}\n\n/**\n * Given a composite filter, returns the list of terms in its disjunctive normal form.\n *\n * <p>Each element in the return value is one term of the resulting DNF. For instance: For the\n * input: (A || B) && C, the DNF form is: (A && C) || (B && C), and the return value is a list\n * with two elements: a composite filter that performs (A && C), and a composite filter that\n * performs (B && C).\n *\n * @param filter the composite filter to calculate DNF transform for.\n * @return the terms in the DNF transform.\n */\nfunction Sr(t) {\n  if (0 === t.getFilters().length) return [];\n  const e = Nr(Vr(t));\n  return M(xr(e)), Dr(e) || Cr(e) ? [e] : e.getFilters();\n}\n\n/** Returns true if the given filter is a single field filter. e.g. (a == 10). */\nfunction Dr(t) {\n  return t instanceof Ve;\n}\n\n/**\n * Returns true if the given filter is the conjunction of one or more field filters. e.g. (a == 10\n * && b == 20)\n */\nfunction Cr(t) {\n  return t instanceof Se && xe(t);\n}\n\n/**\n * Returns whether or not the given filter is in disjunctive normal form (DNF).\n *\n * <p>In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical\n * formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs.\n *\n * <p>For more info, visit: https://en.wikipedia.org/wiki/Disjunctive_normal_form\n */\nfunction xr(t) {\n  return Dr(t) || Cr(t) ||\n  /**\n  * Returns true if the given filter is the disjunction of one or more \"flat conjunctions\" and\n  * field filters. e.g. (a == 10) || (b==20 && c==30)\n  */\n  function (t) {\n    if (t instanceof Se && Ce(t)) {\n      for (const e of t.getFilters()) if (!Dr(e) && !Cr(e)) return !1;\n      return !0;\n    }\n    return !1;\n  }(t);\n}\nfunction Nr(t) {\n  if (M(t instanceof Ve || t instanceof Se), t instanceof Ve) return t;\n  if (1 === t.filters.length) return Nr(t.filters[0]);\n  // Compute DNF for each of the subfilters first\n  const e = t.filters.map(t => Nr(t));\n  let n = Se.create(e, t.op);\n  return n = Mr(n), xr(n) ? n : (M(n instanceof Se), M(De(n)), M(n.filters.length > 1), n.filters.reduce((t, e) => kr(t, e)));\n}\nfunction kr(t, e) {\n  let n;\n  return M(t instanceof Ve || t instanceof Se), M(e instanceof Ve || e instanceof Se),\n  // FieldFilter FieldFilter\n  n = t instanceof Ve ? e instanceof Ve ? function (t, e) {\n    // Conjunction distribution for two field filters is the conjunction of them.\n    return Se.create([t, e], \"and\" /* CompositeOperator.AND */);\n  }(t, e) : $r(t, e) : e instanceof Ve ? $r(e, t) : function (t, e) {\n    // There are four cases:\n    // (A & B) & (C & D) --> (A & B & C & D)\n    // (A & B) & (C | D) --> (A & B & C) | (A & B & D)\n    // (A | B) & (C & D) --> (C & D & A) | (C & D & B)\n    // (A | B) & (C | D) --> (A & C) | (A & D) | (B & C) | (B & D)\n    // Case 1 is a merge.\n    if (M(t.filters.length > 0 && e.filters.length > 0), De(t) && De(e)) return Me(t, e.getFilters());\n    // Case 2,3,4 all have at least one side (lhs or rhs) that is a disjunction. In all three cases\n    // we should take each element of the disjunction and distribute it over the other side, and\n    // return the disjunction of the distribution results.\n    const n = Ce(t) ? t : e,\n      s = Ce(t) ? e : t,\n      i = n.filters.map(t => kr(t, s));\n    return Se.create(i, \"or\" /* CompositeOperator.OR */);\n  }(t, e), Mr(n);\n}\nfunction $r(t, e) {\n  // There are two cases:\n  // A & (B & C) --> (A & B & C)\n  // A & (B | C) --> (A & B) | (A & C)\n  if (De(e))\n    // Case 1\n    return Me(e, t.getFilters());\n  {\n    // Case 2\n    const n = e.filters.map(e => kr(t, e));\n    return Se.create(n, \"or\" /* CompositeOperator.OR */);\n  }\n}\n\n/**\n * Applies the associativity property to the given filter and returns the resulting filter.\n *\n * <ul>\n *   <li>A | (B | C) == (A | B) | C == (A | B | C)\n *   <li>A & (B & C) == (A & B) & C == (A & B & C)\n * </ul>\n *\n * <p>For more info, visit: https://en.wikipedia.org/wiki/Associative_property#Propositional_logic\n */\nfunction Mr(t) {\n  if (M(t instanceof Ve || t instanceof Se), t instanceof Ve) return t;\n  const e = t.getFilters();\n  // If the composite filter only contains 1 filter, apply associativity to it.\n  if (1 === e.length) return Mr(e[0]);\n  // Associativity applied to a flat composite filter results is itself.\n  if (Ne(t)) return t;\n  // First apply associativity to all subfilters. This will in turn recursively apply\n  // associativity to all nested composite filters and field filters.\n  const n = e.map(t => Mr(t)),\n    s = [];\n  // For composite subfilters that perform the same kind of logical operation as `compositeFilter`\n  // take out their filters and add them to `compositeFilter`. For example:\n  // compositeFilter = (A | (B | C | D))\n  // compositeSubfilter = (B | C | D)\n  // Result: (A | B | C | D)\n  // Note that the `compositeSubfilter` has been eliminated, and its filters (B, C, D) have been\n  // added to the top-level \"compositeFilter\".\n  return n.forEach(e => {\n    e instanceof Ve ? s.push(e) : e instanceof Se && (e.op === t.op ?\n    // compositeFilter: (A | (B | C))\n    // compositeSubfilter: (B | C)\n    // Result: (A | B | C)\n    s.push(...e.filters) :\n    // compositeFilter: (A | (B & C))\n    // compositeSubfilter: (B & C)\n    // Result: (A | (B & C))\n    s.push(e));\n  }), 1 === s.length ? s[0] : Se.create(s, t.op);\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of IndexManager.\n */\nclass Or {\n  constructor() {\n    this.Ze = new Fr();\n  }\n  addToCollectionParentIndex(t, e) {\n    return this.Ze.add(e), At.resolve();\n  }\n  getCollectionParents(t, e) {\n    return At.resolve(this.Ze.getEntries(e));\n  }\n  addFieldIndex(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve();\n  }\n  deleteFieldIndex(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve();\n  }\n  getDocumentsMatchingTarget(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve(null);\n  }\n  getIndexType(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve(0 /* IndexType.NONE */);\n  }\n\n  getFieldIndexes(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve([]);\n  }\n  getNextCollectionGroupToUpdate(t) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve(null);\n  }\n  getMinOffset(t, e) {\n    return At.resolve(yt.min());\n  }\n  getMinOffsetFromCollectionGroup(t, e) {\n    return At.resolve(yt.min());\n  }\n  updateCollectionGroup(t, e, n) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve();\n  }\n  updateIndexEntries(t, e) {\n    // Field indices are not supported with memory persistence.\n    return At.resolve();\n  }\n}\n\n/**\n * Internal implementation of the collection-parent index exposed by MemoryIndexManager.\n * Also used for in-memory caching by IndexedDbIndexManager and initial index population\n * in indexeddb_schema.ts\n */\nclass Fr {\n  constructor() {\n    this.index = {};\n  }\n  // Returns false if the entry already existed.\n  add(t) {\n    const e = t.lastSegment(),\n      n = t.popLast(),\n      s = this.index[e] || new Ye(rt.comparator),\n      i = !s.has(n);\n    return this.index[e] = s.add(n), i;\n  }\n  has(t) {\n    const e = t.lastSegment(),\n      n = t.popLast(),\n      s = this.index[e];\n    return s && s.has(n);\n  }\n  getEntries(t) {\n    return (this.index[t] || new Ye(rt.comparator)).toArray();\n  }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Br = new Uint8Array(0);\n\n/**\n * A persisted implementation of IndexManager.\n *\n * PORTING NOTE: Unlike iOS and Android, the Web SDK does not memoize index\n * data as it supports multi-tab access.\n */\nclass Lr {\n  constructor(t, e) {\n    this.user = t, this.databaseId = e,\n    /**\n     * An in-memory copy of the index entries we've already written since the SDK\n     * launched. Used to avoid re-writing the same entry repeatedly.\n     *\n     * This is *NOT* a complete cache of what's in persistence and so can never be\n     * used to satisfy reads.\n     */\n    this.Xe = new Fr(),\n    /**\n     * Maps from a target to its equivalent list of sub-targets. Each sub-target\n     * contains only one term from the target's disjunctive normal form (DNF).\n     */\n    this.tn = new ws(t => un(t), (t, e) => cn(t, e)), this.uid = t.uid || \"\";\n  }\n  /**\n   * Adds a new entry to the collection parent index.\n   *\n   * Repeated calls for the same collectionPath should be avoided within a\n   * transaction as IndexedDbIndexManager only caches writes once a transaction\n   * has been committed.\n   */\n  addToCollectionParentIndex(t, e) {\n    if (!this.Xe.has(e)) {\n      const n = e.lastSegment(),\n        s = e.popLast();\n      t.addOnCommittedListener(() => {\n        // Add the collection to the in memory cache only if the transaction was\n        // successfully committed.\n        this.Xe.add(e);\n      });\n      const i = {\n        collectionId: n,\n        parent: Ii(s)\n      };\n      return qr(t).put(i);\n    }\n    return At.resolve();\n  }\n  getCollectionParents(t, e) {\n    const n = [],\n      s = IDBKeyRange.bound([e, \"\"], [et(e), \"\"], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n    return qr(t).W(s).next(t => {\n      for (const s of t) {\n        // This collectionId guard shouldn't be necessary (and isn't as long\n        // as we're running in a real browser), but there's a bug in\n        // indexeddbshim that breaks our range in our tests running in node:\n        // https://github.com/axemclion/IndexedDBShim/issues/334\n        if (s.collectionId !== e) break;\n        n.push(Ai(s.parent));\n      }\n      return n;\n    });\n  }\n  addFieldIndex(t, e) {\n    // TODO(indexing): Verify that the auto-incrementing index ID works in\n    // Safari & Firefox.\n    const n = Kr(t),\n      s = function (t) {\n        return {\n          indexId: t.indexId,\n          collectionGroup: t.collectionGroup,\n          fields: t.fields.map(t => [t.fieldPath.canonicalString(), t.kind])\n        };\n      }(e);\n    delete s.indexId;\n    // `indexId` is auto-populated by IndexedDb\n    const i = n.add(s);\n    if (e.indexState) {\n      const n = Gr(t);\n      return i.next(t => {\n        n.put(lr(t, this.user, e.indexState.sequenceNumber, e.indexState.offset));\n      });\n    }\n    return i.next();\n  }\n  deleteFieldIndex(t, e) {\n    const n = Kr(t),\n      s = Gr(t),\n      i = Ur(t);\n    return n.delete(e.indexId).next(() => s.delete(IDBKeyRange.bound([e.indexId], [e.indexId + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0))).next(() => i.delete(IDBKeyRange.bound([e.indexId], [e.indexId + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0)));\n  }\n  getDocumentsMatchingTarget(t, e) {\n    const n = Ur(t);\n    let s = !0;\n    const i = new Map();\n    return At.forEach(this.en(e), e => this.nn(t, e).next(t => {\n      s && (s = !!t), i.set(e, t);\n    })).next(() => {\n      if (s) {\n        let t = vs();\n        const s = [];\n        return At.forEach(i, (i, r) => {\n          var o;\n          C(\"IndexedDbIndexManager\", `Using index ${(o = i, `id=${o.indexId}|cg=${o.collectionGroup}|f=${o.fields.map(t => `${t.fieldPath}:${t.kind}`).join(\",\")}`)} to execute ${un(e)}`);\n          const u = function (t, e) {\n              const n = ht(e);\n              if (void 0 === n) return null;\n              for (const e of hn(t, n.fieldPath)) switch (e.op) {\n                case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */:\n                  return e.value.arrayValue.values || [];\n                case \"array-contains\" /* Operator.ARRAY_CONTAINS */:\n                  return [e.value];\n                // Remaining filters are not array filters.\n              }\n\n              return null;\n            }\n            /**\n            * Returns the list of values that are used in != or NOT_IN filters. Returns\n            * `null` if there are no such filters.\n            */(r, i),\n            c = function (t, e) {\n              const n = new Map();\n              for (const s of lt(e)) for (const e of hn(t, s.fieldPath)) switch (e.op) {\n                case \"==\" /* Operator.EQUAL */:\n                case \"in\" /* Operator.IN */:\n                  // Encode equality prefix, which is encoded in the index value before\n                  // the inequality (e.g. `a == 'a' && b != 'b'` is encoded to\n                  // `value != 'ab'`).\n                  n.set(s.fieldPath.canonicalString(), e.value);\n                  break;\n                case \"not-in\" /* Operator.NOT_IN */:\n                case \"!=\" /* Operator.NOT_EQUAL */:\n                  // NotIn/NotEqual is always a suffix. There cannot be any remaining\n                  // segments and hence we can return early here.\n                  return n.set(s.fieldPath.canonicalString(), e.value), Array.from(n.values());\n                // Remaining filters cannot be used as notIn bounds.\n              }\n\n              return null;\n            }\n            /**\n            * Returns a lower bound of field values that can be used as a starting point to\n            * scan the index defined by `fieldIndex`. Returns `MIN_VALUE` if no lower bound\n            * exists.\n            */(r, i),\n            a = function (t, e) {\n              const n = [];\n              let s = !0;\n              // For each segment, retrieve a lower bound if there is a suitable filter or\n              // startAt.\n              for (const i of lt(e)) {\n                const e = 0 /* IndexKind.ASCENDING */ === i.kind ? ln(t, i.fieldPath, t.startAt) : fn(t, i.fieldPath, t.startAt);\n                n.push(e.value), s && (s = e.inclusive);\n              }\n              return new Re(n, s);\n            }\n            /**\n            * Returns an upper bound of field values that can be used as an ending point\n            * when scanning the index defined by `fieldIndex`. Returns `MAX_VALUE` if no\n            * upper bound exists.\n            */(r, i),\n            h = function (t, e) {\n              const n = [];\n              let s = !0;\n              // For each segment, retrieve an upper bound if there is a suitable filter or\n              // endAt.\n              for (const i of lt(e)) {\n                const e = 0 /* IndexKind.ASCENDING */ === i.kind ? fn(t, i.fieldPath, t.endAt) : ln(t, i.fieldPath, t.endAt);\n                n.push(e.value), s && (s = e.inclusive);\n              }\n              return new Re(n, s);\n            }(r, i),\n            l = this.sn(i, r, a),\n            f = this.sn(i, r, h),\n            d = this.rn(i, r, c),\n            _ = this.on(i.indexId, u, l, a.inclusive, f, h.inclusive, d);\n          return At.forEach(_, i => n.J(i, e.limit).next(e => {\n            e.forEach(e => {\n              const n = ct.fromSegments(e.documentKey);\n              t.has(n) || (t = t.add(n), s.push(n));\n            });\n          }));\n        }).next(() => s);\n      }\n      return At.resolve(null);\n    });\n  }\n  en(t) {\n    let e = this.tn.get(t);\n    if (e) return e;\n    if (0 === t.filters.length) e = [t];else {\n      e = Sr(Se.create(t.filters, \"and\" /* CompositeOperator.AND */)).map(e => on(t.path, t.collectionGroup, t.orderBy, e.getFilters(), t.limit, t.startAt, t.endAt));\n    }\n    return this.tn.set(t, e), e;\n  }\n  /**\n   * Constructs a key range query on `DbIndexEntryStore` that unions all\n   * bounds.\n   */\n  on(t, e, n, s, i, r, o) {\n    // The number of total index scans we union together. This is similar to a\n    // distributed normal form, but adapted for array values. We create a single\n    // index range per value in an ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filter\n    // combined with the values from the query bounds.\n    const u = (null != e ? e.length : 1) * Math.max(n.length, i.length),\n      c = u / (null != e ? e.length : 1),\n      a = [];\n    for (let h = 0; h < u; ++h) {\n      const u = e ? this.un(e[h / c]) : Br,\n        l = this.cn(t, u, n[h % c], s),\n        f = this.an(t, u, i[h % c], r),\n        d = o.map(e => this.cn(t, u, e, /* inclusive= */!0));\n      a.push(...this.createRange(l, f, d));\n    }\n    return a;\n  }\n  /** Generates the lower bound for `arrayValue` and `directionalValue`. */\n  cn(t, e, n, s) {\n    const i = new Rr(t, ct.empty(), e, n);\n    return s ? i : i.Ge();\n  }\n  /** Generates the upper bound for `arrayValue` and `directionalValue`. */\n  an(t, e, n, s) {\n    const i = new Rr(t, ct.empty(), e, n);\n    return s ? i.Ge() : i;\n  }\n  nn(t, e) {\n    const n = new br(e),\n      s = null != e.collectionGroup ? e.collectionGroup : e.path.lastSegment();\n    return this.getFieldIndexes(t, s).next(t => {\n      // Return the index with the most number of segments.\n      let e = null;\n      for (const s of t) {\n        n.We(s) && (!e || s.fields.length > e.fields.length) && (e = s);\n      }\n      return e;\n    });\n  }\n  getIndexType(t, e) {\n    let n = 2 /* IndexType.FULL */;\n    const s = this.en(e);\n    return At.forEach(s, e => this.nn(t, e).next(t => {\n      t ? 0 /* IndexType.NONE */ !== n && t.fields.length < function (t) {\n        let e = new Ye(ut.comparator),\n          n = !1;\n        for (const s of t.filters) for (const t of s.getFlattenedFilters())\n        // __name__ is not an explicit segment of any index, so we don't need to\n        // count it.\n        t.field.isKeyField() || (\n        // ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filters must be counted separately.\n        // For instance, it is possible to have an index for \"a ARRAY a ASC\". Even\n        // though these are on the same field, they should be counted as two\n        // separate segments in an index.\n        \"array-contains\" /* Operator.ARRAY_CONTAINS */ === t.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === t.op ? n = !0 : e = e.add(t.field));\n        for (const n of t.orderBy)\n        // __name__ is not an explicit segment of any index, so we don't need to\n        // count it.\n        n.field.isKeyField() || (e = e.add(n.field));\n        return e.size + (n ? 1 : 0);\n      }(e) && (n = 1 /* IndexType.PARTIAL */) : n = 0 /* IndexType.NONE */;\n    })).next(() =>\n    // OR queries have more than one sub-target (one sub-target per DNF term). We currently consider\n    // OR queries that have a `limit` to have a partial index. For such queries we perform sorting\n    // and apply the limit in memory as a post-processing step.\n    function (t) {\n      return null !== t.limit;\n    }(e) && s.length > 1 && 2 /* IndexType.FULL */ === n ? 1 /* IndexType.PARTIAL */ : n);\n  }\n  /**\n   * Returns the byte encoded form of the directional values in the field index.\n   * Returns `null` if the document does not have all fields specified in the\n   * index.\n   */\n  hn(t, e) {\n    const n = new Ar();\n    for (const s of lt(t)) {\n      const t = e.data.field(s.fieldPath);\n      if (null == t) return null;\n      const i = n.Ke(s.kind);\n      gr.Ee.ae(t, i);\n    }\n    return n.Be();\n  }\n  /** Encodes a single value to the ascending index format. */\n  un(t) {\n    const e = new Ar();\n    return gr.Ee.ae(t, e.Ke(0 /* IndexKind.ASCENDING */)), e.Be();\n  }\n  /**\n   * Returns an encoded form of the document key that sorts based on the key\n   * ordering of the field index.\n   */\n  ln(t, e) {\n    const n = new Ar();\n    return gr.Ee.ae(fe(this.databaseId, e), n.Ke(function (t) {\n      const e = lt(t);\n      return 0 === e.length ? 0 /* IndexKind.ASCENDING */ : e[e.length - 1].kind;\n    }(t))), n.Be();\n  }\n  /**\n   * Encodes the given field values according to the specification in `target`.\n   * For IN queries, a list of possible values is returned.\n   */\n  rn(t, e, n) {\n    if (null === n) return [];\n    let s = [];\n    s.push(new Ar());\n    let i = 0;\n    for (const r of lt(t)) {\n      const t = n[i++];\n      for (const n of s) if (this.fn(e, r.fieldPath) && _e(t)) s = this.dn(s, r, t);else {\n        const e = n.Ke(r.kind);\n        gr.Ee.ae(t, e);\n      }\n    }\n    return this._n(s);\n  }\n  /**\n   * Encodes the given bounds according to the specification in `target`. For IN\n   * queries, a list of possible values is returned.\n   */\n  sn(t, e, n) {\n    return this.rn(t, e, n.position);\n  }\n  /** Returns the byte representation for the provided encoders. */\n  _n(t) {\n    const e = [];\n    for (let n = 0; n < t.length; ++n) e[n] = t[n].Be();\n    return e;\n  }\n  /**\n   * Creates a separate encoder for each element of an array.\n   *\n   * The method appends each value to all existing encoders (e.g. filter(\"a\",\n   * \"==\", \"a1\").filter(\"b\", \"in\", [\"b1\", \"b2\"]) becomes [\"a1,b1\", \"a1,b2\"]). A\n   * list of new encoders is returned.\n   */\n  dn(t, e, n) {\n    const s = [...t],\n      i = [];\n    for (const t of n.arrayValue.values || []) for (const n of s) {\n      const s = new Ar();\n      s.seed(n.Be()), gr.Ee.ae(t, s.Ke(e.kind)), i.push(s);\n    }\n    return i;\n  }\n  fn(t, e) {\n    return !!t.filters.find(t => t instanceof Ve && t.field.isEqual(e) && (\"in\" /* Operator.IN */ === t.op || \"not-in\" /* Operator.NOT_IN */ === t.op));\n  }\n  getFieldIndexes(t, e) {\n    const n = Kr(t),\n      s = Gr(t);\n    return (e ? n.W(\"collectionGroupIndex\", IDBKeyRange.bound(e, e)) : n.W()).next(t => {\n      const e = [];\n      return At.forEach(t, t => s.get([t.indexId, this.uid]).next(n => {\n        e.push(function (t, e) {\n          const n = e ? new wt(e.sequenceNumber, new yt(ir(e.readTime), new ct(Ai(e.documentKey)), e.largestBatchId)) : wt.empty(),\n            s = t.fields.map(([t, e]) => new dt(ut.fromServerFormat(t), e));\n          return new at(t.indexId, t.collectionGroup, s, n);\n        }(t, n));\n      })).next(() => e);\n    });\n  }\n  getNextCollectionGroupToUpdate(t) {\n    return this.getFieldIndexes(t).next(t => 0 === t.length ? null : (t.sort((t, e) => {\n      const n = t.indexState.sequenceNumber - e.indexState.sequenceNumber;\n      return 0 !== n ? n : X(t.collectionGroup, e.collectionGroup);\n    }), t[0].collectionGroup));\n  }\n  updateCollectionGroup(t, e, n) {\n    const s = Kr(t),\n      i = Gr(t);\n    return this.wn(t).next(t => s.W(\"collectionGroupIndex\", IDBKeyRange.bound(e, e)).next(e => At.forEach(e, e => i.put(lr(e.indexId, this.user, t, n)))));\n  }\n  updateIndexEntries(t, e) {\n    // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as\n    // it could be used across different IndexedDB transactions. As any cached\n    // data might be invalidated by other multi-tab clients, we can only trust\n    // data within a single IndexedDB transaction. We therefore add a cache\n    // here.\n    const n = new Map();\n    return At.forEach(e, (e, s) => {\n      const i = n.get(e.collectionGroup);\n      return (i ? At.resolve(i) : this.getFieldIndexes(t, e.collectionGroup)).next(i => (n.set(e.collectionGroup, i), At.forEach(i, n => this.mn(t, e, n).next(e => {\n        const i = this.gn(s, n);\n        return e.isEqual(i) ? At.resolve() : this.yn(t, s, n, e, i);\n      }))));\n    });\n  }\n  pn(t, e, n, s) {\n    return Ur(t).put({\n      indexId: s.indexId,\n      uid: this.uid,\n      arrayValue: s.arrayValue,\n      directionalValue: s.directionalValue,\n      orderedDocumentKey: this.ln(n, e.key),\n      documentKey: e.key.path.toArray()\n    });\n  }\n  In(t, e, n, s) {\n    return Ur(t).delete([s.indexId, this.uid, s.arrayValue, s.directionalValue, this.ln(n, e.key), e.key.path.toArray()]);\n  }\n  mn(t, e, n) {\n    const s = Ur(t);\n    let i = new Ye(Pr);\n    return s.X({\n      index: \"documentKeyIndex\",\n      range: IDBKeyRange.only([n.indexId, this.uid, this.ln(n, e)])\n    }, (t, s) => {\n      i = i.add(new Rr(n.indexId, e, s.arrayValue, s.directionalValue));\n    }).next(() => i);\n  }\n  /** Creates the index entries for the given document. */\n  gn(t, e) {\n    let n = new Ye(Pr);\n    const s = this.hn(e, t);\n    if (null == s) return n;\n    const i = ht(e);\n    if (null != i) {\n      const r = t.data.field(i.fieldPath);\n      if (_e(r)) for (const i of r.arrayValue.values || []) n = n.add(new Rr(e.indexId, t.key, this.un(i), s));\n    } else n = n.add(new Rr(e.indexId, t.key, Br, s));\n    return n;\n  }\n  /**\n   * Updates the index entries for the provided document by deleting entries\n   * that are no longer referenced in `newEntries` and adding all newly added\n   * entries.\n   */\n  yn(t, e, n, s, i) {\n    C(\"IndexedDbIndexManager\", \"Updating index entries for document '%s'\", e.key);\n    const r = [];\n    return function (t, e, n, s, i) {\n      const r = t.getIterator(),\n        o = e.getIterator();\n      let u = Xe(r),\n        c = Xe(o);\n      // Walk through the two sets at the same time, using the ordering defined by\n      // `comparator`.\n      for (; u || c;) {\n        let t = !1,\n          e = !1;\n        if (u && c) {\n          const s = n(u, c);\n          s < 0 ?\n          // The element was removed if the next element in our ordered\n          // walkthrough is only in `before`.\n          e = !0 : s > 0 && (\n          // The element was added if the next element in our ordered walkthrough\n          // is only in `after`.\n          t = !0);\n        } else null != u ? e = !0 : t = !0;\n        t ? (s(c), c = Xe(o)) : e ? (i(u), u = Xe(r)) : (u = Xe(r), c = Xe(o));\n      }\n    }(s, i, Pr, /* onAdd= */s => {\n      r.push(this.pn(t, e, n, s));\n    }, /* onRemove= */s => {\n      r.push(this.In(t, e, n, s));\n    }), At.waitFor(r);\n  }\n  wn(t) {\n    let e = 1;\n    return Gr(t).X({\n      index: \"sequenceNumberIndex\",\n      reverse: !0,\n      range: IDBKeyRange.upperBound([this.uid, Number.MAX_SAFE_INTEGER])\n    }, (t, n, s) => {\n      s.done(), e = n.sequenceNumber + 1;\n    }).next(() => e);\n  }\n  /**\n   * Returns a new set of IDB ranges that splits the existing range and excludes\n   * any values that match the `notInValue` from these ranges. As an example,\n   * '[foo > 2 && foo != 3]` becomes  `[foo > 2 && < 3, foo > 3]`.\n   */\n  createRange(t, e, n) {\n    // The notIn values need to be sorted and unique so that we can return a\n    // sorted set of non-overlapping ranges.\n    n = n.sort((t, e) => Pr(t, e)).filter((t, e, n) => !e || 0 !== Pr(t, n[e - 1]));\n    const s = [];\n    s.push(t);\n    for (const i of n) {\n      const n = Pr(i, t),\n        r = Pr(i, e);\n      if (0 === n)\n        // `notInValue` is the lower bound. We therefore need to raise the bound\n        // to the next value.\n        s[0] = t.Ge();else if (n > 0 && r < 0)\n        // `notInValue` is in the middle of the range\n        s.push(i), s.push(i.Ge());else if (r > 0)\n        // `notInValue` (and all following values) are out of the range\n        break;\n    }\n    s.push(e);\n    const i = [];\n    for (let t = 0; t < s.length; t += 2) {\n      // If we encounter two bounds that will create an unmatchable key range,\n      // then we return an empty set of key ranges.\n      if (this.Tn(s[t], s[t + 1])) return [];\n      const e = [s[t].indexId, this.uid, s[t].arrayValue, s[t].directionalValue, Br, []],\n        n = [s[t + 1].indexId, this.uid, s[t + 1].arrayValue, s[t + 1].directionalValue, Br, []];\n      i.push(IDBKeyRange.bound(e, n));\n    }\n    return i;\n  }\n  Tn(t, e) {\n    // If lower bound is greater than the upper bound, then the key\n    // range can never be matched.\n    return Pr(t, e) > 0;\n  }\n  getMinOffsetFromCollectionGroup(t, e) {\n    return this.getFieldIndexes(t, e).next(Qr);\n  }\n  getMinOffset(t, e) {\n    return At.mapArray(this.en(e), e => this.nn(t, e).next(t => t || $())).next(Qr);\n  }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the collectionParents\n * document store.\n */\nfunction qr(t) {\n  return Wi(t, \"collectionParents\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index entry object store.\n */\nfunction Ur(t) {\n  return Wi(t, \"indexEntries\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index configuration object store.\n */\nfunction Kr(t) {\n  return Wi(t, \"indexConfiguration\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index state object store.\n */\nfunction Gr(t) {\n  return Wi(t, \"indexState\");\n}\nfunction Qr(t) {\n  M(0 !== t.length);\n  let e = t[0].indexState.offset,\n    n = e.largestBatchId;\n  for (let s = 1; s < t.length; s++) {\n    const i = t[s].indexState.offset;\n    pt(i, e) < 0 && (e = i), n < i.largestBatchId && (n = i.largestBatchId);\n  }\n  return new yt(e.readTime, e.documentKey, n);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst jr = {\n  didRun: !1,\n  sequenceNumbersCollected: 0,\n  targetsRemoved: 0,\n  documentsRemoved: 0\n};\nclass zr {\n  constructor(\n  // When we attempt to collect, we will only do so if the cache size is greater than this\n  // threshold. Passing `COLLECTION_DISABLED` here will cause collection to always be skipped.\n  t,\n  // The percentage of sequence numbers that we will attempt to collect\n  e,\n  // A cap on the total number of sequence numbers that will be collected. This prevents\n  // us from collecting a huge number of sequence numbers if the cache has grown very large.\n  n) {\n    this.cacheSizeCollectionThreshold = t, this.percentileToCollect = e, this.maximumSequenceNumbersToCollect = n;\n  }\n  static withCacheSize(t) {\n    return new zr(t, zr.DEFAULT_COLLECTION_PERCENTILE, zr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Delete a mutation batch and the associated document mutations.\n * @returns A PersistencePromise of the document mutations that were removed.\n */\nfunction Wr(t, e, n) {\n  const s = t.store(\"mutations\"),\n    i = t.store(\"documentMutations\"),\n    r = [],\n    o = IDBKeyRange.only(n.batchId);\n  let u = 0;\n  const c = s.X({\n    range: o\n  }, (t, e, n) => (u++, n.delete()));\n  r.push(c.next(() => {\n    M(1 === u);\n  }));\n  const a = [];\n  for (const t of n.mutations) {\n    const s = vi(e, t.key.path, n.batchId);\n    r.push(i.delete(s)), a.push(t.key);\n  }\n  return At.waitFor(r).next(() => a);\n}\n\n/**\n * Returns an approximate size for the given document.\n */\nfunction Hr(t) {\n  if (!t) return 0;\n  let e;\n  if (t.document) e = t.document;else if (t.unknownDocument) e = t.unknownDocument;else {\n    if (!t.noDocument) throw $();\n    e = t.noDocument;\n  }\n  return JSON.stringify(e).length;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A mutation queue for a specific user, backed by IndexedDB. */\nzr.DEFAULT_COLLECTION_PERCENTILE = 10, zr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT = 1e3, zr.DEFAULT = new zr(41943040, zr.DEFAULT_COLLECTION_PERCENTILE, zr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT), zr.DISABLED = new zr(-1, 0, 0);\nclass Jr {\n  constructor(\n  /**\n   * The normalized userId (e.g. null UID => \"\" userId) used to store /\n   * retrieve mutations.\n   */\n  t, e, n, s) {\n    this.userId = t, this.Tt = e, this.indexManager = n, this.referenceDelegate = s,\n    /**\n     * Caches the document keys for pending mutation batches. If the mutation\n     * has been removed from IndexedDb, the cached value may continue to\n     * be used to retrieve the batch's document keys. To remove a cached value\n     * locally, `removeCachedMutationKeys()` should be invoked either directly\n     * or through `removeMutationBatches()`.\n     *\n     * With multi-tab, when the primary client acknowledges or rejects a mutation,\n     * this cache is used by secondary clients to invalidate the local\n     * view of the documents that were previously affected by the mutation.\n     */\n    // PORTING NOTE: Multi-tab only.\n    this.En = {};\n  }\n  /**\n   * Creates a new mutation queue for the given user.\n   * @param user - The user for which to create a mutation queue.\n   * @param serializer - The serializer to use when persisting to IndexedDb.\n   */\n  static ue(t, e, n, s) {\n    // TODO(mcg): Figure out what constraints there are on userIDs\n    // In particular, are there any reserved characters? are empty ids allowed?\n    // For the moment store these together in the same mutations table assuming\n    // that empty userIDs aren't allowed.\n    M(\"\" !== t.uid);\n    const i = t.isAuthenticated() ? t.uid : \"\";\n    return new Jr(i, e, n, s);\n  }\n  checkEmpty(t) {\n    let e = !0;\n    const n = IDBKeyRange.bound([this.userId, Number.NEGATIVE_INFINITY], [this.userId, Number.POSITIVE_INFINITY]);\n    return Zr(t).X({\n      index: \"userMutationsIndex\",\n      range: n\n    }, (t, n, s) => {\n      e = !1, s.done();\n    }).next(() => e);\n  }\n  addMutationBatch(t, e, n, s) {\n    const i = Xr(t),\n      r = Zr(t);\n    // The IndexedDb implementation in Chrome (and Firefox) does not handle\n    // compound indices that include auto-generated keys correctly. To ensure\n    // that the index entry is added correctly in all browsers, we perform two\n    // writes: The first write is used to retrieve the next auto-generated Batch\n    // ID, and the second write populates the index and stores the actual\n    // mutation batch.\n    // See: https://bugs.chromium.org/p/chromium/issues/detail?id=701972\n    // We write an empty object to obtain key\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    return r.add({}).next(o => {\n      M(\"number\" == typeof o);\n      const u = new Hi(o, e, n, s),\n        c = function (t, e, n) {\n          const s = n.baseMutations.map(e => ii(t.oe, e)),\n            i = n.mutations.map(e => ii(t.oe, e));\n          return {\n            userId: e,\n            batchId: n.batchId,\n            localWriteTimeMs: n.localWriteTime.toMillis(),\n            baseMutations: s,\n            mutations: i\n          };\n        }(this.Tt, this.userId, u),\n        a = [];\n      let h = new Ye((t, e) => X(t.canonicalString(), e.canonicalString()));\n      for (const t of s) {\n        const e = vi(this.userId, t.key.path, o);\n        h = h.add(t.key.path.popLast()), a.push(r.put(c)), a.push(i.put(e, bi));\n      }\n      return h.forEach(e => {\n        a.push(this.indexManager.addToCollectionParentIndex(t, e));\n      }), t.addOnCommittedListener(() => {\n        this.En[o] = u.keys();\n      }), At.waitFor(a).next(() => u);\n    });\n  }\n  lookupMutationBatch(t, e) {\n    return Zr(t).get(e).next(t => t ? (M(t.userId === this.userId), rr(this.Tt, t)) : null);\n  }\n  /**\n   * Returns the document keys for the mutation batch with the given batchId.\n   * For primary clients, this method returns `null` after\n   * `removeMutationBatches()` has been called. Secondary clients return a\n   * cached result until `removeCachedMutationKeys()` is invoked.\n   */\n  // PORTING NOTE: Multi-tab only.\n  An(t, e) {\n    return this.En[e] ? At.resolve(this.En[e]) : this.lookupMutationBatch(t, e).next(t => {\n      if (t) {\n        const n = t.keys();\n        return this.En[e] = n, n;\n      }\n      return null;\n    });\n  }\n  getNextMutationBatchAfterBatchId(t, e) {\n    const n = e + 1,\n      s = IDBKeyRange.lowerBound([this.userId, n]);\n    let i = null;\n    return Zr(t).X({\n      index: \"userMutationsIndex\",\n      range: s\n    }, (t, e, s) => {\n      e.userId === this.userId && (M(e.batchId >= n), i = rr(this.Tt, e)), s.done();\n    }).next(() => i);\n  }\n  getHighestUnacknowledgedBatchId(t) {\n    const e = IDBKeyRange.upperBound([this.userId, Number.POSITIVE_INFINITY]);\n    let n = -1;\n    return Zr(t).X({\n      index: \"userMutationsIndex\",\n      range: e,\n      reverse: !0\n    }, (t, e, s) => {\n      n = e.batchId, s.done();\n    }).next(() => n);\n  }\n  getAllMutationBatches(t) {\n    const e = IDBKeyRange.bound([this.userId, -1], [this.userId, Number.POSITIVE_INFINITY]);\n    return Zr(t).W(\"userMutationsIndex\", e).next(t => t.map(t => rr(this.Tt, t)));\n  }\n  getAllMutationBatchesAffectingDocumentKey(t, e) {\n    // Scan the document-mutation index starting with a prefix starting with\n    // the given documentKey.\n    const n = Pi(this.userId, e.path),\n      s = IDBKeyRange.lowerBound(n),\n      i = [];\n    return Xr(t).X({\n      range: s\n    }, (n, s, r) => {\n      const [o, u, c] = n,\n        a = Ai(u);\n      // Only consider rows matching exactly the specific key of\n      // interest. Note that because we order by path first, and we\n      // order terminators before path separators, we'll encounter all\n      // the index rows for documentKey contiguously. In particular, all\n      // the rows for documentKey will occur before any rows for\n      // documents nested in a subcollection beneath documentKey so we\n      // can stop as soon as we hit any such row.\n      if (o === this.userId && e.path.isEqual(a))\n        // Look up the mutation batch in the store.\n        return Zr(t).get(c).next(t => {\n          if (!t) throw $();\n          M(t.userId === this.userId), i.push(rr(this.Tt, t));\n        });\n      r.done();\n    }).next(() => i);\n  }\n  getAllMutationBatchesAffectingDocumentKeys(t, e) {\n    let n = new Ye(X);\n    const s = [];\n    return e.forEach(e => {\n      const i = Pi(this.userId, e.path),\n        r = IDBKeyRange.lowerBound(i),\n        o = Xr(t).X({\n          range: r\n        }, (t, s, i) => {\n          const [r, o, u] = t,\n            c = Ai(o);\n          // Only consider rows matching exactly the specific key of\n          // interest. Note that because we order by path first, and we\n          // order terminators before path separators, we'll encounter all\n          // the index rows for documentKey contiguously. In particular, all\n          // the rows for documentKey will occur before any rows for\n          // documents nested in a subcollection beneath documentKey so we\n          // can stop as soon as we hit any such row.\n          r === this.userId && e.path.isEqual(c) ? n = n.add(u) : i.done();\n        });\n      s.push(o);\n    }), At.waitFor(s).next(() => this.Rn(t, n));\n  }\n  getAllMutationBatchesAffectingQuery(t, e) {\n    const n = e.path,\n      s = n.length + 1,\n      i = Pi(this.userId, n),\n      r = IDBKeyRange.lowerBound(i);\n    // Collect up unique batchIDs encountered during a scan of the index. Use a\n    // SortedSet to accumulate batch IDs so they can be traversed in order in a\n    // scan of the main table.\n    let o = new Ye(X);\n    return Xr(t).X({\n      range: r\n    }, (t, e, i) => {\n      const [r, u, c] = t,\n        a = Ai(u);\n      r === this.userId && n.isPrefixOf(a) ?\n      // Rows with document keys more than one segment longer than the\n      // query path can't be matches. For example, a query on 'rooms'\n      // can't match the document /rooms/abc/messages/xyx.\n      // TODO(mcg): we'll need a different scanner when we implement\n      // ancestor queries.\n      a.length === s && (o = o.add(c)) : i.done();\n    }).next(() => this.Rn(t, o));\n  }\n  Rn(t, e) {\n    const n = [],\n      s = [];\n    // TODO(rockwood): Implement this using iterate.\n    return e.forEach(e => {\n      s.push(Zr(t).get(e).next(t => {\n        if (null === t) throw $();\n        M(t.userId === this.userId), n.push(rr(this.Tt, t));\n      }));\n    }), At.waitFor(s).next(() => n);\n  }\n  removeMutationBatch(t, e) {\n    return Wr(t.re, this.userId, e).next(n => (t.addOnCommittedListener(() => {\n      this.Pn(e.batchId);\n    }), At.forEach(n, e => this.referenceDelegate.markPotentiallyOrphaned(t, e))));\n  }\n  /**\n   * Clears the cached keys for a mutation batch. This method should be\n   * called by secondary clients after they process mutation updates.\n   *\n   * Note that this method does not have to be called from primary clients as\n   * the corresponding cache entries are cleared when an acknowledged or\n   * rejected batch is removed from the mutation queue.\n   */\n  // PORTING NOTE: Multi-tab only\n  Pn(t) {\n    delete this.En[t];\n  }\n  performConsistencyCheck(t) {\n    return this.checkEmpty(t).next(e => {\n      if (!e) return At.resolve();\n      // Verify that there are no entries in the documentMutations index if\n      // the queue is empty.\n      const n = IDBKeyRange.lowerBound([this.userId]);\n      const s = [];\n      return Xr(t).X({\n        range: n\n      }, (t, e, n) => {\n        if (t[0] === this.userId) {\n          const e = Ai(t[1]);\n          s.push(e);\n        } else n.done();\n      }).next(() => {\n        M(0 === s.length);\n      });\n    });\n  }\n  containsKey(t, e) {\n    return Yr(t, this.userId, e);\n  }\n  // PORTING NOTE: Multi-tab only (state is held in memory in other clients).\n  /** Returns the mutation queue's metadata from IndexedDb. */\n  vn(t) {\n    return to(t).get(this.userId).next(t => t || {\n      userId: this.userId,\n      lastAcknowledgedBatchId: -1,\n      lastStreamToken: \"\"\n    });\n  }\n}\n\n/**\n * @returns true if the mutation queue for the given user contains a pending\n *         mutation for the given key.\n */\nfunction Yr(t, e, n) {\n  const s = Pi(e, n.path),\n    i = s[1],\n    r = IDBKeyRange.lowerBound(s);\n  let o = !1;\n  return Xr(t).X({\n    range: r,\n    Z: !0\n  }, (t, n, s) => {\n    const [r, u, /*batchID*/c] = t;\n    r === e && u === i && (o = !0), s.done();\n  }).next(() => o);\n}\n\n/** Returns true if any mutation queue contains the given document. */\n/**\n * Helper to get a typed SimpleDbStore for the mutations object store.\n */\nfunction Zr(t) {\n  return Wi(t, \"mutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction Xr(t) {\n  return Wi(t, \"documentMutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction to(t) {\n  return Wi(t, \"mutationQueues\");\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Offset to ensure non-overlapping target ids. */\n/**\n * Generates monotonically increasing target IDs for sending targets to the\n * watch stream.\n *\n * The client constructs two generators, one for the target cache, and one for\n * for the sync engine (to generate limbo documents targets). These\n * generators produce non-overlapping IDs (by using even and odd IDs\n * respectively).\n *\n * By separating the target ID space, the query cache can generate target IDs\n * that persist across client restarts, while sync engine can independently\n * generate in-memory target IDs that are transient and can be reused after a\n * restart.\n */\nclass eo {\n  constructor(t) {\n    this.bn = t;\n  }\n  next() {\n    return this.bn += 2, this.bn;\n  }\n  static Vn() {\n    // The target cache generator must return '2' in its first call to `next()`\n    // as there is no differentiation in the protocol layer between an unset\n    // number and the number '0'. If we were to sent a target with target ID\n    // '0', the backend would consider it unset and replace it with its own ID.\n    return new eo(0);\n  }\n  static Sn() {\n    // Sync engine assigns target IDs for limbo document detection.\n    return new eo(-1);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass no {\n  constructor(t, e) {\n    this.referenceDelegate = t, this.Tt = e;\n  }\n  // PORTING NOTE: We don't cache global metadata for the target cache, since\n  // some of it (in particular `highestTargetId`) can be modified by secondary\n  // tabs. We could perhaps be more granular (and e.g. still cache\n  // `lastRemoteSnapshotVersion` in memory) but for simplicity we currently go\n  // to IndexedDb whenever we need to read metadata. We can revisit if it turns\n  // out to have a meaningful performance impact.\n  allocateTargetId(t) {\n    return this.Dn(t).next(e => {\n      const n = new eo(e.highestTargetId);\n      return e.highestTargetId = n.next(), this.Cn(t, e).next(() => e.highestTargetId);\n    });\n  }\n  getLastRemoteSnapshotVersion(t) {\n    return this.Dn(t).next(t => st.fromTimestamp(new nt(t.lastRemoteSnapshotVersion.seconds, t.lastRemoteSnapshotVersion.nanoseconds)));\n  }\n  getHighestSequenceNumber(t) {\n    return this.Dn(t).next(t => t.highestListenSequenceNumber);\n  }\n  setTargetsMetadata(t, e, n) {\n    return this.Dn(t).next(s => (s.highestListenSequenceNumber = e, n && (s.lastRemoteSnapshotVersion = n.toTimestamp()), e > s.highestListenSequenceNumber && (s.highestListenSequenceNumber = e), this.Cn(t, s)));\n  }\n  addTargetData(t, e) {\n    return this.xn(t, e).next(() => this.Dn(t).next(n => (n.targetCount += 1, this.Nn(e, n), this.Cn(t, n))));\n  }\n  updateTargetData(t, e) {\n    return this.xn(t, e);\n  }\n  removeTargetData(t, e) {\n    return this.removeMatchingKeysForTargetId(t, e.targetId).next(() => so(t).delete(e.targetId)).next(() => this.Dn(t)).next(e => (M(e.targetCount > 0), e.targetCount -= 1, this.Cn(t, e)));\n  }\n  /**\n   * Drops any targets with sequence number less than or equal to the upper bound, excepting those\n   * present in `activeTargetIds`. Document associations for the removed targets are also removed.\n   * Returns the number of targets removed.\n   */\n  removeTargets(t, e, n) {\n    let s = 0;\n    const i = [];\n    return so(t).X((r, o) => {\n      const u = or(o);\n      u.sequenceNumber <= e && null === n.get(u.targetId) && (s++, i.push(this.removeTargetData(t, u)));\n    }).next(() => At.waitFor(i)).next(() => s);\n  }\n  /**\n   * Call provided function with each `TargetData` that we have cached.\n   */\n  forEachTarget(t, e) {\n    return so(t).X((t, n) => {\n      const s = or(n);\n      e(s);\n    });\n  }\n  Dn(t) {\n    return io(t).get(\"targetGlobalKey\").next(t => (M(null !== t), t));\n  }\n  Cn(t, e) {\n    return io(t).put(\"targetGlobalKey\", e);\n  }\n  xn(t, e) {\n    return so(t).put(ur(this.Tt, e));\n  }\n  /**\n   * In-place updates the provided metadata to account for values in the given\n   * TargetData. Saving is done separately. Returns true if there were any\n   * changes to the metadata.\n   */\n  Nn(t, e) {\n    let n = !1;\n    return t.targetId > e.highestTargetId && (e.highestTargetId = t.targetId, n = !0), t.sequenceNumber > e.highestListenSequenceNumber && (e.highestListenSequenceNumber = t.sequenceNumber, n = !0), n;\n  }\n  getTargetCount(t) {\n    return this.Dn(t).next(t => t.targetCount);\n  }\n  getTargetData(t, e) {\n    // Iterating by the canonicalId may yield more than one result because\n    // canonicalId values are not required to be unique per target. This query\n    // depends on the queryTargets index to be efficient.\n    const n = un(e),\n      s = IDBKeyRange.bound([n, Number.NEGATIVE_INFINITY], [n, Number.POSITIVE_INFINITY]);\n    let i = null;\n    return so(t).X({\n      range: s,\n      index: \"queryTargetsIndex\"\n    }, (t, n, s) => {\n      const r = or(n);\n      // After finding a potential match, check that the target is\n      // actually equal to the requested target.\n      cn(e, r.target) && (i = r, s.done());\n    }).next(() => i);\n  }\n  addMatchingKeys(t, e, n) {\n    // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n    // IndexedDb.\n    const s = [],\n      i = ro(t);\n    return e.forEach(e => {\n      const r = Ii(e.path);\n      s.push(i.put({\n        targetId: n,\n        path: r\n      })), s.push(this.referenceDelegate.addReference(t, n, e));\n    }), At.waitFor(s);\n  }\n  removeMatchingKeys(t, e, n) {\n    // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n    // IndexedDb.\n    const s = ro(t);\n    return At.forEach(e, e => {\n      const i = Ii(e.path);\n      return At.waitFor([s.delete([n, i]), this.referenceDelegate.removeReference(t, n, e)]);\n    });\n  }\n  removeMatchingKeysForTargetId(t, e) {\n    const n = ro(t),\n      s = IDBKeyRange.bound([e], [e + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n    return n.delete(s);\n  }\n  getMatchingKeysForTargetId(t, e) {\n    const n = IDBKeyRange.bound([e], [e + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0),\n      s = ro(t);\n    let i = vs();\n    return s.X({\n      range: n,\n      Z: !0\n    }, (t, e, n) => {\n      const s = Ai(t[1]),\n        r = new ct(s);\n      i = i.add(r);\n    }).next(() => i);\n  }\n  containsKey(t, e) {\n    const n = Ii(e.path),\n      s = IDBKeyRange.bound([n], [et(n)], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n    let i = 0;\n    return ro(t).X({\n      index: \"documentTargetsIndex\",\n      Z: !0,\n      range: s\n    }, ([t, e], n, s) => {\n      // Having a sentinel row for a document does not count as containing that document;\n      // For the target cache, containing the document means the document is part of some\n      // target.\n      0 !== t && (i++, s.done());\n    }).next(() => i > 0);\n  }\n  /**\n   * Looks up a TargetData entry by target ID.\n   *\n   * @param targetId - The target ID of the TargetData entry to look up.\n   * @returns The cached TargetData entry, or null if the cache has no entry for\n   * the target.\n   */\n  // PORTING NOTE: Multi-tab only.\n  ie(t, e) {\n    return so(t).get(e).next(t => t ? or(t) : null);\n  }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the queries object store.\n */\nfunction so(t) {\n  return Wi(t, \"targets\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the target globals object store.\n */\nfunction io(t) {\n  return Wi(t, \"targetGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document target object store.\n */\nfunction ro(t) {\n  return Wi(t, \"targetDocuments\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction oo([t, e], [n, s]) {\n  const i = X(t, n);\n  return 0 === i ? X(e, s) : i;\n}\n\n/**\n * Used to calculate the nth sequence number. Keeps a rolling buffer of the\n * lowest n values passed to `addElement`, and finally reports the largest of\n * them in `maxValue`.\n */\nclass uo {\n  constructor(t) {\n    this.kn = t, this.buffer = new Ye(oo), this.$n = 0;\n  }\n  Mn() {\n    return ++this.$n;\n  }\n  On(t) {\n    const e = [t, this.Mn()];\n    if (this.buffer.size < this.kn) this.buffer = this.buffer.add(e);else {\n      const t = this.buffer.last();\n      oo(e, t) < 0 && (this.buffer = this.buffer.delete(t).add(e));\n    }\n  }\n  get maxValue() {\n    // Guaranteed to be non-empty. If we decide we are not collecting any\n    // sequence numbers, nthSequenceNumber below short-circuits. If we have\n    // decided that we are collecting n sequence numbers, it's because n is some\n    // percentage of the existing sequence numbers. That means we should never\n    // be in a situation where we are collecting sequence numbers but don't\n    // actually have any.\n    return this.buffer.last()[0];\n  }\n}\n\n/**\n * This class is responsible for the scheduling of LRU garbage collection. It handles checking\n * whether or not GC is enabled, as well as which delay to use before the next run.\n */\nclass co {\n  constructor(t, e, n) {\n    this.garbageCollector = t, this.asyncQueue = e, this.localStore = n, this.Fn = null;\n  }\n  start() {\n    -1 !== this.garbageCollector.params.cacheSizeCollectionThreshold && this.Bn(6e4);\n  }\n  stop() {\n    this.Fn && (this.Fn.cancel(), this.Fn = null);\n  }\n  get started() {\n    return null !== this.Fn;\n  }\n  Bn(t) {\n    var _this6 = this;\n    C(\"LruGarbageCollector\", `Garbage collection scheduled in ${t}ms`), this.Fn = this.asyncQueue.enqueueAfterDelay(\"lru_garbage_collection\" /* TimerId.LruGarbageCollection */, t, /*#__PURE__*/_asyncToGenerator(function* () {\n      _this6.Fn = null;\n      try {\n        yield _this6.localStore.collectGarbage(_this6.garbageCollector);\n      } catch (t) {\n        Vt(t) ? C(\"LruGarbageCollector\", \"Ignoring IndexedDB error during garbage collection: \", t) : yield Et(t);\n      }\n      yield _this6.Bn(3e5);\n    }));\n  }\n}\n\n/** Implements the steps for LRU garbage collection. */\nclass ao {\n  constructor(t, e) {\n    this.Ln = t, this.params = e;\n  }\n  calculateTargetCount(t, e) {\n    return this.Ln.qn(t).next(t => Math.floor(e / 100 * t));\n  }\n  nthSequenceNumber(t, e) {\n    if (0 === e) return At.resolve($t.at);\n    const n = new uo(e);\n    return this.Ln.forEachTarget(t, t => n.On(t.sequenceNumber)).next(() => this.Ln.Un(t, t => n.On(t))).next(() => n.maxValue);\n  }\n  removeTargets(t, e, n) {\n    return this.Ln.removeTargets(t, e, n);\n  }\n  removeOrphanedDocuments(t, e) {\n    return this.Ln.removeOrphanedDocuments(t, e);\n  }\n  collect(t, e) {\n    return -1 === this.params.cacheSizeCollectionThreshold ? (C(\"LruGarbageCollector\", \"Garbage collection skipped; disabled\"), At.resolve(jr)) : this.getCacheSize(t).next(n => n < this.params.cacheSizeCollectionThreshold ? (C(\"LruGarbageCollector\", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`), jr) : this.Kn(t, e));\n  }\n  getCacheSize(t) {\n    return this.Ln.getCacheSize(t);\n  }\n  Kn(t, e) {\n    let n, s, i, r, o, c, a;\n    const h = Date.now();\n    return this.calculateTargetCount(t, this.params.percentileToCollect).next(e => (\n    // Cap at the configured max\n    e > this.params.maximumSequenceNumbersToCollect ? (C(\"LruGarbageCollector\", `Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${e}`), s = this.params.maximumSequenceNumbersToCollect) : s = e, r = Date.now(), this.nthSequenceNumber(t, s))).next(s => (n = s, o = Date.now(), this.removeTargets(t, n, e))).next(e => (i = e, c = Date.now(), this.removeOrphanedDocuments(t, n))).next(t => {\n      if (a = Date.now(), S() <= LogLevel.DEBUG) {\n        C(\"LruGarbageCollector\", `LRU Garbage Collection\\n\\tCounted targets in ${r - h}ms\\n\\tDetermined least recently used ${s} in ` + (o - r) + \"ms\\n\" + `\\tRemoved ${i} targets in ` + (c - o) + \"ms\\n\" + `\\tRemoved ${t} documents in ` + (a - c) + \"ms\\n\" + `Total Duration: ${a - h}ms`);\n      }\n      return At.resolve({\n        didRun: !0,\n        sequenceNumbersCollected: s,\n        targetsRemoved: i,\n        documentsRemoved: t\n      });\n    });\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Provides LRU functionality for IndexedDB persistence. */\nclass ho {\n  constructor(t, e) {\n    this.db = t, this.garbageCollector = function (t, e) {\n      return new ao(t, e);\n    }(this, e);\n  }\n  qn(t) {\n    const e = this.Gn(t);\n    return this.db.getTargetCache().getTargetCount(t).next(t => e.next(e => t + e));\n  }\n  Gn(t) {\n    let e = 0;\n    return this.Un(t, t => {\n      e++;\n    }).next(() => e);\n  }\n  forEachTarget(t, e) {\n    return this.db.getTargetCache().forEachTarget(t, e);\n  }\n  Un(t, e) {\n    return this.Qn(t, (t, n) => e(n));\n  }\n  addReference(t, e, n) {\n    return lo(t, n);\n  }\n  removeReference(t, e, n) {\n    return lo(t, n);\n  }\n  removeTargets(t, e, n) {\n    return this.db.getTargetCache().removeTargets(t, e, n);\n  }\n  markPotentiallyOrphaned(t, e) {\n    return lo(t, e);\n  }\n  /**\n   * Returns true if anything would prevent this document from being garbage\n   * collected, given that the document in question is not present in any\n   * targets and has a sequence number less than or equal to the upper bound for\n   * the collection run.\n   */\n  jn(t, e) {\n    return function (t, e) {\n      let n = !1;\n      return to(t).tt(s => Yr(t, s, e).next(t => (t && (n = !0), At.resolve(!t)))).next(() => n);\n    }(t, e);\n  }\n  removeOrphanedDocuments(t, e) {\n    const n = this.db.getRemoteDocumentCache().newChangeBuffer(),\n      s = [];\n    let i = 0;\n    return this.Qn(t, (r, o) => {\n      if (o <= e) {\n        const e = this.jn(t, r).next(e => {\n          if (!e)\n            // Our size accounting requires us to read all documents before\n            // removing them.\n            return i++, n.getEntry(t, r).next(() => (n.removeEntry(r, st.min()), ro(t).delete([0, Ii(r.path)])));\n        });\n        s.push(e);\n      }\n    }).next(() => At.waitFor(s)).next(() => n.apply(t)).next(() => i);\n  }\n  removeTarget(t, e) {\n    const n = e.withSequenceNumber(t.currentSequenceNumber);\n    return this.db.getTargetCache().updateTargetData(t, n);\n  }\n  updateLimboDocument(t, e) {\n    return lo(t, e);\n  }\n  /**\n   * Call provided function for each document in the cache that is 'orphaned'. Orphaned\n   * means not a part of any target, so the only entry in the target-document index for\n   * that document will be the sentinel row (targetId 0), which will also have the sequence\n   * number for the last time the document was accessed.\n   */\n  Qn(t, e) {\n    const n = ro(t);\n    let s,\n      i = $t.at;\n    return n.X({\n      index: \"documentTargetsIndex\"\n    }, ([t, n], {\n      path: r,\n      sequenceNumber: o\n    }) => {\n      0 === t ? (\n      // if nextToReport is valid, report it, this is a new key so the\n      // last one must not be a member of any targets.\n      i !== $t.at && e(new ct(Ai(s)), i),\n      // set nextToReport to be this sequence number. It's the next one we\n      // might report, if we don't find any targets for this document.\n      // Note that the sequence number must be defined when the targetId\n      // is 0.\n      i = o, s = r) :\n      // set nextToReport to be invalid, we know we don't need to report\n      // this one since we found a target for it.\n      i = $t.at;\n    }).next(() => {\n      // Since we report sequence numbers after getting to the next key, we\n      // need to check if the last key we iterated over was an orphaned\n      // document and report it.\n      i !== $t.at && e(new ct(Ai(s)), i);\n    });\n  }\n  getCacheSize(t) {\n    return this.db.getRemoteDocumentCache().getSize(t);\n  }\n}\nfunction lo(t, e) {\n  return ro(t).put(\n  /**\n  * @returns A value suitable for writing a sentinel row in the target-document\n  * store.\n  */\n  function (t, e) {\n    return {\n      targetId: 0,\n      path: Ii(t.path),\n      sequenceNumber: e\n    };\n  }(e, t.currentSequenceNumber));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory buffer of entries to be written to a RemoteDocumentCache.\n * It can be used to batch up a set of changes to be written to the cache, but\n * additionally supports reading entries back with the `getEntry()` method,\n * falling back to the underlying RemoteDocumentCache if no entry is\n * buffered.\n *\n * Entries added to the cache *must* be read first. This is to facilitate\n * calculating the size delta of the pending changes.\n *\n * PORTING NOTE: This class was implemented then removed from other platforms.\n * If byte-counting ends up being needed on the other platforms, consider\n * porting this class as part of that implementation work.\n */\nclass fo {\n  constructor() {\n    // A mapping of document key to the new cache entry that should be written.\n    this.changes = new ws(t => t.toString(), (t, e) => t.isEqual(e)), this.changesApplied = !1;\n  }\n  /**\n   * Buffers a `RemoteDocumentCache.addEntry()` call.\n   *\n   * You can only modify documents that have already been retrieved via\n   * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n   */\n  addEntry(t) {\n    this.assertNotApplied(), this.changes.set(t.key, t);\n  }\n  /**\n   * Buffers a `RemoteDocumentCache.removeEntry()` call.\n   *\n   * You can only remove documents that have already been retrieved via\n   * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n   */\n  removeEntry(t, e) {\n    this.assertNotApplied(), this.changes.set(t, sn.newInvalidDocument(t).setReadTime(e));\n  }\n  /**\n   * Looks up an entry in the cache. The buffered changes will first be checked,\n   * and if no buffered change applies, this will forward to\n   * `RemoteDocumentCache.getEntry()`.\n   *\n   * @param transaction - The transaction in which to perform any persistence\n   *     operations.\n   * @param documentKey - The key of the entry to look up.\n   * @returns The cached document or an invalid document if we have nothing\n   * cached.\n   */\n  getEntry(t, e) {\n    this.assertNotApplied();\n    const n = this.changes.get(e);\n    return void 0 !== n ? At.resolve(n) : this.getFromCache(t, e);\n  }\n  /**\n   * Looks up several entries in the cache, forwarding to\n   * `RemoteDocumentCache.getEntry()`.\n   *\n   * @param transaction - The transaction in which to perform any persistence\n   *     operations.\n   * @param documentKeys - The keys of the entries to look up.\n   * @returns A map of cached documents, indexed by key. If an entry cannot be\n   *     found, the corresponding key will be mapped to an invalid document.\n   */\n  getEntries(t, e) {\n    return this.getAllFromCache(t, e);\n  }\n  /**\n   * Applies buffered changes to the underlying RemoteDocumentCache, using\n   * the provided transaction.\n   */\n  apply(t) {\n    return this.assertNotApplied(), this.changesApplied = !0, this.applyChanges(t);\n  }\n  /** Helper to assert this.changes is not null  */\n  assertNotApplied() {}\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newIndexedDbRemoteDocumentCache()`.\n */\nclass _o {\n  constructor(t) {\n    this.Tt = t;\n  }\n  setIndexManager(t) {\n    this.indexManager = t;\n  }\n  /**\n   * Adds the supplied entries to the cache.\n   *\n   * All calls of `addEntry` are required to go through the RemoteDocumentChangeBuffer\n   * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n   */\n  addEntry(t, e, n) {\n    return yo(t).put(n);\n  }\n  /**\n   * Removes a document from the cache.\n   *\n   * All calls of `removeEntry`  are required to go through the RemoteDocumentChangeBuffer\n   * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n   */\n  removeEntry(t, e, n) {\n    return yo(t).delete(\n    /**\n    * Returns a key that can be used for document lookups via the primary key of\n    * the DbRemoteDocument object store.\n    */\n    function (t, e) {\n      const n = t.path.toArray();\n      return [/* prefix path */n.slice(0, n.length - 2), /* collection id */n[n.length - 2], nr(e), /* document id */n[n.length - 1]];\n    }\n    /**\n    * Returns a key that can be used for document lookups on the\n    * `DbRemoteDocumentDocumentCollectionGroupIndex` index.\n    */(e, n));\n  }\n  /**\n   * Updates the current cache size.\n   *\n   * Callers to `addEntry()` and `removeEntry()` *must* call this afterwards to update the\n   * cache's metadata.\n   */\n  updateMetadata(t, e) {\n    return this.getMetadata(t).next(n => (n.byteSize += e, this.zn(t, n)));\n  }\n  getEntry(t, e) {\n    let n = sn.newInvalidDocument(e);\n    return yo(t).X({\n      index: \"documentKeyIndex\",\n      range: IDBKeyRange.only(po(e))\n    }, (t, s) => {\n      n = this.Wn(e, s);\n    }).next(() => n);\n  }\n  /**\n   * Looks up an entry in the cache.\n   *\n   * @param documentKey - The key of the entry to look up.\n   * @returns The cached document entry and its size.\n   */\n  Hn(t, e) {\n    let n = {\n      size: 0,\n      document: sn.newInvalidDocument(e)\n    };\n    return yo(t).X({\n      index: \"documentKeyIndex\",\n      range: IDBKeyRange.only(po(e))\n    }, (t, s) => {\n      n = {\n        document: this.Wn(e, s),\n        size: Hr(s)\n      };\n    }).next(() => n);\n  }\n  getEntries(t, e) {\n    let n = gs();\n    return this.Jn(t, e, (t, e) => {\n      const s = this.Wn(t, e);\n      n = n.insert(t, s);\n    }).next(() => n);\n  }\n  /**\n   * Looks up several entries in the cache.\n   *\n   * @param documentKeys - The set of keys entries to look up.\n   * @returns A map of documents indexed by key and a map of sizes indexed by\n   *     key (zero if the document does not exist).\n   */\n  Yn(t, e) {\n    let n = gs(),\n      s = new We(ct.comparator);\n    return this.Jn(t, e, (t, e) => {\n      const i = this.Wn(t, e);\n      n = n.insert(t, i), s = s.insert(t, Hr(e));\n    }).next(() => ({\n      documents: n,\n      Zn: s\n    }));\n  }\n  Jn(t, e, n) {\n    if (e.isEmpty()) return At.resolve();\n    let s = new Ye(To);\n    e.forEach(t => s = s.add(t));\n    const i = IDBKeyRange.bound(po(s.first()), po(s.last())),\n      r = s.getIterator();\n    let o = r.getNext();\n    return yo(t).X({\n      index: \"documentKeyIndex\",\n      range: i\n    }, (t, e, s) => {\n      const i = ct.fromSegments([...e.prefixPath, e.collectionGroup, e.documentId]);\n      // Go through keys not found in cache.\n      for (; o && To(o, i) < 0;) n(o, null), o = r.getNext();\n      o && o.isEqual(i) && (\n      // Key found in cache.\n      n(o, e), o = r.hasNext() ? r.getNext() : null),\n      // Skip to the next key (if there is one).\n      o ? s.j(po(o)) : s.done();\n    }).next(() => {\n      // The rest of the keys are not in the cache. One case where `iterate`\n      // above won't go through them is when the cache is empty.\n      for (; o;) n(o, null), o = r.hasNext() ? r.getNext() : null;\n    });\n  }\n  getDocumentsMatchingQuery(t, e, n, s) {\n    const i = e.path,\n      r = [i.popLast().toArray(), i.lastSegment(), nr(n.readTime), n.documentKey.path.isEmpty() ? \"\" : n.documentKey.path.lastSegment()],\n      o = [i.popLast().toArray(), i.lastSegment(), [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], \"\"];\n    return yo(t).W(IDBKeyRange.bound(r, o, !0)).next(t => {\n      let n = gs();\n      for (const i of t) {\n        const t = this.Wn(ct.fromSegments(i.prefixPath.concat(i.collectionGroup, i.documentId)), i);\n        t.isFoundDocument() && (bn(e, t) || s.has(t.key)) && (\n        // Either the document matches the given query, or it is mutated.\n        n = n.insert(t.key, t));\n      }\n      return n;\n    });\n  }\n  getAllFromCollectionGroup(t, e, n, s) {\n    let i = gs();\n    const r = Io(e, n),\n      o = Io(e, yt.max());\n    return yo(t).X({\n      index: \"collectionGroupIndex\",\n      range: IDBKeyRange.bound(r, o, !0)\n    }, (t, e, n) => {\n      const r = this.Wn(ct.fromSegments(e.prefixPath.concat(e.collectionGroup, e.documentId)), e);\n      i = i.insert(r.key, r), i.size === s && n.done();\n    }).next(() => i);\n  }\n  newChangeBuffer(t) {\n    return new mo(this, !!t && t.trackRemovals);\n  }\n  getSize(t) {\n    return this.getMetadata(t).next(t => t.byteSize);\n  }\n  getMetadata(t) {\n    return go(t).get(\"remoteDocumentGlobalKey\").next(t => (M(!!t), t));\n  }\n  zn(t, e) {\n    return go(t).put(\"remoteDocumentGlobalKey\", e);\n  }\n  /**\n   * Decodes `dbRemoteDoc` and returns the document (or an invalid document if\n   * the document corresponds to the format used for sentinel deletes).\n   */\n  Wn(t, e) {\n    if (e) {\n      const t = tr(this.Tt, e);\n      // Whether the document is a sentinel removal and should only be used in the\n      // `getNewDocumentChanges()`\n      if (!(t.isNoDocument() && t.version.isEqual(st.min()))) return t;\n    }\n    return sn.newInvalidDocument(t);\n  }\n}\n\n/** Creates a new IndexedDbRemoteDocumentCache. */\nfunction wo(t) {\n  return new _o(t);\n}\n\n/**\n * Handles the details of adding and updating documents in the IndexedDbRemoteDocumentCache.\n *\n * Unlike the MemoryRemoteDocumentChangeBuffer, the IndexedDb implementation computes the size\n * delta for all submitted changes. This avoids having to re-read all documents from IndexedDb\n * when we apply the changes.\n */\nclass mo extends fo {\n  /**\n   * @param documentCache - The IndexedDbRemoteDocumentCache to apply the changes to.\n   * @param trackRemovals - Whether to create sentinel deletes that can be tracked by\n   * `getNewDocumentChanges()`.\n   */\n  constructor(t, e) {\n    super(), this.Xn = t, this.trackRemovals = e,\n    // A map of document sizes and read times prior to applying the changes in\n    // this buffer.\n    this.ts = new ws(t => t.toString(), (t, e) => t.isEqual(e));\n  }\n  applyChanges(t) {\n    const e = [];\n    let n = 0,\n      s = new Ye((t, e) => X(t.canonicalString(), e.canonicalString()));\n    return this.changes.forEach((i, r) => {\n      const o = this.ts.get(i);\n      if (e.push(this.Xn.removeEntry(t, i, o.readTime)), r.isValidDocument()) {\n        const u = er(this.Xn.Tt, r);\n        s = s.add(i.path.popLast());\n        const c = Hr(u);\n        n += c - o.size, e.push(this.Xn.addEntry(t, i, u));\n      } else if (n -= o.size, this.trackRemovals) {\n        // In order to track removals, we store a \"sentinel delete\" in the\n        // RemoteDocumentCache. This entry is represented by a NoDocument\n        // with a version of 0 and ignored by `maybeDecodeDocument()` but\n        // preserved in `getNewDocumentChanges()`.\n        const n = er(this.Xn.Tt, r.convertToNoDocument(st.min()));\n        e.push(this.Xn.addEntry(t, i, n));\n      }\n    }), s.forEach(n => {\n      e.push(this.Xn.indexManager.addToCollectionParentIndex(t, n));\n    }), e.push(this.Xn.updateMetadata(t, n)), At.waitFor(e);\n  }\n  getFromCache(t, e) {\n    // Record the size of everything we load from the cache so we can compute a delta later.\n    return this.Xn.Hn(t, e).next(t => (this.ts.set(e, {\n      size: t.size,\n      readTime: t.document.readTime\n    }), t.document));\n  }\n  getAllFromCache(t, e) {\n    // Record the size of everything we load from the cache so we can compute\n    // a delta later.\n    return this.Xn.Yn(t, e).next(({\n      documents: t,\n      Zn: e\n    }) => (\n    // Note: `getAllFromCache` returns two maps instead of a single map from\n    // keys to `DocumentSizeEntry`s. This is to allow returning the\n    // `MutableDocumentMap` directly, without a conversion.\n    e.forEach((e, n) => {\n      this.ts.set(e, {\n        size: n,\n        readTime: t.get(e).readTime\n      });\n    }), t));\n  }\n}\nfunction go(t) {\n  return Wi(t, \"remoteDocumentGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the remoteDocuments object store.\n */\nfunction yo(t) {\n  return Wi(t, \"remoteDocumentsV14\");\n}\n\n/**\n * Returns a key that can be used for document lookups on the\n * `DbRemoteDocumentDocumentKeyIndex` index.\n */\nfunction po(t) {\n  const e = t.path.toArray();\n  return [/* prefix path */e.slice(0, e.length - 2), /* collection id */e[e.length - 2], /* document id */e[e.length - 1]];\n}\nfunction Io(t, e) {\n  const n = e.documentKey.path.toArray();\n  return [/* collection id */t, nr(e.readTime), /* prefix path */n.slice(0, n.length - 2), /* document id */n.length > 0 ? n[n.length - 1] : \"\"];\n}\n\n/**\n * Comparator that compares document keys according to the primary key sorting\n * used by the `DbRemoteDocumentDocument` store (by prefix path, collection id\n * and then document ID).\n *\n * Visible for testing.\n */\nfunction To(t, e) {\n  const n = t.path.toArray(),\n    s = e.path.toArray();\n  // The ordering is based on https://chromium.googlesource.com/chromium/blink/+/fe5c21fef94dae71c1c3344775b8d8a7f7e6d9ec/Source/modules/indexeddb/IDBKey.cpp#74\n  let i = 0;\n  for (let t = 0; t < n.length - 2 && t < s.length - 2; ++t) if (i = X(n[t], s[t]), i) return i;\n  return i = X(n.length, s.length), i || (i = X(n[n.length - 2], s[s.length - 2]), i || X(n[n.length - 1], s[s.length - 1]));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Schema Version for the Web client:\n * 1.  Initial version including Mutation Queue, Query Cache, and Remote\n *     Document Cache\n * 2.  Used to ensure a targetGlobal object exists and add targetCount to it. No\n *     longer required because migration 3 unconditionally clears it.\n * 3.  Dropped and re-created Query Cache to deal with cache corruption related\n *     to limbo resolution. Addresses\n *     https://github.com/firebase/firebase-ios-sdk/issues/1548\n * 4.  Multi-Tab Support.\n * 5.  Removal of held write acks.\n * 6.  Create document global for tracking document cache size.\n * 7.  Ensure every cached document has a sentinel row with a sequence number.\n * 8.  Add collection-parent index for Collection Group queries.\n * 9.  Change RemoteDocumentChanges store to be keyed by readTime rather than\n *     an auto-incrementing ID. This is required for Index-Free queries.\n * 10. Rewrite the canonical IDs to the explicit Protobuf-based format.\n * 11. Add bundles and named_queries for bundle support.\n * 12. Add document overlays.\n * 13. Rewrite the keys of the remote document cache to allow for efficient\n *     document lookup via `getAll()`.\n * 14. Add overlays.\n * 15. Add indexing support.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a local view (overlay) of a document, and the fields that are\n * locally mutated.\n */\nclass Eo {\n  constructor(t,\n  /**\n   * The fields that are locally mutated by patch mutations.\n   *\n   * If the overlayed\tdocument is from set or delete mutations, this is `null`.\n   * If there is no overlay (mutation) for the document, this is an empty `FieldMask`.\n   */\n  e) {\n    this.overlayedDocument = t, this.mutatedFields = e;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A readonly view of the local state of all documents we're tracking (i.e. we\n * have a cached version in remoteDocumentCache or local mutations for the\n * document). The view is computed by applying the mutations in the\n * MutationQueue to the RemoteDocumentCache.\n */\nclass Ao {\n  constructor(t, e, n, s) {\n    this.remoteDocumentCache = t, this.mutationQueue = e, this.documentOverlayCache = n, this.indexManager = s;\n  }\n  /**\n   * Get the local view of the document identified by `key`.\n   *\n   * @returns Local view of the document or null if we don't have any cached\n   * state for it.\n   */\n  getDocument(t, e) {\n    let n = null;\n    return this.documentOverlayCache.getOverlay(t, e).next(s => (n = s, this.remoteDocumentCache.getEntry(t, e))).next(t => (null !== n && ts(n.mutation, t, tn.empty(), nt.now()), t));\n  }\n  /**\n   * Gets the local view of the documents identified by `keys`.\n   *\n   * If we don't have cached state for a document in `keys`, a NoDocument will\n   * be stored for that key in the resulting set.\n   */\n  getDocuments(t, e) {\n    return this.remoteDocumentCache.getEntries(t, e).next(e => this.getLocalViewOfDocuments(t, e, vs()).next(() => e));\n  }\n  /**\n   * Similar to `getDocuments`, but creates the local view from the given\n   * `baseDocs` without retrieving documents from the local store.\n   *\n   * @param transaction - The transaction this operation is scoped to.\n   * @param docs - The documents to apply local mutations to get the local views.\n   * @param existenceStateChanged - The set of document keys whose existence state\n   *   is changed. This is useful to determine if some documents overlay needs\n   *   to be recalculated.\n   */\n  getLocalViewOfDocuments(t, e, n = vs()) {\n    const s = Ts();\n    return this.populateOverlays(t, s, e).next(() => this.computeViews(t, e, s, n).next(t => {\n      let e = ps();\n      return t.forEach((t, n) => {\n        e = e.insert(t, n.overlayedDocument);\n      }), e;\n    }));\n  }\n  /**\n   * Gets the overlayed documents for the given document map, which will include\n   * the local view of those documents and a `FieldMask` indicating which fields\n   * are mutated locally, `null` if overlay is a Set or Delete mutation.\n   */\n  getOverlayedDocuments(t, e) {\n    const n = Ts();\n    return this.populateOverlays(t, n, e).next(() => this.computeViews(t, e, n, vs()));\n  }\n  /**\n   * Fetches the overlays for {@code docs} and adds them to provided overlay map\n   * if the map does not already contain an entry for the given document key.\n   */\n  populateOverlays(t, e, n) {\n    const s = [];\n    return n.forEach(t => {\n      e.has(t) || s.push(t);\n    }), this.documentOverlayCache.getOverlays(t, s).next(t => {\n      t.forEach((t, n) => {\n        e.set(t, n);\n      });\n    });\n  }\n  /**\n   * Computes the local view for the given documents.\n   *\n   * @param docs - The documents to compute views for. It also has the base\n   *   version of the documents.\n   * @param overlays - The overlays that need to be applied to the given base\n   *   version of the documents.\n   * @param existenceStateChanged - A set of documents whose existence states\n   *   might have changed. This is used to determine if we need to re-calculate\n   *   overlays from mutation queues.\n   * @return A map represents the local documents view.\n   */\n  computeViews(t, e, n, s) {\n    let i = gs();\n    const r = As(),\n      o = As();\n    return e.forEach((t, e) => {\n      const o = n.get(e.key);\n      // Recalculate an overlay if the document's existence state changed due to\n      // a remote event *and* the overlay is a PatchMutation. This is because\n      // document existence state can change if some patch mutation's\n      // preconditions are met.\n      // NOTE: we recalculate when `overlay` is undefined as well, because there\n      // might be a patch mutation whose precondition does not match before the\n      // change (hence overlay is undefined), but would now match.\n      s.has(e.key) && (void 0 === o || o.mutation instanceof is) ? i = i.insert(e.key, e) : void 0 !== o ? (r.set(e.key, o.mutation.getFieldMask()), ts(o.mutation, e, o.mutation.getFieldMask(), nt.now())) :\n      // no overlay exists\n      // Using EMPTY to indicate there is no overlay for the document.\n      r.set(e.key, tn.empty());\n    }), this.recalculateAndSaveOverlays(t, i).next(t => (t.forEach((t, e) => r.set(t, e)), e.forEach((t, e) => {\n      var n;\n      return o.set(t, new Eo(e, null !== (n = r.get(t)) && void 0 !== n ? n : null));\n    }), o));\n  }\n  recalculateAndSaveOverlays(t, e) {\n    const n = As();\n    // A reverse lookup map from batch id to the documents within that batch.\n    let s = new We((t, e) => t - e),\n      i = vs();\n    return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t, e).next(t => {\n      for (const i of t) i.keys().forEach(t => {\n        const r = e.get(t);\n        if (null === r) return;\n        let o = n.get(t) || tn.empty();\n        o = i.applyToLocalView(r, o), n.set(t, o);\n        const u = (s.get(i.batchId) || vs()).add(t);\n        s = s.insert(i.batchId, u);\n      });\n    }).next(() => {\n      const r = [],\n        o = s.getReverseIterator();\n      // Iterate in descending order of batch IDs, and skip documents that are\n      // already saved.\n      for (; o.hasNext();) {\n        const s = o.getNext(),\n          u = s.key,\n          c = s.value,\n          a = Es();\n        c.forEach(t => {\n          if (!i.has(t)) {\n            const s = Zn(e.get(t), n.get(t));\n            null !== s && a.set(t, s), i = i.add(t);\n          }\n        }), r.push(this.documentOverlayCache.saveOverlays(t, u, a));\n      }\n      return At.waitFor(r);\n    }).next(() => n);\n  }\n  /**\n   * Recalculates overlays by reading the documents from remote document cache\n   * first, and saves them after they are calculated.\n   */\n  recalculateAndSaveOverlaysForDocumentKeys(t, e) {\n    return this.remoteDocumentCache.getEntries(t, e).next(e => this.recalculateAndSaveOverlays(t, e));\n  }\n  /**\n   * Performs a query against the local view of all documents.\n   *\n   * @param transaction - The persistence transaction.\n   * @param query - The query to match documents against.\n   * @param offset - Read time and key to start scanning by (exclusive).\n   */\n  getDocumentsMatchingQuery(t, e, n) {\n    /**\n    * Returns whether the query matches a single document by path (rather than a\n    * collection).\n    */\n    return function (t) {\n      return ct.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;\n    }(e) ? this.getDocumentsMatchingDocumentQuery(t, e.path) : pn(e) ? this.getDocumentsMatchingCollectionGroupQuery(t, e, n) : this.getDocumentsMatchingCollectionQuery(t, e, n);\n  }\n  /**\n   * Given a collection group, returns the next documents that follow the provided offset, along\n   * with an updated batch ID.\n   *\n   * <p>The documents returned by this method are ordered by remote version from the provided\n   * offset. If there are no more remote documents after the provided offset, documents with\n   * mutations in order of batch id from the offset are returned. Since all documents in a batch are\n   * returned together, the total number of documents returned can exceed {@code count}.\n   *\n   * @param transaction\n   * @param collectionGroup The collection group for the documents.\n   * @param offset The offset to index into.\n   * @param count The number of documents to return\n   * @return A LocalWriteResult with the documents that follow the provided offset and the last processed batch id.\n   */\n  getNextDocuments(t, e, n, s) {\n    return this.remoteDocumentCache.getAllFromCollectionGroup(t, e, n, s).next(i => {\n      const r = s - i.size > 0 ? this.documentOverlayCache.getOverlaysForCollectionGroup(t, e, n.largestBatchId, s - i.size) : At.resolve(Ts());\n      // The callsite will use the largest batch ID together with the latest read time to create\n      // a new index offset. Since we only process batch IDs if all remote documents have been read,\n      // no overlay will increase the overall read time. This is why we only need to special case\n      // the batch id.\n      let o = -1,\n        u = i;\n      return r.next(e => At.forEach(e, (e, n) => (o < n.largestBatchId && (o = n.largestBatchId), i.get(e) ? At.resolve() : this.remoteDocumentCache.getEntry(t, e).next(t => {\n        u = u.insert(e, t);\n      }))).next(() => this.populateOverlays(t, e, i)).next(() => this.computeViews(t, u, e, vs())).next(t => ({\n        batchId: o,\n        changes: Is(t)\n      })));\n    });\n  }\n  getDocumentsMatchingDocumentQuery(t, e) {\n    // Just do a simple document lookup.\n    return this.getDocument(t, new ct(e)).next(t => {\n      let e = ps();\n      return t.isFoundDocument() && (e = e.insert(t.key, t)), e;\n    });\n  }\n  getDocumentsMatchingCollectionGroupQuery(t, e, n) {\n    const s = e.collectionGroup;\n    let i = ps();\n    return this.indexManager.getCollectionParents(t, s).next(r => At.forEach(r, r => {\n      const o = function (t, e) {\n        return new dn(e, /*collectionGroup=*/null, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);\n      }(e, r.child(s));\n      return this.getDocumentsMatchingCollectionQuery(t, o, n).next(t => {\n        t.forEach((t, e) => {\n          i = i.insert(t, e);\n        });\n      });\n    }).next(() => i));\n  }\n  getDocumentsMatchingCollectionQuery(t, e, n) {\n    // Query the remote documents and overlay mutations.\n    let s;\n    return this.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId).next(i => (s = i, this.remoteDocumentCache.getDocumentsMatchingQuery(t, e, n, s))).next(t => {\n      // As documents might match the query because of their overlay we need to\n      // include documents for all overlays in the initial document set.\n      s.forEach((e, n) => {\n        const s = n.getKey();\n        null === t.get(s) && (t = t.insert(s, sn.newInvalidDocument(s)));\n      });\n      // Apply the overlays and match against the query.\n      let n = ps();\n      return t.forEach((t, i) => {\n        const r = s.get(t);\n        void 0 !== r && ts(r.mutation, i, tn.empty(), nt.now()),\n        // Finally, insert the documents that still match the query\n        bn(e, i) && (n = n.insert(t, i));\n      }), n;\n    });\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Ro {\n  constructor(t) {\n    this.Tt = t, this.es = new Map(), this.ns = new Map();\n  }\n  getBundleMetadata(t, e) {\n    return At.resolve(this.es.get(e));\n  }\n  saveBundleMetadata(t, e) {\n    /** Decodes a BundleMetadata proto into a BundleMetadata object. */\n    var n;\n    return this.es.set(e.id, {\n      id: (n = e).id,\n      version: n.version,\n      createTime: Qs(n.createTime)\n    }), At.resolve();\n  }\n  getNamedQuery(t, e) {\n    return At.resolve(this.ns.get(e));\n  }\n  saveNamedQuery(t, e) {\n    return this.ns.set(e.name, function (t) {\n      return {\n        name: t.name,\n        query: cr(t.bundledQuery),\n        readTime: Qs(t.readTime)\n      };\n    }(e)), At.resolve();\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of DocumentOverlayCache.\n */\nclass Po {\n  constructor() {\n    // A map sorted by DocumentKey, whose value is a pair of the largest batch id\n    // for the overlay and the overlay itself.\n    this.overlays = new We(ct.comparator), this.ss = new Map();\n  }\n  getOverlay(t, e) {\n    return At.resolve(this.overlays.get(e));\n  }\n  getOverlays(t, e) {\n    const n = Ts();\n    return At.forEach(e, e => this.getOverlay(t, e).next(t => {\n      null !== t && n.set(e, t);\n    })).next(() => n);\n  }\n  saveOverlays(t, e, n) {\n    return n.forEach((n, s) => {\n      this.ce(t, e, s);\n    }), At.resolve();\n  }\n  removeOverlaysForBatchId(t, e, n) {\n    const s = this.ss.get(n);\n    return void 0 !== s && (s.forEach(t => this.overlays = this.overlays.remove(t)), this.ss.delete(n)), At.resolve();\n  }\n  getOverlaysForCollection(t, e, n) {\n    const s = Ts(),\n      i = e.length + 1,\n      r = new ct(e.child(\"\")),\n      o = this.overlays.getIteratorFrom(r);\n    for (; o.hasNext();) {\n      const t = o.getNext().value,\n        r = t.getKey();\n      if (!e.isPrefixOf(r.path)) break;\n      // Documents from sub-collections\n      r.path.length === i && t.largestBatchId > n && s.set(t.getKey(), t);\n    }\n    return At.resolve(s);\n  }\n  getOverlaysForCollectionGroup(t, e, n, s) {\n    let i = new We((t, e) => t - e);\n    const r = this.overlays.getIterator();\n    for (; r.hasNext();) {\n      const t = r.getNext().value;\n      if (t.getKey().getCollectionGroup() === e && t.largestBatchId > n) {\n        let e = i.get(t.largestBatchId);\n        null === e && (e = Ts(), i = i.insert(t.largestBatchId, e)), e.set(t.getKey(), t);\n      }\n    }\n    const o = Ts(),\n      u = i.getIterator();\n    for (; u.hasNext();) {\n      if (u.getNext().value.forEach((t, e) => o.set(t, e)), o.size() >= s) break;\n    }\n    return At.resolve(o);\n  }\n  ce(t, e, n) {\n    // Remove the association of the overlay to its batch id.\n    const s = this.overlays.get(n.key);\n    if (null !== s) {\n      const t = this.ss.get(s.largestBatchId).delete(n.key);\n      this.ss.set(s.largestBatchId, t);\n    }\n    this.overlays = this.overlays.insert(n.key, new Yi(e, n));\n    // Create the association of this overlay to the given largestBatchId.\n    let i = this.ss.get(e);\n    void 0 === i && (i = vs(), this.ss.set(e, i)), this.ss.set(e, i.add(n.key));\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A collection of references to a document from some kind of numbered entity\n * (either a target ID or batch ID). As references are added to or removed from\n * the set corresponding events are emitted to a registered garbage collector.\n *\n * Each reference is represented by a DocumentReference object. Each of them\n * contains enough information to uniquely identify the reference. They are all\n * stored primarily in a set sorted by key. A document is considered garbage if\n * there's no references in that set (this can be efficiently checked thanks to\n * sorting by key).\n *\n * ReferenceSet also keeps a secondary set that contains references sorted by\n * IDs. This one is used to efficiently implement removal of all references by\n * some target ID.\n */\nclass vo {\n  constructor() {\n    // A set of outstanding references to a document sorted by key.\n    this.rs = new Ye(bo.os),\n    // A set of outstanding references to a document sorted by target id.\n    this.us = new Ye(bo.cs);\n  }\n  /** Returns true if the reference set contains no references. */\n  isEmpty() {\n    return this.rs.isEmpty();\n  }\n  /** Adds a reference to the given document key for the given ID. */\n  addReference(t, e) {\n    const n = new bo(t, e);\n    this.rs = this.rs.add(n), this.us = this.us.add(n);\n  }\n  /** Add references to the given document keys for the given ID. */\n  hs(t, e) {\n    t.forEach(t => this.addReference(t, e));\n  }\n  /**\n   * Removes a reference to the given document key for the given\n   * ID.\n   */\n  removeReference(t, e) {\n    this.ls(new bo(t, e));\n  }\n  fs(t, e) {\n    t.forEach(t => this.removeReference(t, e));\n  }\n  /**\n   * Clears all references with a given ID. Calls removeRef() for each key\n   * removed.\n   */\n  ds(t) {\n    const e = new ct(new rt([])),\n      n = new bo(e, t),\n      s = new bo(e, t + 1),\n      i = [];\n    return this.us.forEachInRange([n, s], t => {\n      this.ls(t), i.push(t.key);\n    }), i;\n  }\n  _s() {\n    this.rs.forEach(t => this.ls(t));\n  }\n  ls(t) {\n    this.rs = this.rs.delete(t), this.us = this.us.delete(t);\n  }\n  ws(t) {\n    const e = new ct(new rt([])),\n      n = new bo(e, t),\n      s = new bo(e, t + 1);\n    let i = vs();\n    return this.us.forEachInRange([n, s], t => {\n      i = i.add(t.key);\n    }), i;\n  }\n  containsKey(t) {\n    const e = new bo(t, 0),\n      n = this.rs.firstAfterOrEqual(e);\n    return null !== n && t.isEqual(n.key);\n  }\n}\nclass bo {\n  constructor(t, e) {\n    this.key = t, this.gs = e;\n  }\n  /** Compare by key then by ID */\n  static os(t, e) {\n    return ct.comparator(t.key, e.key) || X(t.gs, e.gs);\n  }\n  /** Compare by ID then by key */\n  static cs(t, e) {\n    return X(t.gs, e.gs) || ct.comparator(t.key, e.key);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Vo {\n  constructor(t, e) {\n    this.indexManager = t, this.referenceDelegate = e,\n    /**\n     * The set of all mutations that have been sent but not yet been applied to\n     * the backend.\n     */\n    this.mutationQueue = [], /** Next value to use when assigning sequential IDs to each mutation batch. */\n    this.ys = 1, /** An ordered mapping between documents and the mutations batch IDs. */\n    this.ps = new Ye(bo.os);\n  }\n  checkEmpty(t) {\n    return At.resolve(0 === this.mutationQueue.length);\n  }\n  addMutationBatch(t, e, n, s) {\n    const i = this.ys;\n    this.ys++, this.mutationQueue.length > 0 && this.mutationQueue[this.mutationQueue.length - 1];\n    const r = new Hi(i, e, n, s);\n    this.mutationQueue.push(r);\n    // Track references by document key and index collection parents.\n    for (const e of s) this.ps = this.ps.add(new bo(e.key, i)), this.indexManager.addToCollectionParentIndex(t, e.key.path.popLast());\n    return At.resolve(r);\n  }\n  lookupMutationBatch(t, e) {\n    return At.resolve(this.Is(e));\n  }\n  getNextMutationBatchAfterBatchId(t, e) {\n    const n = e + 1,\n      s = this.Ts(n),\n      i = s < 0 ? 0 : s;\n    // The requested batchId may still be out of range so normalize it to the\n    // start of the queue.\n    return At.resolve(this.mutationQueue.length > i ? this.mutationQueue[i] : null);\n  }\n  getHighestUnacknowledgedBatchId() {\n    return At.resolve(0 === this.mutationQueue.length ? -1 : this.ys - 1);\n  }\n  getAllMutationBatches(t) {\n    return At.resolve(this.mutationQueue.slice());\n  }\n  getAllMutationBatchesAffectingDocumentKey(t, e) {\n    const n = new bo(e, 0),\n      s = new bo(e, Number.POSITIVE_INFINITY),\n      i = [];\n    return this.ps.forEachInRange([n, s], t => {\n      const e = this.Is(t.gs);\n      i.push(e);\n    }), At.resolve(i);\n  }\n  getAllMutationBatchesAffectingDocumentKeys(t, e) {\n    let n = new Ye(X);\n    return e.forEach(t => {\n      const e = new bo(t, 0),\n        s = new bo(t, Number.POSITIVE_INFINITY);\n      this.ps.forEachInRange([e, s], t => {\n        n = n.add(t.gs);\n      });\n    }), At.resolve(this.Es(n));\n  }\n  getAllMutationBatchesAffectingQuery(t, e) {\n    // Use the query path as a prefix for testing if a document matches the\n    // query.\n    const n = e.path,\n      s = n.length + 1;\n    // Construct a document reference for actually scanning the index. Unlike\n    // the prefix the document key in this reference must have an even number of\n    // segments. The empty segment can be used a suffix of the query path\n    // because it precedes all other segments in an ordered traversal.\n    let i = n;\n    ct.isDocumentKey(i) || (i = i.child(\"\"));\n    const r = new bo(new ct(i), 0);\n    // Find unique batchIDs referenced by all documents potentially matching the\n    // query.\n    let o = new Ye(X);\n    return this.ps.forEachWhile(t => {\n      const e = t.key.path;\n      return !!n.isPrefixOf(e) && (\n      // Rows with document keys more than one segment longer than the query\n      // path can't be matches. For example, a query on 'rooms' can't match\n      // the document /rooms/abc/messages/xyx.\n      // TODO(mcg): we'll need a different scanner when we implement\n      // ancestor queries.\n      e.length === s && (o = o.add(t.gs)), !0);\n    }, r), At.resolve(this.Es(o));\n  }\n  Es(t) {\n    // Construct an array of matching batches, sorted by batchID to ensure that\n    // multiple mutations affecting the same document key are applied in order.\n    const e = [];\n    return t.forEach(t => {\n      const n = this.Is(t);\n      null !== n && e.push(n);\n    }), e;\n  }\n  removeMutationBatch(t, e) {\n    M(0 === this.As(e.batchId, \"removed\")), this.mutationQueue.shift();\n    let n = this.ps;\n    return At.forEach(e.mutations, s => {\n      const i = new bo(s.key, e.batchId);\n      return n = n.delete(i), this.referenceDelegate.markPotentiallyOrphaned(t, s.key);\n    }).next(() => {\n      this.ps = n;\n    });\n  }\n  Pn(t) {\n    // No-op since the memory mutation queue does not maintain a separate cache.\n  }\n  containsKey(t, e) {\n    const n = new bo(e, 0),\n      s = this.ps.firstAfterOrEqual(n);\n    return At.resolve(e.isEqual(s && s.key));\n  }\n  performConsistencyCheck(t) {\n    return this.mutationQueue.length, At.resolve();\n  }\n  /**\n   * Finds the index of the given batchId in the mutation queue and asserts that\n   * the resulting index is within the bounds of the queue.\n   *\n   * @param batchId - The batchId to search for\n   * @param action - A description of what the caller is doing, phrased in passive\n   * form (e.g. \"acknowledged\" in a routine that acknowledges batches).\n   */\n  As(t, e) {\n    return this.Ts(t);\n  }\n  /**\n   * Finds the index of the given batchId in the mutation queue. This operation\n   * is O(1).\n   *\n   * @returns The computed index of the batch with the given batchId, based on\n   * the state of the queue. Note this index can be negative if the requested\n   * batchId has already been remvoed from the queue or past the end of the\n   * queue if the batchId is larger than the last added batch.\n   */\n  Ts(t) {\n    if (0 === this.mutationQueue.length)\n      // As an index this is past the end of the queue\n      return 0;\n    // Examine the front of the queue to figure out the difference between the\n    // batchId and indexes in the array. Note that since the queue is ordered\n    // by batchId, if the first batch has a larger batchId then the requested\n    // batchId doesn't exist in the queue.\n    return t - this.mutationQueue[0].batchId;\n  }\n  /**\n   * A version of lookupMutationBatch that doesn't return a promise, this makes\n   * other functions that uses this code easier to read and more efficent.\n   */\n  Is(t) {\n    const e = this.Ts(t);\n    if (e < 0 || e >= this.mutationQueue.length) return null;\n    return this.mutationQueue[e];\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The memory-only RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newMemoryRemoteDocumentCache()`.\n */\nclass So {\n  /**\n   * @param sizer - Used to assess the size of a document. For eager GC, this is\n   * expected to just return 0 to avoid unnecessarily doing the work of\n   * calculating the size.\n   */\n  constructor(t) {\n    this.Rs = t, /** Underlying cache of documents and their read times. */\n    this.docs = new We(ct.comparator), /** Size of all cached documents. */\n    this.size = 0;\n  }\n  setIndexManager(t) {\n    this.indexManager = t;\n  }\n  /**\n   * Adds the supplied entry to the cache and updates the cache size as appropriate.\n   *\n   * All calls of `addEntry`  are required to go through the RemoteDocumentChangeBuffer\n   * returned by `newChangeBuffer()`.\n   */\n  addEntry(t, e) {\n    const n = e.key,\n      s = this.docs.get(n),\n      i = s ? s.size : 0,\n      r = this.Rs(e);\n    return this.docs = this.docs.insert(n, {\n      document: e.mutableCopy(),\n      size: r\n    }), this.size += r - i, this.indexManager.addToCollectionParentIndex(t, n.path.popLast());\n  }\n  /**\n   * Removes the specified entry from the cache and updates the cache size as appropriate.\n   *\n   * All calls of `removeEntry` are required to go through the RemoteDocumentChangeBuffer\n   * returned by `newChangeBuffer()`.\n   */\n  removeEntry(t) {\n    const e = this.docs.get(t);\n    e && (this.docs = this.docs.remove(t), this.size -= e.size);\n  }\n  getEntry(t, e) {\n    const n = this.docs.get(e);\n    return At.resolve(n ? n.document.mutableCopy() : sn.newInvalidDocument(e));\n  }\n  getEntries(t, e) {\n    let n = gs();\n    return e.forEach(t => {\n      const e = this.docs.get(t);\n      n = n.insert(t, e ? e.document.mutableCopy() : sn.newInvalidDocument(t));\n    }), At.resolve(n);\n  }\n  getDocumentsMatchingQuery(t, e, n, s) {\n    let i = gs();\n    // Documents are ordered by key, so we can use a prefix scan to narrow down\n    // the documents we need to match the query against.\n    const r = e.path,\n      o = new ct(r.child(\"\")),\n      u = this.docs.getIteratorFrom(o);\n    for (; u.hasNext();) {\n      const {\n        key: t,\n        value: {\n          document: o\n        }\n      } = u.getNext();\n      if (!r.isPrefixOf(t.path)) break;\n      t.path.length > r.length + 1 || pt(gt(o), n) <= 0 || (s.has(o.key) || bn(e, o)) && (i = i.insert(o.key, o.mutableCopy()));\n    }\n    return At.resolve(i);\n  }\n  getAllFromCollectionGroup(t, e, n, s) {\n    // This method should only be called from the IndexBackfiller if persistence\n    // is enabled.\n    $();\n  }\n  Ps(t, e) {\n    return At.forEach(this.docs, t => e(t));\n  }\n  newChangeBuffer(t) {\n    // `trackRemovals` is ignores since the MemoryRemoteDocumentCache keeps\n    // a separate changelog and does not need special handling for removals.\n    return new Do(this);\n  }\n  getSize(t) {\n    return At.resolve(this.size);\n  }\n}\n\n/**\n * Creates a new memory-only RemoteDocumentCache.\n *\n * @param sizer - Used to assess the size of a document. For eager GC, this is\n * expected to just return 0 to avoid unnecessarily doing the work of\n * calculating the size.\n */\n/**\n * Handles the details of adding and updating documents in the MemoryRemoteDocumentCache.\n */\nclass Do extends fo {\n  constructor(t) {\n    super(), this.Xn = t;\n  }\n  applyChanges(t) {\n    const e = [];\n    return this.changes.forEach((n, s) => {\n      s.isValidDocument() ? e.push(this.Xn.addEntry(t, s)) : this.Xn.removeEntry(n);\n    }), At.waitFor(e);\n  }\n  getFromCache(t, e) {\n    return this.Xn.getEntry(t, e);\n  }\n  getAllFromCache(t, e) {\n    return this.Xn.getEntries(t, e);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Co {\n  constructor(t) {\n    this.persistence = t,\n    /**\n     * Maps a target to the data about that target\n     */\n    this.vs = new ws(t => un(t), cn), /** The last received snapshot version. */\n    this.lastRemoteSnapshotVersion = st.min(), /** The highest numbered target ID encountered. */\n    this.highestTargetId = 0, /** The highest sequence number encountered. */\n    this.bs = 0,\n    /**\n     * A ordered bidirectional mapping between documents and the remote target\n     * IDs.\n     */\n    this.Vs = new vo(), this.targetCount = 0, this.Ss = eo.Vn();\n  }\n  forEachTarget(t, e) {\n    return this.vs.forEach((t, n) => e(n)), At.resolve();\n  }\n  getLastRemoteSnapshotVersion(t) {\n    return At.resolve(this.lastRemoteSnapshotVersion);\n  }\n  getHighestSequenceNumber(t) {\n    return At.resolve(this.bs);\n  }\n  allocateTargetId(t) {\n    return this.highestTargetId = this.Ss.next(), At.resolve(this.highestTargetId);\n  }\n  setTargetsMetadata(t, e, n) {\n    return n && (this.lastRemoteSnapshotVersion = n), e > this.bs && (this.bs = e), At.resolve();\n  }\n  xn(t) {\n    this.vs.set(t.target, t);\n    const e = t.targetId;\n    e > this.highestTargetId && (this.Ss = new eo(e), this.highestTargetId = e), t.sequenceNumber > this.bs && (this.bs = t.sequenceNumber);\n  }\n  addTargetData(t, e) {\n    return this.xn(e), this.targetCount += 1, At.resolve();\n  }\n  updateTargetData(t, e) {\n    return this.xn(e), At.resolve();\n  }\n  removeTargetData(t, e) {\n    return this.vs.delete(e.target), this.Vs.ds(e.targetId), this.targetCount -= 1, At.resolve();\n  }\n  removeTargets(t, e, n) {\n    let s = 0;\n    const i = [];\n    return this.vs.forEach((r, o) => {\n      o.sequenceNumber <= e && null === n.get(o.targetId) && (this.vs.delete(r), i.push(this.removeMatchingKeysForTargetId(t, o.targetId)), s++);\n    }), At.waitFor(i).next(() => s);\n  }\n  getTargetCount(t) {\n    return At.resolve(this.targetCount);\n  }\n  getTargetData(t, e) {\n    const n = this.vs.get(e) || null;\n    return At.resolve(n);\n  }\n  addMatchingKeys(t, e, n) {\n    return this.Vs.hs(e, n), At.resolve();\n  }\n  removeMatchingKeys(t, e, n) {\n    this.Vs.fs(e, n);\n    const s = this.persistence.referenceDelegate,\n      i = [];\n    return s && e.forEach(e => {\n      i.push(s.markPotentiallyOrphaned(t, e));\n    }), At.waitFor(i);\n  }\n  removeMatchingKeysForTargetId(t, e) {\n    return this.Vs.ds(e), At.resolve();\n  }\n  getMatchingKeysForTargetId(t, e) {\n    const n = this.Vs.ws(e);\n    return At.resolve(n);\n  }\n  containsKey(t, e) {\n    return At.resolve(this.Vs.containsKey(e));\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A memory-backed instance of Persistence. Data is stored only in RAM and\n * not persisted across sessions.\n */\nclass xo {\n  /**\n   * The constructor accepts a factory for creating a reference delegate. This\n   * allows both the delegate and this instance to have strong references to\n   * each other without having nullable fields that would then need to be\n   * checked or asserted on every access.\n   */\n  constructor(t, e) {\n    this.Ds = {}, this.overlays = {}, this.Cs = new $t(0), this.xs = !1, this.xs = !0, this.referenceDelegate = t(this), this.Ns = new Co(this);\n    this.indexManager = new Or(), this.remoteDocumentCache = function (t) {\n      return new So(t);\n    }(t => this.referenceDelegate.ks(t)), this.Tt = new Xi(e), this.$s = new Ro(this.Tt);\n  }\n  start() {\n    return Promise.resolve();\n  }\n  shutdown() {\n    // No durable state to ensure is closed on shutdown.\n    return this.xs = !1, Promise.resolve();\n  }\n  get started() {\n    return this.xs;\n  }\n  setDatabaseDeletedListener() {\n    // No op.\n  }\n  setNetworkEnabled() {\n    // No op.\n  }\n  getIndexManager(t) {\n    // We do not currently support indices for memory persistence, so we can\n    // return the same shared instance of the memory index manager.\n    return this.indexManager;\n  }\n  getDocumentOverlayCache(t) {\n    let e = this.overlays[t.toKey()];\n    return e || (e = new Po(), this.overlays[t.toKey()] = e), e;\n  }\n  getMutationQueue(t, e) {\n    let n = this.Ds[t.toKey()];\n    return n || (n = new Vo(e, this.referenceDelegate), this.Ds[t.toKey()] = n), n;\n  }\n  getTargetCache() {\n    return this.Ns;\n  }\n  getRemoteDocumentCache() {\n    return this.remoteDocumentCache;\n  }\n  getBundleCache() {\n    return this.$s;\n  }\n  runTransaction(t, e, n) {\n    C(\"MemoryPersistence\", \"Starting transaction:\", t);\n    const s = new No(this.Cs.next());\n    return this.referenceDelegate.Ms(), n(s).next(t => this.referenceDelegate.Os(s).next(() => t)).toPromise().then(t => (s.raiseOnCommittedEvent(), t));\n  }\n  Fs(t, e) {\n    return At.or(Object.values(this.Ds).map(n => () => n.containsKey(t, e)));\n  }\n}\n\n/**\n * Memory persistence is not actually transactional, but future implementations\n * may have transaction-scoped state.\n */\nclass No extends Tt {\n  constructor(t) {\n    super(), this.currentSequenceNumber = t;\n  }\n}\nclass ko {\n  constructor(t) {\n    this.persistence = t, /** Tracks all documents that are active in Query views. */\n    this.Bs = new vo(), /** The list of documents that are potentially GCed after each transaction. */\n    this.Ls = null;\n  }\n  static qs(t) {\n    return new ko(t);\n  }\n  get Us() {\n    if (this.Ls) return this.Ls;\n    throw $();\n  }\n  addReference(t, e, n) {\n    return this.Bs.addReference(n, e), this.Us.delete(n.toString()), At.resolve();\n  }\n  removeReference(t, e, n) {\n    return this.Bs.removeReference(n, e), this.Us.add(n.toString()), At.resolve();\n  }\n  markPotentiallyOrphaned(t, e) {\n    return this.Us.add(e.toString()), At.resolve();\n  }\n  removeTarget(t, e) {\n    this.Bs.ds(e.targetId).forEach(t => this.Us.add(t.toString()));\n    const n = this.persistence.getTargetCache();\n    return n.getMatchingKeysForTargetId(t, e.targetId).next(t => {\n      t.forEach(t => this.Us.add(t.toString()));\n    }).next(() => n.removeTargetData(t, e));\n  }\n  Ms() {\n    this.Ls = new Set();\n  }\n  Os(t) {\n    // Remove newly orphaned documents.\n    const e = this.persistence.getRemoteDocumentCache().newChangeBuffer();\n    return At.forEach(this.Us, n => {\n      const s = ct.fromPath(n);\n      return this.Ks(t, s).next(t => {\n        t || e.removeEntry(s, st.min());\n      });\n    }).next(() => (this.Ls = null, e.apply(t)));\n  }\n  updateLimboDocument(t, e) {\n    return this.Ks(t, e).next(t => {\n      t ? this.Us.delete(e.toString()) : this.Us.add(e.toString());\n    });\n  }\n  ks(t) {\n    // For eager GC, we don't care about the document size, there are no size thresholds.\n    return 0;\n  }\n  Ks(t, e) {\n    return At.or([() => At.resolve(this.Bs.containsKey(e)), () => this.persistence.getTargetCache().containsKey(t, e), () => this.persistence.Fs(t, e)]);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Performs database creation and schema upgrades. */\nclass $o {\n  constructor(t) {\n    this.Tt = t;\n  }\n  /**\n   * Performs database creation and schema upgrades.\n   *\n   * Note that in production, this method is only ever used to upgrade the schema\n   * to SCHEMA_VERSION. Different values of toVersion are only used for testing\n   * and local feature development.\n   */\n  F(t, e, n, s) {\n    const i = new Rt(\"createOrUpgrade\", e);\n    n < 1 && s >= 1 && (function (t) {\n      t.createObjectStore(\"owner\");\n    }(t), function (t) {\n      t.createObjectStore(\"mutationQueues\", {\n        keyPath: \"userId\"\n      });\n      t.createObjectStore(\"mutations\", {\n        keyPath: \"batchId\",\n        autoIncrement: !0\n      }).createIndex(\"userMutationsIndex\", Ri, {\n        unique: !0\n      }), t.createObjectStore(\"documentMutations\");\n    }\n    /**\n    * Upgrade function to migrate the 'mutations' store from V1 to V3. Loads\n    * and rewrites all data.\n    */(t), Mo(t), function (t) {\n      t.createObjectStore(\"remoteDocuments\");\n    }(t));\n    // Migration 2 to populate the targetGlobal object no longer needed since\n    // migration 3 unconditionally clears it.\n    let r = At.resolve();\n    return n < 3 && s >= 3 && (\n    // Brand new clients don't need to drop and recreate--only clients that\n    // potentially have corrupt data.\n    0 !== n && (!function (t) {\n      t.deleteObjectStore(\"targetDocuments\"), t.deleteObjectStore(\"targets\"), t.deleteObjectStore(\"targetGlobal\");\n    }(t), Mo(t)), r = r.next(() =>\n    /**\n    * Creates the target global singleton row.\n    *\n    * @param txn - The version upgrade transaction for indexeddb\n    */\n    function (t) {\n      const e = t.store(\"targetGlobal\"),\n        n = {\n          highestTargetId: 0,\n          highestListenSequenceNumber: 0,\n          lastRemoteSnapshotVersion: st.min().toTimestamp(),\n          targetCount: 0\n        };\n      return e.put(\"targetGlobalKey\", n);\n    }(i))), n < 4 && s >= 4 && (0 !== n && (\n    // Schema version 3 uses auto-generated keys to generate globally unique\n    // mutation batch IDs (this was previously ensured internally by the\n    // client). To migrate to the new schema, we have to read all mutations\n    // and write them back out. We preserve the existing batch IDs to guarantee\n    // consistency with other object stores. Any further mutation batch IDs will\n    // be auto-generated.\n    r = r.next(() => function (t, e) {\n      return e.store(\"mutations\").W().next(n => {\n        t.deleteObjectStore(\"mutations\");\n        t.createObjectStore(\"mutations\", {\n          keyPath: \"batchId\",\n          autoIncrement: !0\n        }).createIndex(\"userMutationsIndex\", Ri, {\n          unique: !0\n        });\n        const s = e.store(\"mutations\"),\n          i = n.map(t => s.put(t));\n        return At.waitFor(i);\n      });\n    }(t, i))), r = r.next(() => {\n      !function (t) {\n        t.createObjectStore(\"clientMetadata\", {\n          keyPath: \"clientId\"\n        });\n      }(t);\n    })), n < 5 && s >= 5 && (r = r.next(() => this.Gs(i))), n < 6 && s >= 6 && (r = r.next(() => (function (t) {\n      t.createObjectStore(\"remoteDocumentGlobal\");\n    }(t), this.Qs(i)))), n < 7 && s >= 7 && (r = r.next(() => this.js(i))), n < 8 && s >= 8 && (r = r.next(() => this.zs(t, i))), n < 9 && s >= 9 && (r = r.next(() => {\n      // Multi-Tab used to manage its own changelog, but this has been moved\n      // to the DbRemoteDocument object store itself. Since the previous change\n      // log only contained transient data, we can drop its object store.\n      !function (t) {\n        t.objectStoreNames.contains(\"remoteDocumentChanges\") && t.deleteObjectStore(\"remoteDocumentChanges\");\n      }(t);\n      // Note: Schema version 9 used to create a read time index for the\n      // RemoteDocumentCache. This is now done with schema version 13.\n    })), n < 10 && s >= 10 && (r = r.next(() => this.Ws(i))), n < 11 && s >= 11 && (r = r.next(() => {\n      !function (t) {\n        t.createObjectStore(\"bundles\", {\n          keyPath: \"bundleId\"\n        });\n      }(t), function (t) {\n        t.createObjectStore(\"namedQueries\", {\n          keyPath: \"name\"\n        });\n      }(t);\n    })), n < 12 && s >= 12 && (r = r.next(() => {\n      !function (t) {\n        const e = t.createObjectStore(\"documentOverlays\", {\n          keyPath: Bi\n        });\n        e.createIndex(\"collectionPathOverlayIndex\", Li, {\n          unique: !1\n        }), e.createIndex(\"collectionGroupOverlayIndex\", qi, {\n          unique: !1\n        });\n      }(t);\n    })), n < 13 && s >= 13 && (r = r.next(() => function (t) {\n      const e = t.createObjectStore(\"remoteDocumentsV14\", {\n        keyPath: Vi\n      });\n      e.createIndex(\"documentKeyIndex\", Si), e.createIndex(\"collectionGroupIndex\", Di);\n    }(t)).next(() => this.Hs(t, i)).next(() => t.deleteObjectStore(\"remoteDocuments\"))), n < 14 && s >= 14 && (r = r.next(() => this.Js(t, i))), n < 15 && s >= 15 && (r = r.next(() => function (t) {\n      t.createObjectStore(\"indexConfiguration\", {\n        keyPath: \"indexId\",\n        autoIncrement: !0\n      }).createIndex(\"collectionGroupIndex\", \"collectionGroup\", {\n        unique: !1\n      });\n      t.createObjectStore(\"indexState\", {\n        keyPath: $i\n      }).createIndex(\"sequenceNumberIndex\", Mi, {\n        unique: !1\n      });\n      t.createObjectStore(\"indexEntries\", {\n        keyPath: Oi\n      }).createIndex(\"documentKeyIndex\", Fi, {\n        unique: !1\n      });\n    }(t))), r;\n  }\n  Qs(t) {\n    let e = 0;\n    return t.store(\"remoteDocuments\").X((t, n) => {\n      e += Hr(n);\n    }).next(() => {\n      const n = {\n        byteSize: e\n      };\n      return t.store(\"remoteDocumentGlobal\").put(\"remoteDocumentGlobalKey\", n);\n    });\n  }\n  Gs(t) {\n    const e = t.store(\"mutationQueues\"),\n      n = t.store(\"mutations\");\n    return e.W().next(e => At.forEach(e, e => {\n      const s = IDBKeyRange.bound([e.userId, -1], [e.userId, e.lastAcknowledgedBatchId]);\n      return n.W(\"userMutationsIndex\", s).next(n => At.forEach(n, n => {\n        M(n.userId === e.userId);\n        const s = rr(this.Tt, n);\n        return Wr(t, e.userId, s).next(() => {});\n      }));\n    }));\n  }\n  /**\n   * Ensures that every document in the remote document cache has a corresponding sentinel row\n   * with a sequence number. Missing rows are given the most recently used sequence number.\n   */\n  js(t) {\n    const e = t.store(\"targetDocuments\"),\n      n = t.store(\"remoteDocuments\");\n    return t.store(\"targetGlobal\").get(\"targetGlobalKey\").next(t => {\n      const s = [];\n      return n.X((n, i) => {\n        const r = new rt(n),\n          o = function (t) {\n            return [0, Ii(t)];\n          }(r);\n        s.push(e.get(o).next(n => n ? At.resolve() : (n => e.put({\n          targetId: 0,\n          path: Ii(n),\n          sequenceNumber: t.highestListenSequenceNumber\n        }))(r)));\n      }).next(() => At.waitFor(s));\n    });\n  }\n  zs(t, e) {\n    // Create the index.\n    t.createObjectStore(\"collectionParents\", {\n      keyPath: ki\n    });\n    const n = e.store(\"collectionParents\"),\n      s = new Fr(),\n      i = t => {\n        if (s.add(t)) {\n          const e = t.lastSegment(),\n            s = t.popLast();\n          return n.put({\n            collectionId: e,\n            parent: Ii(s)\n          });\n        }\n      };\n    // Helper to add an index entry iff we haven't already written it.\n    // Index existing remote documents.\n    return e.store(\"remoteDocuments\").X({\n      Z: !0\n    }, (t, e) => {\n      const n = new rt(t);\n      return i(n.popLast());\n    }).next(() => e.store(\"documentMutations\").X({\n      Z: !0\n    }, ([t, e, n], s) => {\n      const r = Ai(e);\n      return i(r.popLast());\n    }));\n  }\n  Ws(t) {\n    const e = t.store(\"targets\");\n    return e.X((t, n) => {\n      const s = or(n),\n        i = ur(this.Tt, s);\n      return e.put(i);\n    });\n  }\n  Hs(t, e) {\n    const n = e.store(\"remoteDocuments\"),\n      s = [];\n    return n.X((t, n) => {\n      const i = e.store(\"remoteDocumentsV14\"),\n        r = (o = n, o.document ? new ct(rt.fromString(o.document.name).popFirst(5)) : o.noDocument ? ct.fromSegments(o.noDocument.path) : o.unknownDocument ? ct.fromSegments(o.unknownDocument.path) : $()).path.toArray();\n      var o;\n      /**\n      * @license\n      * Copyright 2017 Google LLC\n      *\n      * Licensed under the Apache License, Version 2.0 (the \"License\");\n      * you may not use this file except in compliance with the License.\n      * You may obtain a copy of the License at\n      *\n      *   http://www.apache.org/licenses/LICENSE-2.0\n      *\n      * Unless required by applicable law or agreed to in writing, software\n      * distributed under the License is distributed on an \"AS IS\" BASIS,\n      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      * See the License for the specific language governing permissions and\n      * limitations under the License.\n      */\n      const u = {\n        prefixPath: r.slice(0, r.length - 2),\n        collectionGroup: r[r.length - 2],\n        documentId: r[r.length - 1],\n        readTime: n.readTime || [0, 0],\n        unknownDocument: n.unknownDocument,\n        noDocument: n.noDocument,\n        document: n.document,\n        hasCommittedMutations: !!n.hasCommittedMutations\n      };\n      s.push(i.put(u));\n    }).next(() => At.waitFor(s));\n  }\n  Js(t, e) {\n    const n = e.store(\"mutations\"),\n      s = wo(this.Tt),\n      i = new xo(ko.qs, this.Tt.oe);\n    return n.W().next(t => {\n      const n = new Map();\n      return t.forEach(t => {\n        var e;\n        let s = null !== (e = n.get(t.userId)) && void 0 !== e ? e : vs();\n        rr(this.Tt, t).keys().forEach(t => s = s.add(t)), n.set(t.userId, s);\n      }), At.forEach(n, (t, n) => {\n        const r = new v(n),\n          o = wr.ue(this.Tt, r),\n          u = i.getIndexManager(r),\n          c = Jr.ue(r, this.Tt, u, i.referenceDelegate);\n        return new Ao(s, c, o, u).recalculateAndSaveOverlaysForDocumentKeys(new zi(e, $t.at), t).next();\n      });\n    });\n  }\n}\nfunction Mo(t) {\n  t.createObjectStore(\"targetDocuments\", {\n    keyPath: xi\n  }).createIndex(\"documentTargetsIndex\", Ni, {\n    unique: !0\n  });\n  // NOTE: This is unique only because the TargetId is the suffix.\n  t.createObjectStore(\"targets\", {\n    keyPath: \"targetId\"\n  }).createIndex(\"queryTargetsIndex\", Ci, {\n    unique: !0\n  }), t.createObjectStore(\"targetGlobal\");\n}\nconst Oo = \"Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.\";\n\n/**\n * Oldest acceptable age in milliseconds for client metadata before the client\n * is considered inactive and its associated data is garbage collected.\n */\n/**\n * An IndexedDB-backed instance of Persistence. Data is stored persistently\n * across sessions.\n *\n * On Web only, the Firestore SDKs support shared access to its persistence\n * layer. This allows multiple browser tabs to read and write to IndexedDb and\n * to synchronize state even without network connectivity. Shared access is\n * currently optional and not enabled unless all clients invoke\n * `enablePersistence()` with `{synchronizeTabs:true}`.\n *\n * In multi-tab mode, if multiple clients are active at the same time, the SDK\n * will designate one client as the “primary client”. An effort is made to pick\n * a visible, network-connected and active client, and this client is\n * responsible for letting other clients know about its presence. The primary\n * client writes a unique client-generated identifier (the client ID) to\n * IndexedDb’s “owner” store every 4 seconds. If the primary client fails to\n * update this entry, another client can acquire the lease and take over as\n * primary.\n *\n * Some persistence operations in the SDK are designated as primary-client only\n * operations. This includes the acknowledgment of mutations and all updates of\n * remote documents. The effects of these operations are written to persistence\n * and then broadcast to other tabs via LocalStorage (see\n * `WebStorageSharedClientState`), which then refresh their state from\n * persistence.\n *\n * Similarly, the primary client listens to notifications sent by secondary\n * clients to discover persistence changes written by secondary clients, such as\n * the addition of new mutations and query targets.\n *\n * If multi-tab is not enabled and another tab already obtained the primary\n * lease, IndexedDbPersistence enters a failed state and all subsequent\n * operations will automatically fail.\n *\n * Additionally, there is an optimization so that when a tab is closed, the\n * primary lease is released immediately (this is especially important to make\n * sure that a refreshed tab is able to immediately re-acquire the primary\n * lease). Unfortunately, IndexedDB cannot be reliably used in window.unload\n * since it is an asynchronous API. So in addition to attempting to give up the\n * lease, the leaseholder writes its client ID to a \"zombiedClient\" entry in\n * LocalStorage which acts as an indicator that another tab should go ahead and\n * take the primary lease immediately regardless of the current lease timestamp.\n *\n * TODO(b/114226234): Remove `synchronizeTabs` section when multi-tab is no\n * longer optional.\n */\nclass Fo {\n  constructor(\n  /**\n   * Whether to synchronize the in-memory state of multiple tabs and share\n   * access to local persistence.\n   */\n  t, e, n, s, i, r, o, u, c,\n  /**\n   * If set to true, forcefully obtains database access. Existing tabs will\n   * no longer be able to access IndexedDB.\n   */\n  a, h = 15) {\n    if (this.allowTabSynchronization = t, this.persistenceKey = e, this.clientId = n, this.Ys = i, this.window = r, this.document = o, this.Zs = c, this.Xs = a, this.ti = h, this.Cs = null, this.xs = !1, this.isPrimary = !1, this.networkEnabled = !0, /** Our window.unload handler, if registered. */\n    this.ei = null, this.inForeground = !1, /** Our 'visibilitychange' listener if registered. */\n    this.ni = null, /** The client metadata refresh task. */\n    this.si = null, /** The last time we garbage collected the client metadata object store. */\n    this.ii = Number.NEGATIVE_INFINITY, /** A listener to notify on primary state changes. */\n    this.ri = t => Promise.resolve(), !Fo.C()) throw new L(B.UNIMPLEMENTED, \"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.\");\n    this.referenceDelegate = new ho(this, s), this.oi = e + \"main\", this.Tt = new Xi(u), this.ui = new Pt(this.oi, this.ti, new $o(this.Tt)), this.Ns = new no(this.referenceDelegate, this.Tt), this.remoteDocumentCache = wo(this.Tt), this.$s = new fr(), this.window && this.window.localStorage ? this.ci = this.window.localStorage : (this.ci = null, !1 === a && x(\"IndexedDbPersistence\", \"LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page.\"));\n  }\n  /**\n   * Attempt to start IndexedDb persistence.\n   *\n   * @returns Whether persistence was enabled.\n   */\n  start() {\n    // NOTE: This is expected to fail sometimes (in the case of another tab\n    // already having the persistence lock), so it's the first thing we should\n    // do.\n    return this.ai().then(() => {\n      if (!this.isPrimary && !this.allowTabSynchronization)\n        // Fail `start()` if `synchronizeTabs` is disabled and we cannot\n        // obtain the primary lease.\n        throw new L(B.FAILED_PRECONDITION, Oo);\n      return this.hi(), this.li(), this.fi(), this.runTransaction(\"getHighestListenSequenceNumber\", \"readonly\", t => this.Ns.getHighestSequenceNumber(t));\n    }).then(t => {\n      this.Cs = new $t(t, this.Zs);\n    }).then(() => {\n      this.xs = !0;\n    }).catch(t => (this.ui && this.ui.close(), Promise.reject(t)));\n  }\n  /**\n   * Registers a listener that gets called when the primary state of the\n   * instance changes. Upon registering, this listener is invoked immediately\n   * with the current primary state.\n   *\n   * PORTING NOTE: This is only used for Web multi-tab.\n   */\n  di(t) {\n    var _this7 = this;\n    return this.ri = /*#__PURE__*/function () {\n      var _ref4 = _asyncToGenerator(function* (e) {\n        if (_this7.started) return t(e);\n      });\n      return function (_x2) {\n        return _ref4.apply(this, arguments);\n      };\n    }(), t(this.isPrimary);\n  }\n  /**\n   * Registers a listener that gets called when the database receives a\n   * version change event indicating that it has deleted.\n   *\n   * PORTING NOTE: This is only used for Web multi-tab.\n   */\n  setDatabaseDeletedListener(t) {\n    this.ui.L( /*#__PURE__*/function () {\n      var _ref5 = _asyncToGenerator(function* (e) {\n        // Check if an attempt is made to delete IndexedDB.\n        null === e.newVersion && (yield t());\n      });\n      return function (_x3) {\n        return _ref5.apply(this, arguments);\n      };\n    }());\n  }\n  /**\n   * Adjusts the current network state in the client's metadata, potentially\n   * affecting the primary lease.\n   *\n   * PORTING NOTE: This is only used for Web multi-tab.\n   */\n  setNetworkEnabled(t) {\n    var _this8 = this;\n    this.networkEnabled !== t && (this.networkEnabled = t,\n    // Schedule a primary lease refresh for immediate execution. The eventual\n    // lease update will be propagated via `primaryStateListener`.\n    this.Ys.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      _this8.started && (yield _this8.ai());\n    })));\n  }\n  /**\n   * Updates the client metadata in IndexedDb and attempts to either obtain or\n   * extend the primary lease for the local client. Asynchronously notifies the\n   * primary state listener if the client either newly obtained or released its\n   * primary lease.\n   */\n  ai() {\n    return this.runTransaction(\"updateClientMetadataAndTryBecomePrimary\", \"readwrite\", t => Lo(t).put({\n      clientId: this.clientId,\n      updateTimeMs: Date.now(),\n      networkEnabled: this.networkEnabled,\n      inForeground: this.inForeground\n    }).next(() => {\n      if (this.isPrimary) return this._i(t).next(t => {\n        t || (this.isPrimary = !1, this.Ys.enqueueRetryable(() => this.ri(!1)));\n      });\n    }).next(() => this.wi(t)).next(e => this.isPrimary && !e ? this.mi(t).next(() => !1) : !!e && this.gi(t).next(() => !0))).catch(t => {\n      if (Vt(t))\n        // Proceed with the existing state. Any subsequent access to\n        // IndexedDB will verify the lease.\n        return C(\"IndexedDbPersistence\", \"Failed to extend owner lease: \", t), this.isPrimary;\n      if (!this.allowTabSynchronization) throw t;\n      return C(\"IndexedDbPersistence\", \"Releasing owner lease after error during lease refresh\", t), /* isPrimary= */!1;\n    }).then(t => {\n      this.isPrimary !== t && this.Ys.enqueueRetryable(() => this.ri(t)), this.isPrimary = t;\n    });\n  }\n  _i(t) {\n    return Bo(t).get(\"owner\").next(t => At.resolve(this.yi(t)));\n  }\n  pi(t) {\n    return Lo(t).delete(this.clientId);\n  }\n  /**\n   * If the garbage collection threshold has passed, prunes the\n   * RemoteDocumentChanges and the ClientMetadata store based on the last update\n   * time of all clients.\n   */\n  Ii() {\n    var _this9 = this;\n    return _asyncToGenerator(function* () {\n      if (_this9.isPrimary && !_this9.Ti(_this9.ii, 18e5)) {\n        _this9.ii = Date.now();\n        const t = yield _this9.runTransaction(\"maybeGarbageCollectMultiClientState\", \"readwrite-primary\", t => {\n          const e = Wi(t, \"clientMetadata\");\n          return e.W().next(t => {\n            const n = _this9.Ei(t, 18e5),\n              s = t.filter(t => -1 === n.indexOf(t));\n            // Delete metadata for clients that are no longer considered active.\n            return At.forEach(s, t => e.delete(t.clientId)).next(() => s);\n          });\n        }).catch(() => []);\n        // Delete potential leftover entries that may continue to mark the\n        // inactive clients as zombied in LocalStorage.\n        // Ideally we'd delete the IndexedDb and LocalStorage zombie entries for\n        // the client atomically, but we can't. So we opt to delete the IndexedDb\n        // entries first to avoid potentially reviving a zombied client.\n        if (_this9.ci) for (const e of t) _this9.ci.removeItem(_this9.Ai(e.clientId));\n      }\n    })();\n  }\n  /**\n   * Schedules a recurring timer to update the client metadata and to either\n   * extend or acquire the primary lease if the client is eligible.\n   */\n  fi() {\n    this.si = this.Ys.enqueueAfterDelay(\"client_metadata_refresh\" /* TimerId.ClientMetadataRefresh */, 4e3, () => this.ai().then(() => this.Ii()).then(() => this.fi()));\n  }\n  /** Checks whether `client` is the local client. */\n  yi(t) {\n    return !!t && t.ownerId === this.clientId;\n  }\n  /**\n   * Evaluate the state of all active clients and determine whether the local\n   * client is or can act as the holder of the primary lease. Returns whether\n   * the client is eligible for the lease, but does not actually acquire it.\n   * May return 'false' even if there is no active leaseholder and another\n   * (foreground) client should become leaseholder instead.\n   */\n  wi(t) {\n    if (this.Xs) return At.resolve(!0);\n    return Bo(t).get(\"owner\").next(e => {\n      // A client is eligible for the primary lease if:\n      // - its network is enabled and the client's tab is in the foreground.\n      // - its network is enabled and no other client's tab is in the\n      //   foreground.\n      // - every clients network is disabled and the client's tab is in the\n      //   foreground.\n      // - every clients network is disabled and no other client's tab is in\n      //   the foreground.\n      // - the `forceOwningTab` setting was passed in.\n      if (null !== e && this.Ti(e.leaseTimestampMs, 5e3) && !this.Ri(e.ownerId)) {\n        if (this.yi(e) && this.networkEnabled) return !0;\n        if (!this.yi(e)) {\n          if (!e.allowTabSynchronization)\n            // Fail the `canActAsPrimary` check if the current leaseholder has\n            // not opted into multi-tab synchronization. If this happens at\n            // client startup, we reject the Promise returned by\n            // `enablePersistence()` and the user can continue to use Firestore\n            // with in-memory persistence.\n            // If this fails during a lease refresh, we will instead block the\n            // AsyncQueue from executing further operations. Note that this is\n            // acceptable since mixing & matching different `synchronizeTabs`\n            // settings is not supported.\n            // TODO(b/114226234): Remove this check when `synchronizeTabs` can\n            // no longer be turned off.\n            throw new L(B.FAILED_PRECONDITION, Oo);\n          return !1;\n        }\n      }\n      return !(!this.networkEnabled || !this.inForeground) || Lo(t).W().next(t => void 0 === this.Ei(t, 5e3).find(t => {\n        if (this.clientId !== t.clientId) {\n          const e = !this.networkEnabled && t.networkEnabled,\n            n = !this.inForeground && t.inForeground,\n            s = this.networkEnabled === t.networkEnabled;\n          if (e || n && s) return !0;\n        }\n        return !1;\n      }));\n    }).next(t => (this.isPrimary !== t && C(\"IndexedDbPersistence\", `Client ${t ? \"is\" : \"is not\"} eligible for a primary lease.`), t));\n  }\n  shutdown() {\n    var _this10 = this;\n    return _asyncToGenerator(function* () {\n      // The shutdown() operations are idempotent and can be called even when\n      // start() aborted (e.g. because it couldn't acquire the persistence lease).\n      _this10.xs = !1, _this10.Pi(), _this10.si && (_this10.si.cancel(), _this10.si = null), _this10.vi(), _this10.bi(), // Use `SimpleDb.runTransaction` directly to avoid failing if another tab\n      // has obtained the primary lease.\n      yield _this10.ui.runTransaction(\"shutdown\", \"readwrite\", [\"owner\", \"clientMetadata\"], t => {\n        const e = new zi(t, $t.at);\n        return _this10.mi(e).next(() => _this10.pi(e));\n      }), _this10.ui.close(),\n      // Remove the entry marking the client as zombied from LocalStorage since\n      // we successfully deleted its metadata from IndexedDb.\n      _this10.Vi();\n    })();\n  }\n  /**\n   * Returns clients that are not zombied and have an updateTime within the\n   * provided threshold.\n   */\n  Ei(t, e) {\n    return t.filter(t => this.Ti(t.updateTimeMs, e) && !this.Ri(t.clientId));\n  }\n  /**\n   * Returns the IDs of the clients that are currently active. If multi-tab\n   * is not supported, returns an array that only contains the local client's\n   * ID.\n   *\n   * PORTING NOTE: This is only used for Web multi-tab.\n   */\n  Si() {\n    return this.runTransaction(\"getActiveClients\", \"readonly\", t => Lo(t).W().next(t => this.Ei(t, 18e5).map(t => t.clientId)));\n  }\n  get started() {\n    return this.xs;\n  }\n  getMutationQueue(t, e) {\n    return Jr.ue(t, this.Tt, e, this.referenceDelegate);\n  }\n  getTargetCache() {\n    return this.Ns;\n  }\n  getRemoteDocumentCache() {\n    return this.remoteDocumentCache;\n  }\n  getIndexManager(t) {\n    return new Lr(t, this.Tt.oe.databaseId);\n  }\n  getDocumentOverlayCache(t) {\n    return wr.ue(this.Tt, t);\n  }\n  getBundleCache() {\n    return this.$s;\n  }\n  runTransaction(t, e, n) {\n    C(\"IndexedDbPersistence\", \"Starting transaction:\", t);\n    const s = \"readonly\" === e ? \"readonly\" : \"readwrite\",\n      i = 15 === (r = this.ti) ? ji : 14 === r ? Qi : 13 === r ? Gi : 12 === r ? Ki : 11 === r ? Ui : void $();\n    /** Returns the object stores for the provided schema. */\n    var r;\n    let o;\n    // Do all transactions as readwrite against all object stores, since we\n    // are the only reader/writer.\n    return this.ui.runTransaction(t, s, i, s => (o = new zi(s, this.Cs ? this.Cs.next() : $t.at), \"readwrite-primary\" === e ? this._i(o).next(t => !!t || this.wi(o)).next(e => {\n      if (!e) throw x(`Failed to obtain primary lease for action '${t}'.`), this.isPrimary = !1, this.Ys.enqueueRetryable(() => this.ri(!1)), new L(B.FAILED_PRECONDITION, It);\n      return n(o);\n    }).next(t => this.gi(o).next(() => t)) : this.Di(o).next(() => n(o)))).then(t => (o.raiseOnCommittedEvent(), t));\n  }\n  /**\n   * Verifies that the current tab is the primary leaseholder or alternatively\n   * that the leaseholder has opted into multi-tab synchronization.\n   */\n  // TODO(b/114226234): Remove this check when `synchronizeTabs` can no longer\n  // be turned off.\n  Di(t) {\n    return Bo(t).get(\"owner\").next(t => {\n      if (null !== t && this.Ti(t.leaseTimestampMs, 5e3) && !this.Ri(t.ownerId) && !this.yi(t) && !(this.Xs || this.allowTabSynchronization && t.allowTabSynchronization)) throw new L(B.FAILED_PRECONDITION, Oo);\n    });\n  }\n  /**\n   * Obtains or extends the new primary lease for the local client. This\n   * method does not verify that the client is eligible for this lease.\n   */\n  gi(t) {\n    const e = {\n      ownerId: this.clientId,\n      allowTabSynchronization: this.allowTabSynchronization,\n      leaseTimestampMs: Date.now()\n    };\n    return Bo(t).put(\"owner\", e);\n  }\n  static C() {\n    return Pt.C();\n  }\n  /** Checks the primary lease and removes it if we are the current primary. */\n  mi(t) {\n    const e = Bo(t);\n    return e.get(\"owner\").next(t => this.yi(t) ? (C(\"IndexedDbPersistence\", \"Releasing primary lease.\"), e.delete(\"owner\")) : At.resolve());\n  }\n  /** Verifies that `updateTimeMs` is within `maxAgeMs`. */\n  Ti(t, e) {\n    const n = Date.now();\n    return !(t < n - e) && (!(t > n) || (x(`Detected an update time that is in the future: ${t} > ${n}`), !1));\n  }\n  hi() {\n    null !== this.document && \"function\" == typeof this.document.addEventListener && (this.ni = () => {\n      this.Ys.enqueueAndForget(() => (this.inForeground = \"visible\" === this.document.visibilityState, this.ai()));\n    }, this.document.addEventListener(\"visibilitychange\", this.ni), this.inForeground = \"visible\" === this.document.visibilityState);\n  }\n  vi() {\n    this.ni && (this.document.removeEventListener(\"visibilitychange\", this.ni), this.ni = null);\n  }\n  /**\n   * Attaches a window.unload handler that will synchronously write our\n   * clientId to a \"zombie client id\" location in LocalStorage. This can be used\n   * by tabs trying to acquire the primary lease to determine that the lease\n   * is no longer valid even if the timestamp is recent. This is particularly\n   * important for the refresh case (so the tab correctly re-acquires the\n   * primary lease). LocalStorage is used for this rather than IndexedDb because\n   * it is a synchronous API and so can be used reliably from  an unload\n   * handler.\n   */\n  li() {\n    var t;\n    \"function\" == typeof (null === (t = this.window) || void 0 === t ? void 0 : t.addEventListener) && (this.ei = () => {\n      // Note: In theory, this should be scheduled on the AsyncQueue since it\n      // accesses internal state. We execute this code directly during shutdown\n      // to make sure it gets a chance to run.\n      this.Pi();\n      const t = /(?:Version|Mobile)\\/1[456]/;\n      isSafari() && (navigator.appVersion.match(t) || navigator.userAgent.match(t)) &&\n      // On Safari 14, 15, and 16, we do not run any cleanup actions as it might\n      // trigger a bug that prevents Safari from re-opening IndexedDB during\n      // the next page load.\n      // See https://bugs.webkit.org/show_bug.cgi?id=226547\n      this.Ys.enterRestrictedMode( /* purgeExistingTasks= */!0), this.Ys.enqueueAndForget(() => this.shutdown());\n    }, this.window.addEventListener(\"pagehide\", this.ei));\n  }\n  bi() {\n    this.ei && (this.window.removeEventListener(\"pagehide\", this.ei), this.ei = null);\n  }\n  /**\n   * Returns whether a client is \"zombied\" based on its LocalStorage entry.\n   * Clients become zombied when their tab closes without running all of the\n   * cleanup logic in `shutdown()`.\n   */\n  Ri(t) {\n    var e;\n    try {\n      const n = null !== (null === (e = this.ci) || void 0 === e ? void 0 : e.getItem(this.Ai(t)));\n      return C(\"IndexedDbPersistence\", `Client '${t}' ${n ? \"is\" : \"is not\"} zombied in LocalStorage`), n;\n    } catch (t) {\n      // Gracefully handle if LocalStorage isn't working.\n      return x(\"IndexedDbPersistence\", \"Failed to get zombied client id.\", t), !1;\n    }\n  }\n  /**\n   * Record client as zombied (a client that had its tab closed). Zombied\n   * clients are ignored during primary tab selection.\n   */\n  Pi() {\n    if (this.ci) try {\n      this.ci.setItem(this.Ai(this.clientId), String(Date.now()));\n    } catch (t) {\n      // Gracefully handle if LocalStorage isn't available / working.\n      x(\"Failed to set zombie client id.\", t);\n    }\n  }\n  /** Removes the zombied client entry if it exists. */\n  Vi() {\n    if (this.ci) try {\n      this.ci.removeItem(this.Ai(this.clientId));\n    } catch (t) {\n      // Ignore\n    }\n  }\n  Ai(t) {\n    return `firestore_zombie_${this.persistenceKey}_${t}`;\n  }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the primary client object store.\n */\nfunction Bo(t) {\n  return Wi(t, \"owner\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the client metadata object store.\n */\nfunction Lo(t) {\n  return Wi(t, \"clientMetadata\");\n}\n\n/**\n * Generates a string used as a prefix when storing data in IndexedDB and\n * LocalStorage.\n */\nfunction qo(t, e) {\n  // Use two different prefix formats:\n  //   * firestore / persistenceKey / projectID . databaseID / ...\n  //   * firestore / persistenceKey / projectID / ...\n  // projectIDs are DNS-compatible names and cannot contain dots\n  // so there's no danger of collisions.\n  let n = t.projectId;\n  return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A set of changes to what documents are currently in view and out of view for\n * a given query. These changes are sent to the LocalStore by the View (via\n * the SyncEngine) and are used to pin / unpin documents as appropriate.\n */\nclass Uo {\n  constructor(t, e, n, s) {\n    this.targetId = t, this.fromCache = e, this.Ci = n, this.xi = s;\n  }\n  static Ni(t, e) {\n    let n = vs(),\n      s = vs();\n    for (const t of e.docChanges) switch (t.type) {\n      case 0 /* ChangeType.Added */:\n        n = n.add(t.doc.key);\n        break;\n      case 1 /* ChangeType.Removed */:\n        s = s.add(t.doc.key);\n      // do nothing\n    }\n\n    return new Uo(t, e.fromCache, n, s);\n  }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The Firestore query engine.\n *\n * Firestore queries can be executed in three modes. The Query Engine determines\n * what mode to use based on what data is persisted. The mode only determines\n * the runtime complexity of the query - the result set is equivalent across all\n * implementations.\n *\n * The Query engine will use indexed-based execution if a user has configured\n * any index that can be used to execute query (via `setIndexConfiguration()`).\n * Otherwise, the engine will try to optimize the query by re-using a previously\n * persisted query result. If that is not possible, the query will be executed\n * via a full collection scan.\n *\n * Index-based execution is the default when available. The query engine\n * supports partial indexed execution and merges the result from the index\n * lookup with documents that have not yet been indexed. The index evaluation\n * matches the backend's format and as such, the SDK can use indexing for all\n * queries that the backend supports.\n *\n * If no index exists, the query engine tries to take advantage of the target\n * document mapping in the TargetCache. These mappings exists for all queries\n * that have been synced with the backend at least once and allow the query\n * engine to only read documents that previously matched a query plus any\n * documents that were edited after the query was last listened to.\n *\n * There are some cases when this optimization is not guaranteed to produce\n * the same results as full collection scans. In these cases, query\n * processing falls back to full scans. These cases are:\n *\n * - Limit queries where a document that matched the query previously no longer\n *   matches the query.\n *\n * - Limit queries where a document edit may cause the document to sort below\n *   another document that is in the local cache.\n *\n * - Queries that have never been CURRENT or free of limbo documents.\n */\nclass Ko {\n  constructor() {\n    this.ki = !1;\n  }\n  /** Sets the document view to query against. */\n  initialize(t, e) {\n    this.$i = t, this.indexManager = e, this.ki = !0;\n  }\n  /** Returns all local documents matching the specified query. */\n  getDocumentsMatchingQuery(t, e, n, s) {\n    return this.Mi(t, e).next(i => i || this.Oi(t, e, s, n)).next(n => n || this.Fi(t, e));\n  }\n  /**\n   * Performs an indexed query that evaluates the query based on a collection's\n   * persisted index values. Returns `null` if an index is not available.\n   */\n  Mi(t, e) {\n    if (mn(e))\n      // Queries that match all documents don't benefit from using\n      // key-based lookups. It is more efficient to scan all documents in a\n      // collection, rather than to perform individual lookups.\n      return At.resolve(null);\n    let n = Tn(e);\n    return this.indexManager.getIndexType(t, n).next(s => 0 /* IndexType.NONE */ === s ? null : (null !== e.limit && 1 /* IndexType.PARTIAL */ === s && (\n    // We cannot apply a limit for targets that are served using a partial\n    // index. If a partial index will be used to serve the target, the\n    // query may return a superset of documents that match the target\n    // (e.g. if the index doesn't include all the target's filters), or\n    // may return the correct set of documents in the wrong order (e.g. if\n    // the index doesn't include a segment for one of the orderBys).\n    // Therefore, a limit should not be applied in such cases.\n    e = An(e, null, \"F\" /* LimitType.First */), n = Tn(e)), this.indexManager.getDocumentsMatchingTarget(t, n).next(s => {\n      const i = vs(...s);\n      return this.$i.getDocuments(t, i).next(s => this.indexManager.getMinOffset(t, n).next(n => {\n        const r = this.Bi(e, s);\n        return this.Li(e, r, i, n.readTime) ? this.Mi(t, An(e, null, \"F\" /* LimitType.First */)) : this.qi(t, r, e, n);\n      }));\n    })));\n  }\n  /**\n   * Performs a query based on the target's persisted query mapping. Returns\n   * `null` if the mapping is not available or cannot be used.\n   */\n  Oi(t, e, n, s) {\n    return mn(e) || s.isEqual(st.min()) ? this.Fi(t, e) : this.$i.getDocuments(t, n).next(i => {\n      const r = this.Bi(e, i);\n      return this.Li(e, r, n, s) ? this.Fi(t, e) : (S() <= LogLevel.DEBUG && C(\"QueryEngine\", \"Re-using previous result from %s to execute query: %s\", s.toString(), vn(e)), this.qi(t, r, e, mt(s, -1)));\n    });\n    // Queries that have never seen a snapshot without limbo free documents\n    // should also be run as a full collection scan.\n  }\n  /** Applies the query filter and sorting to the provided documents.  */\n  Bi(t, e) {\n    // Sort the documents and re-apply the query filter since previously\n    // matching documents do not necessarily still match the query.\n    let n = new Ye(Sn(t));\n    return e.forEach((e, s) => {\n      bn(t, s) && (n = n.add(s));\n    }), n;\n  }\n  /**\n   * Determines if a limit query needs to be refilled from cache, making it\n   * ineligible for index-free execution.\n   *\n   * @param query - The query.\n   * @param sortedPreviousResults - The documents that matched the query when it\n   * was last synchronized, sorted by the query's comparator.\n   * @param remoteKeys - The document keys that matched the query at the last\n   * snapshot.\n   * @param limboFreeSnapshotVersion - The version of the snapshot when the\n   * query was last synchronized.\n   */\n  Li(t, e, n, s) {\n    if (null === t.limit)\n      // Queries without limits do not need to be refilled.\n      return !1;\n    if (n.size !== e.size)\n      // The query needs to be refilled if a previously matching document no\n      // longer matches.\n      return !0;\n    // Limit queries are not eligible for index-free query execution if there is\n    // a potential that an older document from cache now sorts before a document\n    // that was previously part of the limit. This, however, can only happen if\n    // the document at the edge of the limit goes out of limit.\n    // If a document that is not the limit boundary sorts differently,\n    // the boundary of the limit itself did not change and documents from cache\n    // will continue to be \"rejected\" by this boundary. Therefore, we can ignore\n    // any modifications that don't affect the last document.\n    const i = \"F\" /* LimitType.First */ === t.limitType ? e.last() : e.first();\n    return !!i && (i.hasPendingWrites || i.version.compareTo(s) > 0);\n  }\n  Fi(t, e) {\n    return S() <= LogLevel.DEBUG && C(\"QueryEngine\", \"Using full collection scan to execute query:\", vn(e)), this.$i.getDocumentsMatchingQuery(t, e, yt.min());\n  }\n  /**\n   * Combines the results from an indexed execution with the remaining documents\n   * that have not yet been indexed.\n   */\n  qi(t, e, n, s) {\n    // Retrieve all results for documents that were updated since the offset.\n    return this.$i.getDocumentsMatchingQuery(t, n, s).next(t => (\n    // Merge with existing results\n    e.forEach(e => {\n      t = t.insert(e.key, e);\n    }), t));\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implements `LocalStore` interface.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */\nclass Go {\n  constructor( /** Manages our in-memory or durable persistence. */\n  t, e, n, s) {\n    this.persistence = t, this.Ui = e, this.Tt = s,\n    /**\n     * Maps a targetID to data about its target.\n     *\n     * PORTING NOTE: We are using an immutable data structure on Web to make re-runs\n     * of `applyRemoteEvent()` idempotent.\n     */\n    this.Ki = new We(X), /** Maps a target to its targetID. */\n    // TODO(wuandy): Evaluate if TargetId can be part of Target.\n    this.Gi = new ws(t => un(t), cn),\n    /**\n     * A per collection group index of the last read time processed by\n     * `getNewDocumentChanges()`.\n     *\n     * PORTING NOTE: This is only used for multi-tab synchronization.\n     */\n    this.Qi = new Map(), this.ji = t.getRemoteDocumentCache(), this.Ns = t.getTargetCache(), this.$s = t.getBundleCache(), this.zi(n);\n  }\n  zi(t) {\n    // TODO(indexing): Add spec tests that test these components change after a\n    // user change\n    this.documentOverlayCache = this.persistence.getDocumentOverlayCache(t), this.indexManager = this.persistence.getIndexManager(t), this.mutationQueue = this.persistence.getMutationQueue(t, this.indexManager), this.localDocuments = new Ao(this.ji, this.mutationQueue, this.documentOverlayCache, this.indexManager), this.ji.setIndexManager(this.indexManager), this.Ui.initialize(this.localDocuments, this.indexManager);\n  }\n  collectGarbage(t) {\n    return this.persistence.runTransaction(\"Collect garbage\", \"readwrite-primary\", e => t.collect(e, this.Ki));\n  }\n}\nfunction Qo( /** Manages our in-memory or durable persistence. */\nt, e, n, s) {\n  return new Go(t, e, n, s);\n}\n\n/**\n * Tells the LocalStore that the currently authenticated user has changed.\n *\n * In response the local store switches the mutation queue to the new user and\n * returns any resulting document changes.\n */\n// PORTING NOTE: Android and iOS only return the documents affected by the\n// change.\nfunction jo(_x4, _x5) {\n  return _jo.apply(this, arguments);\n}\n/* Accepts locally generated Mutations and commit them to storage. */\n/**\n * Acknowledges the given batch.\n *\n * On the happy path when a batch is acknowledged, the local store will\n *\n *  + remove the batch from the mutation queue;\n *  + apply the changes to the remote document cache;\n *  + recalculate the latency compensated view implied by those changes (there\n *    may be mutations in the queue that affect the documents but haven't been\n *    acknowledged yet); and\n *  + give the changed documents back the sync engine\n *\n * @returns The resulting (modified) documents.\n */\nfunction _jo() {\n  _jo = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    return yield n.persistence.runTransaction(\"Handle user change\", \"readonly\", t => {\n      // Swap out the mutation queue, grabbing the pending mutation batches\n      // before and after.\n      let s;\n      return n.mutationQueue.getAllMutationBatches(t).next(i => (s = i, n.zi(e), n.mutationQueue.getAllMutationBatches(t))).next(e => {\n        const i = [],\n          r = [];\n        // Union the old/new changed keys.\n        let o = vs();\n        for (const t of s) {\n          i.push(t.batchId);\n          for (const e of t.mutations) o = o.add(e.key);\n        }\n        for (const t of e) {\n          r.push(t.batchId);\n          for (const e of t.mutations) o = o.add(e.key);\n        }\n        // Return the set of all (potentially) changed documents and the list\n        // of mutation batch IDs that were affected by change.\n        return n.localDocuments.getDocuments(t, o).next(t => ({\n          Wi: t,\n          removedBatchIds: i,\n          addedBatchIds: r\n        }));\n      });\n    });\n  });\n  return _jo.apply(this, arguments);\n}\nfunction zo(t, e) {\n  const n = F(t);\n  return n.persistence.runTransaction(\"Acknowledge batch\", \"readwrite-primary\", t => {\n    const s = e.batch.keys(),\n      i = n.ji.newChangeBuffer({\n        trackRemovals: !0\n      });\n    return function (t, e, n, s) {\n      const i = n.batch,\n        r = i.keys();\n      let o = At.resolve();\n      return r.forEach(t => {\n        o = o.next(() => s.getEntry(e, t)).next(e => {\n          const r = n.docVersions.get(t);\n          M(null !== r), e.version.compareTo(r) < 0 && (i.applyToRemoteDocument(e, n), e.isValidDocument() && (\n          // We use the commitVersion as the readTime rather than the\n          // document's updateTime since the updateTime is not advanced\n          // for updates that do not modify the underlying document.\n          e.setReadTime(n.commitVersion), s.addEntry(e)));\n        });\n      }), o.next(() => t.mutationQueue.removeMutationBatch(e, i));\n    }\n    /** Returns the local view of the documents affected by a mutation batch. */\n    // PORTING NOTE: Multi-Tab only.\n    (n, t, e, i).next(() => i.apply(t)).next(() => n.mutationQueue.performConsistencyCheck(t)).next(() => n.documentOverlayCache.removeOverlaysForBatchId(t, s, e.batch.batchId)).next(() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(t, function (t) {\n      let e = vs();\n      for (let n = 0; n < t.mutationResults.length; ++n) {\n        t.mutationResults[n].transformResults.length > 0 && (e = e.add(t.batch.mutations[n].key));\n      }\n      return e;\n    }\n    /**\n    * Removes mutations from the MutationQueue for the specified batch;\n    * LocalDocuments will be recalculated.\n    *\n    * @returns The resulting modified documents.\n    */(e))).next(() => n.localDocuments.getDocuments(t, s));\n  });\n}\n\n/**\n * Returns the last consistent snapshot processed (used by the RemoteStore to\n * determine whether to buffer incoming snapshots from the backend).\n */\nfunction Wo(t) {\n  const e = F(t);\n  return e.persistence.runTransaction(\"Get last remote snapshot version\", \"readonly\", t => e.Ns.getLastRemoteSnapshotVersion(t));\n}\n\n/**\n * Updates the \"ground-state\" (remote) documents. We assume that the remote\n * event reflects any write batches that have been acknowledged or rejected\n * (i.e. we do not re-apply local mutations to updates from this event).\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\nfunction Ho(t, e) {\n  const n = F(t),\n    s = e.snapshotVersion;\n  let i = n.Ki;\n  return n.persistence.runTransaction(\"Apply remote event\", \"readwrite-primary\", t => {\n    const r = n.ji.newChangeBuffer({\n      trackRemovals: !0\n    });\n    // Reset newTargetDataByTargetMap in case this transaction gets re-run.\n    i = n.Ki;\n    const o = [];\n    e.targetChanges.forEach((r, u) => {\n      const c = i.get(u);\n      if (!c) return;\n      // Only update the remote keys if the target is still active. This\n      // ensures that we can persist the updated target data along with\n      // the updated assignment.\n      o.push(n.Ns.removeMatchingKeys(t, r.removedDocuments, u).next(() => n.Ns.addMatchingKeys(t, r.addedDocuments, u)));\n      let a = c.withSequenceNumber(t.currentSequenceNumber);\n      e.targetMismatches.has(u) ? a = a.withResumeToken(Ht.EMPTY_BYTE_STRING, st.min()).withLastLimboFreeSnapshotVersion(st.min()) : r.resumeToken.approximateByteSize() > 0 && (a = a.withResumeToken(r.resumeToken, s)), i = i.insert(u, a),\n      // Update the target data if there are target changes (or if\n      // sufficient time has passed since the last update).\n      /**\n      * Returns true if the newTargetData should be persisted during an update of\n      * an active target. TargetData should always be persisted when a target is\n      * being released and should not call this function.\n      *\n      * While the target is active, TargetData updates can be omitted when nothing\n      * about the target has changed except metadata like the resume token or\n      * snapshot version. Occasionally it's worth the extra write to prevent these\n      * values from getting too stale after a crash, but this doesn't have to be\n      * too frequent.\n      */\n      function (t, e, n) {\n        // Always persist target data if we don't already have a resume token.\n        if (0 === t.resumeToken.approximateByteSize()) return !0;\n        // Don't allow resume token changes to be buffered indefinitely. This\n        // allows us to be reasonably up-to-date after a crash and avoids needing\n        // to loop over all active queries on shutdown. Especially in the browser\n        // we may not get time to do anything interesting while the current tab is\n        // closing.\n        if (e.snapshotVersion.toMicroseconds() - t.snapshotVersion.toMicroseconds() >= 3e8) return !0;\n        // Otherwise if the only thing that has changed about a target is its resume\n        // token it's not worth persisting. Note that the RemoteStore keeps an\n        // in-memory view of the currently active targets which includes the current\n        // resume token, so stream failure or user changes will still use an\n        // up-to-date resume token regardless of what we do here.\n        return n.addedDocuments.size + n.modifiedDocuments.size + n.removedDocuments.size > 0;\n      }\n      /**\n      * Notifies local store of the changed views to locally pin documents.\n      */(c, a, r) && o.push(n.Ns.updateTargetData(t, a));\n    });\n    let u = gs(),\n      c = vs();\n    // HACK: The only reason we allow a null snapshot version is so that we\n    // can synthesize remote events when we get permission denied errors while\n    // trying to resolve the state of a locally cached document that is in\n    // limbo.\n    if (e.documentUpdates.forEach(s => {\n      e.resolvedLimboDocuments.has(s) && o.push(n.persistence.referenceDelegate.updateLimboDocument(t, s));\n    }),\n    // Each loop iteration only affects its \"own\" doc, so it's safe to get all\n    // the remote documents in advance in a single call.\n    o.push(Jo(t, r, e.documentUpdates).next(t => {\n      u = t.Hi, c = t.Ji;\n    })), !s.isEqual(st.min())) {\n      const e = n.Ns.getLastRemoteSnapshotVersion(t).next(e => n.Ns.setTargetsMetadata(t, t.currentSequenceNumber, s));\n      o.push(e);\n    }\n    return At.waitFor(o).next(() => r.apply(t)).next(() => n.localDocuments.getLocalViewOfDocuments(t, u, c)).next(() => u);\n  }).then(t => (n.Ki = i, t));\n}\n\n/**\n * Populates document change buffer with documents from backend or a bundle.\n * Returns the document changes resulting from applying those documents, and\n * also a set of documents whose existence state are changed as a result.\n *\n * @param txn - Transaction to use to read existing documents from storage.\n * @param documentBuffer - Document buffer to collect the resulted changes to be\n *        applied to storage.\n * @param documents - Documents to be applied.\n */\nfunction Jo(t, e, n) {\n  let s = vs(),\n    i = vs();\n  return n.forEach(t => s = s.add(t)), e.getEntries(t, s).next(t => {\n    let s = gs();\n    return n.forEach((n, r) => {\n      const o = t.get(n);\n      // Check if see if there is a existence state change for this document.\n      r.isFoundDocument() !== o.isFoundDocument() && (i = i.add(n)),\n      // Note: The order of the steps below is important, since we want\n      // to ensure that rejected limbo resolutions (which fabricate\n      // NoDocuments with SnapshotVersion.min()) never add documents to\n      // cache.\n      r.isNoDocument() && r.version.isEqual(st.min()) ? (\n      // NoDocuments with SnapshotVersion.min() are used in manufactured\n      // events. We remove these documents from cache since we lost\n      // access.\n      e.removeEntry(n, r.readTime), s = s.insert(n, r)) : !o.isValidDocument() || r.version.compareTo(o.version) > 0 || 0 === r.version.compareTo(o.version) && o.hasPendingWrites ? (e.addEntry(r), s = s.insert(n, r)) : C(\"LocalStore\", \"Ignoring outdated watch update for \", n, \". Current version:\", o.version, \" Watch version:\", r.version);\n    }), {\n      Hi: s,\n      Ji: i\n    };\n  });\n}\n\n/**\n * Gets the mutation batch after the passed in batchId in the mutation queue\n * or null if empty.\n * @param afterBatchId - If provided, the batch to search after.\n * @returns The next mutation or null if there wasn't one.\n */\nfunction Yo(t, e) {\n  const n = F(t);\n  return n.persistence.runTransaction(\"Get next mutation batch\", \"readonly\", t => (void 0 === e && (e = -1), n.mutationQueue.getNextMutationBatchAfterBatchId(t, e)));\n}\n\n/**\n * Reads the current value of a Document with a given key or null if not\n * found - used for testing.\n */\n/**\n * Assigns the given target an internal ID so that its results can be pinned so\n * they don't get GC'd. A target must be allocated in the local store before\n * the store can be used to manage its view.\n *\n * Allocating an already allocated `Target` will return the existing `TargetData`\n * for that `Target`.\n */\nfunction Zo(t, e) {\n  const n = F(t);\n  return n.persistence.runTransaction(\"Allocate target\", \"readwrite\", t => {\n    let s;\n    return n.Ns.getTargetData(t, e).next(i => i ? (\n    // This target has been listened to previously, so reuse the\n    // previous targetID.\n    // TODO(mcg): freshen last accessed date?\n    s = i, At.resolve(s)) : n.Ns.allocateTargetId(t).next(i => (s = new Zi(e, i, 0 /* TargetPurpose.Listen */, t.currentSequenceNumber), n.Ns.addTargetData(t, s).next(() => s))));\n  }).then(t => {\n    // If Multi-Tab is enabled, the existing target data may be newer than\n    // the in-memory data\n    const s = n.Ki.get(t.targetId);\n    return (null === s || t.snapshotVersion.compareTo(s.snapshotVersion) > 0) && (n.Ki = n.Ki.insert(t.targetId, t), n.Gi.set(e, t.targetId)), t;\n  });\n}\n\n/**\n * Returns the TargetData as seen by the LocalStore, including updates that may\n * have not yet been persisted to the TargetCache.\n */\n// Visible for testing.\n/**\n * Unpins all the documents associated with the given target. If\n * `keepPersistedTargetData` is set to false and Eager GC enabled, the method\n * directly removes the associated target data from the target cache.\n *\n * Releasing a non-existing `Target` is a no-op.\n */\n// PORTING NOTE: `keepPersistedTargetData` is multi-tab only.\nfunction Xo(_x6, _x7, _x8) {\n  return _Xo.apply(this, arguments);\n}\n/**\n * Runs the specified query against the local store and returns the results,\n * potentially taking advantage of query data from previous executions (such\n * as the set of remote keys).\n *\n * @param usePreviousResults - Whether results from previous executions can\n * be used to optimize this query execution.\n */\nfunction _Xo() {\n  _Xo = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t),\n      i = s.Ki.get(e),\n      r = n ? \"readwrite\" : \"readwrite-primary\";\n    try {\n      n || (yield s.persistence.runTransaction(\"Release target\", r, t => s.persistence.referenceDelegate.removeTarget(t, i)));\n    } catch (t) {\n      if (!Vt(t)) throw t;\n      // All `releaseTarget` does is record the final metadata state for the\n      // target, but we've been recording this periodically during target\n      // activity. If we lose this write this could cause a very slight\n      // difference in the order of target deletion during GC, but we\n      // don't define exact LRU semantics so this is acceptable.\n      C(\"LocalStore\", `Failed to update sequence numbers for target ${e}: ${t}`);\n    }\n    s.Ki = s.Ki.remove(e), s.Gi.delete(i.target);\n  });\n  return _Xo.apply(this, arguments);\n}\nfunction tu(t, e, n) {\n  const s = F(t);\n  let i = st.min(),\n    r = vs();\n  return s.persistence.runTransaction(\"Execute query\", \"readonly\", t => function (t, e, n) {\n    const s = F(t),\n      i = s.Gi.get(n);\n    return void 0 !== i ? At.resolve(s.Ki.get(i)) : s.Ns.getTargetData(e, n);\n  }(s, t, Tn(e)).next(e => {\n    if (e) return i = e.lastLimboFreeSnapshotVersion, s.Ns.getMatchingKeysForTargetId(t, e.targetId).next(t => {\n      r = t;\n    });\n  }).next(() => s.Ui.getDocumentsMatchingQuery(t, e, n ? i : st.min(), n ? r : vs())).next(t => (su(s, Vn(e), t), {\n    documents: t,\n    Yi: r\n  })));\n}\n\n// PORTING NOTE: Multi-Tab only.\nfunction eu(t, e) {\n  const n = F(t),\n    s = F(n.Ns),\n    i = n.Ki.get(e);\n  return i ? Promise.resolve(i.target) : n.persistence.runTransaction(\"Get target data\", \"readonly\", t => s.ie(t, e).next(t => t ? t.target : null));\n}\n\n/**\n * Returns the set of documents that have been updated since the last call.\n * If this is the first call, returns the set of changes since client\n * initialization. Further invocations will return document that have changed\n * since the prior call.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction nu(t, e) {\n  const n = F(t),\n    s = n.Qi.get(e) || st.min();\n  // Get the current maximum read time for the collection. This should always\n  // exist, but to reduce the chance for regressions we default to\n  // SnapshotVersion.Min()\n  // TODO(indexing): Consider removing the default value.\n  return n.persistence.runTransaction(\"Get new document changes\", \"readonly\", t => n.ji.getAllFromCollectionGroup(t, e, mt(s, -1), /* limit= */Number.MAX_SAFE_INTEGER)).then(t => (su(n, e, t), t));\n}\n\n/** Sets the collection group's maximum read time from the given documents. */\n// PORTING NOTE: Multi-Tab only.\nfunction su(t, e, n) {\n  let s = t.Qi.get(e) || st.min();\n  n.forEach((t, e) => {\n    e.readTime.compareTo(s) > 0 && (s = e.readTime);\n  }), t.Qi.set(e, s);\n}\n\n/**\n * Creates a new target using the given bundle name, which will be used to\n * hold the keys of all documents from the bundle in query-document mappings.\n * This ensures that the loaded documents do not get garbage collected\n * right away.\n */\n/**\n * Applies the documents from a bundle to the \"ground-state\" (remote)\n * documents.\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\nfunction iu(_x9, _x10, _x11, _x12) {\n  return _iu.apply(this, arguments);\n}\n/**\n * Returns a promise of a boolean to indicate if the given bundle has already\n * been loaded and the create time is newer than the current loading bundle.\n */\n/**\n * Saves the given `NamedQuery` to local persistence.\n */\nfunction _iu() {\n  _iu = _asyncToGenerator(function* (t, e, n, s) {\n    const i = F(t);\n    let r = vs(),\n      o = gs();\n    for (const t of n) {\n      const n = e.Zi(t.metadata.name);\n      t.document && (r = r.add(n));\n      const s = e.Xi(t);\n      s.setReadTime(e.tr(t.metadata.readTime)), o = o.insert(n, s);\n    }\n    const u = i.ji.newChangeBuffer({\n        trackRemovals: !0\n      }),\n      c = yield Zo(i, function (t) {\n        // It is OK that the path used for the query is not valid, because this will\n        // not be read and queried.\n        return Tn(wn(rt.fromString(`__bundle__/docs/${t}`)));\n      }(s));\n    // Allocates a target to hold all document keys from the bundle, such that\n    // they will not get garbage collected right away.\n    return i.persistence.runTransaction(\"Apply bundle documents\", \"readwrite\", t => Jo(t, u, o).next(e => (u.apply(t), e)).next(e => i.Ns.removeMatchingKeysForTargetId(t, c.targetId).next(() => i.Ns.addMatchingKeys(t, r, c.targetId)).next(() => i.localDocuments.getLocalViewOfDocuments(t, e.Hi, e.Ji)).next(() => e.Hi)));\n  });\n  return _iu.apply(this, arguments);\n}\nfunction ru(_x13, _x14) {\n  return _ru.apply(this, arguments);\n}\n/** Assembles the key for a client state in WebStorage */\nfunction _ru() {\n  _ru = _asyncToGenerator(function* (t, e, n = vs()) {\n    // Allocate a target for the named query such that it can be resumed\n    // from associated read time if users use it to listen.\n    // NOTE: this also means if no corresponding target exists, the new target\n    // will remain active and will not get collected, unless users happen to\n    // unlisten the query somehow.\n    const s = yield Zo(t, Tn(cr(e.bundledQuery))),\n      i = F(t);\n    return i.persistence.runTransaction(\"Save named query\", \"readwrite\", t => {\n      const r = Qs(e.readTime);\n      // Simply save the query itself if it is older than what the SDK already\n      // has.\n      if (s.snapshotVersion.compareTo(r) >= 0) return i.$s.saveNamedQuery(t, e);\n      // Update existing target data because the query from the bundle is newer.\n      const o = s.withResumeToken(Ht.EMPTY_BYTE_STRING, r);\n      return i.Ki = i.Ki.insert(o.targetId, o), i.Ns.updateTargetData(t, o).next(() => i.Ns.removeMatchingKeysForTargetId(t, s.targetId)).next(() => i.Ns.addMatchingKeys(t, n, s.targetId)).next(() => i.$s.saveNamedQuery(t, e));\n    });\n  });\n  return _ru.apply(this, arguments);\n}\nfunction ou(t, e) {\n  return `firestore_clients_${t}_${e}`;\n}\n\n// The format of the WebStorage key that stores the mutation state is:\n//     firestore_mutations_<persistence_prefix>_<batch_id>\n//     (for unauthenticated users)\n// or: firestore_mutations_<persistence_prefix>_<batch_id>_<user_uid>\n\n// 'user_uid' is last to avoid needing to escape '_' characters that it might\n// contain.\n/** Assembles the key for a mutation batch in WebStorage */\nfunction uu(t, e, n) {\n  let s = `firestore_mutations_${t}_${n}`;\n  return e.isAuthenticated() && (s += `_${e.uid}`), s;\n}\n\n// The format of the WebStorage key that stores a query target's metadata is:\n//     firestore_targets_<persistence_prefix>_<target_id>\n/** Assembles the key for a query state in WebStorage */\nfunction cu(t, e) {\n  return `firestore_targets_${t}_${e}`;\n}\n\n// The WebStorage prefix that stores the primary tab's online state. The\n// format of the key is:\n//     firestore_online_state_<persistence_prefix>\n/**\n * Holds the state of a mutation batch, including its user ID, batch ID and\n * whether the batch is 'pending', 'acknowledged' or 'rejected'.\n */\n// Visible for testing\nclass au {\n  constructor(t, e, n, s) {\n    this.user = t, this.batchId = e, this.state = n, this.error = s;\n  }\n  /**\n   * Parses a MutationMetadata from its JSON representation in WebStorage.\n   * Logs a warning and returns null if the format of the data is not valid.\n   */\n  static er(t, e, n) {\n    const s = JSON.parse(n);\n    let i,\n      r = \"object\" == typeof s && -1 !== [\"pending\", \"acknowledged\", \"rejected\"].indexOf(s.state) && (void 0 === s.error || \"object\" == typeof s.error);\n    return r && s.error && (r = \"string\" == typeof s.error.message && \"string\" == typeof s.error.code, r && (i = new L(s.error.code, s.error.message))), r ? new au(t, e, s.state, i) : (x(\"SharedClientState\", `Failed to parse mutation state for ID '${e}': ${n}`), null);\n  }\n  nr() {\n    const t = {\n      state: this.state,\n      updateTimeMs: Date.now()\n    };\n    return this.error && (t.error = {\n      code: this.error.code,\n      message: this.error.message\n    }), JSON.stringify(t);\n  }\n}\n\n/**\n * Holds the state of a query target, including its target ID and whether the\n * target is 'not-current', 'current' or 'rejected'.\n */\n// Visible for testing\nclass hu {\n  constructor(t, e, n) {\n    this.targetId = t, this.state = e, this.error = n;\n  }\n  /**\n   * Parses a QueryTargetMetadata from its JSON representation in WebStorage.\n   * Logs a warning and returns null if the format of the data is not valid.\n   */\n  static er(t, e) {\n    const n = JSON.parse(e);\n    let s,\n      i = \"object\" == typeof n && -1 !== [\"not-current\", \"current\", \"rejected\"].indexOf(n.state) && (void 0 === n.error || \"object\" == typeof n.error);\n    return i && n.error && (i = \"string\" == typeof n.error.message && \"string\" == typeof n.error.code, i && (s = new L(n.error.code, n.error.message))), i ? new hu(t, n.state, s) : (x(\"SharedClientState\", `Failed to parse target state for ID '${t}': ${e}`), null);\n  }\n  nr() {\n    const t = {\n      state: this.state,\n      updateTimeMs: Date.now()\n    };\n    return this.error && (t.error = {\n      code: this.error.code,\n      message: this.error.message\n    }), JSON.stringify(t);\n  }\n}\n\n/**\n * This class represents the immutable ClientState for a client read from\n * WebStorage, containing the list of active query targets.\n */\nclass lu {\n  constructor(t, e) {\n    this.clientId = t, this.activeTargetIds = e;\n  }\n  /**\n   * Parses a RemoteClientState from the JSON representation in WebStorage.\n   * Logs a warning and returns null if the format of the data is not valid.\n   */\n  static er(t, e) {\n    const n = JSON.parse(e);\n    let s = \"object\" == typeof n && n.activeTargetIds instanceof Array,\n      i = Vs();\n    for (let t = 0; s && t < n.activeTargetIds.length; ++t) s = jt(n.activeTargetIds[t]), i = i.add(n.activeTargetIds[t]);\n    return s ? new lu(t, i) : (x(\"SharedClientState\", `Failed to parse client data for instance '${t}': ${e}`), null);\n  }\n}\n\n/**\n * This class represents the online state for all clients participating in\n * multi-tab. The online state is only written to by the primary client, and\n * used in secondary clients to update their query views.\n */\nclass fu {\n  constructor(t, e) {\n    this.clientId = t, this.onlineState = e;\n  }\n  /**\n   * Parses a SharedOnlineState from its JSON representation in WebStorage.\n   * Logs a warning and returns null if the format of the data is not valid.\n   */\n  static er(t) {\n    const e = JSON.parse(t);\n    return \"object\" == typeof e && -1 !== [\"Unknown\", \"Online\", \"Offline\"].indexOf(e.onlineState) && \"string\" == typeof e.clientId ? new fu(e.clientId, e.onlineState) : (x(\"SharedClientState\", `Failed to parse online state: ${t}`), null);\n  }\n}\n\n/**\n * Metadata state of the local client. Unlike `RemoteClientState`, this class is\n * mutable and keeps track of all pending mutations, which allows us to\n * update the range of pending mutation batch IDs as new mutations are added or\n * removed.\n *\n * The data in `LocalClientState` is not read from WebStorage and instead\n * updated via its instance methods. The updated state can be serialized via\n * `toWebStorageJSON()`.\n */\n// Visible for testing.\nclass du {\n  constructor() {\n    this.activeTargetIds = Vs();\n  }\n  sr(t) {\n    this.activeTargetIds = this.activeTargetIds.add(t);\n  }\n  ir(t) {\n    this.activeTargetIds = this.activeTargetIds.delete(t);\n  }\n  /**\n   * Converts this entry into a JSON-encoded format we can use for WebStorage.\n   * Does not encode `clientId` as it is part of the key in WebStorage.\n   */\n  nr() {\n    const t = {\n      activeTargetIds: this.activeTargetIds.toArray(),\n      updateTimeMs: Date.now()\n    };\n    return JSON.stringify(t);\n  }\n}\n\n/**\n * `WebStorageSharedClientState` uses WebStorage (window.localStorage) as the\n * backing store for the SharedClientState. It keeps track of all active\n * clients and supports modifications of the local client's data.\n */\nclass _u {\n  constructor(t, e, n, s, i) {\n    this.window = t, this.Ys = e, this.persistenceKey = n, this.rr = s, this.syncEngine = null, this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.ur = this.cr.bind(this), this.ar = new We(X), this.started = !1,\n    /**\n     * Captures WebStorage events that occur before `start()` is called. These\n     * events are replayed once `WebStorageSharedClientState` is started.\n     */\n    this.hr = [];\n    // Escape the special characters mentioned here:\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n    const r = n.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n    this.storage = this.window.localStorage, this.currentUser = i, this.lr = ou(this.persistenceKey, this.rr), this.dr = /** Assembles the key for the current sequence number. */\n    function (t) {\n      return `firestore_sequence_number_${t}`;\n    }\n    /**\n    * @license\n    * Copyright 2018 Google LLC\n    *\n    * Licensed under the Apache License, Version 2.0 (the \"License\");\n    * you may not use this file except in compliance with the License.\n    * You may obtain a copy of the License at\n    *\n    *   http://www.apache.org/licenses/LICENSE-2.0\n    *\n    * Unless required by applicable law or agreed to in writing, software\n    * distributed under the License is distributed on an \"AS IS\" BASIS,\n    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    * See the License for the specific language governing permissions and\n    * limitations under the License.\n    */(this.persistenceKey), this.ar = this.ar.insert(this.rr, new du()), this._r = new RegExp(`^firestore_clients_${r}_([^_]*)$`), this.wr = new RegExp(`^firestore_mutations_${r}_(\\\\d+)(?:_(.*))?$`), this.mr = new RegExp(`^firestore_targets_${r}_(\\\\d+)$`), this.gr = /** Assembles the key for the online state of the primary tab. */\n    function (t) {\n      return `firestore_online_state_${t}`;\n    }\n    // The WebStorage prefix that plays as a event to indicate the remote documents\n    // might have changed due to some secondary tabs loading a bundle.\n    // format of the key is:\n    //     firestore_bundle_loaded_v2_<persistenceKey>\n    // The version ending with \"v2\" stores the list of modified collection groups.\n    (this.persistenceKey), this.yr = function (t) {\n      return `firestore_bundle_loaded_v2_${t}`;\n    }\n    // The WebStorage key prefix for the key that stores the last sequence number allocated. The key\n    // looks like 'firestore_sequence_number_<persistence_prefix>'.\n    (this.persistenceKey),\n    // Rather than adding the storage observer during start(), we add the\n    // storage observer during initialization. This ensures that we collect\n    // events before other components populate their initial state (during their\n    // respective start() calls). Otherwise, we might for example miss a\n    // mutation that is added after LocalStore's start() processed the existing\n    // mutations but before we observe WebStorage events.\n    this.window.addEventListener(\"storage\", this.ur);\n  }\n  /** Returns 'true' if WebStorage is available in the current environment. */\n  static C(t) {\n    return !(!t || !t.localStorage);\n  }\n  start() {\n    var _this11 = this;\n    return _asyncToGenerator(function* () {\n      // Retrieve the list of existing clients to backfill the data in\n      // SharedClientState.\n      const t = yield _this11.syncEngine.Si();\n      for (const e of t) {\n        if (e === _this11.rr) continue;\n        const t = _this11.getItem(ou(_this11.persistenceKey, e));\n        if (t) {\n          const n = lu.er(e, t);\n          n && (_this11.ar = _this11.ar.insert(n.clientId, n));\n        }\n      }\n      _this11.pr();\n      // Check if there is an existing online state and call the callback handler\n      // if applicable.\n      const e = _this11.storage.getItem(_this11.gr);\n      if (e) {\n        const t = _this11.Ir(e);\n        t && _this11.Tr(t);\n      }\n      for (const t of _this11.hr) _this11.cr(t);\n      _this11.hr = [],\n      // Register a window unload hook to remove the client metadata entry from\n      // WebStorage even if `shutdown()` was not called.\n      _this11.window.addEventListener(\"pagehide\", () => _this11.shutdown()), _this11.started = !0;\n    })();\n  }\n  writeSequenceNumber(t) {\n    this.setItem(this.dr, JSON.stringify(t));\n  }\n  getAllActiveQueryTargets() {\n    return this.Er(this.ar);\n  }\n  isActiveQueryTarget(t) {\n    let e = !1;\n    return this.ar.forEach((n, s) => {\n      s.activeTargetIds.has(t) && (e = !0);\n    }), e;\n  }\n  addPendingMutation(t) {\n    this.Ar(t, \"pending\");\n  }\n  updateMutationState(t, e, n) {\n    this.Ar(t, e, n),\n    // Once a final mutation result is observed by other clients, they no longer\n    // access the mutation's metadata entry. Since WebStorage replays events\n    // in order, it is safe to delete the entry right after updating it.\n    this.Rr(t);\n  }\n  addLocalQueryTarget(t) {\n    let e = \"not-current\";\n    // Lookup an existing query state if the target ID was already registered\n    // by another tab\n    if (this.isActiveQueryTarget(t)) {\n      const n = this.storage.getItem(cu(this.persistenceKey, t));\n      if (n) {\n        const s = hu.er(t, n);\n        s && (e = s.state);\n      }\n    }\n    return this.Pr.sr(t), this.pr(), e;\n  }\n  removeLocalQueryTarget(t) {\n    this.Pr.ir(t), this.pr();\n  }\n  isLocalQueryTarget(t) {\n    return this.Pr.activeTargetIds.has(t);\n  }\n  clearQueryState(t) {\n    this.removeItem(cu(this.persistenceKey, t));\n  }\n  updateQueryState(t, e, n) {\n    this.vr(t, e, n);\n  }\n  handleUserChange(t, e, n) {\n    e.forEach(t => {\n      this.Rr(t);\n    }), this.currentUser = t, n.forEach(t => {\n      this.addPendingMutation(t);\n    });\n  }\n  setOnlineState(t) {\n    this.br(t);\n  }\n  notifyBundleLoaded(t) {\n    this.Vr(t);\n  }\n  shutdown() {\n    this.started && (this.window.removeEventListener(\"storage\", this.ur), this.removeItem(this.lr), this.started = !1);\n  }\n  getItem(t) {\n    const e = this.storage.getItem(t);\n    return C(\"SharedClientState\", \"READ\", t, e), e;\n  }\n  setItem(t, e) {\n    C(\"SharedClientState\", \"SET\", t, e), this.storage.setItem(t, e);\n  }\n  removeItem(t) {\n    C(\"SharedClientState\", \"REMOVE\", t), this.storage.removeItem(t);\n  }\n  cr(t) {\n    var _this12 = this;\n    // Note: The function is typed to take Event to be interface-compatible with\n    // `Window.addEventListener`.\n    const e = t;\n    if (e.storageArea === this.storage) {\n      if (C(\"SharedClientState\", \"EVENT\", e.key, e.newValue), e.key === this.lr) return void x(\"Received WebStorage notification for local change. Another client might have garbage-collected our state\");\n      this.Ys.enqueueRetryable( /*#__PURE__*/_asyncToGenerator(function* () {\n        if (_this12.started) {\n          if (null !== e.key) if (_this12._r.test(e.key)) {\n            if (null == e.newValue) {\n              const t = _this12.Sr(e.key);\n              return _this12.Dr(t, null);\n            }\n            {\n              const t = _this12.Cr(e.key, e.newValue);\n              if (t) return _this12.Dr(t.clientId, t);\n            }\n          } else if (_this12.wr.test(e.key)) {\n            if (null !== e.newValue) {\n              const t = _this12.Nr(e.key, e.newValue);\n              if (t) return _this12.kr(t);\n            }\n          } else if (_this12.mr.test(e.key)) {\n            if (null !== e.newValue) {\n              const t = _this12.$r(e.key, e.newValue);\n              if (t) return _this12.Mr(t);\n            }\n          } else if (e.key === _this12.gr) {\n            if (null !== e.newValue) {\n              const t = _this12.Ir(e.newValue);\n              if (t) return _this12.Tr(t);\n            }\n          } else if (e.key === _this12.dr) {\n            const t = function (t) {\n              let e = $t.at;\n              if (null != t) try {\n                const n = JSON.parse(t);\n                M(\"number\" == typeof n), e = n;\n              } catch (t) {\n                x(\"SharedClientState\", \"Failed to read sequence number from WebStorage\", t);\n              }\n              return e;\n            }\n            /**\n            * `MemorySharedClientState` is a simple implementation of SharedClientState for\n            * clients using memory persistence. The state in this class remains fully\n            * isolated and no synchronization is performed.\n            */(e.newValue);\n            t !== $t.at && _this12.sequenceNumberHandler(t);\n          } else if (e.key === _this12.yr) {\n            const t = _this12.Or(e.newValue);\n            yield Promise.all(t.map(t => _this12.syncEngine.Fr(t)));\n          }\n        } else _this12.hr.push(e);\n      }));\n    }\n  }\n  get Pr() {\n    return this.ar.get(this.rr);\n  }\n  pr() {\n    this.setItem(this.lr, this.Pr.nr());\n  }\n  Ar(t, e, n) {\n    const s = new au(this.currentUser, t, e, n),\n      i = uu(this.persistenceKey, this.currentUser, t);\n    this.setItem(i, s.nr());\n  }\n  Rr(t) {\n    const e = uu(this.persistenceKey, this.currentUser, t);\n    this.removeItem(e);\n  }\n  br(t) {\n    const e = {\n      clientId: this.rr,\n      onlineState: t\n    };\n    this.storage.setItem(this.gr, JSON.stringify(e));\n  }\n  vr(t, e, n) {\n    const s = cu(this.persistenceKey, t),\n      i = new hu(t, e, n);\n    this.setItem(s, i.nr());\n  }\n  Vr(t) {\n    const e = JSON.stringify(Array.from(t));\n    this.setItem(this.yr, e);\n  }\n  /**\n   * Parses a client state key in WebStorage. Returns null if the key does not\n   * match the expected key format.\n   */\n  Sr(t) {\n    const e = this._r.exec(t);\n    return e ? e[1] : null;\n  }\n  /**\n   * Parses a client state in WebStorage. Returns 'null' if the value could not\n   * be parsed.\n   */\n  Cr(t, e) {\n    const n = this.Sr(t);\n    return lu.er(n, e);\n  }\n  /**\n   * Parses a mutation batch state in WebStorage. Returns 'null' if the value\n   * could not be parsed.\n   */\n  Nr(t, e) {\n    const n = this.wr.exec(t),\n      s = Number(n[1]),\n      i = void 0 !== n[2] ? n[2] : null;\n    return au.er(new v(i), s, e);\n  }\n  /**\n   * Parses a query target state from WebStorage. Returns 'null' if the value\n   * could not be parsed.\n   */\n  $r(t, e) {\n    const n = this.mr.exec(t),\n      s = Number(n[1]);\n    return hu.er(s, e);\n  }\n  /**\n   * Parses an online state from WebStorage. Returns 'null' if the value\n   * could not be parsed.\n   */\n  Ir(t) {\n    return fu.er(t);\n  }\n  Or(t) {\n    return JSON.parse(t);\n  }\n  kr(t) {\n    var _this13 = this;\n    return _asyncToGenerator(function* () {\n      if (t.user.uid === _this13.currentUser.uid) return _this13.syncEngine.Br(t.batchId, t.state, t.error);\n      C(\"SharedClientState\", `Ignoring mutation for non-active user ${t.user.uid}`);\n    })();\n  }\n  Mr(t) {\n    return this.syncEngine.Lr(t.targetId, t.state, t.error);\n  }\n  Dr(t, e) {\n    const n = e ? this.ar.insert(t, e) : this.ar.remove(t),\n      s = this.Er(this.ar),\n      i = this.Er(n),\n      r = [],\n      o = [];\n    return i.forEach(t => {\n      s.has(t) || r.push(t);\n    }), s.forEach(t => {\n      i.has(t) || o.push(t);\n    }), this.syncEngine.qr(r, o).then(() => {\n      this.ar = n;\n    });\n  }\n  Tr(t) {\n    // We check whether the client that wrote this online state is still active\n    // by comparing its client ID to the list of clients kept active in\n    // IndexedDb. If a client does not update their IndexedDb client state\n    // within 5 seconds, it is considered inactive and we don't emit an online\n    // state event.\n    this.ar.get(t.clientId) && this.onlineStateHandler(t.onlineState);\n  }\n  Er(t) {\n    let e = Vs();\n    return t.forEach((t, n) => {\n      e = e.unionWith(n.activeTargetIds);\n    }), e;\n  }\n}\nclass wu {\n  constructor() {\n    this.Ur = new du(), this.Kr = {}, this.onlineStateHandler = null, this.sequenceNumberHandler = null;\n  }\n  addPendingMutation(t) {\n    // No op.\n  }\n  updateMutationState(t, e, n) {\n    // No op.\n  }\n  addLocalQueryTarget(t) {\n    return this.Ur.sr(t), this.Kr[t] || \"not-current\";\n  }\n  updateQueryState(t, e, n) {\n    this.Kr[t] = e;\n  }\n  removeLocalQueryTarget(t) {\n    this.Ur.ir(t);\n  }\n  isLocalQueryTarget(t) {\n    return this.Ur.activeTargetIds.has(t);\n  }\n  clearQueryState(t) {\n    delete this.Kr[t];\n  }\n  getAllActiveQueryTargets() {\n    return this.Ur.activeTargetIds;\n  }\n  isActiveQueryTarget(t) {\n    return this.Ur.activeTargetIds.has(t);\n  }\n  start() {\n    return this.Ur = new du(), Promise.resolve();\n  }\n  handleUserChange(t, e, n) {\n    // No op.\n  }\n  setOnlineState(t) {\n    // No op.\n  }\n  shutdown() {}\n  writeSequenceNumber(t) {}\n  notifyBundleLoaded(t) {\n    // No op.\n  }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass mu {\n  Gr(t) {\n    // No-op.\n  }\n  shutdown() {\n    // No-op.\n  }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by BrowserConnectivityMonitor.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Browser implementation of ConnectivityMonitor.\n */\nclass gu {\n  constructor() {\n    this.Qr = () => this.jr(), this.zr = () => this.Wr(), this.Hr = [], this.Jr();\n  }\n  Gr(t) {\n    this.Hr.push(t);\n  }\n  shutdown() {\n    window.removeEventListener(\"online\", this.Qr), window.removeEventListener(\"offline\", this.zr);\n  }\n  Jr() {\n    window.addEventListener(\"online\", this.Qr), window.addEventListener(\"offline\", this.zr);\n  }\n  jr() {\n    C(\"ConnectivityMonitor\", \"Network connectivity changed: AVAILABLE\");\n    for (const t of this.Hr) t(0 /* NetworkStatus.AVAILABLE */);\n  }\n\n  Wr() {\n    C(\"ConnectivityMonitor\", \"Network connectivity changed: UNAVAILABLE\");\n    for (const t of this.Hr) t(1 /* NetworkStatus.UNAVAILABLE */);\n  }\n  // TODO(chenbrian): Consider passing in window either into this component or\n  // here for testing via FakeWindow.\n  /** Checks that all used attributes of window are available. */\n  static C() {\n    return \"undefined\" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;\n  }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The value returned from the most recent invocation of\n * `generateUniqueDebugId()`, or null if it has never been invoked.\n */\nlet yu = null;\n\n/**\n * Generates and returns an initial value for `lastUniqueDebugId`.\n *\n * The returned value is randomly selected from a range of integers that are\n * represented as 8 hexadecimal digits. This means that (within reason) any\n * numbers generated by incrementing the returned number by 1 will also be\n * represented by 8 hexadecimal digits. This leads to all \"IDs\" having the same\n * length when converted to a hexadecimal string, making reading logs containing\n * these IDs easier to follow. And since the return value is randomly selected\n * it will help to differentiate between logs from different executions.\n */\n/**\n * Generates and returns a unique ID as a hexadecimal string.\n *\n * The returned ID is intended to be used in debug logging messages to help\n * correlate log messages that may be spatially separated in the logs, but\n * logically related. For example, a network connection could include the same\n * \"debug ID\" string in all of its log messages to help trace a specific\n * connection over time.\n *\n * @return the 10-character generated ID (e.g. \"0xa1b2c3d4\").\n */\nfunction pu() {\n  return null === yu ? yu = 268435456 + Math.round(2147483648 * Math.random()) : yu++, \"0x\" + yu.toString(16);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Iu = {\n  BatchGetDocuments: \"batchGet\",\n  Commit: \"commit\",\n  RunQuery: \"runQuery\",\n  RunAggregationQuery: \"runAggregationQuery\"\n};\n\n/**\n * Maps RPC names to the corresponding REST endpoint name.\n *\n * We use array notation to avoid mangling.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a simple helper class that implements the Stream interface to\n * bridge to other implementations that are streams but do not implement the\n * interface. The stream callbacks are invoked with the callOn... methods.\n */\nclass Tu {\n  constructor(t) {\n    this.Yr = t.Yr, this.Zr = t.Zr;\n  }\n  Xr(t) {\n    this.eo = t;\n  }\n  no(t) {\n    this.so = t;\n  }\n  onMessage(t) {\n    this.io = t;\n  }\n  close() {\n    this.Zr();\n  }\n  send(t) {\n    this.Yr(t);\n  }\n  ro() {\n    this.eo();\n  }\n  oo(t) {\n    this.so(t);\n  }\n  uo(t) {\n    this.io(t);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Eu = \"WebChannelConnection\";\nclass Au extends\n/**\n * Base class for all Rest-based connections to the backend (WebChannel and\n * HTTP).\n */\nclass {\n  constructor(t) {\n    this.databaseInfo = t, this.databaseId = t.databaseId;\n    const e = t.ssl ? \"https\" : \"http\";\n    this.co = e + \"://\" + t.host, this.ao = \"projects/\" + this.databaseId.projectId + \"/databases/\" + this.databaseId.database + \"/documents\";\n  }\n  get ho() {\n    // Both `invokeRPC()` and `invokeStreamingRPC()` use their `path` arguments to determine\n    // where to run the query, and expect the `request` to NOT specify the \"path\".\n    return !1;\n  }\n  lo(t, e, n, s, i) {\n    const r = pu(),\n      o = this.fo(t, e);\n    C(\"RestConnection\", `Sending RPC '${t}' ${r}:`, o, n);\n    const u = {};\n    return this._o(u, s, i), this.wo(t, o, u, n).then(e => (C(\"RestConnection\", `Received RPC '${t}' ${r}: `, e), e), e => {\n      throw N(\"RestConnection\", `RPC '${t}' ${r} failed with error: `, e, \"url: \", o, \"request:\", n), e;\n    });\n  }\n  mo(t, e, n, s, i, r) {\n    // The REST API automatically aggregates all of the streamed results, so we\n    // can just use the normal invoke() method.\n    return this.lo(t, e, n, s, i);\n  }\n  /**\n   * Modifies the headers for a request, adding any authorization token if\n   * present and any additional headers for the request.\n   */\n  _o(t, e, n) {\n    t[\"X-Goog-Api-Client\"] = \"gl-js/ fire/\" + b,\n    // Content-Type: text/plain will avoid preflight requests which might\n    // mess with CORS and redirects by proxies. If we add custom headers\n    // we will need to change this code to potentially use the $httpOverwrite\n    // parameter supported by ESF to avoid triggering preflight requests.\n    t[\"Content-Type\"] = \"text/plain\", this.databaseInfo.appId && (t[\"X-Firebase-GMPID\"] = this.databaseInfo.appId), e && e.headers.forEach((e, n) => t[n] = e), n && n.headers.forEach((e, n) => t[n] = e);\n  }\n  fo(t, e) {\n    const n = Iu[t];\n    return `${this.co}/v1/${e}:${n}`;\n  }\n} {\n  constructor(t) {\n    super(t), this.forceLongPolling = t.forceLongPolling, this.autoDetectLongPolling = t.autoDetectLongPolling, this.useFetchStreams = t.useFetchStreams;\n  }\n  wo(t, e, n, s) {\n    const i = pu();\n    return new Promise((r, o) => {\n      const u = new XhrIo();\n      u.setWithCredentials(!0), u.listenOnce(EventType.COMPLETE, () => {\n        try {\n          switch (u.getLastErrorCode()) {\n            case ErrorCode.NO_ERROR:\n              const e = u.getResponseJson();\n              C(Eu, `XHR for RPC '${t}' ${i} received:`, JSON.stringify(e)), r(e);\n              break;\n            case ErrorCode.TIMEOUT:\n              C(Eu, `RPC '${t}' ${i} timed out`), o(new L(B.DEADLINE_EXCEEDED, \"Request time out\"));\n              break;\n            case ErrorCode.HTTP_ERROR:\n              const n = u.getStatus();\n              if (C(Eu, `RPC '${t}' ${i} failed with status:`, n, \"response text:\", u.getResponseText()), n > 0) {\n                let t = u.getResponseJson();\n                Array.isArray(t) && (t = t[0]);\n                const e = null == t ? void 0 : t.error;\n                if (e && e.status && e.message) {\n                  const t = function (t) {\n                    const e = t.toLowerCase().replace(/_/g, \"-\");\n                    return Object.values(B).indexOf(e) >= 0 ? e : B.UNKNOWN;\n                  }(e.status);\n                  o(new L(t, e.message));\n                } else o(new L(B.UNKNOWN, \"Server responded with status \" + u.getStatus()));\n              } else\n                // If we received an HTTP_ERROR but there's no status code,\n                // it's most probably a connection issue\n                o(new L(B.UNAVAILABLE, \"Connection failed.\"));\n              break;\n            default:\n              $();\n          }\n        } finally {\n          C(Eu, `RPC '${t}' ${i} completed.`);\n        }\n      });\n      const c = JSON.stringify(s);\n      C(Eu, `RPC '${t}' ${i} sending request:`, s), u.send(e, \"POST\", c, n, 15);\n    });\n  }\n  yo(t, e, n) {\n    const s = pu(),\n      i = [this.co, \"/\", \"google.firestore.v1.Firestore\", \"/\", t, \"/channel\"],\n      r = createWebChannelTransport(),\n      o = getStatEventTarget(),\n      u = {\n        // Required for backend stickiness, routing behavior is based on this\n        // parameter.\n        httpSessionIdParam: \"gsessionid\",\n        initMessageHeaders: {},\n        messageUrlParams: {\n          // This param is used to improve routing and project isolation by the\n          // backend and must be included in every request.\n          database: `projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`\n        },\n        sendRawJson: !0,\n        supportsCrossDomainXhr: !0,\n        internalChannelParams: {\n          // Override the default timeout (randomized between 10-20 seconds) since\n          // a large write batch on a slow internet connection may take a long\n          // time to send to the backend. Rather than have WebChannel impose a\n          // tight timeout which could lead to infinite timeouts and retries, we\n          // set it very large (5-10 minutes) and rely on the browser's builtin\n          // timeouts to kick in if the request isn't working.\n          forwardChannelRequestTimeoutMs: 6e5\n        },\n        forceLongPolling: this.forceLongPolling,\n        detectBufferingProxy: this.autoDetectLongPolling\n      };\n    this.useFetchStreams && (u.xmlHttpFactory = new FetchXmlHttpFactory({})), this._o(u.initMessageHeaders, e, n),\n    // Sending the custom headers we just added to request.initMessageHeaders\n    // (Authorization, etc.) will trigger the browser to make a CORS preflight\n    // request because the XHR will no longer meet the criteria for a \"simple\"\n    // CORS request:\n    // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests\n    // Therefore to avoid the CORS preflight request (an extra network\n    // roundtrip), we use the encodeInitMessageHeaders option to specify that\n    // the headers should instead be encoded in the request's POST payload,\n    // which is recognized by the webchannel backend.\n    u.encodeInitMessageHeaders = !0;\n    const c = i.join(\"\");\n    C(Eu, `Creating RPC '${t}' stream ${s}: ${c}`, u);\n    const a = r.createWebChannel(c, u);\n    // WebChannel supports sending the first message with the handshake - saving\n    // a network round trip. However, it will have to call send in the same\n    // JS event loop as open. In order to enforce this, we delay actually\n    // opening the WebChannel until send is called. Whether we have called\n    // open is tracked with this variable.\n    let h = !1,\n      l = !1;\n    // A flag to determine whether the stream was closed (by us or through an\n    // error/close event) to avoid delivering multiple close events or sending\n    // on a closed stream\n    const f = new Tu({\n        Yr: e => {\n          l ? C(Eu, `Not sending because RPC '${t}' stream ${s} is closed:`, e) : (h || (C(Eu, `Opening RPC '${t}' stream ${s} transport.`), a.open(), h = !0), C(Eu, `RPC '${t}' stream ${s} sending:`, e), a.send(e));\n        },\n        Zr: () => a.close()\n      }),\n      d = (t, e, n) => {\n        // TODO(dimond): closure typing seems broken because WebChannel does\n        // not implement goog.events.Listenable\n        t.listen(e, t => {\n          try {\n            n(t);\n          } catch (t) {\n            setTimeout(() => {\n              throw t;\n            }, 0);\n          }\n        });\n      };\n    // Closure events are guarded and exceptions are swallowed, so catch any\n    // exception and rethrow using a setTimeout so they become visible again.\n    // Note that eventually this function could go away if we are confident\n    // enough the code is exception free.\n    return d(a, WebChannel.EventType.OPEN, () => {\n      l || C(Eu, `RPC '${t}' stream ${s} transport opened.`);\n    }), d(a, WebChannel.EventType.CLOSE, () => {\n      l || (l = !0, C(Eu, `RPC '${t}' stream ${s} transport closed`), f.oo());\n    }), d(a, WebChannel.EventType.ERROR, e => {\n      l || (l = !0, N(Eu, `RPC '${t}' stream ${s} transport errored:`, e), f.oo(new L(B.UNAVAILABLE, \"The operation could not be completed\")));\n    }), d(a, WebChannel.EventType.MESSAGE, e => {\n      var n;\n      if (!l) {\n        const i = e.data[0];\n        M(!!i);\n        // TODO(b/35143891): There is a bug in One Platform that caused errors\n        // (and only errors) to be wrapped in an extra array. To be forward\n        // compatible with the bug we need to check either condition. The latter\n        // can be removed once the fix has been rolled out.\n        // Use any because msgData.error is not typed.\n        const r = i,\n          o = r.error || (null === (n = r[0]) || void 0 === n ? void 0 : n.error);\n        if (o) {\n          C(Eu, `RPC '${t}' stream ${s} received error:`, o);\n          // error.status will be a string like 'OK' or 'NOT_FOUND'.\n          const e = o.status;\n          let n =\n            /**\n            * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.\n            *\n            * @returns The Code equivalent to the given status string or undefined if\n            *     there is no match.\n            */\n            function (t) {\n              // lookup by string\n              // eslint-disable-next-line @typescript-eslint/no-explicit-any\n              const e = ls[t];\n              if (void 0 !== e) return _s(e);\n            }(e),\n            i = o.message;\n          void 0 === n && (n = B.INTERNAL, i = \"Unknown error status: \" + e + \" with message \" + o.message),\n          // Mark closed so no further events are propagated\n          l = !0, f.oo(new L(n, i)), a.close();\n        } else C(Eu, `RPC '${t}' stream ${s} received:`, i), f.uo(i);\n      }\n    }), d(o, Event.STAT_EVENT, e => {\n      e.stat === Stat.PROXY ? C(Eu, `RPC '${t}' stream ${s} detected buffering proxy`) : e.stat === Stat.NOPROXY && C(Eu, `RPC '${t}' stream ${s} detected no buffering proxy`);\n    }), setTimeout(() => {\n      // Technically we could/should wait for the WebChannel opened event,\n      // but because we want to send the first message with the WebChannel\n      // handshake we pretend the channel opened here (asynchronously), and\n      // then delay the actual open until the first message is sent.\n      f.ro();\n    }, 0), f;\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Initializes the WebChannelConnection for the browser. */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** The Platform's 'window' implementation or null if not available. */\nfunction Ru() {\n  // `window` is not always available, e.g. in ReactNative and WebWorkers.\n  // eslint-disable-next-line no-restricted-globals\n  return \"undefined\" != typeof window ? window : null;\n}\n\n/** The Platform's 'document' implementation or null if not available. */\nfunction Pu() {\n  // `document` is not always available, e.g. in ReactNative and WebWorkers.\n  // eslint-disable-next-line no-restricted-globals\n  return \"undefined\" != typeof document ? document : null;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction vu(t) {\n  return new qs(t, /* useProto3Json= */!0);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A helper for running delayed tasks following an exponential backoff curve\n * between attempts.\n *\n * Each delay is made up of a \"base\" delay which follows the exponential\n * backoff curve, and a +/- 50% \"jitter\" that is calculated and added to the\n * base delay. This prevents clients from accidentally synchronizing their\n * delays causing spikes of load to the backend.\n */\nclass bu {\n  constructor(\n  /**\n   * The AsyncQueue to run backoff operations on.\n   */\n  t,\n  /**\n   * The ID to use when scheduling backoff operations on the AsyncQueue.\n   */\n  e,\n  /**\n   * The initial delay (used as the base delay on the first retry attempt).\n   * Note that jitter will still be applied, so the actual delay could be as\n   * little as 0.5*initialDelayMs.\n   */\n  n = 1e3\n  /**\n   * The multiplier to use to determine the extended base delay after each\n   * attempt.\n   */, s = 1.5\n  /**\n   * The maximum base delay after which no further backoff is performed.\n   * Note that jitter will still be applied, so the actual delay could be as\n   * much as 1.5*maxDelayMs.\n   */, i = 6e4) {\n    this.Ys = t, this.timerId = e, this.po = n, this.Io = s, this.To = i, this.Eo = 0, this.Ao = null, /** The last backoff attempt, as epoch milliseconds. */\n    this.Ro = Date.now(), this.reset();\n  }\n  /**\n   * Resets the backoff delay.\n   *\n   * The very next backoffAndWait() will have no delay. If it is called again\n   * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and\n   * subsequent ones will increase according to the backoffFactor.\n   */\n  reset() {\n    this.Eo = 0;\n  }\n  /**\n   * Resets the backoff delay to the maximum delay (e.g. for use after a\n   * RESOURCE_EXHAUSTED error).\n   */\n  Po() {\n    this.Eo = this.To;\n  }\n  /**\n   * Returns a promise that resolves after currentDelayMs, and increases the\n   * delay for any subsequent attempts. If there was a pending backoff operation\n   * already, it will be canceled.\n   */\n  vo(t) {\n    // Cancel any pending backoff operation.\n    this.cancel();\n    // First schedule using the current base (which may be 0 and should be\n    // honored as such).\n    const e = Math.floor(this.Eo + this.bo()),\n      n = Math.max(0, Date.now() - this.Ro),\n      s = Math.max(0, e - n);\n    // Guard against lastAttemptTime being in the future due to a clock change.\n    s > 0 && C(\"ExponentialBackoff\", `Backing off for ${s} ms (base delay: ${this.Eo} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`), this.Ao = this.Ys.enqueueAfterDelay(this.timerId, s, () => (this.Ro = Date.now(), t())),\n    // Apply backoff factor to determine next delay and ensure it is within\n    // bounds.\n    this.Eo *= this.Io, this.Eo < this.po && (this.Eo = this.po), this.Eo > this.To && (this.Eo = this.To);\n  }\n  Vo() {\n    null !== this.Ao && (this.Ao.skipDelay(), this.Ao = null);\n  }\n  cancel() {\n    null !== this.Ao && (this.Ao.cancel(), this.Ao = null);\n  }\n  /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */\n  bo() {\n    return (Math.random() - .5) * this.Eo;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A PersistentStream is an abstract base class that represents a streaming RPC\n * to the Firestore backend. It's built on top of the connections own support\n * for streaming RPCs, and adds several critical features for our clients:\n *\n *   - Exponential backoff on failure\n *   - Authentication via CredentialsProvider\n *   - Dispatching all callbacks into the shared worker queue\n *   - Closing idle streams after 60 seconds of inactivity\n *\n * Subclasses of PersistentStream implement serialization of models to and\n * from the JSON representation of the protocol buffers for a specific\n * streaming RPC.\n *\n * ## Starting and Stopping\n *\n * Streaming RPCs are stateful and need to be start()ed before messages can\n * be sent and received. The PersistentStream will call the onOpen() function\n * of the listener once the stream is ready to accept requests.\n *\n * Should a start() fail, PersistentStream will call the registered onClose()\n * listener with a FirestoreError indicating what went wrong.\n *\n * A PersistentStream can be started and stopped repeatedly.\n *\n * Generic types:\n *  SendType: The type of the outgoing message of the underlying\n *    connection stream\n *  ReceiveType: The type of the incoming message of the underlying\n *    connection stream\n *  ListenerType: The type of the listener that will be used for callbacks\n */\nclass Vu {\n  constructor(t, e, n, s, i, r, o, u) {\n    this.Ys = t, this.So = n, this.Do = s, this.connection = i, this.authCredentialsProvider = r, this.appCheckCredentialsProvider = o, this.listener = u, this.state = 0 /* PersistentStreamState.Initial */,\n    /**\n     * A close count that's incremented every time the stream is closed; used by\n     * getCloseGuardedDispatcher() to invalidate callbacks that happen after\n     * close.\n     */\n    this.Co = 0, this.xo = null, this.No = null, this.stream = null, this.ko = new bu(t, e);\n  }\n  /**\n   * Returns true if start() has been called and no error has occurred. True\n   * indicates the stream is open or in the process of opening (which\n   * encompasses respecting backoff, getting auth tokens, and starting the\n   * actual RPC). Use isOpen() to determine if the stream is open and ready for\n   * outbound requests.\n   */\n  $o() {\n    return 1 /* PersistentStreamState.Starting */ === this.state || 5 /* PersistentStreamState.Backoff */ === this.state || this.Mo();\n  }\n  /**\n   * Returns true if the underlying RPC is open (the onOpen() listener has been\n   * called) and the stream is ready for outbound requests.\n   */\n  Mo() {\n    return 2 /* PersistentStreamState.Open */ === this.state || 3 /* PersistentStreamState.Healthy */ === this.state;\n  }\n  /**\n   * Starts the RPC. Only allowed if isStarted() returns false. The stream is\n   * not immediately ready for use: onOpen() will be invoked when the RPC is\n   * ready for outbound requests, at which point isOpen() will return true.\n   *\n   * When start returns, isStarted() will return true.\n   */\n  start() {\n    4 /* PersistentStreamState.Error */ !== this.state ? this.auth() : this.Oo();\n  }\n  /**\n   * Stops the RPC. This call is idempotent and allowed regardless of the\n   * current isStarted() state.\n   *\n   * When stop returns, isStarted() and isOpen() will both return false.\n   */\n  stop() {\n    var _this14 = this;\n    return _asyncToGenerator(function* () {\n      _this14.$o() && (yield _this14.close(0 /* PersistentStreamState.Initial */));\n    })();\n  }\n  /**\n   * After an error the stream will usually back off on the next attempt to\n   * start it. If the error warrants an immediate restart of the stream, the\n   * sender can use this to indicate that the receiver should not back off.\n   *\n   * Each error will call the onClose() listener. That function can decide to\n   * inhibit backoff if required.\n   */\n  Fo() {\n    this.state = 0 /* PersistentStreamState.Initial */, this.ko.reset();\n  }\n  /**\n   * Marks this stream as idle. If no further actions are performed on the\n   * stream for one minute, the stream will automatically close itself and\n   * notify the stream's onClose() handler with Status.OK. The stream will then\n   * be in a !isStarted() state, requiring the caller to start the stream again\n   * before further use.\n   *\n   * Only streams that are in state 'Open' can be marked idle, as all other\n   * states imply pending network operations.\n   */\n  Bo() {\n    // Starts the idle time if we are in state 'Open' and are not yet already\n    // running a timer (in which case the previous idle timeout still applies).\n    this.Mo() && null === this.xo && (this.xo = this.Ys.enqueueAfterDelay(this.So, 6e4, () => this.Lo()));\n  }\n  /** Sends a message to the underlying stream. */\n  qo(t) {\n    this.Uo(), this.stream.send(t);\n  }\n  /** Called by the idle timer when the stream should close due to inactivity. */\n  Lo() {\n    var _this15 = this;\n    return _asyncToGenerator(function* () {\n      if (_this15.Mo())\n        // When timing out an idle stream there's no reason to force the stream into backoff when\n        // it restarts so set the stream state to Initial instead of Error.\n        return _this15.close(0 /* PersistentStreamState.Initial */);\n    })();\n  }\n  /** Marks the stream as active again. */\n  Uo() {\n    this.xo && (this.xo.cancel(), this.xo = null);\n  }\n  /** Cancels the health check delayed operation. */\n  Ko() {\n    this.No && (this.No.cancel(), this.No = null);\n  }\n  /**\n   * Closes the stream and cleans up as necessary:\n   *\n   * * closes the underlying GRPC stream;\n   * * calls the onClose handler with the given 'error';\n   * * sets internal stream state to 'finalState';\n   * * adjusts the backoff timer based on the error\n   *\n   * A new stream can be opened by calling start().\n   *\n   * @param finalState - the intended state of the stream after closing.\n   * @param error - the error the connection was closed with.\n   */\n  close(t, e) {\n    var _this16 = this;\n    return _asyncToGenerator(function* () {\n      // Cancel any outstanding timers (they're guaranteed not to execute).\n      _this16.Uo(), _this16.Ko(), _this16.ko.cancel(),\n      // Invalidates any stream-related callbacks (e.g. from auth or the\n      // underlying stream), guaranteeing they won't execute.\n      _this16.Co++, 4 /* PersistentStreamState.Error */ !== t ?\n      // If this is an intentional close ensure we don't delay our next connection attempt.\n      _this16.ko.reset() : e && e.code === B.RESOURCE_EXHAUSTED ? (\n      // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)\n      x(e.toString()), x(\"Using maximum backoff delay to prevent overloading the backend.\"), _this16.ko.Po()) : e && e.code === B.UNAUTHENTICATED && 3 /* PersistentStreamState.Healthy */ !== _this16.state && (\n      // \"unauthenticated\" error means the token was rejected. This should rarely\n      // happen since both Auth and AppCheck ensure a sufficient TTL when we\n      // request a token. If a user manually resets their system clock this can\n      // fail, however. In this case, we should get a Code.UNAUTHENTICATED error\n      // before we received the first message and we need to invalidate the token\n      // to ensure that we fetch a new token.\n      _this16.authCredentialsProvider.invalidateToken(), _this16.appCheckCredentialsProvider.invalidateToken()),\n      // Clean up the underlying stream because we are no longer interested in events.\n      null !== _this16.stream && (_this16.Go(), _this16.stream.close(), _this16.stream = null),\n      // This state must be assigned before calling onClose() to allow the callback to\n      // inhibit backoff or otherwise manipulate the state in its non-started state.\n      _this16.state = t, // Notify the listener that the stream closed.\n      yield _this16.listener.no(e);\n    })();\n  }\n  /**\n   * Can be overridden to perform additional cleanup before the stream is closed.\n   * Calling super.tearDown() is not required.\n   */\n  Go() {}\n  auth() {\n    this.state = 1 /* PersistentStreamState.Starting */;\n    const t = this.Qo(this.Co),\n      e = this.Co;\n    // TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.\n    Promise.all([this.authCredentialsProvider.getToken(), this.appCheckCredentialsProvider.getToken()]).then(([t, n]) => {\n      // Stream can be stopped while waiting for authentication.\n      // TODO(mikelehen): We really should just use dispatchIfNotClosed\n      // and let this dispatch onto the queue, but that opened a spec test can\n      // of worms that I don't want to deal with in this PR.\n      this.Co === e &&\n      // Normally we'd have to schedule the callback on the AsyncQueue.\n      // However, the following calls are safe to be called outside the\n      // AsyncQueue since they don't chain asynchronous calls\n      this.jo(t, n);\n    }, e => {\n      t(() => {\n        const t = new L(B.UNKNOWN, \"Fetching auth token failed: \" + e.message);\n        return this.zo(t);\n      });\n    });\n  }\n  jo(t, e) {\n    const n = this.Qo(this.Co);\n    this.stream = this.Wo(t, e), this.stream.Xr(() => {\n      n(() => (this.state = 2 /* PersistentStreamState.Open */, this.No = this.Ys.enqueueAfterDelay(this.Do, 1e4, () => (this.Mo() && (this.state = 3 /* PersistentStreamState.Healthy */), Promise.resolve())), this.listener.Xr()));\n    }), this.stream.no(t => {\n      n(() => this.zo(t));\n    }), this.stream.onMessage(t => {\n      n(() => this.onMessage(t));\n    });\n  }\n  Oo() {\n    var _this17 = this;\n    this.state = 5 /* PersistentStreamState.Backoff */, this.ko.vo( /*#__PURE__*/_asyncToGenerator(function* () {\n      _this17.state = 0 /* PersistentStreamState.Initial */, _this17.start();\n    }));\n  }\n  // Visible for tests\n  zo(t) {\n    // In theory the stream could close cleanly, however, in our current model\n    // we never expect this to happen because if we stop a stream ourselves,\n    // this callback will never be called. To prevent cases where we retry\n    // without a backoff accidentally, we set the stream to error in all cases.\n    return C(\"PersistentStream\", `close with error: ${t}`), this.stream = null, this.close(4 /* PersistentStreamState.Error */, t);\n  }\n  /**\n   * Returns a \"dispatcher\" function that dispatches operations onto the\n   * AsyncQueue but only runs them if closeCount remains unchanged. This allows\n   * us to turn auth / stream callbacks into no-ops if the stream is closed /\n   * re-opened, etc.\n   */\n  Qo(t) {\n    return e => {\n      this.Ys.enqueueAndForget(() => this.Co === t ? e() : (C(\"PersistentStream\", \"stream callback skipped by getCloseGuardedDispatcher.\"), Promise.resolve()));\n    };\n  }\n}\n\n/**\n * A PersistentStream that implements the Listen RPC.\n *\n * Once the Listen stream has called the onOpen() listener, any number of\n * listen() and unlisten() calls can be made to control what changes will be\n * sent from the server for ListenResponses.\n */\nclass Su extends Vu {\n  constructor(t, e, n, s, i, r) {\n    super(t, \"listen_stream_connection_backoff\" /* TimerId.ListenStreamConnectionBackoff */, \"listen_stream_idle\" /* TimerId.ListenStreamIdle */, \"health_check_timeout\" /* TimerId.HealthCheckTimeout */, e, n, s, r), this.Tt = i;\n  }\n  Wo(t, e) {\n    return this.connection.yo(\"Listen\", t, e);\n  }\n  onMessage(t) {\n    // A successful response means the stream is healthy\n    this.ko.reset();\n    const e = si(this.Tt, t),\n      n = function (t) {\n        // We have only reached a consistent snapshot for the entire stream if there\n        // is a read_time set and it applies to all targets (i.e. the list of\n        // targets is empty). The backend is guaranteed to send such responses.\n        if (!(\"targetChange\" in t)) return st.min();\n        const e = t.targetChange;\n        return e.targetIds && e.targetIds.length ? st.min() : e.readTime ? Qs(e.readTime) : st.min();\n      }(t);\n    return this.listener.Ho(e, n);\n  }\n  /**\n   * Registers interest in the results of the given target. If the target\n   * includes a resumeToken it will be included in the request. Results that\n   * affect the target will be streamed back as WatchChange messages that\n   * reference the targetId.\n   */\n  Jo(t) {\n    const e = {};\n    e.database = Zs(this.Tt), e.addTarget = function (t, e) {\n      let n;\n      const s = e.target;\n      return n = an(s) ? {\n        documents: ui(t, s)\n      } : {\n        query: ci(t, s)\n      }, n.targetId = e.targetId, e.resumeToken.approximateByteSize() > 0 ? n.resumeToken = Ks(t, e.resumeToken) : e.snapshotVersion.compareTo(st.min()) > 0 && (\n      // TODO(wuandy): Consider removing above check because it is most likely true.\n      // Right now, many tests depend on this behaviour though (leaving min() out\n      // of serialization).\n      n.readTime = Us(t, e.snapshotVersion.toTimestamp())), n;\n    }(this.Tt, t);\n    const n = hi(this.Tt, t);\n    n && (e.labels = n), this.qo(e);\n  }\n  /**\n   * Unregisters interest in the results of the target associated with the\n   * given targetId.\n   */\n  Yo(t) {\n    const e = {};\n    e.database = Zs(this.Tt), e.removeTarget = t, this.qo(e);\n  }\n}\n\n/**\n * A Stream that implements the Write RPC.\n *\n * The Write RPC requires the caller to maintain special streamToken\n * state in between calls, to help the server understand which responses the\n * client has processed by the time the next request is made. Every response\n * will contain a streamToken; this value must be passed to the next\n * request.\n *\n * After calling start() on this stream, the next request must be a handshake,\n * containing whatever streamToken is on hand. Once a response to this\n * request is received, all pending mutations may be submitted. When\n * submitting multiple batches of mutations at the same time, it's\n * okay to use the same streamToken for the calls to writeMutations.\n *\n * TODO(b/33271235): Use proto types\n */\nclass Du extends Vu {\n  constructor(t, e, n, s, i, r) {\n    super(t, \"write_stream_connection_backoff\" /* TimerId.WriteStreamConnectionBackoff */, \"write_stream_idle\" /* TimerId.WriteStreamIdle */, \"health_check_timeout\" /* TimerId.HealthCheckTimeout */, e, n, s, r), this.Tt = i, this.Zo = !1;\n  }\n  /**\n   * Tracks whether or not a handshake has been successfully exchanged and\n   * the stream is ready to accept mutations.\n   */\n  get Xo() {\n    return this.Zo;\n  }\n  // Override of PersistentStream.start\n  start() {\n    this.Zo = !1, this.lastStreamToken = void 0, super.start();\n  }\n  Go() {\n    this.Zo && this.tu([]);\n  }\n  Wo(t, e) {\n    return this.connection.yo(\"Write\", t, e);\n  }\n  onMessage(t) {\n    if (\n    // Always capture the last stream token.\n    M(!!t.streamToken), this.lastStreamToken = t.streamToken, this.Zo) {\n      // A successful first write response means the stream is healthy,\n      // Note, that we could consider a successful handshake healthy, however,\n      // the write itself might be causing an error we want to back off from.\n      this.ko.reset();\n      const e = oi(t.writeResults, t.commitTime),\n        n = Qs(t.commitTime);\n      return this.listener.eu(n, e);\n    }\n    // The first response is always the handshake response\n    return M(!t.writeResults || 0 === t.writeResults.length), this.Zo = !0, this.listener.nu();\n  }\n  /**\n   * Sends an initial streamToken to the server, performing the handshake\n   * required to make the StreamingWrite RPC work. Subsequent\n   * calls should wait until onHandshakeComplete was called.\n   */\n  su() {\n    // TODO(dimond): Support stream resumption. We intentionally do not set the\n    // stream token on the handshake, ignoring any stream token we might have.\n    const t = {};\n    t.database = Zs(this.Tt), this.qo(t);\n  }\n  /** Sends a group of mutations to the Firestore backend to apply. */\n  tu(t) {\n    const e = {\n      streamToken: this.lastStreamToken,\n      writes: t.map(t => ii(this.Tt, t))\n    };\n    this.qo(e);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Datastore and its related methods are a wrapper around the external Google\n * Cloud Datastore grpc API, which provides an interface that is more convenient\n * for the rest of the client SDK architecture to consume.\n */\n/**\n * An implementation of Datastore that exposes additional state for internal\n * consumption.\n */\nclass Cu extends class {} {\n  constructor(t, e, n, s) {\n    super(), this.authCredentials = t, this.appCheckCredentials = e, this.connection = n, this.Tt = s, this.iu = !1;\n  }\n  ru() {\n    if (this.iu) throw new L(B.FAILED_PRECONDITION, \"The client has already been terminated.\");\n  }\n  /** Invokes the provided RPC with auth and AppCheck tokens. */\n  lo(t, e, n) {\n    return this.ru(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([s, i]) => this.connection.lo(t, e, n, s, i)).catch(t => {\n      throw \"FirebaseError\" === t.name ? (t.code === B.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), t) : new L(B.UNKNOWN, t.toString());\n    });\n  }\n  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */\n  mo(t, e, n, s) {\n    return this.ru(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([i, r]) => this.connection.mo(t, e, n, i, r, s)).catch(t => {\n      throw \"FirebaseError\" === t.name ? (t.code === B.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), t) : new L(B.UNKNOWN, t.toString());\n    });\n  }\n  terminate() {\n    this.iu = !0;\n  }\n}\n\n// TODO(firestorexp): Make sure there is only one Datastore instance per\n// firestore-exp client.\nfunction xu(_x15, _x16, _x17) {\n  return _xu.apply(this, arguments);\n}\n/**\n * A component used by the RemoteStore to track the OnlineState (that is,\n * whether or not the client as a whole should be considered to be online or\n * offline), implementing the appropriate heuristics.\n *\n * In particular, when the client is trying to connect to the backend, we\n * allow up to MAX_WATCH_STREAM_FAILURES within ONLINE_STATE_TIMEOUT_MS for\n * a connection to succeed. If we have too many failures or the timeout elapses,\n * then we set the OnlineState to Offline, and the client will behave as if\n * it is offline (get()s will return cached data, etc.).\n */\nfunction _xu() {\n  _xu = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t),\n      i = function (t, e, n) {\n        const s = ci(t, e),\n          i = [];\n        return n.forEach(t => {\n          \"count\" === t.lt ? i.push({\n            alias: t.alias.canonicalString(),\n            count: {}\n          }) : \"avg\" === t.lt ? i.push({\n            alias: t.alias.canonicalString(),\n            avg: {\n              field: wi(t.fieldPath)\n            }\n          }) : \"sum\" === t.lt && i.push({\n            alias: t.alias.canonicalString(),\n            sum: {\n              field: wi(t.fieldPath)\n            }\n          });\n        }), {\n          structuredAggregationQuery: {\n            aggregations: i,\n            structuredQuery: s.structuredQuery\n          },\n          parent: s.parent\n        };\n      }(s.Tt, Tn(e), n),\n      r = i.parent;\n    s.connection.ho || delete i.parent;\n    const o = (yield s.mo(\"RunAggregationQuery\", r, i, /*expectedResponseCount=*/1)).filter(t => !!t.result);\n    // Omit RunAggregationQueryResponse that only contain readTimes.\n    return M(1 === o.length), (u = o[0]).result, u.result.aggregateFields, new en({\n      mapValue: {\n        fields: null === (c = u.result) || void 0 === c ? void 0 : c.aggregateFields\n      }\n    });\n    var u, c;\n  });\n  return _xu.apply(this, arguments);\n}\nclass Nu {\n  constructor(t, e) {\n    this.asyncQueue = t, this.onlineStateHandler = e, /** The current OnlineState. */\n    this.state = \"Unknown\" /* OnlineState.Unknown */,\n    /**\n     * A count of consecutive failures to open the stream. If it reaches the\n     * maximum defined by MAX_WATCH_STREAM_FAILURES, we'll set the OnlineState to\n     * Offline.\n     */\n    this.ou = 0,\n    /**\n     * A timer that elapses after ONLINE_STATE_TIMEOUT_MS, at which point we\n     * transition from OnlineState.Unknown to OnlineState.Offline without waiting\n     * for the stream to actually fail (MAX_WATCH_STREAM_FAILURES times).\n     */\n    this.uu = null,\n    /**\n     * Whether the client should log a warning message if it fails to connect to\n     * the backend (initially true, cleared after a successful stream, or if we've\n     * logged the message already).\n     */\n    this.cu = !0;\n  }\n  /**\n   * Called by RemoteStore when a watch stream is started (including on each\n   * backoff attempt).\n   *\n   * If this is the first attempt, it sets the OnlineState to Unknown and starts\n   * the onlineStateTimer.\n   */\n  au() {\n    0 === this.ou && (this.hu(\"Unknown\" /* OnlineState.Unknown */), this.uu = this.asyncQueue.enqueueAfterDelay(\"online_state_timeout\" /* TimerId.OnlineStateTimeout */, 1e4, () => (this.uu = null, this.lu(\"Backend didn't respond within 10 seconds.\"), this.hu(\"Offline\" /* OnlineState.Offline */), Promise.resolve())));\n  }\n  /**\n   * Updates our OnlineState as appropriate after the watch stream reports a\n   * failure. The first failure moves us to the 'Unknown' state. We then may\n   * allow multiple failures (based on MAX_WATCH_STREAM_FAILURES) before we\n   * actually transition to the 'Offline' state.\n   */\n  fu(t) {\n    \"Online\" /* OnlineState.Online */ === this.state ? this.hu(\"Unknown\" /* OnlineState.Unknown */) : (this.ou++, this.ou >= 1 && (this.du(), this.lu(`Connection failed 1 times. Most recent error: ${t.toString()}`), this.hu(\"Offline\" /* OnlineState.Offline */)));\n  }\n  /**\n   * Explicitly sets the OnlineState to the specified state.\n   *\n   * Note that this resets our timers / failure counters, etc. used by our\n   * Offline heuristics, so must not be used in place of\n   * handleWatchStreamStart() and handleWatchStreamFailure().\n   */\n  set(t) {\n    this.du(), this.ou = 0, \"Online\" /* OnlineState.Online */ === t && (\n    // We've connected to watch at least once. Don't warn the developer\n    // about being offline going forward.\n    this.cu = !1), this.hu(t);\n  }\n  hu(t) {\n    t !== this.state && (this.state = t, this.onlineStateHandler(t));\n  }\n  lu(t) {\n    const e = `Could not reach Cloud Firestore backend. ${t}\\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;\n    this.cu ? (x(e), this.cu = !1) : C(\"OnlineStateTracker\", e);\n  }\n  du() {\n    null !== this.uu && (this.uu.cancel(), this.uu = null);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass ku {\n  constructor(\n  /**\n   * The local store, used to fill the write pipeline with outbound mutations.\n   */\n  t, /** The client-side proxy for interacting with the backend. */\n  e, n, s, i) {\n    var _this18 = this;\n    this.localStore = t, this.datastore = e, this.asyncQueue = n, this.remoteSyncer = {},\n    /**\n     * A list of up to MAX_PENDING_WRITES writes that we have fetched from the\n     * LocalStore via fillWritePipeline() and have or will send to the write\n     * stream.\n     *\n     * Whenever writePipeline.length > 0 the RemoteStore will attempt to start or\n     * restart the write stream. When the stream is established the writes in the\n     * pipeline will be sent in order.\n     *\n     * Writes remain in writePipeline until they are acknowledged by the backend\n     * and thus will automatically be re-sent if the stream is interrupted /\n     * restarted before they're acknowledged.\n     *\n     * Write responses from the backend are linked to their originating request\n     * purely based on order, and so we can just shift() writes from the front of\n     * the writePipeline as we receive responses.\n     */\n    this._u = [],\n    /**\n     * A mapping of watched targets that the client cares about tracking and the\n     * user has explicitly called a 'listen' for this target.\n     *\n     * These targets may or may not have been sent to or acknowledged by the\n     * server. On re-establishing the listen stream, these targets should be sent\n     * to the server. The targets removed with unlistens are removed eagerly\n     * without waiting for confirmation from the listen stream.\n     */\n    this.wu = new Map(),\n    /**\n     * A set of reasons for why the RemoteStore may be offline. If empty, the\n     * RemoteStore may start its network connections.\n     */\n    this.mu = new Set(),\n    /**\n     * Event handlers that get called when the network is disabled or enabled.\n     *\n     * PORTING NOTE: These functions are used on the Web client to create the\n     * underlying streams (to support tree-shakeable streams). On Android and iOS,\n     * the streams are created during construction of RemoteStore.\n     */\n    this.gu = [], this.yu = i, this.yu.Gr(t => {\n      n.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n        // Porting Note: Unlike iOS, `restartNetwork()` is called even when the\n        // network becomes unreachable as we don't have any other way to tear\n        // down our streams.\n        Ku(_this18) && (C(\"RemoteStore\", \"Restarting streams for network reachability change.\"), yield function () {\n          var _ref10 = _asyncToGenerator(function* (t) {\n            const e = F(t);\n            e.mu.add(4 /* OfflineCause.ConnectivityChange */), yield Mu(e), e.pu.set(\"Unknown\" /* OnlineState.Unknown */), e.mu.delete(4 /* OfflineCause.ConnectivityChange */), yield $u(e);\n          });\n          return function (_x18) {\n            return _ref10.apply(this, arguments);\n          };\n        }()(_this18));\n      }));\n    }), this.pu = new Nu(n, s);\n  }\n}\nfunction $u(_x19) {\n  return _$u.apply(this, arguments);\n}\n/**\n * Temporarily disables the network. The network can be re-enabled using\n * enableNetwork().\n */\nfunction _$u() {\n  _$u = _asyncToGenerator(function* (t) {\n    if (Ku(t)) for (const e of t.gu) yield e( /* enabled= */!0);\n  });\n  return _$u.apply(this, arguments);\n}\nfunction Mu(_x20) {\n  return _Mu.apply(this, arguments);\n}\n/**\n * Starts new listen for the given target. Uses resume token if provided. It\n * is a no-op if the target of given `TargetData` is already being listened to.\n */\nfunction _Mu() {\n  _Mu = _asyncToGenerator(function* (t) {\n    for (const e of t.gu) yield e( /* enabled= */!1);\n  });\n  return _Mu.apply(this, arguments);\n}\nfunction Ou(t, e) {\n  const n = F(t);\n  n.wu.has(e.targetId) || (\n  // Mark this as something the client is currently listening for.\n  n.wu.set(e.targetId, e), Uu(n) ?\n  // The listen will be sent in onWatchStreamOpen\n  qu(n) : uc(n).Mo() && Bu(n, e));\n}\n\n/**\n * Removes the listen from server. It is a no-op if the given target id is\n * not being listened to.\n */\nfunction Fu(t, e) {\n  const n = F(t),\n    s = uc(n);\n  n.wu.delete(e), s.Mo() && Lu(n, e), 0 === n.wu.size && (s.Mo() ? s.Bo() : Ku(n) &&\n  // Revert to OnlineState.Unknown if the watch stream is not open and we\n  // have no listeners, since without any listens to send we cannot\n  // confirm if the stream is healthy and upgrade to OnlineState.Online.\n  n.pu.set(\"Unknown\" /* OnlineState.Unknown */));\n}\n\n/**\n * We need to increment the the expected number of pending responses we're due\n * from watch so we wait for the ack to process any messages from this target.\n */\nfunction Bu(t, e) {\n  t.Iu.Ot(e.targetId), uc(t).Jo(e);\n}\n\n/**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */\nfunction Lu(t, e) {\n  t.Iu.Ot(e), uc(t).Yo(e);\n}\nfunction qu(t) {\n  t.Iu = new $s({\n    getRemoteKeysForTarget: e => t.remoteSyncer.getRemoteKeysForTarget(e),\n    ie: e => t.wu.get(e) || null\n  }), uc(t).start(), t.pu.au();\n}\n\n/**\n * Returns whether the watch stream should be started because it's necessary\n * and has not yet been started.\n */\nfunction Uu(t) {\n  return Ku(t) && !uc(t).$o() && t.wu.size > 0;\n}\nfunction Ku(t) {\n  return 0 === F(t).mu.size;\n}\nfunction Gu(t) {\n  t.Iu = void 0;\n}\nfunction Qu(_x21) {\n  return _Qu.apply(this, arguments);\n}\nfunction _Qu() {\n  _Qu = _asyncToGenerator(function* (t) {\n    t.wu.forEach((e, n) => {\n      Bu(t, e);\n    });\n  });\n  return _Qu.apply(this, arguments);\n}\nfunction ju(_x22, _x23) {\n  return _ju.apply(this, arguments);\n}\nfunction _ju() {\n  _ju = _asyncToGenerator(function* (t, e) {\n    Gu(t),\n    // If we still need the watch stream, retry the connection.\n    Uu(t) ? (t.pu.fu(e), qu(t)) :\n    // No need to restart watch stream because there are no active targets.\n    // The online state is set to unknown because there is no active attempt\n    // at establishing a connection\n    t.pu.set(\"Unknown\" /* OnlineState.Unknown */);\n  });\n  return _ju.apply(this, arguments);\n}\nfunction zu(_x24, _x25, _x26) {\n  return _zu.apply(this, arguments);\n}\n/**\n * Recovery logic for IndexedDB errors that takes the network offline until\n * `op` succeeds. Retries are scheduled with backoff using\n * `enqueueRetryable()`. If `op()` is not provided, IndexedDB access is\n * validated via a generic operation.\n *\n * The returned Promise is resolved once the network is disabled and before\n * any retry attempt.\n */\nfunction _zu() {\n  _zu = _asyncToGenerator(function* (t, e, n) {\n    if (\n    // Mark the client as online since we got a message from the server\n    t.pu.set(\"Online\" /* OnlineState.Online */), e instanceof Ns && 2 /* WatchTargetChangeState.Removed */ === e.state && e.cause)\n      // There was an error on a target, don't wait for a consistent snapshot\n      // to raise events\n      try {\n        yield (/** Handles an error on a target */function () {\n            var _ref44 = _asyncToGenerator(function* (t, e) {\n              const n = e.cause;\n              for (const s of e.targetIds)\n              // A watched target might have been removed already.\n              t.wu.has(s) && (yield t.remoteSyncer.rejectListen(s, n), t.wu.delete(s), t.Iu.removeTarget(s));\n            });\n            return function (_x124, _x125) {\n              return _ref44.apply(this, arguments);\n            };\n          }()\n          /**\n          * Attempts to fill our write pipeline with writes from the LocalStore.\n          *\n          * Called internally to bootstrap or refill the write pipeline and by\n          * SyncEngine whenever there are new mutations to process.\n          *\n          * Starts the write stream if necessary.\n          */\n          (t, e)\n        );\n      } catch (n) {\n        C(\"RemoteStore\", \"Failed to remove targets %s: %s \", e.targetIds.join(\",\"), n), yield Wu(t, n);\n      } else if (e instanceof Cs ? t.Iu.Qt(e) : e instanceof xs ? t.Iu.Zt(e) : t.Iu.Wt(e), !n.isEqual(st.min())) try {\n      const e = yield Wo(t.localStore);\n      n.compareTo(e) >= 0 && ( // We have received a target change with a global snapshot if the snapshot\n      // version is not equal to SnapshotVersion.min().\n      yield function (t, e) {\n        const n = t.Iu.ee(e);\n        // Update in-memory resume tokens. LocalStore will update the\n        // persistent view of these when applying the completed RemoteEvent.\n        return n.targetChanges.forEach((n, s) => {\n          if (n.resumeToken.approximateByteSize() > 0) {\n            const i = t.wu.get(s);\n            // A watched target might have been removed already.\n            i && t.wu.set(s, i.withResumeToken(n.resumeToken, e));\n          }\n        }),\n        // Re-establish listens for the targets that have been invalidated by\n        // existence filter mismatches.\n        n.targetMismatches.forEach(e => {\n          const n = t.wu.get(e);\n          if (!n)\n            // A watched target might have been removed already.\n            return;\n          // Clear the resume token for the target, since we're in a known mismatch\n          // state.\n          t.wu.set(e, n.withResumeToken(Ht.EMPTY_BYTE_STRING, n.snapshotVersion)),\n          // Cause a hard reset by unwatching and rewatching immediately, but\n          // deliberately don't send a resume token so that we get a full update.\n          Lu(t, e);\n          // Mark the target we send as being on behalf of an existence filter\n          // mismatch, but don't actually retain that in listenTargets. This ensures\n          // that we flag the first re-listen this way without impacting future\n          // listens of this target (that might happen e.g. on reconnect).\n          const s = new Zi(n.target, e, 1 /* TargetPurpose.ExistenceFilterMismatch */, n.sequenceNumber);\n          Bu(t, s);\n        }), t.remoteSyncer.applyRemoteEvent(n);\n      }(t, n));\n    } catch (e) {\n      C(\"RemoteStore\", \"Failed to raise snapshot:\", e), yield Wu(t, e);\n    }\n  });\n  return _zu.apply(this, arguments);\n}\nfunction Wu(_x27, _x28, _x29) {\n  return _Wu.apply(this, arguments);\n}\n/**\n * Executes `op`. If `op` fails, takes the network offline until `op`\n * succeeds. Returns after the first attempt.\n */\nfunction _Wu() {\n  _Wu = _asyncToGenerator(function* (t, e, n) {\n    if (!Vt(e)) throw e;\n    t.mu.add(1 /* OfflineCause.IndexedDbFailed */), // Disable network and raise offline snapshots\n    yield Mu(t), t.pu.set(\"Offline\" /* OnlineState.Offline */), n || (\n    // Use a simple read operation to determine if IndexedDB recovered.\n    // Ideally, we would expose a health check directly on SimpleDb, but\n    // RemoteStore only has access to persistence through LocalStore.\n    n = () => Wo(t.localStore)),\n    // Probe IndexedDB periodically and re-enable network\n    t.asyncQueue.enqueueRetryable( /*#__PURE__*/_asyncToGenerator(function* () {\n      C(\"RemoteStore\", \"Retrying IndexedDB access\"), yield n(), t.mu.delete(1 /* OfflineCause.IndexedDbFailed */), yield $u(t);\n    }));\n  });\n  return _Wu.apply(this, arguments);\n}\nfunction Hu(t, e) {\n  return e().catch(n => Wu(t, n, e));\n}\nfunction Ju(_x30) {\n  return _Ju.apply(this, arguments);\n}\n/**\n * Returns true if we can add to the write pipeline (i.e. the network is\n * enabled and the write pipeline is not full).\n */\nfunction _Ju() {\n  _Ju = _asyncToGenerator(function* (t) {\n    const e = F(t),\n      n = cc(e);\n    let s = e._u.length > 0 ? e._u[e._u.length - 1].batchId : -1;\n    for (; Yu(e);) try {\n      const t = yield Yo(e.localStore, s);\n      if (null === t) {\n        0 === e._u.length && n.Bo();\n        break;\n      }\n      s = t.batchId, Zu(e, t);\n    } catch (t) {\n      yield Wu(e, t);\n    }\n    Xu(e) && tc(e);\n  });\n  return _Ju.apply(this, arguments);\n}\nfunction Yu(t) {\n  return Ku(t) && t._u.length < 10;\n}\n\n/**\n * Queues additional writes to be sent to the write stream, sending them\n * immediately if the write stream is established.\n */\nfunction Zu(t, e) {\n  t._u.push(e);\n  const n = cc(t);\n  n.Mo() && n.Xo && n.tu(e.mutations);\n}\nfunction Xu(t) {\n  return Ku(t) && !cc(t).$o() && t._u.length > 0;\n}\nfunction tc(t) {\n  cc(t).start();\n}\nfunction ec(_x31) {\n  return _ec.apply(this, arguments);\n}\nfunction _ec() {\n  _ec = _asyncToGenerator(function* (t) {\n    cc(t).su();\n  });\n  return _ec.apply(this, arguments);\n}\nfunction nc(_x32) {\n  return _nc.apply(this, arguments);\n}\nfunction _nc() {\n  _nc = _asyncToGenerator(function* (t) {\n    const e = cc(t);\n    // Send the write pipeline now that the stream is established.\n    for (const n of t._u) e.tu(n.mutations);\n  });\n  return _nc.apply(this, arguments);\n}\nfunction sc(_x33, _x34, _x35) {\n  return _sc.apply(this, arguments);\n}\nfunction _sc() {\n  _sc = _asyncToGenerator(function* (t, e, n) {\n    const s = t._u.shift(),\n      i = Ji.from(s, e, n);\n    yield Hu(t, () => t.remoteSyncer.applySuccessfulWrite(i)), // It's possible that with the completion of this mutation another\n    // slot has freed up.\n    yield Ju(t);\n  });\n  return _sc.apply(this, arguments);\n}\nfunction ic(_x36, _x37) {\n  return _ic.apply(this, arguments);\n}\nfunction _ic() {\n  _ic = _asyncToGenerator(function* (t, e) {\n    // If the write stream closed after the write handshake completes, a write\n    // operation failed and we fail the pending operation.\n    e && cc(t).Xo && ( // This error affects the actual write.\n    yield function () {\n      var _ref46 = _asyncToGenerator(function* (t, e) {\n        // Only handle permanent errors here. If it's transient, just let the retry\n        // logic kick in.\n        if (n = e.code, ds(n) && n !== B.ABORTED) {\n          // This was a permanent error, the request itself was the problem\n          // so it's not going to succeed if we resend it.\n          const n = t._u.shift();\n          // In this case it's also unlikely that the server itself is melting\n          // down -- this was just a bad request so inhibit backoff on the next\n          // restart.\n          cc(t).Fo(), yield Hu(t, () => t.remoteSyncer.rejectFailedWrite(n.batchId, e)), // It's possible that with the completion of this mutation\n          // another slot has freed up.\n          yield Ju(t);\n        }\n        var n;\n      });\n      return function (_x126, _x127) {\n        return _ref46.apply(this, arguments);\n      };\n    }()(t, e)),\n    // The write stream might have been started by refilling the write\n    // pipeline for failed writes\n    Xu(t) && tc(t);\n  });\n  return _ic.apply(this, arguments);\n}\nfunction rc(_x38, _x39) {\n  return _rc.apply(this, arguments);\n}\n/**\n * Toggles the network state when the client gains or loses its primary lease.\n */\nfunction _rc() {\n  _rc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    n.asyncQueue.verifyOperationInProgress(), C(\"RemoteStore\", \"RemoteStore received new credentials\");\n    const s = Ku(n);\n    // Tear down and re-create our network streams. This will ensure we get a\n    // fresh auth token for the new user and re-fill the write pipeline with\n    // new mutations from the LocalStore (since mutations are per-user).\n    n.mu.add(3 /* OfflineCause.CredentialChange */), yield Mu(n), s &&\n    // Don't set the network status to Unknown if we are offline.\n    n.pu.set(\"Unknown\" /* OnlineState.Unknown */), yield n.remoteSyncer.handleCredentialChange(e), n.mu.delete(3 /* OfflineCause.CredentialChange */), yield $u(n);\n  });\n  return _rc.apply(this, arguments);\n}\nfunction oc(_x40, _x41) {\n  return _oc.apply(this, arguments);\n}\n/**\n * If not yet initialized, registers the WatchStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */\nfunction _oc() {\n  _oc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    e ? (n.mu.delete(2 /* OfflineCause.IsSecondary */), yield $u(n)) : e || (n.mu.add(2 /* OfflineCause.IsSecondary */), yield Mu(n), n.pu.set(\"Unknown\" /* OnlineState.Unknown */));\n  });\n  return _oc.apply(this, arguments);\n}\nfunction uc(t) {\n  return t.Tu || (\n  // Create stream (but note that it is not started yet).\n  t.Tu = function (t, e, n) {\n    const s = F(t);\n    return s.ru(), new Su(e, s.connection, s.authCredentials, s.appCheckCredentials, s.Tt, n);\n  }\n  /**\n  * @license\n  * Copyright 2018 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */(t.datastore, t.asyncQueue, {\n    Xr: Qu.bind(null, t),\n    no: ju.bind(null, t),\n    Ho: zu.bind(null, t)\n  }), t.gu.push( /*#__PURE__*/function () {\n    var _ref11 = _asyncToGenerator(function* (e) {\n      e ? (t.Tu.Fo(), Uu(t) ? qu(t) : t.pu.set(\"Unknown\" /* OnlineState.Unknown */)) : (yield t.Tu.stop(), Gu(t));\n    });\n    return function (_x42) {\n      return _ref11.apply(this, arguments);\n    };\n  }())), t.Tu;\n}\n\n/**\n * If not yet initialized, registers the WriteStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WriteStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */\nfunction cc(t) {\n  return t.Eu || (\n  // Create stream (but note that it is not started yet).\n  t.Eu = function (t, e, n) {\n    const s = F(t);\n    return s.ru(), new Du(e, s.connection, s.authCredentials, s.appCheckCredentials, s.Tt, n);\n  }(t.datastore, t.asyncQueue, {\n    Xr: ec.bind(null, t),\n    no: ic.bind(null, t),\n    nu: nc.bind(null, t),\n    eu: sc.bind(null, t)\n  }), t.gu.push( /*#__PURE__*/function () {\n    var _ref12 = _asyncToGenerator(function* (e) {\n      e ? (t.Eu.Fo(), // This will start the write stream if necessary.\n      yield Ju(t)) : (yield t.Eu.stop(), t._u.length > 0 && (C(\"RemoteStore\", `Stopping write stream with ${t._u.length} pending writes`), t._u = []));\n    });\n    return function (_x43) {\n      return _ref12.apply(this, arguments);\n    };\n  }())), t.Eu;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an operation scheduled to be run in the future on an AsyncQueue.\n *\n * It is created via DelayedOperation.createAndSchedule().\n *\n * Supports cancellation (via cancel()) and early execution (via skipDelay()).\n *\n * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type\n * in newer versions of TypeScript defines `finally`, which is not available in\n * IE.\n */\nclass ac {\n  constructor(t, e, n, s, i) {\n    this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = s, this.removalCallback = i, this.deferred = new q(), this.then = this.deferred.promise.then.bind(this.deferred.promise),\n    // It's normal for the deferred promise to be canceled (due to cancellation)\n    // and so we attach a dummy catch callback to avoid\n    // 'UnhandledPromiseRejectionWarning' log spam.\n    this.deferred.promise.catch(t => {});\n  }\n  /**\n   * Creates and returns a DelayedOperation that has been scheduled to be\n   * executed on the provided asyncQueue after the provided delayMs.\n   *\n   * @param asyncQueue - The queue to schedule the operation on.\n   * @param id - A Timer ID identifying the type of operation this is.\n   * @param delayMs - The delay (ms) before the operation should be scheduled.\n   * @param op - The operation to run.\n   * @param removalCallback - A callback to be called synchronously once the\n   *   operation is executed or canceled, notifying the AsyncQueue to remove it\n   *   from its delayedOperations list.\n   *   PORTING NOTE: This exists to prevent making removeDelayedOperation() and\n   *   the DelayedOperation class public.\n   */\n  static createAndSchedule(t, e, n, s, i) {\n    const r = Date.now() + n,\n      o = new ac(t, e, r, s, i);\n    return o.start(n), o;\n  }\n  /**\n   * Starts the timer. This is called immediately after construction by\n   * createAndSchedule().\n   */\n  start(t) {\n    this.timerHandle = setTimeout(() => this.handleDelayElapsed(), t);\n  }\n  /**\n   * Queues the operation to run immediately (if it hasn't already been run or\n   * canceled).\n   */\n  skipDelay() {\n    return this.handleDelayElapsed();\n  }\n  /**\n   * Cancels the operation if it hasn't already been executed or canceled. The\n   * promise will be rejected.\n   *\n   * As long as the operation has not yet been run, calling cancel() provides a\n   * guarantee that the operation will not be run.\n   */\n  cancel(t) {\n    null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new L(B.CANCELLED, \"Operation cancelled\" + (t ? \": \" + t : \"\"))));\n  }\n  handleDelayElapsed() {\n    this.asyncQueue.enqueueAndForget(() => null !== this.timerHandle ? (this.clearTimeout(), this.op().then(t => this.deferred.resolve(t))) : Promise.resolve());\n  }\n  clearTimeout() {\n    null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle), this.timerHandle = null);\n  }\n}\n\n/**\n * Returns a FirestoreError that can be surfaced to the user if the provided\n * error is an IndexedDbTransactionError. Re-throws the error otherwise.\n */\nfunction hc(t, e) {\n  if (x(\"AsyncQueue\", `${e}: ${t}`), Vt(t)) return new L(B.UNAVAILABLE, `${e}: ${t}`);\n  throw t;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentSet is an immutable (copy-on-write) collection that holds documents\n * in order specified by the provided comparator. We always add a document key\n * comparator on top of what is provided to guarantee document equality based on\n * the key.\n */\nclass lc {\n  /** The default ordering is by key if the comparator is omitted */\n  constructor(t) {\n    // We are adding document key comparator to the end as it's the only\n    // guaranteed unique property of a document.\n    this.comparator = t ? (e, n) => t(e, n) || ct.comparator(e.key, n.key) : (t, e) => ct.comparator(t.key, e.key), this.keyedMap = ps(), this.sortedSet = new We(this.comparator);\n  }\n  /**\n   * Returns an empty copy of the existing DocumentSet, using the same\n   * comparator.\n   */\n  static emptySet(t) {\n    return new lc(t.comparator);\n  }\n  has(t) {\n    return null != this.keyedMap.get(t);\n  }\n  get(t) {\n    return this.keyedMap.get(t);\n  }\n  first() {\n    return this.sortedSet.minKey();\n  }\n  last() {\n    return this.sortedSet.maxKey();\n  }\n  isEmpty() {\n    return this.sortedSet.isEmpty();\n  }\n  /**\n   * Returns the index of the provided key in the document set, or -1 if the\n   * document key is not present in the set;\n   */\n  indexOf(t) {\n    const e = this.keyedMap.get(t);\n    return e ? this.sortedSet.indexOf(e) : -1;\n  }\n  get size() {\n    return this.sortedSet.size;\n  }\n  /** Iterates documents in order defined by \"comparator\" */\n  forEach(t) {\n    this.sortedSet.inorderTraversal((e, n) => (t(e), !1));\n  }\n  /** Inserts or updates a document with the same key */\n  add(t) {\n    // First remove the element if we have it.\n    const e = this.delete(t.key);\n    return e.copy(e.keyedMap.insert(t.key, t), e.sortedSet.insert(t, null));\n  }\n  /** Deletes a document with a given key */\n  delete(t) {\n    const e = this.get(t);\n    return e ? this.copy(this.keyedMap.remove(t), this.sortedSet.remove(e)) : this;\n  }\n  isEqual(t) {\n    if (!(t instanceof lc)) return !1;\n    if (this.size !== t.size) return !1;\n    const e = this.sortedSet.getIterator(),\n      n = t.sortedSet.getIterator();\n    for (; e.hasNext();) {\n      const t = e.getNext().key,\n        s = n.getNext().key;\n      if (!t.isEqual(s)) return !1;\n    }\n    return !0;\n  }\n  toString() {\n    const t = [];\n    return this.forEach(e => {\n      t.push(e.toString());\n    }), 0 === t.length ? \"DocumentSet ()\" : \"DocumentSet (\\n  \" + t.join(\"  \\n\") + \"\\n)\";\n  }\n  copy(t, e) {\n    const n = new lc();\n    return n.comparator = this.comparator, n.keyedMap = t, n.sortedSet = e, n;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentChangeSet keeps track of a set of changes to docs in a query, merging\n * duplicate events for the same doc.\n */\nclass fc {\n  constructor() {\n    this.Au = new We(ct.comparator);\n  }\n  track(t) {\n    const e = t.doc.key,\n      n = this.Au.get(e);\n    n ?\n    // Merge the new change with the existing change.\n    0 /* ChangeType.Added */ !== t.type && 3 /* ChangeType.Metadata */ === n.type ? this.Au = this.Au.insert(e, t) : 3 /* ChangeType.Metadata */ === t.type && 1 /* ChangeType.Removed */ !== n.type ? this.Au = this.Au.insert(e, {\n      type: n.type,\n      doc: t.doc\n    }) : 2 /* ChangeType.Modified */ === t.type && 2 /* ChangeType.Modified */ === n.type ? this.Au = this.Au.insert(e, {\n      type: 2 /* ChangeType.Modified */,\n      doc: t.doc\n    }) : 2 /* ChangeType.Modified */ === t.type && 0 /* ChangeType.Added */ === n.type ? this.Au = this.Au.insert(e, {\n      type: 0 /* ChangeType.Added */,\n      doc: t.doc\n    }) : 1 /* ChangeType.Removed */ === t.type && 0 /* ChangeType.Added */ === n.type ? this.Au = this.Au.remove(e) : 1 /* ChangeType.Removed */ === t.type && 2 /* ChangeType.Modified */ === n.type ? this.Au = this.Au.insert(e, {\n      type: 1 /* ChangeType.Removed */,\n      doc: n.doc\n    }) : 0 /* ChangeType.Added */ === t.type && 1 /* ChangeType.Removed */ === n.type ? this.Au = this.Au.insert(e, {\n      type: 2 /* ChangeType.Modified */,\n      doc: t.doc\n    }) :\n    // This includes these cases, which don't make sense:\n    // Added->Added\n    // Removed->Removed\n    // Modified->Added\n    // Removed->Modified\n    // Metadata->Added\n    // Removed->Metadata\n    $() : this.Au = this.Au.insert(e, t);\n  }\n  Ru() {\n    const t = [];\n    return this.Au.inorderTraversal((e, n) => {\n      t.push(n);\n    }), t;\n  }\n}\nclass dc {\n  constructor(t, e, n, s, i, r, o, u, c) {\n    this.query = t, this.docs = e, this.oldDocs = n, this.docChanges = s, this.mutatedKeys = i, this.fromCache = r, this.syncStateChanged = o, this.excludesMetadataChanges = u, this.hasCachedResults = c;\n  }\n  /** Returns a view snapshot as if all documents in the snapshot were added. */\n  static fromInitialDocuments(t, e, n, s, i) {\n    const r = [];\n    return e.forEach(t => {\n      r.push({\n        type: 0 /* ChangeType.Added */,\n        doc: t\n      });\n    }), new dc(t, e, lc.emptySet(e), r, n, s, /* syncStateChanged= */!0, /* excludesMetadataChanges= */!1, i);\n  }\n  get hasPendingWrites() {\n    return !this.mutatedKeys.isEmpty();\n  }\n  isEqual(t) {\n    if (!(this.fromCache === t.fromCache && this.hasCachedResults === t.hasCachedResults && this.syncStateChanged === t.syncStateChanged && this.mutatedKeys.isEqual(t.mutatedKeys) && Rn(this.query, t.query) && this.docs.isEqual(t.docs) && this.oldDocs.isEqual(t.oldDocs))) return !1;\n    const e = this.docChanges,\n      n = t.docChanges;\n    if (e.length !== n.length) return !1;\n    for (let t = 0; t < e.length; t++) if (e[t].type !== n[t].type || !e[t].doc.isEqual(n[t].doc)) return !1;\n    return !0;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Holds the listeners and the last received ViewSnapshot for a query being\n * tracked by EventManager.\n */\nclass _c {\n  constructor() {\n    this.Pu = void 0, this.listeners = [];\n  }\n}\nclass wc {\n  constructor() {\n    this.queries = new ws(t => Pn(t), Rn), this.onlineState = \"Unknown\" /* OnlineState.Unknown */, this.vu = new Set();\n  }\n}\nfunction mc(_x44, _x45) {\n  return _mc.apply(this, arguments);\n}\nfunction _mc() {\n  _mc = _asyncToGenerator(function* (t, e) {\n    const n = F(t),\n      s = e.query;\n    let i = !1,\n      r = n.queries.get(s);\n    if (r || (i = !0, r = new _c()), i) try {\n      r.Pu = yield n.onListen(s);\n    } catch (t) {\n      const n = hc(t, `Initialization of query '${vn(e.query)}' failed`);\n      return void e.onError(n);\n    }\n    if (n.queries.set(s, r), r.listeners.push(e),\n    // Run global snapshot listeners if a consistent snapshot has been emitted.\n    e.bu(n.onlineState), r.Pu) {\n      e.Vu(r.Pu) && Ic(n);\n    }\n  });\n  return _mc.apply(this, arguments);\n}\nfunction gc(_x46, _x47) {\n  return _gc.apply(this, arguments);\n}\nfunction _gc() {\n  _gc = _asyncToGenerator(function* (t, e) {\n    const n = F(t),\n      s = e.query;\n    let i = !1;\n    const r = n.queries.get(s);\n    if (r) {\n      const t = r.listeners.indexOf(e);\n      t >= 0 && (r.listeners.splice(t, 1), i = 0 === r.listeners.length);\n    }\n    if (i) return n.queries.delete(s), n.onUnlisten(s);\n  });\n  return _gc.apply(this, arguments);\n}\nfunction yc(t, e) {\n  const n = F(t);\n  let s = !1;\n  for (const t of e) {\n    const e = t.query,\n      i = n.queries.get(e);\n    if (i) {\n      for (const e of i.listeners) e.Vu(t) && (s = !0);\n      i.Pu = t;\n    }\n  }\n  s && Ic(n);\n}\nfunction pc(t, e, n) {\n  const s = F(t),\n    i = s.queries.get(e);\n  if (i) for (const t of i.listeners) t.onError(n);\n  // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()\n  // after an error.\n  s.queries.delete(e);\n}\n\n// Call all global snapshot listeners that have been set.\nfunction Ic(t) {\n  t.vu.forEach(t => {\n    t.next();\n  });\n}\n\n/**\n * QueryListener takes a series of internal view snapshots and determines\n * when to raise the event.\n *\n * It uses an Observer to dispatch events.\n */\nclass Tc {\n  constructor(t, e, n) {\n    this.query = t, this.Su = e,\n    /**\n     * Initial snapshots (e.g. from cache) may not be propagated to the wrapped\n     * observer. This flag is set to true once we've actually raised an event.\n     */\n    this.Du = !1, this.Cu = null, this.onlineState = \"Unknown\" /* OnlineState.Unknown */, this.options = n || {};\n  }\n  /**\n   * Applies the new ViewSnapshot to this listener, raising a user-facing event\n   * if applicable (depending on what changed, whether the user has opted into\n   * metadata-only changes, etc.). Returns true if a user-facing event was\n   * indeed raised.\n   */\n  Vu(t) {\n    if (!this.options.includeMetadataChanges) {\n      // Remove the metadata only changes.\n      const e = [];\n      for (const n of t.docChanges) 3 /* ChangeType.Metadata */ !== n.type && e.push(n);\n      t = new dc(t.query, t.docs, t.oldDocs, e, t.mutatedKeys, t.fromCache, t.syncStateChanged, /* excludesMetadataChanges= */!0, t.hasCachedResults);\n    }\n    let e = !1;\n    return this.Du ? this.xu(t) && (this.Su.next(t), e = !0) : this.Nu(t, this.onlineState) && (this.ku(t), e = !0), this.Cu = t, e;\n  }\n  onError(t) {\n    this.Su.error(t);\n  }\n  /** Returns whether a snapshot was raised. */\n  bu(t) {\n    this.onlineState = t;\n    let e = !1;\n    return this.Cu && !this.Du && this.Nu(this.Cu, t) && (this.ku(this.Cu), e = !0), e;\n  }\n  Nu(t, e) {\n    // Always raise the first event when we're synced\n    if (!t.fromCache) return !0;\n    // NOTE: We consider OnlineState.Unknown as online (it should become Offline\n    // or Online if we wait long enough).\n    const n = \"Offline\" /* OnlineState.Offline */ !== e;\n    // Don't raise the event if we're online, aren't synced yet (checked\n    // above) and are waiting for a sync.\n    return (!this.options.$u || !n) && (!t.docs.isEmpty() || t.hasCachedResults || \"Offline\" /* OnlineState.Offline */ === e);\n    // Raise data from cache if we have any documents, have cached results before,\n    // or we are offline.\n  }\n\n  xu(t) {\n    // We don't need to handle includeDocumentMetadataChanges here because\n    // the Metadata only changes have already been stripped out if needed.\n    // At this point the only changes we will see are the ones we should\n    // propagate.\n    if (t.docChanges.length > 0) return !0;\n    const e = this.Cu && this.Cu.hasPendingWrites !== t.hasPendingWrites;\n    return !(!t.syncStateChanged && !e) && !0 === this.options.includeMetadataChanges;\n    // Generally we should have hit one of the cases above, but it's possible\n    // to get here if there were only metadata docChanges and they got\n    // stripped out.\n  }\n\n  ku(t) {\n    t = dc.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache, t.hasCachedResults), this.Du = !0, this.Su.next(t);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A complete element in the bundle stream, together with the byte length it\n * occupies in the stream.\n */\nclass Ec {\n  constructor(t,\n  // How many bytes this element takes to store in the bundle.\n  e) {\n    this.Mu = t, this.byteLength = e;\n  }\n  Ou() {\n    return \"metadata\" in this.Mu;\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Helper to convert objects from bundles to model objects in the SDK.\n */\nclass Ac {\n  constructor(t) {\n    this.Tt = t;\n  }\n  Zi(t) {\n    return Hs(this.Tt, t);\n  }\n  /**\n   * Converts a BundleDocument to a MutableDocument.\n   */\n  Xi(t) {\n    return t.metadata.exists ? ei(this.Tt, t.document, !1) : sn.newNoDocument(this.Zi(t.metadata.name), this.tr(t.metadata.readTime));\n  }\n  tr(t) {\n    return Qs(t);\n  }\n}\n\n/**\n * A class to process the elements from a bundle, load them into local\n * storage and provide progress update while loading.\n */\nclass Rc {\n  constructor(t, e, n) {\n    this.Fu = t, this.localStore = e, this.Tt = n, /** Batched queries to be saved into storage */\n    this.queries = [], /** Batched documents to be saved into storage */\n    this.documents = [], /** The collection groups affected by this bundle. */\n    this.collectionGroups = new Set(), this.progress = Pc(t);\n  }\n  /**\n   * Adds an element from the bundle to the loader.\n   *\n   * Returns a new progress if adding the element leads to a new progress,\n   * otherwise returns null.\n   */\n  Bu(t) {\n    this.progress.bytesLoaded += t.byteLength;\n    let e = this.progress.documentsLoaded;\n    if (t.Mu.namedQuery) this.queries.push(t.Mu.namedQuery);else if (t.Mu.documentMetadata) {\n      this.documents.push({\n        metadata: t.Mu.documentMetadata\n      }), t.Mu.documentMetadata.exists || ++e;\n      const n = rt.fromString(t.Mu.documentMetadata.name);\n      this.collectionGroups.add(n.get(n.length - 2));\n    } else t.Mu.document && (this.documents[this.documents.length - 1].document = t.Mu.document, ++e);\n    return e !== this.progress.documentsLoaded ? (this.progress.documentsLoaded = e, Object.assign({}, this.progress)) : null;\n  }\n  Lu(t) {\n    const e = new Map(),\n      n = new Ac(this.Tt);\n    for (const s of t) if (s.metadata.queries) {\n      const t = n.Zi(s.metadata.name);\n      for (const n of s.metadata.queries) {\n        const s = (e.get(n) || vs()).add(t);\n        e.set(n, s);\n      }\n    }\n    return e;\n  }\n  /**\n   * Update the progress to 'Success' and return the updated progress.\n   */\n  complete() {\n    var _this19 = this;\n    return _asyncToGenerator(function* () {\n      const t = yield iu(_this19.localStore, new Ac(_this19.Tt), _this19.documents, _this19.Fu.id),\n        e = _this19.Lu(_this19.documents);\n      for (const t of _this19.queries) yield ru(_this19.localStore, t, e.get(t.name));\n      return _this19.progress.taskState = \"Success\", {\n        progress: _this19.progress,\n        qu: _this19.collectionGroups,\n        Uu: t\n      };\n    })();\n  }\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the initial progress of\n * loading a bundle.\n */\nfunction Pc(t) {\n  return {\n    taskState: \"Running\",\n    documentsLoaded: 0,\n    bytesLoaded: 0,\n    totalDocuments: t.totalDocuments,\n    totalBytes: t.totalBytes\n  };\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the progress that the loading\n * has succeeded.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass vc {\n  constructor(t) {\n    this.key = t;\n  }\n}\nclass bc {\n  constructor(t) {\n    this.key = t;\n  }\n}\n\n/**\n * View is responsible for computing the final merged truth of what docs are in\n * a query. It gets notified of local and remote changes to docs, and applies\n * the query filters and limits to determine the most correct possible results.\n */\nclass Vc {\n  constructor(t, /** Documents included in the remote target */\n  e) {\n    this.query = t, this.Ku = e, this.Gu = null, this.hasCachedResults = !1,\n    /**\n     * A flag whether the view is current with the backend. A view is considered\n     * current after it has seen the current flag from the backend and did not\n     * lose consistency within the watch stream (e.g. because of an existence\n     * filter mismatch).\n     */\n    this.current = !1, /** Documents in the view but not in the remote target */\n    this.Qu = vs(), /** Document Keys that have local changes */\n    this.mutatedKeys = vs(), this.ju = Sn(t), this.zu = new lc(this.ju);\n  }\n  /**\n   * The set of remote documents that the server has told us belongs to the target associated with\n   * this view.\n   */\n  get Wu() {\n    return this.Ku;\n  }\n  /**\n   * Iterates over a set of doc changes, applies the query limit, and computes\n   * what the new results should be, what the changes were, and whether we may\n   * need to go back to the local cache for more results. Does not make any\n   * changes to the view.\n   * @param docChanges - The doc changes to apply to this view.\n   * @param previousChanges - If this is being called with a refill, then start\n   *        with this set of docs and changes instead of the current view.\n   * @returns a new set of docs, changes, and refill flag.\n   */\n  Hu(t, e) {\n    const n = e ? e.Ju : new fc(),\n      s = e ? e.zu : this.zu;\n    let i = e ? e.mutatedKeys : this.mutatedKeys,\n      r = s,\n      o = !1;\n    // Track the last doc in a (full) limit. This is necessary, because some\n    // update (a delete, or an update moving a doc past the old limit) might\n    // mean there is some other document in the local cache that either should\n    // come (1) between the old last limit doc and the new last document, in the\n    // case of updates, or (2) after the new last document, in the case of\n    // deletes. So we keep this doc at the old limit to compare the updates to.\n    // Note that this should never get used in a refill (when previousChanges is\n    // set), because there will only be adds -- no deletes or updates.\n    const u = \"F\" /* LimitType.First */ === this.query.limitType && s.size === this.query.limit ? s.last() : null,\n      c = \"L\" /* LimitType.Last */ === this.query.limitType && s.size === this.query.limit ? s.first() : null;\n    // Drop documents out to meet limit/limitToLast requirement.\n    if (t.inorderTraversal((t, e) => {\n      const a = s.get(t),\n        h = bn(this.query, e) ? e : null,\n        l = !!a && this.mutatedKeys.has(a.key),\n        f = !!h && (h.hasLocalMutations ||\n        // We only consider committed mutations for documents that were\n        // mutated during the lifetime of the view.\n        this.mutatedKeys.has(h.key) && h.hasCommittedMutations);\n      let d = !1;\n      // Calculate change\n      if (a && h) {\n        a.data.isEqual(h.data) ? l !== f && (n.track({\n          type: 3 /* ChangeType.Metadata */,\n          doc: h\n        }), d = !0) : this.Yu(a, h) || (n.track({\n          type: 2 /* ChangeType.Modified */,\n          doc: h\n        }), d = !0, (u && this.ju(h, u) > 0 || c && this.ju(h, c) < 0) && (\n        // This doc moved from inside the limit to outside the limit.\n        // That means there may be some other doc in the local cache\n        // that should be included instead.\n        o = !0));\n      } else !a && h ? (n.track({\n        type: 0 /* ChangeType.Added */,\n        doc: h\n      }), d = !0) : a && !h && (n.track({\n        type: 1 /* ChangeType.Removed */,\n        doc: a\n      }), d = !0, (u || c) && (\n      // A doc was removed from a full limit query. We'll need to\n      // requery from the local cache to see if we know about some other\n      // doc that should be in the results.\n      o = !0));\n      d && (h ? (r = r.add(h), i = f ? i.add(t) : i.delete(t)) : (r = r.delete(t), i = i.delete(t)));\n    }), null !== this.query.limit) for (; r.size > this.query.limit;) {\n      const t = \"F\" /* LimitType.First */ === this.query.limitType ? r.last() : r.first();\n      r = r.delete(t.key), i = i.delete(t.key), n.track({\n        type: 1 /* ChangeType.Removed */,\n        doc: t\n      });\n    }\n    return {\n      zu: r,\n      Ju: n,\n      Li: o,\n      mutatedKeys: i\n    };\n  }\n  Yu(t, e) {\n    // We suppress the initial change event for documents that were modified as\n    // part of a write acknowledgment (e.g. when the value of a server transform\n    // is applied) as Watch will send us the same document again.\n    // By suppressing the event, we only raise two user visible events (one with\n    // `hasPendingWrites` and the final state of the document) instead of three\n    // (one with `hasPendingWrites`, the modified document with\n    // `hasPendingWrites` and the final state of the document).\n    return t.hasLocalMutations && e.hasCommittedMutations && !e.hasLocalMutations;\n  }\n  /**\n   * Updates the view with the given ViewDocumentChanges and optionally updates\n   * limbo docs and sync state from the provided target change.\n   * @param docChanges - The set of changes to make to the view's docs.\n   * @param updateLimboDocuments - Whether to update limbo documents based on\n   *        this change.\n   * @param targetChange - A target change to apply for computing limbo docs and\n   *        sync state.\n   * @returns A new ViewChange with the given docs, changes, and sync state.\n   */\n  // PORTING NOTE: The iOS/Android clients always compute limbo document changes.\n  applyChanges(t, e, n) {\n    const s = this.zu;\n    this.zu = t.zu, this.mutatedKeys = t.mutatedKeys;\n    // Sort changes based on type and query comparator\n    const i = t.Ju.Ru();\n    i.sort((t, e) => function (t, e) {\n      const n = t => {\n        switch (t) {\n          case 0 /* ChangeType.Added */:\n            return 1;\n          case 2 /* ChangeType.Modified */:\n          case 3 /* ChangeType.Metadata */:\n            // A metadata change is converted to a modified change at the public\n            // api layer.  Since we sort by document key and then change type,\n            // metadata and modified changes must be sorted equivalently.\n            return 2;\n          case 1 /* ChangeType.Removed */:\n            return 0;\n          default:\n            return $();\n        }\n      };\n      return n(t) - n(e);\n    }\n    /**\n    * @license\n    * Copyright 2020 Google LLC\n    *\n    * Licensed under the Apache License, Version 2.0 (the \"License\");\n    * you may not use this file except in compliance with the License.\n    * You may obtain a copy of the License at\n    *\n    *   http://www.apache.org/licenses/LICENSE-2.0\n    *\n    * Unless required by applicable law or agreed to in writing, software\n    * distributed under the License is distributed on an \"AS IS\" BASIS,\n    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    * See the License for the specific language governing permissions and\n    * limitations under the License.\n    */(t.type, e.type) || this.ju(t.doc, e.doc)), this.Zu(n);\n    const r = e ? this.Xu() : [],\n      o = 0 === this.Qu.size && this.current ? 1 /* SyncState.Synced */ : 0 /* SyncState.Local */,\n      u = o !== this.Gu;\n    if (this.Gu = o, 0 !== i.length || u) {\n      return {\n        snapshot: new dc(this.query, t.zu, s, i, t.mutatedKeys, 0 /* SyncState.Local */ === o, u, /* excludesMetadataChanges= */!1, !!n && n.resumeToken.approximateByteSize() > 0),\n        tc: r\n      };\n    }\n    // no changes\n    return {\n      tc: r\n    };\n  }\n  /**\n   * Applies an OnlineState change to the view, potentially generating a\n   * ViewChange if the view's syncState changes as a result.\n   */\n  bu(t) {\n    return this.current && \"Offline\" /* OnlineState.Offline */ === t ? (\n    // If we're offline, set `current` to false and then call applyChanges()\n    // to refresh our syncState and generate a ViewChange as appropriate. We\n    // are guaranteed to get a new TargetChange that sets `current` back to\n    // true once the client is back online.\n    this.current = !1, this.applyChanges({\n      zu: this.zu,\n      Ju: new fc(),\n      mutatedKeys: this.mutatedKeys,\n      Li: !1\n    }, /* updateLimboDocuments= */!1)) : {\n      tc: []\n    };\n  }\n  /**\n   * Returns whether the doc for the given key should be in limbo.\n   */\n  ec(t) {\n    // If the remote end says it's part of this query, it's not in limbo.\n    return !this.Ku.has(t) &&\n    // The local store doesn't think it's a result, so it shouldn't be in limbo.\n    !!this.zu.has(t) && !this.zu.get(t).hasLocalMutations;\n  }\n  /**\n   * Updates syncedDocuments, current, and limbo docs based on the given change.\n   * Returns the list of changes to which docs are in limbo.\n   */\n  Zu(t) {\n    t && (t.addedDocuments.forEach(t => this.Ku = this.Ku.add(t)), t.modifiedDocuments.forEach(t => {}), t.removedDocuments.forEach(t => this.Ku = this.Ku.delete(t)), this.current = t.current);\n  }\n  Xu() {\n    // We can only determine limbo documents when we're in-sync with the server.\n    if (!this.current) return [];\n    // TODO(klimt): Do this incrementally so that it's not quadratic when\n    // updating many documents.\n    const t = this.Qu;\n    this.Qu = vs(), this.zu.forEach(t => {\n      this.ec(t.key) && (this.Qu = this.Qu.add(t.key));\n    });\n    // Diff the new limbo docs with the old limbo docs.\n    const e = [];\n    return t.forEach(t => {\n      this.Qu.has(t) || e.push(new bc(t));\n    }), this.Qu.forEach(n => {\n      t.has(n) || e.push(new vc(n));\n    }), e;\n  }\n  /**\n   * Update the in-memory state of the current view with the state read from\n   * persistence.\n   *\n   * We update the query view whenever a client's primary status changes:\n   * - When a client transitions from primary to secondary, it can miss\n   *   LocalStorage updates and its query views may temporarily not be\n   *   synchronized with the state on disk.\n   * - For secondary to primary transitions, the client needs to update the list\n   *   of `syncedDocuments` since secondary clients update their query views\n   *   based purely on synthesized RemoteEvents.\n   *\n   * @param queryResult.documents - The documents that match the query according\n   * to the LocalStore.\n   * @param queryResult.remoteKeys - The keys of the documents that match the\n   * query according to the backend.\n   *\n   * @returns The ViewChange that resulted from this synchronization.\n   */\n  // PORTING NOTE: Multi-tab only.\n  nc(t) {\n    this.Ku = t.Yi, this.Qu = vs();\n    const e = this.Hu(t.documents);\n    return this.applyChanges(e, /*updateLimboDocuments=*/!0);\n  }\n  /**\n   * Returns a view snapshot as if this query was just listened to. Contains\n   * a document add for every existing document and the `fromCache` and\n   * `hasPendingWrites` status of the already established view.\n   */\n  // PORTING NOTE: Multi-tab only.\n  sc() {\n    return dc.fromInitialDocuments(this.query, this.zu, this.mutatedKeys, 0 /* SyncState.Local */ === this.Gu, this.hasCachedResults);\n  }\n}\n\n/**\n * QueryView contains all of the data that SyncEngine needs to keep track of for\n * a particular query.\n */\nclass Sc {\n  constructor(\n  /**\n   * The query itself.\n   */\n  t,\n  /**\n   * The target number created by the client that is used in the watch\n   * stream to identify this query.\n   */\n  e,\n  /**\n   * The view is responsible for computing the final merged truth of what\n   * docs are in the query. It gets notified of local and remote changes,\n   * and applies the query filters and limits to determine the most correct\n   * possible results.\n   */\n  n) {\n    this.query = t, this.targetId = e, this.view = n;\n  }\n}\n\n/** Tracks a limbo resolution. */\nclass Dc {\n  constructor(t) {\n    this.key = t,\n    /**\n     * Set to true once we've received a document. This is used in\n     * getRemoteKeysForTarget() and ultimately used by WatchChangeAggregator to\n     * decide whether it needs to manufacture a delete event for the target once\n     * the target is CURRENT.\n     */\n    this.ic = !1;\n  }\n}\n\n/**\n * An implementation of `SyncEngine` coordinating with other parts of SDK.\n *\n * The parts of SyncEngine that act as a callback to RemoteStore need to be\n * registered individually. This is done in `syncEngineWrite()` and\n * `syncEngineListen()` (as well as `applyPrimaryState()`) as these methods\n * serve as entry points to RemoteStore's functionality.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */\nclass Cc {\n  constructor(t, e, n,\n  // PORTING NOTE: Manages state synchronization in multi-tab environments.\n  s, i, r) {\n    this.localStore = t, this.remoteStore = e, this.eventManager = n, this.sharedClientState = s, this.currentUser = i, this.maxConcurrentLimboResolutions = r, this.rc = {}, this.oc = new ws(t => Pn(t), Rn), this.uc = new Map(),\n    /**\n     * The keys of documents that are in limbo for which we haven't yet started a\n     * limbo resolution query. The strings in this set are the result of calling\n     * `key.path.canonicalString()` where `key` is a `DocumentKey` object.\n     *\n     * The `Set` type was chosen because it provides efficient lookup and removal\n     * of arbitrary elements and it also maintains insertion order, providing the\n     * desired queue-like FIFO semantics.\n     */\n    this.cc = new Set(),\n    /**\n     * Keeps track of the target ID for each document that is in limbo with an\n     * active target.\n     */\n    this.ac = new We(ct.comparator),\n    /**\n     * Keeps track of the information about an active limbo resolution for each\n     * active target ID that was started for the purpose of limbo resolution.\n     */\n    this.hc = new Map(), this.lc = new vo(), /** Stores user completion handlers, indexed by User and BatchId. */\n    this.fc = {}, /** Stores user callbacks waiting for all pending writes to be acknowledged. */\n    this.dc = new Map(), this._c = eo.Sn(), this.onlineState = \"Unknown\" /* OnlineState.Unknown */,\n    // The primary state is set to `true` or `false` immediately after Firestore\n    // startup. In the interim, a client should only be considered primary if\n    // `isPrimary` is true.\n    this.wc = void 0;\n  }\n  get isPrimaryClient() {\n    return !0 === this.wc;\n  }\n}\n\n/**\n * Initiates the new listen, resolves promise when listen enqueued to the\n * server. All the subsequent view snapshots or errors are sent to the\n * subscribed handlers. Returns the initial snapshot.\n */\nfunction xc(_x48, _x49) {\n  return _xc.apply(this, arguments);\n}\n/**\n * Registers a view for a previously unknown query and computes its initial\n * snapshot.\n */\nfunction _xc() {\n  _xc = _asyncToGenerator(function* (t, e) {\n    const n = ua(t);\n    let s, i;\n    const r = n.oc.get(e);\n    if (r)\n      // PORTING NOTE: With Multi-Tab Web, it is possible that a query view\n      // already exists when EventManager calls us for the first time. This\n      // happens when the primary tab is already listening to this query on\n      // behalf of another tab and the user of the primary also starts listening\n      // to the query. EventManager will not have an assigned target ID in this\n      // case and calls `listen` to obtain this ID.\n      s = r.targetId, n.sharedClientState.addLocalQueryTarget(s), i = r.view.sc();else {\n      const t = yield Zo(n.localStore, Tn(e));\n      n.isPrimaryClient && Ou(n.remoteStore, t);\n      const r = n.sharedClientState.addLocalQueryTarget(t.targetId);\n      s = t.targetId, i = yield Nc(n, e, s, \"current\" === r, t.resumeToken);\n    }\n    return i;\n  });\n  return _xc.apply(this, arguments);\n}\nfunction Nc(_x50, _x51, _x52, _x53, _x54) {\n  return _Nc.apply(this, arguments);\n}\n/** Stops listening to the query. */\nfunction _Nc() {\n  _Nc = _asyncToGenerator(function* (t, e, n, s, i) {\n    // PORTING NOTE: On Web only, we inject the code that registers new Limbo\n    // targets based on view changes. This allows us to only depend on Limbo\n    // changes when user code includes queries.\n    t.mc = (e, n, s) => function () {\n      var _ref47 = _asyncToGenerator(function* (t, e, n, s) {\n        let i = e.view.Hu(n);\n        i.Li && (\n        // The query has a limit and some docs were removed, so we need\n        // to re-run the query against the local store to make sure we\n        // didn't lose any good docs that had been past the limit.\n        i = yield tu(t.localStore, e.query, /* usePreviousResults= */!1).then(({\n          documents: t\n        }) => e.view.Hu(t, i)));\n        const r = s && s.targetChanges.get(e.targetId),\n          o = e.view.applyChanges(i, /* updateLimboDocuments= */t.isPrimaryClient, r);\n        return jc(t, e.targetId, o.tc), o.snapshot;\n      });\n      return function (_x128, _x129, _x130, _x131) {\n        return _ref47.apply(this, arguments);\n      };\n    }()(t, e, n, s);\n    const r = yield tu(t.localStore, e, /* usePreviousResults= */!0),\n      o = new Vc(e, r.Yi),\n      u = o.Hu(r.documents),\n      c = Ds.createSynthesizedTargetChangeForCurrentChange(n, s && \"Offline\" /* OnlineState.Offline */ !== t.onlineState, i),\n      a = o.applyChanges(u, /* updateLimboDocuments= */t.isPrimaryClient, c);\n    jc(t, n, a.tc);\n    const h = new Sc(e, n, o);\n    return t.oc.set(e, h), t.uc.has(n) ? t.uc.get(n).push(e) : t.uc.set(n, [e]), a.snapshot;\n  });\n  return _Nc.apply(this, arguments);\n}\nfunction kc(_x55, _x56) {\n  return _kc.apply(this, arguments);\n}\n/**\n * Initiates the write of local mutation batch which involves adding the\n * writes to the mutation queue, notifying the remote store about new\n * mutations and raising events for any changes this write caused.\n *\n * The promise returned by this call is resolved when the above steps\n * have completed, *not* when the write was acked by the backend. The\n * userCallback is resolved once the write was acked/rejected by the\n * backend (or failed locally for any other reason).\n */\nfunction _kc() {\n  _kc = _asyncToGenerator(function* (t, e) {\n    const n = F(t),\n      s = n.oc.get(e),\n      i = n.uc.get(s.targetId);\n    if (i.length > 1) return n.uc.set(s.targetId, i.filter(t => !Rn(t, e))), void n.oc.delete(e);\n    // No other queries are mapped to the target, clean up the query and the target.\n    if (n.isPrimaryClient) {\n      // We need to remove the local query target first to allow us to verify\n      // whether any other client is still interested in this target.\n      n.sharedClientState.removeLocalQueryTarget(s.targetId);\n      n.sharedClientState.isActiveQueryTarget(s.targetId) || (yield Xo(n.localStore, s.targetId, /*keepPersistedTargetData=*/!1).then(() => {\n        n.sharedClientState.clearQueryState(s.targetId), Fu(n.remoteStore, s.targetId), Gc(n, s.targetId);\n      }).catch(Et));\n    } else Gc(n, s.targetId), yield Xo(n.localStore, s.targetId, /*keepPersistedTargetData=*/!0);\n  });\n  return _kc.apply(this, arguments);\n}\nfunction $c(_x57, _x58, _x59) {\n  return _$c.apply(this, arguments);\n}\n/**\n * Applies one remote event to the sync engine, notifying any views of the\n * changes, and releasing any pending mutation batches that would become\n * visible because of the snapshot version the remote event contains.\n */\nfunction _$c() {\n  _$c = _asyncToGenerator(function* (t, e, n) {\n    const s = ca(t);\n    try {\n      const t = yield function (t, e) {\n        const n = F(t),\n          s = nt.now(),\n          i = e.reduce((t, e) => t.add(e.key), vs());\n        let r, o;\n        return n.persistence.runTransaction(\"Locally write mutations\", \"readwrite\", t => {\n          // Figure out which keys do not have a remote version in the cache, this\n          // is needed to create the right overlay mutation: if no remote version\n          // presents, we do not need to create overlays as patch mutations.\n          // TODO(Overlay): Is there a better way to determine this? Using the\n          //  document version does not work because local mutations set them back\n          //  to 0.\n          let u = gs(),\n            c = vs();\n          return n.ji.getEntries(t, i).next(t => {\n            u = t, u.forEach((t, e) => {\n              e.isValidDocument() || (c = c.add(t));\n            });\n          }).next(() => n.localDocuments.getOverlayedDocuments(t, u)).next(i => {\n            r = i;\n            // For non-idempotent mutations (such as `FieldValue.increment()`),\n            // we record the base state in a separate patch mutation. This is\n            // later used to guarantee consistent values and prevents flicker\n            // even if the backend sends us an update that already includes our\n            // transform.\n            const o = [];\n            for (const t of e) {\n              const e = es(t, r.get(t.key).overlayedDocument);\n              null != e &&\n              // NOTE: The base state should only be applied if there's some\n              // existing document to override, so use a Precondition of\n              // exists=true\n              o.push(new is(t.key, e, nn(e.value.mapValue), Hn.exists(!0)));\n            }\n            return n.mutationQueue.addMutationBatch(t, s, o, e);\n          }).next(e => {\n            o = e;\n            const s = e.applyToLocalDocumentSet(r, c);\n            return n.documentOverlayCache.saveOverlays(t, e.batchId, s);\n          });\n        }).then(() => ({\n          batchId: o.batchId,\n          changes: Is(r)\n        }));\n      }(s.localStore, e);\n      s.sharedClientState.addPendingMutation(t.batchId), function (t, e, n) {\n        let s = t.fc[t.currentUser.toKey()];\n        s || (s = new We(X));\n        s = s.insert(e, n), t.fc[t.currentUser.toKey()] = s;\n      }\n      /**\n      * Resolves or rejects the user callback for the given batch and then discards\n      * it.\n      */(s, t.batchId, n), yield Hc(s, t.changes), yield Ju(s.remoteStore);\n    } catch (t) {\n      // If we can't persist the mutation, we reject the user callback and\n      // don't send the mutation. The user can then retry the write.\n      const e = hc(t, \"Failed to persist write\");\n      n.reject(e);\n    }\n  });\n  return _$c.apply(this, arguments);\n}\nfunction Mc(_x60, _x61) {\n  return _Mc.apply(this, arguments);\n}\n/**\n * Applies an OnlineState change to the sync engine and notifies any views of\n * the change.\n */\nfunction _Mc() {\n  _Mc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    try {\n      const t = yield Ho(n.localStore, e);\n      // Update `receivedDocument` as appropriate for any limbo targets.\n      e.targetChanges.forEach((t, e) => {\n        const s = n.hc.get(e);\n        s && (\n        // Since this is a limbo resolution lookup, it's for a single document\n        // and it could be added, modified, or removed, but not a combination.\n        M(t.addedDocuments.size + t.modifiedDocuments.size + t.removedDocuments.size <= 1), t.addedDocuments.size > 0 ? s.ic = !0 : t.modifiedDocuments.size > 0 ? M(s.ic) : t.removedDocuments.size > 0 && (M(s.ic), s.ic = !1));\n      }), yield Hc(n, t, e);\n    } catch (t) {\n      yield Et(t);\n    }\n  });\n  return _Mc.apply(this, arguments);\n}\nfunction Oc(t, e, n) {\n  const s = F(t);\n  // If we are the secondary client, we explicitly ignore the remote store's\n  // online state (the local client may go offline, even though the primary\n  // tab remains online) and only apply the primary tab's online state from\n  // SharedClientState.\n  if (s.isPrimaryClient && 0 /* OnlineStateSource.RemoteStore */ === n || !s.isPrimaryClient && 1 /* OnlineStateSource.SharedClientState */ === n) {\n    const t = [];\n    s.oc.forEach((n, s) => {\n      const i = s.view.bu(e);\n      i.snapshot && t.push(i.snapshot);\n    }), function (t, e) {\n      const n = F(t);\n      n.onlineState = e;\n      let s = !1;\n      n.queries.forEach((t, n) => {\n        for (const t of n.listeners)\n        // Run global snapshot listeners if a consistent snapshot has been emitted.\n        t.bu(e) && (s = !0);\n      }), s && Ic(n);\n    }(s.eventManager, e), t.length && s.rc.Ho(t), s.onlineState = e, s.isPrimaryClient && s.sharedClientState.setOnlineState(e);\n  }\n}\n\n/**\n * Rejects the listen for the given targetID. This can be triggered by the\n * backend for any active target.\n *\n * @param syncEngine - The sync engine implementation.\n * @param targetId - The targetID corresponds to one previously initiated by the\n * user as part of TargetData passed to listen() on RemoteStore.\n * @param err - A description of the condition that has forced the rejection.\n * Nearly always this will be an indication that the user is no longer\n * authorized to see the data matching the target.\n */\nfunction Fc(_x62, _x63, _x64) {\n  return _Fc.apply(this, arguments);\n}\nfunction _Fc() {\n  _Fc = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t);\n    // PORTING NOTE: Multi-tab only.\n    s.sharedClientState.updateQueryState(e, \"rejected\", n);\n    const i = s.hc.get(e),\n      r = i && i.key;\n    if (r) {\n      // TODO(klimt): We really only should do the following on permission\n      // denied errors, but we don't have the cause code here.\n      // It's a limbo doc. Create a synthetic event saying it was deleted.\n      // This is kind of a hack. Ideally, we would have a method in the local\n      // store to purge a document. However, it would be tricky to keep all of\n      // the local store's invariants with another method.\n      let t = new We(ct.comparator);\n      // TODO(b/217189216): This limbo document should ideally have a read time,\n      // so that it is picked up by any read-time based scans. The backend,\n      // however, does not send a read time for target removals.\n      t = t.insert(r, sn.newNoDocument(r, st.min()));\n      const n = vs().add(r),\n        i = new Ss(st.min(), /* targetChanges= */new Map(), /* targetMismatches= */new Ye(X), t, n);\n      yield Mc(s, i),\n      // Since this query failed, we won't want to manually unlisten to it.\n      // We only remove it from bookkeeping after we successfully applied the\n      // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to\n      // this query when the RemoteStore restarts the Watch stream, which should\n      // re-trigger the target failure.\n      s.ac = s.ac.remove(r), s.hc.delete(e), Wc(s);\n    } else yield Xo(s.localStore, e, /* keepPersistedTargetData */!1).then(() => Gc(s, e, n)).catch(Et);\n  });\n  return _Fc.apply(this, arguments);\n}\nfunction Bc(_x65, _x66) {\n  return _Bc.apply(this, arguments);\n}\nfunction _Bc() {\n  _Bc = _asyncToGenerator(function* (t, e) {\n    const n = F(t),\n      s = e.batch.batchId;\n    try {\n      const t = yield zo(n.localStore, e);\n      // The local store may or may not be able to apply the write result and\n      // raise events immediately (depending on whether the watcher is caught\n      // up), so we raise user callbacks first so that they consistently happen\n      // before listen events.\n      Kc(n, s, /*error=*/null), Uc(n, s), n.sharedClientState.updateMutationState(s, \"acknowledged\"), yield Hc(n, t);\n    } catch (t) {\n      yield Et(t);\n    }\n  });\n  return _Bc.apply(this, arguments);\n}\nfunction Lc(_x67, _x68, _x69) {\n  return _Lc.apply(this, arguments);\n}\n/**\n * Registers a user callback that resolves when all pending mutations at the moment of calling\n * are acknowledged .\n */\nfunction _Lc() {\n  _Lc = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t);\n    try {\n      const t = yield function (t, e) {\n        const n = F(t);\n        return n.persistence.runTransaction(\"Reject batch\", \"readwrite-primary\", t => {\n          let s;\n          return n.mutationQueue.lookupMutationBatch(t, e).next(e => (M(null !== e), s = e.keys(), n.mutationQueue.removeMutationBatch(t, e))).next(() => n.mutationQueue.performConsistencyCheck(t)).next(() => n.documentOverlayCache.removeOverlaysForBatchId(t, s, e)).next(() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(t, s)).next(() => n.localDocuments.getDocuments(t, s));\n        });\n      }\n      /**\n      * Returns the largest (latest) batch id in mutation queue that is pending\n      * server response.\n      *\n      * Returns `BATCHID_UNKNOWN` if the queue is empty.\n      */(s.localStore, e);\n      // The local store may or may not be able to apply the write result and\n      // raise events immediately (depending on whether the watcher is caught up),\n      // so we raise user callbacks first so that they consistently happen before\n      // listen events.\n      Kc(s, e, n), Uc(s, e), s.sharedClientState.updateMutationState(e, \"rejected\", n), yield Hc(s, t);\n    } catch (n) {\n      yield Et(n);\n    }\n  });\n  return _Lc.apply(this, arguments);\n}\nfunction qc(_x70, _x71) {\n  return _qc.apply(this, arguments);\n}\n/**\n * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,\n * if there are any.\n */\nfunction _qc() {\n  _qc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    Ku(n.remoteStore) || C(\"SyncEngine\", \"The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.\");\n    try {\n      const t = yield function (t) {\n        const e = F(t);\n        return e.persistence.runTransaction(\"Get highest unacknowledged batch id\", \"readonly\", t => e.mutationQueue.getHighestUnacknowledgedBatchId(t));\n      }(n.localStore);\n      if (-1 === t)\n        // Trigger the callback right away if there is no pending writes at the moment.\n        return void e.resolve();\n      const s = n.dc.get(t) || [];\n      s.push(e), n.dc.set(t, s);\n    } catch (t) {\n      const n = hc(t, \"Initialization of waitForPendingWrites() operation failed\");\n      e.reject(n);\n    }\n  });\n  return _qc.apply(this, arguments);\n}\nfunction Uc(t, e) {\n  (t.dc.get(e) || []).forEach(t => {\n    t.resolve();\n  }), t.dc.delete(e);\n}\n\n/** Reject all outstanding callbacks waiting for pending writes to complete. */\nfunction Kc(t, e, n) {\n  const s = F(t);\n  let i = s.fc[s.currentUser.toKey()];\n  // NOTE: Mutations restored from persistence won't have callbacks, so it's\n  // okay for there to be no callback for this ID.\n  if (i) {\n    const t = i.get(e);\n    t && (n ? t.reject(n) : t.resolve(), i = i.remove(e)), s.fc[s.currentUser.toKey()] = i;\n  }\n}\nfunction Gc(t, e, n = null) {\n  t.sharedClientState.removeLocalQueryTarget(e);\n  for (const s of t.uc.get(e)) t.oc.delete(s), n && t.rc.gc(s, n);\n  if (t.uc.delete(e), t.isPrimaryClient) {\n    t.lc.ds(e).forEach(e => {\n      t.lc.containsKey(e) ||\n      // We removed the last reference for this key\n      Qc(t, e);\n    });\n  }\n}\nfunction Qc(t, e) {\n  t.cc.delete(e.path.canonicalString());\n  // It's possible that the target already got removed because the query failed. In that case,\n  // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.\n  const n = t.ac.get(e);\n  null !== n && (Fu(t.remoteStore, n), t.ac = t.ac.remove(e), t.hc.delete(n), Wc(t));\n}\nfunction jc(t, e, n) {\n  for (const s of n) if (s instanceof vc) t.lc.addReference(s.key, e), zc(t, s);else if (s instanceof bc) {\n    C(\"SyncEngine\", \"Document no longer in limbo: \" + s.key), t.lc.removeReference(s.key, e);\n    t.lc.containsKey(s.key) ||\n    // We removed the last reference for this key\n    Qc(t, s.key);\n  } else $();\n}\nfunction zc(t, e) {\n  const n = e.key,\n    s = n.path.canonicalString();\n  t.ac.get(n) || t.cc.has(s) || (C(\"SyncEngine\", \"New document in limbo: \" + n), t.cc.add(s), Wc(t));\n}\n\n/**\n * Starts listens for documents in limbo that are enqueued for resolution,\n * subject to a maximum number of concurrent resolutions.\n *\n * Without bounding the number of concurrent resolutions, the server can fail\n * with \"resource exhausted\" errors which can lead to pathological client\n * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.\n */\nfunction Wc(t) {\n  for (; t.cc.size > 0 && t.ac.size < t.maxConcurrentLimboResolutions;) {\n    const e = t.cc.values().next().value;\n    t.cc.delete(e);\n    const n = new ct(rt.fromString(e)),\n      s = t._c.next();\n    t.hc.set(s, new Dc(n)), t.ac = t.ac.insert(n, s), Ou(t.remoteStore, new Zi(Tn(wn(n.path)), s, 2 /* TargetPurpose.LimboResolution */, $t.at));\n  }\n}\nfunction Hc(_x72, _x73, _x74) {\n  return _Hc.apply(this, arguments);\n}\nfunction _Hc() {\n  _Hc = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t),\n      i = [],\n      r = [],\n      o = [];\n    s.oc.isEmpty() || (s.oc.forEach((t, u) => {\n      o.push(s.mc(u, e, n).then(t => {\n        // Update views if there are actual changes.\n        if (\n        // If there are changes, or we are handling a global snapshot, notify\n        // secondary clients to update query state.\n        (t || n) && s.isPrimaryClient && s.sharedClientState.updateQueryState(u.targetId, (null == t ? void 0 : t.fromCache) ? \"not-current\" : \"current\"), t) {\n          i.push(t);\n          const e = Uo.Ni(u.targetId, t);\n          r.push(e);\n        }\n      }));\n    }), yield Promise.all(o), s.rc.Ho(i), yield function () {\n      var _ref48 = _asyncToGenerator(function* (t, e) {\n        const n = F(t);\n        try {\n          yield n.persistence.runTransaction(\"notifyLocalViewChanges\", \"readwrite\", t => At.forEach(e, e => At.forEach(e.Ci, s => n.persistence.referenceDelegate.addReference(t, e.targetId, s)).next(() => At.forEach(e.xi, s => n.persistence.referenceDelegate.removeReference(t, e.targetId, s)))));\n        } catch (t) {\n          if (!Vt(t)) throw t;\n          // If `notifyLocalViewChanges` fails, we did not advance the sequence\n          // number for the documents that were included in this transaction.\n          // This might trigger them to be deleted earlier than they otherwise\n          // would have, but it should not invalidate the integrity of the data.\n          C(\"LocalStore\", \"Failed to update sequence numbers: \" + t);\n        }\n        for (const t of e) {\n          const e = t.targetId;\n          if (!t.fromCache) {\n            const t = n.Ki.get(e),\n              s = t.snapshotVersion,\n              i = t.withLastLimboFreeSnapshotVersion(s);\n            // Advance the last limbo free snapshot version\n            n.Ki = n.Ki.insert(e, i);\n          }\n        }\n      });\n      return function (_x132, _x133) {\n        return _ref48.apply(this, arguments);\n      };\n    }()(s.localStore, r));\n  });\n  return _Hc.apply(this, arguments);\n}\nfunction Jc(_x75, _x76) {\n  return _Jc.apply(this, arguments);\n}\nfunction _Jc() {\n  _Jc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    if (!n.currentUser.isEqual(e)) {\n      C(\"SyncEngine\", \"User change. New user:\", e.toKey());\n      const t = yield jo(n.localStore, e);\n      n.currentUser = e,\n      // Fails tasks waiting for pending writes requested by previous user.\n      function (t, e) {\n        t.dc.forEach(t => {\n          t.forEach(t => {\n            t.reject(new L(B.CANCELLED, e));\n          });\n        }), t.dc.clear();\n      }(n, \"'waitForPendingWrites' promise is rejected due to a user change.\"),\n      // TODO(b/114226417): Consider calling this only in the primary tab.\n      n.sharedClientState.handleUserChange(e, t.removedBatchIds, t.addedBatchIds), yield Hc(n, t.Wi);\n    }\n  });\n  return _Jc.apply(this, arguments);\n}\nfunction Yc(t, e) {\n  const n = F(t),\n    s = n.hc.get(e);\n  if (s && s.ic) return vs().add(s.key);\n  {\n    let t = vs();\n    const s = n.uc.get(e);\n    if (!s) return t;\n    for (const e of s) {\n      const s = n.oc.get(e);\n      t = t.unionWith(s.view.Wu);\n    }\n    return t;\n  }\n}\n\n/**\n * Reconcile the list of synced documents in an existing view with those\n * from persistence.\n */\nfunction Zc(_x77, _x78) {\n  return _Zc.apply(this, arguments);\n}\n/**\n * Retrieves newly changed documents from remote document cache and raises\n * snapshots if needed.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction _Zc() {\n  _Zc = _asyncToGenerator(function* (t, e) {\n    const n = F(t),\n      s = yield tu(n.localStore, e.query, /* usePreviousResults= */!0),\n      i = e.view.nc(s);\n    return n.isPrimaryClient && jc(n, e.targetId, i.tc), i;\n  });\n  return _Zc.apply(this, arguments);\n}\nfunction Xc(_x79, _x80) {\n  return _Xc.apply(this, arguments);\n}\n/** Applies a mutation state to an existing batch.  */\n// PORTING NOTE: Multi-Tab only.\nfunction _Xc() {\n  _Xc = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    return nu(n.localStore, e).then(t => Hc(n, t));\n  });\n  return _Xc.apply(this, arguments);\n}\nfunction ta(_x81, _x82, _x83, _x84) {\n  return _ta.apply(this, arguments);\n}\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nfunction _ta() {\n  _ta = _asyncToGenerator(function* (t, e, n, s) {\n    const i = F(t),\n      r = yield function (t, e) {\n        const n = F(t),\n          s = F(n.mutationQueue);\n        return n.persistence.runTransaction(\"Lookup mutation documents\", \"readonly\", t => s.An(t, e).next(e => e ? n.localDocuments.getDocuments(t, e) : At.resolve(null)));\n      }\n      // PORTING NOTE: Multi-Tab only.\n      (i.localStore, e);\n    null !== r ? (\"pending\" === n ? // If we are the primary client, we need to send this write to the\n    // backend. Secondary clients will ignore these writes since their remote\n    // connection is disabled.\n    yield Ju(i.remoteStore) : \"acknowledged\" === n || \"rejected\" === n ? (\n    // NOTE: Both these methods are no-ops for batches that originated from\n    // other clients.\n    Kc(i, e, s || null), Uc(i, e), function (t, e) {\n      F(F(t).mutationQueue).Pn(e);\n    }\n    // PORTING NOTE: Multi-Tab only.\n    (i.localStore, e)) : $(), yield Hc(i, r)) :\n    // A throttled tab may not have seen the mutation before it was completed\n    // and removed from the mutation queue, in which case we won't have cached\n    // the affected documents. In this case we can safely ignore the update\n    // since that means we didn't apply the mutation locally at all (if we\n    // had, we would have cached the affected documents), and so we will just\n    // see any resulting document changes via normal remote document updates\n    // as applicable.\n    C(\"SyncEngine\", \"Cannot apply mutation batch with id: \" + e);\n  });\n  return _ta.apply(this, arguments);\n}\nfunction ea(_x85, _x86) {\n  return _ea.apply(this, arguments);\n}\nfunction _ea() {\n  _ea = _asyncToGenerator(function* (t, e) {\n    const n = F(t);\n    if (ua(n), ca(n), !0 === e && !0 !== n.wc) {\n      // Secondary tabs only maintain Views for their local listeners and the\n      // Views internal state may not be 100% populated (in particular\n      // secondary tabs don't track syncedDocuments, the set of documents the\n      // server considers to be in the target). So when a secondary becomes\n      // primary, we need to need to make sure that all views for all targets\n      // match the state on disk.\n      const t = n.sharedClientState.getAllActiveQueryTargets(),\n        e = yield na(n, t.toArray());\n      n.wc = !0, yield oc(n.remoteStore, !0);\n      for (const t of e) Ou(n.remoteStore, t);\n    } else if (!1 === e && !1 !== n.wc) {\n      const t = [];\n      let e = Promise.resolve();\n      n.uc.forEach((s, i) => {\n        n.sharedClientState.isLocalQueryTarget(i) ? t.push(i) : e = e.then(() => (Gc(n, i), Xo(n.localStore, i, /*keepPersistedTargetData=*/!0))), Fu(n.remoteStore, i);\n      }), yield e, yield na(n, t),\n      // PORTING NOTE: Multi-Tab only.\n      function (t) {\n        const e = F(t);\n        e.hc.forEach((t, n) => {\n          Fu(e.remoteStore, n);\n        }), e.lc._s(), e.hc = new Map(), e.ac = new We(ct.comparator);\n      }\n      /**\n      * Reconcile the query views of the provided query targets with the state from\n      * persistence. Raises snapshots for any changes that affect the local\n      * client and returns the updated state of all target's query data.\n      *\n      * @param syncEngine - The sync engine implementation\n      * @param targets - the list of targets with views that need to be recomputed\n      * @param transitionToPrimary - `true` iff the tab transitions from a secondary\n      * tab to a primary tab\n      */\n      // PORTING NOTE: Multi-Tab only.\n      (n), n.wc = !1, yield oc(n.remoteStore, !1);\n    }\n  });\n  return _ea.apply(this, arguments);\n}\nfunction na(_x87, _x88, _x89) {\n  return _na.apply(this, arguments);\n}\n/**\n * Creates a `Query` object from the specified `Target`. There is no way to\n * obtain the original `Query`, so we synthesize a `Query` from the `Target`\n * object.\n *\n * The synthesized result might be different from the original `Query`, but\n * since the synthesized `Query` should return the same results as the\n * original one (only the presentation of results might differ), the potential\n * difference will not cause issues.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction _na() {\n  _na = _asyncToGenerator(function* (t, e, n) {\n    const s = F(t),\n      i = [],\n      r = [];\n    for (const t of e) {\n      let e;\n      const n = s.uc.get(t);\n      if (n && 0 !== n.length) {\n        // For queries that have a local View, we fetch their current state\n        // from LocalStore (as the resume token and the snapshot version\n        // might have changed) and reconcile their views with the persisted\n        // state (the list of syncedDocuments may have gotten out of sync).\n        e = yield Zo(s.localStore, Tn(n[0]));\n        for (const t of n) {\n          const e = s.oc.get(t),\n            n = yield Zc(s, e);\n          n.snapshot && r.push(n.snapshot);\n        }\n      } else {\n        // For queries that never executed on this client, we need to\n        // allocate the target in LocalStore and initialize a new View.\n        const n = yield eu(s.localStore, t);\n        e = yield Zo(s.localStore, n), yield Nc(s, sa(n), t, /*current=*/!1, e.resumeToken);\n      }\n      i.push(e);\n    }\n    return s.rc.Ho(r), i;\n  });\n  return _na.apply(this, arguments);\n}\nfunction sa(t) {\n  return _n(t.path, t.collectionGroup, t.orderBy, t.filters, t.limit, \"F\" /* LimitType.First */, t.startAt, t.endAt);\n}\n\n/** Returns the IDs of the clients that are currently active. */\n// PORTING NOTE: Multi-Tab only.\nfunction ia(t) {\n  const e = F(t);\n  return F(F(e.localStore).persistence).Si();\n}\n\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nfunction ra(_x90, _x91, _x92, _x93) {\n  return _ra.apply(this, arguments);\n}\n/** Adds or removes Watch targets for queries from different tabs. */\nfunction _ra() {\n  _ra = _asyncToGenerator(function* (t, e, n, s) {\n    const i = F(t);\n    if (i.wc)\n      // If we receive a target state notification via WebStorage, we are\n      // either already secondary or another tab has taken the primary lease.\n      return void C(\"SyncEngine\", \"Ignoring unexpected query state notification.\");\n    const r = i.uc.get(e);\n    if (r && r.length > 0) switch (n) {\n      case \"current\":\n      case \"not-current\":\n        {\n          const t = yield nu(i.localStore, Vn(r[0])),\n            s = Ss.createSynthesizedRemoteEventForCurrentChange(e, \"current\" === n, Ht.EMPTY_BYTE_STRING);\n          yield Hc(i, t, s);\n          break;\n        }\n      case \"rejected\":\n        yield Xo(i.localStore, e, /* keepPersistedTargetData */!0), Gc(i, e, s);\n        break;\n      default:\n        $();\n    }\n  });\n  return _ra.apply(this, arguments);\n}\nfunction oa(_x94, _x95, _x96) {\n  return _oa.apply(this, arguments);\n}\nfunction _oa() {\n  _oa = _asyncToGenerator(function* (t, e, n) {\n    const s = ua(t);\n    if (s.wc) {\n      for (const t of e) {\n        if (s.uc.has(t)) {\n          // A target might have been added in a previous attempt\n          C(\"SyncEngine\", \"Adding an already active target \" + t);\n          continue;\n        }\n        const e = yield eu(s.localStore, t),\n          n = yield Zo(s.localStore, e);\n        yield Nc(s, sa(e), n.targetId, /*current=*/!1, n.resumeToken), Ou(s.remoteStore, n);\n      }\n      for (const t of n)\n      // Check that the target is still active since the target might have been\n      // removed if it has been rejected by the backend.\n      s.uc.has(t) && ( // Release queries that are still active.\n      yield Xo(s.localStore, t, /* keepPersistedTargetData */!1).then(() => {\n        Fu(s.remoteStore, t), Gc(s, t);\n      }).catch(Et));\n    }\n  });\n  return _oa.apply(this, arguments);\n}\nfunction ua(t) {\n  const e = F(t);\n  return e.remoteStore.remoteSyncer.applyRemoteEvent = Mc.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = Yc.bind(null, e), e.remoteStore.remoteSyncer.rejectListen = Fc.bind(null, e), e.rc.Ho = yc.bind(null, e.eventManager), e.rc.gc = pc.bind(null, e.eventManager), e;\n}\nfunction ca(t) {\n  const e = F(t);\n  return e.remoteStore.remoteSyncer.applySuccessfulWrite = Bc.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = Lc.bind(null, e), e;\n}\n\n/**\n * Loads a Firestore bundle into the SDK. The returned promise resolves when\n * the bundle finished loading.\n *\n * @param syncEngine - SyncEngine to use.\n * @param bundleReader - Bundle to load into the SDK.\n * @param task - LoadBundleTask used to update the loading progress to public API.\n */\nfunction aa(t, e, n) {\n  const s = F(t);\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  /** Loads a bundle and returns the list of affected collection groups. */(function () {\n    var _ref13 = _asyncToGenerator(function* (t, e, n) {\n      try {\n        const s = yield e.getMetadata();\n        if (yield function (t, e) {\n          const n = F(t),\n            s = Qs(e.createTime);\n          return n.persistence.runTransaction(\"hasNewerBundle\", \"readonly\", t => n.$s.getBundleMetadata(t, e.id)).then(t => !!t && t.createTime.compareTo(s) >= 0);\n        }\n        /**\n        * Saves the given `BundleMetadata` to local persistence.\n        */(t.localStore, s)) return yield e.close(), n._completeWith(function (t) {\n          return {\n            taskState: \"Success\",\n            documentsLoaded: t.totalDocuments,\n            bytesLoaded: t.totalBytes,\n            totalDocuments: t.totalDocuments,\n            totalBytes: t.totalBytes\n          };\n        }(s)), Promise.resolve(new Set());\n        n._updateProgress(Pc(s));\n        const i = new Rc(s, t.localStore, e.Tt);\n        let r = yield e.yc();\n        for (; r;) {\n          const t = yield i.Bu(r);\n          t && n._updateProgress(t), r = yield e.yc();\n        }\n        const o = yield i.complete();\n        return yield Hc(t, o.Uu, /* remoteEvent */void 0), // Save metadata, so loading the same bundle will skip.\n        yield function (t, e) {\n          const n = F(t);\n          return n.persistence.runTransaction(\"Save bundle\", \"readwrite\", t => n.$s.saveBundleMetadata(t, e));\n        }\n        /**\n        * Returns a promise of a `NamedQuery` associated with given query name. Promise\n        * resolves to undefined if no persisted data can be found.\n        */(t.localStore, s), n._completeWith(o.progress), Promise.resolve(o.qu);\n      } catch (t) {\n        return N(\"SyncEngine\", `Loading bundle failed with ${t}`), n._failWith(t), Promise.resolve(new Set());\n      }\n    });\n    return function (_x97, _x98, _x99) {\n      return _ref13.apply(this, arguments);\n    };\n  })()\n  /**\n  * @license\n  * Copyright 2020 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */\n  /**\n  * Provides all components needed for Firestore with in-memory persistence.\n  * Uses EagerGC garbage collection.\n  */\n  (s, e, n).then(t => {\n    s.sharedClientState.notifyBundleLoaded(t);\n  });\n}\nclass ha {\n  constructor() {\n    this.synchronizeTabs = !1;\n  }\n  initialize(t) {\n    var _this20 = this;\n    return _asyncToGenerator(function* () {\n      _this20.Tt = vu(t.databaseInfo.databaseId), _this20.sharedClientState = _this20.Ic(t), _this20.persistence = _this20.Tc(t), yield _this20.persistence.start(), _this20.localStore = _this20.Ec(t), _this20.gcScheduler = _this20.Ac(t, _this20.localStore), _this20.indexBackfillerScheduler = _this20.Rc(t, _this20.localStore);\n    })();\n  }\n  Ac(t, e) {\n    return null;\n  }\n  Rc(t, e) {\n    return null;\n  }\n  Ec(t) {\n    return Qo(this.persistence, new Ko(), t.initialUser, this.Tt);\n  }\n  Tc(t) {\n    return new xo(ko.qs, this.Tt);\n  }\n  Ic(t) {\n    return new wu();\n  }\n  terminate() {\n    var _this21 = this;\n    return _asyncToGenerator(function* () {\n      _this21.gcScheduler && _this21.gcScheduler.stop(), yield _this21.sharedClientState.shutdown(), yield _this21.persistence.shutdown();\n    })();\n  }\n}\n\n/**\n * Provides all components needed for Firestore with IndexedDB persistence.\n */\nclass la extends ha {\n  constructor(t, e, n) {\n    super(), this.Pc = t, this.cacheSizeBytes = e, this.forceOwnership = n, this.synchronizeTabs = !1;\n  }\n  initialize(t) {\n    var _superprop_getInitialize = () => super.initialize,\n      _this22 = this;\n    return _asyncToGenerator(function* () {\n      yield _superprop_getInitialize().call(_this22, t), yield _this22.Pc.initialize(_this22, t), // Enqueue writes from a previous session\n      yield ca(_this22.Pc.syncEngine), yield Ju(_this22.Pc.remoteStore), // NOTE: This will immediately call the listener, so we make sure to\n      // set it after localStore / remoteStore are started.\n      yield _this22.persistence.di(() => (_this22.gcScheduler && !_this22.gcScheduler.started && _this22.gcScheduler.start(), _this22.indexBackfillerScheduler && !_this22.indexBackfillerScheduler.started && _this22.indexBackfillerScheduler.start(), Promise.resolve()));\n    })();\n  }\n  Ec(t) {\n    return Qo(this.persistence, new Ko(), t.initialUser, this.Tt);\n  }\n  Ac(t, e) {\n    const n = this.persistence.referenceDelegate.garbageCollector;\n    return new co(n, t.asyncQueue, e);\n  }\n  Rc(t, e) {\n    const n = new kt(e, this.persistence);\n    return new Nt(t.asyncQueue, n);\n  }\n  Tc(t) {\n    const e = qo(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey),\n      n = void 0 !== this.cacheSizeBytes ? zr.withCacheSize(this.cacheSizeBytes) : zr.DEFAULT;\n    return new Fo(this.synchronizeTabs, e, t.clientId, n, t.asyncQueue, Ru(), Pu(), this.Tt, this.sharedClientState, !!this.forceOwnership);\n  }\n  Ic(t) {\n    return new wu();\n  }\n}\n\n/**\n * Provides all components needed for Firestore with multi-tab IndexedDB\n * persistence.\n *\n * In the legacy client, this provider is used to provide both multi-tab and\n * non-multi-tab persistence since we cannot tell at build time whether\n * `synchronizeTabs` will be enabled.\n */\nclass fa extends la {\n  constructor(t, e) {\n    super(t, e, /* forceOwnership= */!1), this.Pc = t, this.cacheSizeBytes = e, this.synchronizeTabs = !0;\n  }\n  initialize(t) {\n    var _superprop_getInitialize2 = () => super.initialize,\n      _this23 = this;\n    return _asyncToGenerator(function* () {\n      yield _superprop_getInitialize2().call(_this23, t);\n      const e = _this23.Pc.syncEngine;\n      _this23.sharedClientState instanceof _u && (_this23.sharedClientState.syncEngine = {\n        Br: ta.bind(null, e),\n        Lr: ra.bind(null, e),\n        qr: oa.bind(null, e),\n        Si: ia.bind(null, e),\n        Fr: Xc.bind(null, e)\n      }, yield _this23.sharedClientState.start()), // NOTE: This will immediately call the listener, so we make sure to\n      // set it after localStore / remoteStore are started.\n      yield _this23.persistence.di( /*#__PURE__*/function () {\n        var _ref14 = _asyncToGenerator(function* (t) {\n          yield ea(_this23.Pc.syncEngine, t), _this23.gcScheduler && (t && !_this23.gcScheduler.started ? _this23.gcScheduler.start() : t || _this23.gcScheduler.stop()), _this23.indexBackfillerScheduler && (t && !_this23.indexBackfillerScheduler.started ? _this23.indexBackfillerScheduler.start() : t || _this23.indexBackfillerScheduler.stop());\n        });\n        return function (_x100) {\n          return _ref14.apply(this, arguments);\n        };\n      }());\n    })();\n  }\n  Ic(t) {\n    const e = Ru();\n    if (!_u.C(e)) throw new L(B.UNIMPLEMENTED, \"IndexedDB persistence is only available on platforms that support LocalStorage.\");\n    const n = qo(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey);\n    return new _u(e, t.asyncQueue, n, t.clientId, t.initialUser);\n  }\n}\n\n/**\n * Initializes and wires the components that are needed to interface with the\n * network.\n */\nclass da {\n  initialize(t, e) {\n    var _this24 = this;\n    return _asyncToGenerator(function* () {\n      _this24.localStore || (_this24.localStore = t.localStore, _this24.sharedClientState = t.sharedClientState, _this24.datastore = _this24.createDatastore(e), _this24.remoteStore = _this24.createRemoteStore(e), _this24.eventManager = _this24.createEventManager(e), _this24.syncEngine = _this24.createSyncEngine(e, /* startAsPrimary=*/!t.synchronizeTabs), _this24.sharedClientState.onlineStateHandler = t => Oc(_this24.syncEngine, t, 1 /* OnlineStateSource.SharedClientState */), _this24.remoteStore.remoteSyncer.handleCredentialChange = Jc.bind(null, _this24.syncEngine), yield oc(_this24.remoteStore, _this24.syncEngine.isPrimaryClient));\n    })();\n  }\n  createEventManager(t) {\n    return new wc();\n  }\n  createDatastore(t) {\n    const e = vu(t.databaseInfo.databaseId),\n      n = (s = t.databaseInfo, new Au(s));\n    var s;\n    /** Return the Platform-specific connectivity monitor. */\n    return function (t, e, n, s) {\n      return new Cu(t, e, n, s);\n    }(t.authCredentials, t.appCheckCredentials, n, e);\n  }\n  createRemoteStore(t) {\n    return e = this.localStore, n = this.datastore, s = t.asyncQueue, i = t => Oc(this.syncEngine, t, 0 /* OnlineStateSource.RemoteStore */), r = gu.C() ? new gu() : new mu(), new ku(e, n, s, i, r);\n    var e, n, s, i, r;\n    /** Re-enables the network. Idempotent. */\n  }\n  createSyncEngine(t, e) {\n    return function (t, e, n,\n    // PORTING NOTE: Manages state synchronization in multi-tab environments.\n    s, i, r, o) {\n      const u = new Cc(t, e, n, s, i, r);\n      return o && (u.wc = !0), u;\n    }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t.initialUser, t.maxConcurrentLimboResolutions, e);\n  }\n  terminate() {\n    return function () {\n      var _ref15 = _asyncToGenerator(function* (t) {\n        const e = F(t);\n        C(\"RemoteStore\", \"RemoteStore shutting down.\"), e.mu.add(5 /* OfflineCause.Shutdown */), yield Mu(e), e.yu.shutdown(),\n        // Set the OnlineState to Unknown (rather than Offline) to avoid potentially\n        // triggering spurious listener events with cached data, etc.\n        e.pu.set(\"Unknown\" /* OnlineState.Unknown */);\n      });\n      return function (_x101) {\n        return _ref15.apply(this, arguments);\n      };\n    }()(this.remoteStore);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * How many bytes to read each time when `ReadableStreamReader.read()` is\n * called. Only applicable for byte streams that we control (e.g. those backed\n * by an UInt8Array).\n */\n/**\n * Builds a `ByteStreamReader` from a UInt8Array.\n * @param source - The data source to use.\n * @param bytesPerRead - How many bytes each `read()` from the returned reader\n *        will read.\n */\nfunction _a(t, e = 10240) {\n  let n = 0;\n  // The TypeScript definition for ReadableStreamReader changed. We use\n  // `any` here to allow this code to compile with different versions.\n  // See https://github.com/microsoft/TypeScript/issues/42970\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  return {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    read() {\n      return _asyncToGenerator(function* () {\n        if (n < t.byteLength) {\n          const s = {\n            value: t.slice(n, n + e),\n            done: !1\n          };\n          return n += e, s;\n        }\n        return {\n          done: !0\n        };\n      })();\n    },\n    cancel() {\n      return _asyncToGenerator(function* () {})();\n    },\n    releaseLock() {},\n    closed: Promise.resolve()\n  };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * On web, a `ReadableStream` is wrapped around by a `ByteStreamReader`.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * A wrapper implementation of Observer<T> that will dispatch events\n * asynchronously. To allow immediate silencing, a mute call is added which\n * causes events scheduled to no longer be raised.\n */\nclass wa {\n  constructor(t) {\n    this.observer = t,\n    /**\n     * When set to true, will not raise future events. Necessary to deal with\n     * async detachment of listener.\n     */\n    this.muted = !1;\n  }\n  next(t) {\n    this.observer.next && this.vc(this.observer.next, t);\n  }\n  error(t) {\n    this.observer.error ? this.vc(this.observer.error, t) : x(\"Uncaught Error in snapshot listener:\", t.toString());\n  }\n  bc() {\n    this.muted = !0;\n  }\n  vc(t, e) {\n    this.muted || setTimeout(() => {\n      this.muted || t(e);\n    }, 0);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A class representing a bundle.\n *\n * Takes a bundle stream or buffer, and presents abstractions to read bundled\n * elements out of the underlying content.\n */\nclass ma {\n  constructor( /** The reader to read from underlying binary bundle data source. */\n  t, e) {\n    this.Vc = t, this.Tt = e, /** Cached bundle metadata. */\n    this.metadata = new q(),\n    /**\n     * Internal buffer to hold bundle content, accumulating incomplete element\n     * content.\n     */\n    this.buffer = new Uint8Array(), this.Sc = new TextDecoder(\"utf-8\"),\n    // Read the metadata (which is the first element).\n    this.Dc().then(t => {\n      t && t.Ou() ? this.metadata.resolve(t.Mu.metadata) : this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\\n             ${JSON.stringify(null == t ? void 0 : t.Mu)}`));\n    }, t => this.metadata.reject(t));\n  }\n  close() {\n    return this.Vc.cancel();\n  }\n  getMetadata() {\n    var _this25 = this;\n    return _asyncToGenerator(function* () {\n      return _this25.metadata.promise;\n    })();\n  }\n  yc() {\n    var _this26 = this;\n    return _asyncToGenerator(function* () {\n      // Makes sure metadata is read before proceeding.\n      return yield _this26.getMetadata(), _this26.Dc();\n    })();\n  }\n  /**\n   * Reads from the head of internal buffer, and pulling more data from\n   * underlying stream if a complete element cannot be found, until an\n   * element(including the prefixed length and the JSON string) is found.\n   *\n   * Once a complete element is read, it is dropped from internal buffer.\n   *\n   * Returns either the bundled element, or null if we have reached the end of\n   * the stream.\n   */\n  Dc() {\n    var _this27 = this;\n    return _asyncToGenerator(function* () {\n      const t = yield _this27.Cc();\n      if (null === t) return null;\n      const e = _this27.Sc.decode(t),\n        n = Number(e);\n      isNaN(n) && _this27.xc(`length string (${e}) is not valid number`);\n      const s = yield _this27.Nc(n);\n      return new Ec(JSON.parse(s), t.length + n);\n    })();\n  }\n  /** First index of '{' from the underlying buffer. */\n  kc() {\n    return this.buffer.findIndex(t => t === \"{\".charCodeAt(0));\n  }\n  /**\n   * Reads from the beginning of the internal buffer, until the first '{', and\n   * return the content.\n   *\n   * If reached end of the stream, returns a null.\n   */\n  Cc() {\n    var _this28 = this;\n    return _asyncToGenerator(function* () {\n      for (; _this28.kc() < 0;) {\n        if (yield _this28.$c()) break;\n      }\n      // Broke out of the loop because underlying stream is closed, and there\n      // happens to be no more data to process.\n      if (0 === _this28.buffer.length) return null;\n      const t = _this28.kc();\n      // Broke out of the loop because underlying stream is closed, but still\n      // cannot find an open bracket.\n      t < 0 && _this28.xc(\"Reached the end of bundle when a length string is expected.\");\n      const e = _this28.buffer.slice(0, t);\n      // Update the internal buffer to drop the read length.\n      return _this28.buffer = _this28.buffer.slice(t), e;\n    })();\n  }\n  /**\n   * Reads from a specified position from the internal buffer, for a specified\n   * number of bytes, pulling more data from the underlying stream if needed.\n   *\n   * Returns a string decoded from the read bytes.\n   */\n  Nc(t) {\n    var _this29 = this;\n    return _asyncToGenerator(function* () {\n      for (; _this29.buffer.length < t;) {\n        (yield _this29.$c()) && _this29.xc(\"Reached the end of bundle when more is expected.\");\n      }\n      const e = _this29.Sc.decode(_this29.buffer.slice(0, t));\n      // Update the internal buffer to drop the read json string.\n      return _this29.buffer = _this29.buffer.slice(t), e;\n    })();\n  }\n  xc(t) {\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    throw this.Vc.cancel(), new Error(`Invalid bundle format: ${t}`);\n  }\n  /**\n   * Pulls more data from underlying stream to internal buffer.\n   * Returns a boolean indicating whether the stream is finished.\n   */\n  $c() {\n    var _this30 = this;\n    return _asyncToGenerator(function* () {\n      const t = yield _this30.Vc.read();\n      if (!t.done) {\n        const e = new Uint8Array(_this30.buffer.length + t.value.length);\n        e.set(_this30.buffer), e.set(t.value, _this30.buffer.length), _this30.buffer = e;\n      }\n      return t.done;\n    })();\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Internal transaction object responsible for accumulating the mutations to\n * perform and the base versions for any documents read.\n */\nclass ga {\n  constructor(t) {\n    this.datastore = t,\n    // The version of each document that was read during this transaction.\n    this.readVersions = new Map(), this.mutations = [], this.committed = !1,\n    /**\n     * A deferred usage error that occurred previously in this transaction that\n     * will cause the transaction to fail once it actually commits.\n     */\n    this.lastWriteError = null,\n    /**\n     * Set of documents that have been written in the transaction.\n     *\n     * When there's more than one write to the same key in a transaction, any\n     * writes after the first are handled differently.\n     */\n    this.writtenDocs = new Set();\n  }\n  lookup(t) {\n    var _this31 = this;\n    return _asyncToGenerator(function* () {\n      if (_this31.ensureCommitNotCalled(), _this31.mutations.length > 0) throw new L(B.INVALID_ARGUMENT, \"Firestore transactions require all reads to be executed before all writes.\");\n      const e = yield function () {\n        var _ref16 = _asyncToGenerator(function* (t, e) {\n          const n = F(t),\n            s = Zs(n.Tt) + \"/documents\",\n            i = {\n              documents: e.map(t => Ws(n.Tt, t))\n            },\n            r = yield n.mo(\"BatchGetDocuments\", s, i, e.length),\n            o = new Map();\n          r.forEach(t => {\n            const e = ni(n.Tt, t);\n            o.set(e.key.toString(), e);\n          });\n          const u = [];\n          return e.forEach(t => {\n            const e = o.get(t.toString());\n            M(!!e), u.push(e);\n          }), u;\n        });\n        return function (_x102, _x103) {\n          return _ref16.apply(this, arguments);\n        };\n      }()(_this31.datastore, t);\n      return e.forEach(t => _this31.recordVersion(t)), e;\n    })();\n  }\n  set(t, e) {\n    this.write(e.toMutation(t, this.precondition(t))), this.writtenDocs.add(t.toString());\n  }\n  update(t, e) {\n    try {\n      this.write(e.toMutation(t, this.preconditionForUpdate(t)));\n    } catch (t) {\n      this.lastWriteError = t;\n    }\n    this.writtenDocs.add(t.toString());\n  }\n  delete(t) {\n    this.write(new cs(t, this.precondition(t))), this.writtenDocs.add(t.toString());\n  }\n  commit() {\n    var _this32 = this;\n    return _asyncToGenerator(function* () {\n      if (_this32.ensureCommitNotCalled(), _this32.lastWriteError) throw _this32.lastWriteError;\n      const t = _this32.readVersions;\n      // For each mutation, note that the doc was written.\n      _this32.mutations.forEach(e => {\n        t.delete(e.key.toString());\n      }),\n      // For each document that was read but not written to, we want to perform\n      // a `verify` operation.\n      t.forEach((t, e) => {\n        const n = ct.fromPath(e);\n        _this32.mutations.push(new as(n, _this32.precondition(n)));\n      }), yield function () {\n        var _ref17 = _asyncToGenerator(function* (t, e) {\n          const n = F(t),\n            s = Zs(n.Tt) + \"/documents\",\n            i = {\n              writes: e.map(t => ii(n.Tt, t))\n            };\n          yield n.lo(\"Commit\", s, i);\n        });\n        return function (_x104, _x105) {\n          return _ref17.apply(this, arguments);\n        };\n      }()(_this32.datastore, _this32.mutations), _this32.committed = !0;\n    })();\n  }\n  recordVersion(t) {\n    let e;\n    if (t.isFoundDocument()) e = t.version;else {\n      if (!t.isNoDocument()) throw $();\n      // Represent a deleted doc using SnapshotVersion.min().\n      e = st.min();\n    }\n    const n = this.readVersions.get(t.key.toString());\n    if (n) {\n      if (!e.isEqual(n))\n        // This transaction will fail no matter what.\n        throw new L(B.ABORTED, \"Document version changed between two reads.\");\n    } else this.readVersions.set(t.key.toString(), e);\n  }\n  /**\n   * Returns the version of this document when it was read in this transaction,\n   * as a precondition, or no precondition if it was not read.\n   */\n  precondition(t) {\n    const e = this.readVersions.get(t.toString());\n    return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(st.min()) ? Hn.exists(!1) : Hn.updateTime(e) : Hn.none();\n  }\n  /**\n   * Returns the precondition for a document if the operation is an update.\n   */\n  preconditionForUpdate(t) {\n    const e = this.readVersions.get(t.toString());\n    // The first time a document is written, we want to take into account the\n    // read time and existence\n    if (!this.writtenDocs.has(t.toString()) && e) {\n      if (e.isEqual(st.min()))\n        // The document doesn't exist, so fail the transaction.\n        // This has to be validated locally because you can't send a\n        // precondition that a document does not exist without changing the\n        // semantics of the backend write to be an insert. This is the reverse\n        // of what we want, since we want to assert that the document doesn't\n        // exist but then send the update and have it fail. Since we can't\n        // express that to the backend, we have to validate locally.\n        // Note: this can change once we can send separate verify writes in the\n        // transaction.\n        throw new L(B.INVALID_ARGUMENT, \"Can't update a document that doesn't exist.\");\n      // Document exists, base precondition on document update time.\n      return Hn.updateTime(e);\n    }\n    // Document was not read, so we just use the preconditions for a blind\n    // update.\n    return Hn.exists(!0);\n  }\n  write(t) {\n    this.ensureCommitNotCalled(), this.mutations.push(t);\n  }\n  ensureCommitNotCalled() {}\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * TransactionRunner encapsulates the logic needed to run and retry transactions\n * with backoff.\n */\nclass ya {\n  constructor(t, e, n, s, i) {\n    this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = s, this.deferred = i, this.Mc = n.maxAttempts, this.ko = new bu(this.asyncQueue, \"transaction_retry\" /* TimerId.TransactionRetry */);\n  }\n  /** Runs the transaction and sets the result on deferred. */\n  run() {\n    this.Mc -= 1, this.Oc();\n  }\n  Oc() {\n    var _this33 = this;\n    this.ko.vo( /*#__PURE__*/_asyncToGenerator(function* () {\n      const t = new ga(_this33.datastore),\n        e = _this33.Fc(t);\n      e && e.then(e => {\n        _this33.asyncQueue.enqueueAndForget(() => t.commit().then(() => {\n          _this33.deferred.resolve(e);\n        }).catch(t => {\n          _this33.Bc(t);\n        }));\n      }).catch(t => {\n        _this33.Bc(t);\n      });\n    }));\n  }\n  Fc(t) {\n    try {\n      const e = this.updateFunction(t);\n      return !Gt(e) && e.catch && e.then ? e : (this.deferred.reject(Error(\"Transaction callback must return a Promise\")), null);\n    } catch (t) {\n      // Do not retry errors thrown by user provided updateFunction.\n      return this.deferred.reject(t), null;\n    }\n  }\n  Bc(t) {\n    this.Mc > 0 && this.Lc(t) ? (this.Mc -= 1, this.asyncQueue.enqueueAndForget(() => (this.Oc(), Promise.resolve()))) : this.deferred.reject(t);\n  }\n  Lc(t) {\n    if (\"FirebaseError\" === t.name) {\n      // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and\n      // non-matching document versions with ABORTED. These errors should be retried.\n      const e = t.code;\n      return \"aborted\" === e || \"failed-precondition\" === e || \"already-exists\" === e || !ds(e);\n    }\n    return !1;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * FirestoreClient is a top-level class that constructs and owns all of the\n * pieces of the client SDK architecture. It is responsible for creating the\n * async queue that is shared by all of the other components in the system.\n */\nclass pa {\n  constructor(t, e,\n  /**\n   * Asynchronous queue responsible for all of our internal processing. When\n   * we get incoming work from the user (via public API) or the network\n   * (incoming GRPC messages), we should always schedule onto this queue.\n   * This ensures all of our work is properly serialized (e.g. we don't\n   * start processing a new operation while the previous one is waiting for\n   * an async I/O to complete).\n   */\n  n, s) {\n    var _this34 = this;\n    this.authCredentials = t, this.appCheckCredentials = e, this.asyncQueue = n, this.databaseInfo = s, this.user = v.UNAUTHENTICATED, this.clientId = Z.R(), this.authCredentialListener = () => Promise.resolve(), this.appCheckCredentialListener = () => Promise.resolve(), this.authCredentials.start(n, /*#__PURE__*/function () {\n      var _ref19 = _asyncToGenerator(function* (t) {\n        C(\"FirestoreClient\", \"Received user=\", t.uid), yield _this34.authCredentialListener(t), _this34.user = t;\n      });\n      return function (_x106) {\n        return _ref19.apply(this, arguments);\n      };\n    }()), this.appCheckCredentials.start(n, t => (C(\"FirestoreClient\", \"Received new app check token=\", t), this.appCheckCredentialListener(t, this.user)));\n  }\n  getConfiguration() {\n    var _this35 = this;\n    return _asyncToGenerator(function* () {\n      return {\n        asyncQueue: _this35.asyncQueue,\n        databaseInfo: _this35.databaseInfo,\n        clientId: _this35.clientId,\n        authCredentials: _this35.authCredentials,\n        appCheckCredentials: _this35.appCheckCredentials,\n        initialUser: _this35.user,\n        maxConcurrentLimboResolutions: 100\n      };\n    })();\n  }\n  setCredentialChangeListener(t) {\n    this.authCredentialListener = t;\n  }\n  setAppCheckTokenChangeListener(t) {\n    this.appCheckCredentialListener = t;\n  }\n  /**\n   * Checks that the client has not been terminated. Ensures that other methods on\n   * this class cannot be called after the client is terminated.\n   */\n  verifyNotTerminated() {\n    if (this.asyncQueue.isShuttingDown) throw new L(B.FAILED_PRECONDITION, \"The client has already been terminated.\");\n  }\n  terminate() {\n    var _this36 = this;\n    this.asyncQueue.enterRestrictedMode();\n    const t = new q();\n    return this.asyncQueue.enqueueAndForgetEvenWhileRestricted( /*#__PURE__*/_asyncToGenerator(function* () {\n      try {\n        _this36.onlineComponents && (yield _this36.onlineComponents.terminate()), _this36.offlineComponents && (yield _this36.offlineComponents.terminate()),\n        // The credentials provider must be terminated after shutting down the\n        // RemoteStore as it will prevent the RemoteStore from retrieving auth\n        // tokens.\n        _this36.authCredentials.shutdown(), _this36.appCheckCredentials.shutdown(), t.resolve();\n      } catch (e) {\n        const n = hc(e, \"Failed to shutdown persistence\");\n        t.reject(n);\n      }\n    })), t.promise;\n  }\n}\nfunction Ia(_x107, _x108) {\n  return _Ia.apply(this, arguments);\n}\nfunction _Ia() {\n  _Ia = _asyncToGenerator(function* (t, e) {\n    t.asyncQueue.verifyOperationInProgress(), C(\"FirestoreClient\", \"Initializing OfflineComponentProvider\");\n    const n = yield t.getConfiguration();\n    yield e.initialize(n);\n    let s = n.initialUser;\n    t.setCredentialChangeListener( /*#__PURE__*/function () {\n      var _ref49 = _asyncToGenerator(function* (t) {\n        s.isEqual(t) || (yield jo(e.localStore, t), s = t);\n      });\n      return function (_x134) {\n        return _ref49.apply(this, arguments);\n      };\n    }()),\n    // When a user calls clearPersistence() in one client, all other clients\n    // need to be terminated to allow the delete to succeed.\n    e.persistence.setDatabaseDeletedListener(() => t.terminate()), t.offlineComponents = e;\n  });\n  return _Ia.apply(this, arguments);\n}\nfunction Ta(_x109, _x110) {\n  return _Ta.apply(this, arguments);\n}\nfunction _Ta() {\n  _Ta = _asyncToGenerator(function* (t, e) {\n    t.asyncQueue.verifyOperationInProgress();\n    const n = yield Ea(t);\n    C(\"FirestoreClient\", \"Initializing OnlineComponentProvider\");\n    const s = yield t.getConfiguration();\n    yield e.initialize(n, s),\n    // The CredentialChangeListener of the online component provider takes\n    // precedence over the offline component provider.\n    t.setCredentialChangeListener(t => rc(e.remoteStore, t)), t.setAppCheckTokenChangeListener((t, n) => rc(e.remoteStore, n)), t.onlineComponents = e;\n  });\n  return _Ta.apply(this, arguments);\n}\nfunction Ea(_x111) {\n  return _Ea.apply(this, arguments);\n}\nfunction _Ea() {\n  _Ea = _asyncToGenerator(function* (t) {\n    return t.offlineComponents || (C(\"FirestoreClient\", \"Using default OfflineComponentProvider\"), yield Ia(t, new ha())), t.offlineComponents;\n  });\n  return _Ea.apply(this, arguments);\n}\nfunction Aa(_x112) {\n  return _Aa.apply(this, arguments);\n}\nfunction _Aa() {\n  _Aa = _asyncToGenerator(function* (t) {\n    return t.onlineComponents || (C(\"FirestoreClient\", \"Using default OnlineComponentProvider\"), yield Ta(t, new da())), t.onlineComponents;\n  });\n  return _Aa.apply(this, arguments);\n}\nfunction Ra(t) {\n  return Ea(t).then(t => t.persistence);\n}\nfunction Pa(t) {\n  return Ea(t).then(t => t.localStore);\n}\nfunction va(t) {\n  return Aa(t).then(t => t.remoteStore);\n}\nfunction ba(t) {\n  return Aa(t).then(t => t.syncEngine);\n}\nfunction Va(t) {\n  return Aa(t).then(t => t.datastore);\n}\nfunction Sa(_x113) {\n  return _Sa.apply(this, arguments);\n}\n/** Enables the network connection and re-enqueues all pending operations. */\nfunction _Sa() {\n  _Sa = _asyncToGenerator(function* (t) {\n    const e = yield Aa(t),\n      n = e.eventManager;\n    return n.onListen = xc.bind(null, e.syncEngine), n.onUnlisten = kc.bind(null, e.syncEngine), n;\n  });\n  return _Sa.apply(this, arguments);\n}\nfunction Da(t) {\n  return t.asyncQueue.enqueue( /*#__PURE__*/_asyncToGenerator(function* () {\n    const e = yield Ra(t),\n      n = yield va(t);\n    return e.setNetworkEnabled(!0), function (t) {\n      const e = F(t);\n      return e.mu.delete(0 /* OfflineCause.UserDisabled */), $u(e);\n    }(n);\n  }));\n}\n\n/** Disables the network connection. Pending operations will not complete. */\nfunction Ca(t) {\n  return t.asyncQueue.enqueue( /*#__PURE__*/_asyncToGenerator(function* () {\n    const e = yield Ra(t),\n      n = yield va(t);\n    return e.setNetworkEnabled(!1), function () {\n      var _ref23 = _asyncToGenerator(function* (t) {\n        const e = F(t);\n        e.mu.add(0 /* OfflineCause.UserDisabled */), yield Mu(e),\n        // Set the OnlineState to Offline so get()s return from cache, etc.\n        e.pu.set(\"Offline\" /* OnlineState.Offline */);\n      });\n      return function (_x114) {\n        return _ref23.apply(this, arguments);\n      };\n    }()(n);\n  }));\n}\n\n/**\n * Returns a Promise that resolves when all writes that were pending at the time\n * this method was called received server acknowledgement. An acknowledgement\n * can be either acceptance or rejection.\n */\nfunction xa(t, e) {\n  const n = new q();\n  return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function () {\n      var _ref25 = _asyncToGenerator(function* (t, e, n) {\n        try {\n          const s = yield function (t, e) {\n            const n = F(t);\n            return n.persistence.runTransaction(\"read document\", \"readonly\", t => n.localDocuments.getDocument(t, e));\n          }(t, e);\n          s.isFoundDocument() ? n.resolve(s) : s.isNoDocument() ? n.resolve(null) : n.reject(new L(B.UNAVAILABLE, \"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)\"));\n        } catch (t) {\n          const s = hc(t, `Failed to get document '${e} from cache`);\n          n.reject(s);\n        }\n      });\n      return function (_x115, _x116, _x117) {\n        return _ref25.apply(this, arguments);\n      };\n    }()\n    /**\n    * Retrieves a latency-compensated document from the backend via a\n    * SnapshotListener.\n    */\n    (yield Pa(t), e, n);\n  })), n.promise;\n}\nfunction Na(t, e, n = {}) {\n  const s = new q();\n  return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function (t, e, n, s, i) {\n      const r = new wa({\n          next: r => {\n            // Remove query first before passing event to user to avoid\n            // user actions affecting the now stale query.\n            e.enqueueAndForget(() => gc(t, o));\n            const u = r.docs.has(n);\n            !u && r.fromCache ?\n            // TODO(dimond): If we're online and the document doesn't\n            // exist then we resolve with a doc.exists set to false. If\n            // we're offline however, we reject the Promise in this\n            // case. Two options: 1) Cache the negative response from\n            // the server so we can deliver that even when you're\n            // offline 2) Actually reject the Promise in the online case\n            // if the document doesn't exist.\n            i.reject(new L(B.UNAVAILABLE, \"Failed to get document because the client is offline.\")) : u && r.fromCache && s && \"server\" === s.source ? i.reject(new L(B.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)')) : i.resolve(r);\n          },\n          error: t => i.reject(t)\n        }),\n        o = new Tc(wn(n.path), r, {\n          includeMetadataChanges: !0,\n          $u: !0\n        });\n      return mc(t, o);\n    }(yield Sa(t), t.asyncQueue, e, n, s);\n  })), s.promise;\n}\nfunction ka(t, e) {\n  const n = new q();\n  return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function () {\n      var _ref28 = _asyncToGenerator(function* (t, e, n) {\n        try {\n          const s = yield tu(t, e, /* usePreviousResults= */!0),\n            i = new Vc(e, s.Yi),\n            r = i.Hu(s.documents),\n            o = i.applyChanges(r, /* updateLimboDocuments= */!1);\n          n.resolve(o.snapshot);\n        } catch (t) {\n          const s = hc(t, `Failed to execute query '${e} against cache`);\n          n.reject(s);\n        }\n      });\n      return function (_x118, _x119, _x120) {\n        return _ref28.apply(this, arguments);\n      };\n    }()\n    /**\n    * Retrieves a latency-compensated query snapshot from the backend via a\n    * SnapshotListener.\n    */\n    (yield Pa(t), e, n);\n  })), n.promise;\n}\nfunction $a(t, e, n = {}) {\n  const s = new q();\n  return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function (t, e, n, s, i) {\n      const r = new wa({\n          next: n => {\n            // Remove query first before passing event to user to avoid\n            // user actions affecting the now stale query.\n            e.enqueueAndForget(() => gc(t, o)), n.fromCache && \"server\" === s.source ? i.reject(new L(B.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to \"server\" to retrieve the cached documents.)')) : i.resolve(n);\n          },\n          error: t => i.reject(t)\n        }),\n        o = new Tc(n, r, {\n          includeMetadataChanges: !0,\n          $u: !0\n        });\n      return mc(t, o);\n    }(yield Sa(t), t.asyncQueue, e, n, s);\n  })), s.promise;\n}\nfunction Ma(t, e) {\n  const n = new wa(e);\n  return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function (t, e) {\n      F(t).vu.add(e),\n      // Immediately fire an initial event, indicating all existing listeners\n      // are in-sync.\n      e.next();\n    }(yield Sa(t), n);\n  })), () => {\n    n.bc(), t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      return function (t, e) {\n        F(t).vu.delete(e);\n      }(yield Sa(t), n);\n    }));\n  };\n}\n\n/**\n * Takes an updateFunction in which a set of reads and writes can be performed\n * atomically. In the updateFunction, the client can read and write values\n * using the supplied transaction object. After the updateFunction, all\n * changes will be committed. If a retryable error occurs (ex: some other\n * client has changed any of the data referenced), then the updateFunction\n * will be called again after a backoff. If the updateFunction still fails\n * after all retries, then the transaction will be rejected.\n *\n * The transaction object passed to the updateFunction contains methods for\n * accessing documents and collections. Unlike other datastore access, data\n * accessed with the transaction will not reflect local changes that have not\n * been committed. For this reason, it is required that all reads are\n * performed before any writes. Transactions must be performed while online.\n */\nfunction Oa(t, e, n, s) {\n  const i = function (t, e) {\n    let n;\n    n = \"string\" == typeof t ? new TextEncoder().encode(t) : t;\n    return function (t, e) {\n      return new ma(t, e);\n    }(function (t, e) {\n      if (t instanceof Uint8Array) return _a(t, e);\n      if (t instanceof ArrayBuffer) return _a(new Uint8Array(t), e);\n      if (t instanceof ReadableStream) return t.getReader();\n      throw new Error(\"Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream\");\n    }\n    /**\n    * @license\n    * Copyright 2023 Google LLC\n    *\n    * Licensed under the Apache License, Version 2.0 (the \"License\");\n    * you may not use this file except in compliance with the License.\n    * You may obtain a copy of the License at\n    *\n    *   http://www.apache.org/licenses/LICENSE-2.0\n    *\n    * Unless required by applicable law or agreed to in writing, software\n    * distributed under the License is distributed on an \"AS IS\" BASIS,\n    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    * See the License for the specific language governing permissions and\n    * limitations under the License.\n    */\n    /**\n    * An instance of the Platform's 'TextEncoder' implementation.\n    */(n), e);\n  }\n  /**\n  * @license\n  * Copyright 2020 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */(n, vu(e));\n  t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n    aa(yield ba(t), i, s);\n  }));\n}\nfunction Fa(t, e) {\n  return t.asyncQueue.enqueue( /*#__PURE__*/_asyncToGenerator(function* () {\n    return function (t, e) {\n      const n = F(t);\n      return n.persistence.runTransaction(\"Get named query\", \"readonly\", t => n.$s.getNamedQuery(t, e));\n    }(yield Pa(t), e);\n  }));\n}\nconst Ba = new Map();\n\n/**\n * An instance map that ensures only one Datastore exists per Firestore\n * instance.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction La(t, e, n) {\n  if (!n) throw new L(B.INVALID_ARGUMENT, `Function ${t}() cannot be called with an empty ${e}.`);\n}\n\n/**\n * Validates that two boolean options are not set at the same time.\n * @internal\n */\nfunction qa(t, e, n, s) {\n  if (!0 === e && !0 === s) throw new L(B.INVALID_ARGUMENT, `${t} and ${n} cannot be used together.`);\n}\n\n/**\n * Validates that `path` refers to a document (indicated by the fact it contains\n * an even numbers of segments).\n */\nfunction Ua(t) {\n  if (!ct.isDocumentKey(t)) throw new L(B.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`);\n}\n\n/**\n * Validates that `path` refers to a collection (indicated by the fact it\n * contains an odd numbers of segments).\n */\nfunction Ka(t) {\n  if (ct.isDocumentKey(t)) throw new L(B.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`);\n}\n\n/**\n * Returns true if it's a non-null object without a custom prototype\n * (i.e. excludes Array, Date, etc.).\n */\n/** Returns a string describing the type / value of the provided input. */\nfunction Ga(t) {\n  if (void 0 === t) return \"undefined\";\n  if (null === t) return \"null\";\n  if (\"string\" == typeof t) return t.length > 20 && (t = `${t.substring(0, 20)}...`), JSON.stringify(t);\n  if (\"number\" == typeof t || \"boolean\" == typeof t) return \"\" + t;\n  if (\"object\" == typeof t) {\n    if (t instanceof Array) return \"an array\";\n    {\n      const e = /** try to get the constructor name for an object. */\n      function (t) {\n        if (t.constructor) return t.constructor.name;\n        return null;\n      }\n      /**\n      * Casts `obj` to `T`, optionally unwrapping Compat types to expose the\n      * underlying instance. Throws if  `obj` is not an instance of `T`.\n      *\n      * This cast is used in the Lite and Full SDK to verify instance types for\n      * arguments passed to the public API.\n      * @internal\n      */(t);\n      return e ? `a custom ${e} object` : \"an object\";\n    }\n  }\n  return \"function\" == typeof t ? \"a function\" : $();\n}\nfunction Qa(t,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n  if (\"_delegate\" in t && (\n  // Unwrap Compat types\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  t = t._delegate), !(t instanceof e)) {\n    if (e.name === t.constructor.name) throw new L(B.INVALID_ARGUMENT, \"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?\");\n    {\n      const n = Ga(t);\n      throw new L(B.INVALID_ARGUMENT, `Expected type '${e.name}', but it was: ${n}`);\n    }\n  }\n  return t;\n}\nfunction ja(t, e) {\n  if (e <= 0) throw new L(B.INVALID_ARGUMENT, `Function ${t}() requires a positive number, but it was: ${e}.`);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// settings() defaults:\n/**\n * A concrete type describing all the values that can be applied via a\n * user-supplied `FirestoreSettings` object. This is a separate type so that\n * defaults can be supplied and the value can be checked for equality.\n */\nclass za {\n  constructor(t) {\n    var e;\n    if (void 0 === t.host) {\n      if (void 0 !== t.ssl) throw new L(B.INVALID_ARGUMENT, \"Can't provide ssl option if host option is not set\");\n      this.host = \"firestore.googleapis.com\", this.ssl = true;\n    } else this.host = t.host, this.ssl = null === (e = t.ssl) || void 0 === e || e;\n    if (this.credentials = t.credentials, this.ignoreUndefinedProperties = !!t.ignoreUndefinedProperties, void 0 === t.cacheSizeBytes) this.cacheSizeBytes = 41943040;else {\n      if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new L(B.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n      this.cacheSizeBytes = t.cacheSizeBytes;\n    }\n    this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling, this.useFetchStreams = !!t.useFetchStreams, qa(\"experimentalForceLongPolling\", t.experimentalForceLongPolling, \"experimentalAutoDetectLongPolling\", t.experimentalAutoDetectLongPolling);\n  }\n  isEqual(t) {\n    return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */\nclass Wa {\n  /** @hideconstructor */\n  constructor(t, e, n, s) {\n    this._authCredentials = t, this._appCheckCredentials = e, this._databaseId = n, this._app = s,\n    /**\n     * Whether it's a Firestore or Firestore Lite instance.\n     */\n    this.type = \"firestore-lite\", this._persistenceKey = \"(lite)\", this._settings = new za({}), this._settingsFrozen = !1;\n  }\n  /**\n   * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service\n   * instance.\n   */\n  get app() {\n    if (!this._app) throw new L(B.FAILED_PRECONDITION, \"Firestore was not initialized using the Firebase SDK. 'app' is not available\");\n    return this._app;\n  }\n  get _initialized() {\n    return this._settingsFrozen;\n  }\n  get _terminated() {\n    return void 0 !== this._terminateTask;\n  }\n  _setSettings(t) {\n    if (this._settingsFrozen) throw new L(B.FAILED_PRECONDITION, \"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.\");\n    this._settings = new za(t), void 0 !== t.credentials && (this._authCredentials = function (t) {\n      if (!t) return new K();\n      switch (t.type) {\n        case \"gapi\":\n          const e = t.client;\n          return new z(e, t.sessionIndex || \"0\", t.iamToken || null, t.authTokenFactory || null);\n        case \"provider\":\n          return t.client;\n        default:\n          throw new L(B.INVALID_ARGUMENT, \"makeAuthCredentialsProvider failed due to invalid credential type\");\n      }\n    }(t.credentials));\n  }\n  _getSettings() {\n    return this._settings;\n  }\n  _freezeSettings() {\n    return this._settingsFrozen = !0, this._settings;\n  }\n  _delete() {\n    return this._terminateTask || (this._terminateTask = this._terminate()), this._terminateTask;\n  }\n  /** Returns a JSON-serializable representation of this `Firestore` instance. */\n  toJSON() {\n    return {\n      app: this._app,\n      databaseId: this._databaseId,\n      settings: this._settings\n    };\n  }\n  /**\n   * Terminates all components used by this client. Subclasses can override\n   * this method to clean up their own dependencies, but must also call this\n   * method.\n   *\n   * Only ever called once.\n   */\n  _terminate() {\n    /**\n    * Removes all components associated with the provided instance. Must be called\n    * when the `Firestore` instance is terminated.\n    */\n    return function (t) {\n      const e = Ba.get(t);\n      e && (C(\"ComponentProvider\", \"Removing Datastore\"), Ba.delete(t), e.terminate());\n    }(this), Promise.resolve();\n  }\n}\n\n/**\n * Modify this instance to communicate with the Cloud Firestore emulator.\n *\n * Note: This must be called before this instance has been used to do any\n * operations.\n *\n * @param firestore - The `Firestore` instance to configure to connect to the\n * emulator.\n * @param host - the emulator host (ex: localhost).\n * @param port - the emulator port (ex: 9000).\n * @param options.mockUserToken - the mock auth token to use for unit testing\n * Security Rules.\n */\nfunction Ha(t, e, n, s = {}) {\n  var i;\n  const r = (t = Qa(t, Wa))._getSettings();\n  if (\"firestore.googleapis.com\" !== r.host && r.host !== e && N(\"Host has been set in both settings() and useEmulator(), emulator host will be used\"), t._setSettings(Object.assign(Object.assign({}, r), {\n    host: `${e}:${n}`,\n    ssl: !1\n  })), s.mockUserToken) {\n    let e, n;\n    if (\"string\" == typeof s.mockUserToken) e = s.mockUserToken, n = v.MOCK_USER;else {\n      // Let createMockUserToken validate first (catches common mistakes like\n      // invalid field \"uid\" and missing field \"sub\" / \"user_id\".)\n      e = createMockUserToken(s.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);\n      const r = s.mockUserToken.sub || s.mockUserToken.user_id;\n      if (!r) throw new L(B.INVALID_ARGUMENT, \"mockUserToken must contain 'sub' or 'user_id' field!\");\n      n = new v(r);\n    }\n    t._authCredentials = new G(new U(e, n));\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `DocumentReference` refers to a document location in a Firestore database\n * and can be used to write, read, or listen to the location. The document at\n * the referenced location may or may not exist.\n */\nclass Ja {\n  /** @hideconstructor */\n  constructor(t,\n  /**\n   * If provided, the `FirestoreDataConverter` associated with this instance.\n   */\n  e, n) {\n    this.converter = e, this._key = n, /** The type of this Firestore reference. */\n    this.type = \"document\", this.firestore = t;\n  }\n  get _path() {\n    return this._key.path;\n  }\n  /**\n   * The document's identifier within its collection.\n   */\n  get id() {\n    return this._key.path.lastSegment();\n  }\n  /**\n   * A string representing the path of the referenced document (relative\n   * to the root of the database).\n   */\n  get path() {\n    return this._key.path.canonicalString();\n  }\n  /**\n   * The collection this `DocumentReference` belongs to.\n   */\n  get parent() {\n    return new Za(this.firestore, this.converter, this._key.path.popLast());\n  }\n  withConverter(t) {\n    return new Ja(this.firestore, t, this._key);\n  }\n}\n\n/**\n * A `Query` refers to a query which you can read or listen to. You can also\n * construct refined `Query` objects by adding filters and ordering.\n */\nclass Ya {\n  // This is the lite version of the Query class in the main SDK.\n  /** @hideconstructor protected */\n  constructor(t,\n  /**\n   * If provided, the `FirestoreDataConverter` associated with this instance.\n   */\n  e, n) {\n    this.converter = e, this._query = n, /** The type of this Firestore reference. */\n    this.type = \"query\", this.firestore = t;\n  }\n  withConverter(t) {\n    return new Ya(this.firestore, t, this._query);\n  }\n}\n\n/**\n * A `CollectionReference` object can be used for adding documents, getting\n * document references, and querying for documents (using {@link (query:1)}).\n */\nclass Za extends Ya {\n  /** @hideconstructor */\n  constructor(t, e, n) {\n    super(t, e, wn(n)), this._path = n, /** The type of this Firestore reference. */\n    this.type = \"collection\";\n  }\n  /** The collection's identifier. */\n  get id() {\n    return this._query.path.lastSegment();\n  }\n  /**\n   * A string representing the path of the referenced collection (relative\n   * to the root of the database).\n   */\n  get path() {\n    return this._query.path.canonicalString();\n  }\n  /**\n   * A reference to the containing `DocumentReference` if this is a\n   * subcollection. If this isn't a subcollection, the reference is null.\n   */\n  get parent() {\n    const t = this._path.popLast();\n    return t.isEmpty() ? null : new Ja(this.firestore, /* converter= */null, new ct(t));\n  }\n  withConverter(t) {\n    return new Za(this.firestore, t, this._path);\n  }\n}\nfunction Xa(t, e, ...n) {\n  if (t = getModularInstance(t), La(\"collection\", \"path\", e), t instanceof Wa) {\n    const s = rt.fromString(e, ...n);\n    return Ka(s), new Za(t, /* converter= */null, s);\n  }\n  {\n    if (!(t instanceof Ja || t instanceof Za)) throw new L(B.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n    const s = t._path.child(rt.fromString(e, ...n));\n    return Ka(s), new Za(t.firestore, /* converter= */null, s);\n  }\n}\n\n// TODO(firestorelite): Consider using ErrorFactory -\n// https://github.com/firebase/firebase-js-sdk/blob/0131e1f/packages/util/src/errors.ts#L106\n/**\n * Creates and returns a new `Query` instance that includes all documents in the\n * database that are contained in a collection or subcollection with the\n * given `collectionId`.\n *\n * @param firestore - A reference to the root `Firestore` instance.\n * @param collectionId - Identifies the collections to query over. Every\n * collection or subcollection with this ID as the last segment of its path\n * will be included. Cannot contain a slash.\n * @returns The created `Query`.\n */\nfunction th(t, e) {\n  if (t = Qa(t, Wa), La(\"collectionGroup\", \"collection id\", e), e.indexOf(\"/\") >= 0) throw new L(B.INVALID_ARGUMENT, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);\n  return new Ya(t, /* converter= */null, function (t) {\n    return new dn(rt.emptyPath(), t);\n  }(e));\n}\nfunction eh(t, e, ...n) {\n  if (t = getModularInstance(t),\n  // We allow omission of 'pathString' but explicitly prohibit passing in both\n  // 'undefined' and 'null'.\n  1 === arguments.length && (e = Z.R()), La(\"doc\", \"path\", e), t instanceof Wa) {\n    const s = rt.fromString(e, ...n);\n    return Ua(s), new Ja(t, /* converter= */null, new ct(s));\n  }\n  {\n    if (!(t instanceof Ja || t instanceof Za)) throw new L(B.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n    const s = t._path.child(rt.fromString(e, ...n));\n    return Ua(s), new Ja(t.firestore, t instanceof Za ? t.converter : null, new ct(s));\n  }\n}\n\n/**\n * Returns true if the provided references are equal.\n *\n * @param left - A reference to compare.\n * @param right - A reference to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */\nfunction nh(t, e) {\n  return t = getModularInstance(t), e = getModularInstance(e), (t instanceof Ja || t instanceof Za) && (e instanceof Ja || e instanceof Za) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter;\n}\n\n/**\n * Returns true if the provided queries point to the same collection and apply\n * the same constraints.\n *\n * @param left - A `Query` to compare.\n * @param right - A `Query` to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */\nfunction sh(t, e) {\n  return t = getModularInstance(t), e = getModularInstance(e), t instanceof Ya && e instanceof Ya && t.firestore === e.firestore && Rn(t._query, e._query) && t.converter === e.converter;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass ih {\n  constructor() {\n    // The last promise in the queue.\n    this.qc = Promise.resolve(),\n    // A list of retryable operations. Retryable operations are run in order and\n    // retried with backoff.\n    this.Uc = [],\n    // Is this AsyncQueue being shut down? Once it is set to true, it will not\n    // be changed again.\n    this.Kc = !1,\n    // Operations scheduled to be queued in the future. Operations are\n    // automatically removed after they are run or canceled.\n    this.Gc = [],\n    // visible for testing\n    this.Qc = null,\n    // Flag set while there's an outstanding AsyncQueue operation, used for\n    // assertion sanity-checks.\n    this.jc = !1,\n    // Enabled during shutdown on Safari to prevent future access to IndexedDB.\n    this.zc = !1,\n    // List of TimerIds to fast-forward delays for.\n    this.Wc = [],\n    // Backoff timer used to schedule retries for retryable operations\n    this.ko = new bu(this, \"async_queue_retry\" /* TimerId.AsyncQueueRetry */),\n    // Visibility handler that triggers an immediate retry of all retryable\n    // operations. Meant to speed up recovery when we regain file system access\n    // after page comes into foreground.\n    this.Hc = () => {\n      const t = Pu();\n      t && C(\"AsyncQueue\", \"Visibility state changed to \" + t.visibilityState), this.ko.Vo();\n    };\n    const t = Pu();\n    t && \"function\" == typeof t.addEventListener && t.addEventListener(\"visibilitychange\", this.Hc);\n  }\n  get isShuttingDown() {\n    return this.Kc;\n  }\n  /**\n   * Adds a new operation to the queue without waiting for it to complete (i.e.\n   * we ignore the Promise result).\n   */\n  enqueueAndForget(t) {\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.enqueue(t);\n  }\n  enqueueAndForgetEvenWhileRestricted(t) {\n    this.Jc(),\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.Yc(t);\n  }\n  enterRestrictedMode(t) {\n    if (!this.Kc) {\n      this.Kc = !0, this.zc = t || !1;\n      const e = Pu();\n      e && \"function\" == typeof e.removeEventListener && e.removeEventListener(\"visibilitychange\", this.Hc);\n    }\n  }\n  enqueue(t) {\n    if (this.Jc(), this.Kc)\n      // Return a Promise which never resolves.\n      return new Promise(() => {});\n    // Create a deferred Promise that we can return to the callee. This\n    // allows us to return a \"hanging Promise\" only to the callee and still\n    // advance the queue even when the operation is not run.\n    const e = new q();\n    return this.Yc(() => this.Kc && this.zc ? Promise.resolve() : (t().then(e.resolve, e.reject), e.promise)).then(() => e.promise);\n  }\n  enqueueRetryable(t) {\n    this.enqueueAndForget(() => (this.Uc.push(t), this.Zc()));\n  }\n  /**\n   * Runs the next operation from the retryable queue. If the operation fails,\n   * reschedules with backoff.\n   */\n  Zc() {\n    var _this37 = this;\n    return _asyncToGenerator(function* () {\n      if (0 !== _this37.Uc.length) {\n        try {\n          yield _this37.Uc[0](), _this37.Uc.shift(), _this37.ko.reset();\n        } catch (t) {\n          if (!Vt(t)) throw t;\n          // Failure will be handled by AsyncQueue\n          C(\"AsyncQueue\", \"Operation failed with retryable error: \" + t);\n        }\n        _this37.Uc.length > 0 &&\n        // If there are additional operations, we re-schedule `retryNextOp()`.\n        // This is necessary to run retryable operations that failed during\n        // their initial attempt since we don't know whether they are already\n        // enqueued. If, for example, `op1`, `op2`, `op3` are enqueued and `op1`\n        // needs to  be re-run, we will run `op1`, `op1`, `op2` using the\n        // already enqueued calls to `retryNextOp()`. `op3()` will then run in the\n        // call scheduled here.\n        // Since `backoffAndRun()` cancels an existing backoff and schedules a\n        // new backoff on every call, there is only ever a single additional\n        // operation in the queue.\n        _this37.ko.vo(() => _this37.Zc());\n      }\n    })();\n  }\n  Yc(t) {\n    const e = this.qc.then(() => (this.jc = !0, t().catch(t => {\n      this.Qc = t, this.jc = !1;\n      const e =\n      /**\n      * Chrome includes Error.message in Error.stack. Other browsers do not.\n      * This returns expected output of message + stack when available.\n      * @param error - Error or FirestoreError\n      */\n      function (t) {\n        let e = t.message || \"\";\n        t.stack && (e = t.stack.includes(t.message) ? t.stack : t.message + \"\\n\" + t.stack);\n        return e;\n      }\n      /**\n      * @license\n      * Copyright 2017 Google LLC\n      *\n      * Licensed under the Apache License, Version 2.0 (the \"License\");\n      * you may not use this file except in compliance with the License.\n      * You may obtain a copy of the License at\n      *\n      *   http://www.apache.org/licenses/LICENSE-2.0\n      *\n      * Unless required by applicable law or agreed to in writing, software\n      * distributed under the License is distributed on an \"AS IS\" BASIS,\n      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      * See the License for the specific language governing permissions and\n      * limitations under the License.\n      */(t);\n      // Re-throw the error so that this.tail becomes a rejected Promise and\n      // all further attempts to chain (via .then) will just short-circuit\n      // and return the rejected Promise.\n      throw x(\"INTERNAL UNHANDLED ERROR: \", e), t;\n    }).then(t => (this.jc = !1, t))));\n    return this.qc = e, e;\n  }\n  enqueueAfterDelay(t, e, n) {\n    this.Jc(),\n    // Fast-forward delays for timerIds that have been overriden.\n    this.Wc.indexOf(t) > -1 && (e = 0);\n    const s = ac.createAndSchedule(this, t, e, n, t => this.Xc(t));\n    return this.Gc.push(s), s;\n  }\n  Jc() {\n    this.Qc && $();\n  }\n  verifyOperationInProgress() {}\n  /**\n   * Waits until all currently queued tasks are finished executing. Delayed\n   * operations are not run.\n   */\n  ta() {\n    var _this38 = this;\n    return _asyncToGenerator(function* () {\n      // Operations in the queue prior to draining may have enqueued additional\n      // operations. Keep draining the queue until the tail is no longer advanced,\n      // which indicates that no more new operations were enqueued and that all\n      // operations were executed.\n      let t;\n      do {\n        t = _this38.qc, yield t;\n      } while (t !== _this38.qc);\n    })();\n  }\n  /**\n   * For Tests: Determine if a delayed operation with a particular TimerId\n   * exists.\n   */\n  ea(t) {\n    for (const e of this.Gc) if (e.timerId === t) return !0;\n    return !1;\n  }\n  /**\n   * For Tests: Runs some or all delayed operations early.\n   *\n   * @param lastTimerId - Delayed operations up to and including this TimerId\n   * will be drained. Pass TimerId.All to run all delayed operations.\n   * @returns a Promise that resolves once all operations have been run.\n   */\n  na(t) {\n    // Note that draining may generate more delayed ops, so we do that first.\n    return this.ta().then(() => {\n      // Run ops in the same order they'd run if they ran naturally.\n      this.Gc.sort((t, e) => t.targetTimeMs - e.targetTimeMs);\n      for (const e of this.Gc) if (e.skipDelay(), \"all\" /* TimerId.All */ !== t && e.timerId === t) break;\n      return this.ta();\n    });\n  }\n  /**\n   * For Tests: Skip all subsequent delays for a timer id.\n   */\n  sa(t) {\n    this.Wc.push(t);\n  }\n  /** Called once a DelayedOperation is run or canceled. */\n  Xc(t) {\n    // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.\n    const e = this.Gc.indexOf(t);\n    this.Gc.splice(e, 1);\n  }\n}\nfunction rh(t) {\n  /**\n  * Returns true if obj is an object and contains at least one of the specified\n  * methods.\n  */\n  return function (t, e) {\n    if (\"object\" != typeof t || null === t) return !1;\n    const n = t;\n    for (const t of e) if (t in n && \"function\" == typeof n[t]) return !0;\n    return !1;\n  }\n  /**\n  * @license\n  * Copyright 2020 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */\n  /**\n  * Represents the task of loading a Firestore bundle. It provides progress of bundle\n  * loading, as well as task completion and error events.\n  *\n  * The API is compatible with `Promise<LoadBundleTaskProgress>`.\n  */(t, [\"next\", \"error\", \"complete\"]);\n}\nclass oh {\n  constructor() {\n    this._progressObserver = {}, this._taskCompletionResolver = new q(), this._lastProgress = {\n      taskState: \"Running\",\n      totalBytes: 0,\n      totalDocuments: 0,\n      bytesLoaded: 0,\n      documentsLoaded: 0\n    };\n  }\n  /**\n   * Registers functions to listen to bundle loading progress events.\n   * @param next - Called when there is a progress update from bundle loading. Typically `next` calls occur\n   *   each time a Firestore document is loaded from the bundle.\n   * @param error - Called when an error occurs during bundle loading. The task aborts after reporting the\n   *   error, and there should be no more updates after this.\n   * @param complete - Called when the loading task is complete.\n   */\n  onProgress(t, e, n) {\n    this._progressObserver = {\n      next: t,\n      error: e,\n      complete: n\n    };\n  }\n  /**\n   * Implements the `Promise<LoadBundleTaskProgress>.catch` interface.\n   *\n   * @param onRejected - Called when an error occurs during bundle loading.\n   */\n  catch(t) {\n    return this._taskCompletionResolver.promise.catch(t);\n  }\n  /**\n   * Implements the `Promise<LoadBundleTaskProgress>.then` interface.\n   *\n   * @param onFulfilled - Called on the completion of the loading task with a final `LoadBundleTaskProgress` update.\n   *   The update will always have its `taskState` set to `\"Success\"`.\n   * @param onRejected - Called when an error occurs during bundle loading.\n   */\n  then(t, e) {\n    return this._taskCompletionResolver.promise.then(t, e);\n  }\n  /**\n   * Notifies all observers that bundle loading has completed, with a provided\n   * `LoadBundleTaskProgress` object.\n   *\n   * @private\n   */\n  _completeWith(t) {\n    this._updateProgress(t), this._progressObserver.complete && this._progressObserver.complete(), this._taskCompletionResolver.resolve(t);\n  }\n  /**\n   * Notifies all observers that bundle loading has failed, with a provided\n   * `Error` as the reason.\n   *\n   * @private\n   */\n  _failWith(t) {\n    this._lastProgress.taskState = \"Error\", this._progressObserver.next && this._progressObserver.next(this._lastProgress), this._progressObserver.error && this._progressObserver.error(t), this._taskCompletionResolver.reject(t);\n  }\n  /**\n   * Notifies a progress update of loading a bundle.\n   * @param progress - The new progress.\n   *\n   * @private\n   */\n  _updateProgress(t) {\n    this._lastProgress = t, this._progressObserver.next && this._progressObserver.next(t);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** DOMException error code constants. */\nconst uh = -1;\n\n/**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */\nclass ch extends Wa {\n  /** @hideconstructor */\n  constructor(t, e, n, s) {\n    super(t, e, n, s),\n    /**\n     * Whether it's a {@link Firestore} or Firestore Lite instance.\n     */\n    this.type = \"firestore\", this._queue = new ih(), this._persistenceKey = (null == s ? void 0 : s.name) || \"[DEFAULT]\";\n  }\n  _terminate() {\n    return this._firestoreClient ||\n    // The client must be initialized to ensure that all subsequent API\n    // usage throws an exception.\n    fh(this), this._firestoreClient.terminate();\n  }\n}\n\n/**\n * Initializes a new instance of {@link Firestore} with the provided settings.\n * Can only be called before any other function, including\n * {@link (getFirestore:1)}. If the custom settings are empty, this function is\n * equivalent to calling {@link (getFirestore:1)}.\n *\n * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will\n * be associated.\n * @param settings - A settings object to configure the {@link Firestore} instance.\n * @param databaseId - The name of database.\n * @returns A newly initialized {@link Firestore} instance.\n */\nfunction ah(t, e, n) {\n  n || (n = \"(default)\");\n  const s = _getProvider(t, \"firestore\");\n  if (s.isInitialized(n)) {\n    const t = s.getImmediate({\n        identifier: n\n      }),\n      i = s.getOptions(n);\n    if (deepEqual(i, e)) return t;\n    throw new L(B.FAILED_PRECONDITION, \"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.\");\n  }\n  if (void 0 !== e.cacheSizeBytes && -1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new L(B.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n  return s.initialize({\n    options: e,\n    instanceIdentifier: n\n  });\n}\nfunction hh(e, n) {\n  const s = \"object\" == typeof e ? e : getApp(),\n    i = \"string\" == typeof e ? e : n || \"(default)\",\n    r = _getProvider(s, \"firestore\").getImmediate({\n      identifier: i\n    });\n  if (!r._initialized) {\n    const t = getDefaultEmulatorHostnameAndPort(\"firestore\");\n    t && Ha(r, ...t);\n  }\n  return r;\n}\n\n/**\n * @internal\n */\nfunction lh(t) {\n  return t._firestoreClient || fh(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;\n}\nfunction fh(t) {\n  var e;\n  const n = t._freezeSettings(),\n    s = function (t, e, n, s) {\n      return new Bt(t, e, n, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams);\n    }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || \"\", t._persistenceKey, n);\n  t._firestoreClient = new pa(t._authCredentials, t._appCheckCredentials, t._queue, s);\n}\n\n/**\n * Attempts to enable persistent storage, if possible.\n *\n * Must be called before any other functions (other than\n * {@link initializeFirestore}, {@link (getFirestore:1)} or\n * {@link clearIndexedDbPersistence}.\n *\n * If this fails, `enableIndexedDbPersistence()` will reject the promise it\n * returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n *   * failed-precondition: The app is already open in another browser tab.\n *   * unimplemented: The browser is incompatible with the offline\n *     persistence implementation.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @param persistenceSettings - Optional settings object to configure\n * persistence.\n * @returns A `Promise` that represents successfully enabling persistent storage.\n */\nfunction dh(t, e) {\n  Ah(t = Qa(t, ch));\n  const n = lh(t),\n    s = t._freezeSettings(),\n    i = new da();\n  return wh(n, i, new la(i, s.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));\n}\n\n/**\n * Attempts to enable multi-tab persistent storage, if possible. If enabled\n * across all tabs, all operations share access to local persistence, including\n * shared execution of queries and latency-compensated local document updates\n * across all connected instances.\n *\n * If this fails, `enableMultiTabIndexedDbPersistence()` will reject the promise\n * it returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n *   * failed-precondition: The app is already open in another browser tab and\n *     multi-tab is not enabled.\n *   * unimplemented: The browser is incompatible with the offline\n *     persistence implementation.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @returns A `Promise` that represents successfully enabling persistent\n * storage.\n */\nfunction _h(t) {\n  Ah(t = Qa(t, ch));\n  const e = lh(t),\n    n = t._freezeSettings(),\n    s = new da();\n  return wh(e, s, new fa(s, n.cacheSizeBytes));\n}\n\n/**\n * Registers both the `OfflineComponentProvider` and `OnlineComponentProvider`.\n * If the operation fails with a recoverable error (see\n * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected\n * but the client remains usable.\n */\nfunction wh(t, e, n) {\n  const s = new q();\n  return t.asyncQueue.enqueue( /*#__PURE__*/_asyncToGenerator(function* () {\n    try {\n      yield Ia(t, n), yield Ta(t, e), s.resolve();\n    } catch (t) {\n      const e = t;\n      if (!\n      /**\n      * Decides whether the provided error allows us to gracefully disable\n      * persistence (as opposed to crashing the client).\n      */\n      function (t) {\n        if (\"FirebaseError\" === t.name) return t.code === B.FAILED_PRECONDITION || t.code === B.UNIMPLEMENTED;\n        if (\"undefined\" != typeof DOMException && t instanceof DOMException)\n          // There are a few known circumstances where we can open IndexedDb but\n          // trying to read/write will fail (e.g. quota exceeded). For\n          // well-understood cases, we attempt to detect these and then gracefully\n          // fall back to memory persistence.\n          // NOTE: Rather than continue to add to this list, we could decide to\n          // always fall back, with the risk that we might accidentally hide errors\n          // representing actual SDK bugs.\n          // When the browser is out of quota we could get either quota exceeded\n          // or an aborted error depending on whether the error happened during\n          // schema migration.\n          return 22 === t.code || 20 === t.code ||\n          // Firefox Private Browsing mode disables IndexedDb and returns\n          // INVALID_STATE for any usage.\n          11 === t.code;\n        return !0;\n      }\n      /**\n      * Clears the persistent storage. This includes pending writes and cached\n      * documents.\n      *\n      * Must be called while the {@link Firestore} instance is not started (after the app is\n      * terminated or when the app is first initialized). On startup, this function\n      * must be called before other functions (other than {@link\n      * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}\n      * instance is still running, the promise will be rejected with the error code\n      * of `failed-precondition`.\n      *\n      * Note: `clearIndexedDbPersistence()` is primarily intended to help write\n      * reliable tests that use Cloud Firestore. It uses an efficient mechanism for\n      * dropping existing data but does not attempt to securely overwrite or\n      * otherwise make cached data unrecoverable. For applications that are sensitive\n      * to the disclosure of cached data in between user sessions, we strongly\n      * recommend not enabling persistence at all.\n      *\n      * @param firestore - The {@link Firestore} instance to clear persistence for.\n      * @returns A `Promise` that is resolved when the persistent storage is\n      * cleared. Otherwise, the promise is rejected with an error.\n      */(e)) throw e;\n      N(\"Error enabling offline persistence. Falling back to persistence disabled: \" + e), s.reject(e);\n    }\n  })).then(() => s.promise);\n}\nfunction mh(t) {\n  if (t._initialized && !t._terminated) throw new L(B.FAILED_PRECONDITION, \"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.\");\n  const e = new q();\n  return t._queue.enqueueAndForgetEvenWhileRestricted( /*#__PURE__*/_asyncToGenerator(function* () {\n    try {\n      yield function () {\n        var _ref36 = _asyncToGenerator(function* (t) {\n          if (!Pt.C()) return Promise.resolve();\n          const e = t + \"main\";\n          yield Pt.delete(e);\n        });\n        return function (_x121) {\n          return _ref36.apply(this, arguments);\n        };\n      }()\n      /**\n      * @license\n      * Copyright 2017 Google LLC\n      *\n      * Licensed under the Apache License, Version 2.0 (the \"License\");\n      * you may not use this file except in compliance with the License.\n      * You may obtain a copy of the License at\n      *\n      *   http://www.apache.org/licenses/LICENSE-2.0\n      *\n      * Unless required by applicable law or agreed to in writing, software\n      * distributed under the License is distributed on an \"AS IS\" BASIS,\n      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      * See the License for the specific language governing permissions and\n      * limitations under the License.\n      */\n      /**\n      * Compares two array for equality using comparator. The method computes the\n      * intersection and invokes `onAdd` for every element that is in `after` but not\n      * `before`. `onRemove` is invoked for every element in `before` but missing\n      * from `after`.\n      *\n      * The method creates a copy of both `before` and `after` and runs in O(n log\n      * n), where n is the size of the two lists.\n      *\n      * @param before - The elements that exist in the original array.\n      * @param after - The elements to diff against the original array.\n      * @param comparator - The comparator for the elements in before and after.\n      * @param onAdd - A function to invoke for every element that is part of `\n      * after` but not `before`.\n      * @param onRemove - A function to invoke for every element that is part of\n      * `before` but not `after`.\n      */\n      (qo(t._databaseId, t._persistenceKey)), e.resolve();\n    } catch (t) {\n      e.reject(t);\n    }\n  })), e.promise;\n}\n\n/**\n * Waits until all currently pending writes for the active user have been\n * acknowledged by the backend.\n *\n * The returned promise resolves immediately if there are no outstanding writes.\n * Otherwise, the promise waits for all previously issued writes (including\n * those written in a previous app session), but it does not wait for writes\n * that were added after the function is called. If you want to wait for\n * additional writes, call `waitForPendingWrites()` again.\n *\n * Any outstanding `waitForPendingWrites()` promises are rejected during user\n * changes.\n *\n * @returns A `Promise` which resolves when all currently pending writes have been\n * acknowledged by the backend.\n */\nfunction gh(t) {\n  return function (t) {\n    const e = new q();\n    return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      return qc(yield ba(t), e);\n    })), e.promise;\n  }(lh(t = Qa(t, ch)));\n}\n\n/**\n * Re-enables use of the network for this {@link Firestore} instance after a prior\n * call to {@link disableNetwork}.\n *\n * @returns A `Promise` that is resolved once the network has been enabled.\n */\nfunction yh(t) {\n  return Da(lh(t = Qa(t, ch)));\n}\n\n/**\n * Disables network usage for this instance. It can be re-enabled via {@link\n * enableNetwork}. While the network is disabled, any snapshot listeners,\n * `getDoc()` or `getDocs()` calls will return results from cache, and any write\n * operations will be queued until the network is restored.\n *\n * @returns A `Promise` that is resolved once the network has been disabled.\n */\nfunction ph(t) {\n  return Ca(lh(t = Qa(t, ch)));\n}\n\n/**\n * Terminates the provided {@link Firestore} instance.\n *\n * After calling `terminate()` only the `clearIndexedDbPersistence()` function\n * may be used. Any other function will throw a `FirestoreError`.\n *\n * To restart after termination, create a new instance of FirebaseFirestore with\n * {@link (getFirestore:1)}.\n *\n * Termination does not cancel any pending writes, and any promises that are\n * awaiting a response from the server will not be resolved. If you have\n * persistence enabled, the next time you start this instance, it will resume\n * sending these writes to the server.\n *\n * Note: Under normal circumstances, calling `terminate()` is not required. This\n * function is useful only when you want to force this instance to release all\n * of its resources or in combination with `clearIndexedDbPersistence()` to\n * ensure that all local state is destroyed between test runs.\n *\n * @returns A `Promise` that is resolved when the instance has been successfully\n * terminated.\n */\nfunction Ih(t) {\n  return _removeServiceInstance(t.app, \"firestore\", t._databaseId.database), t._delete();\n}\n\n/**\n * Loads a Firestore bundle into the local cache.\n *\n * @param firestore - The {@link Firestore} instance to load bundles for.\n * @param bundleData - An object representing the bundle to be loaded. Valid\n * objects are `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.\n *\n * @returns A `LoadBundleTask` object, which notifies callers with progress\n * updates, and completion or error events. It can be used as a\n * `Promise<LoadBundleTaskProgress>`.\n */\nfunction Th(t, e) {\n  const n = lh(t = Qa(t, ch)),\n    s = new oh();\n  return Oa(n, t._databaseId, e, s), s;\n}\n\n/**\n * Reads a Firestore {@link Query} from local cache, identified by the given\n * name.\n *\n * The named queries are packaged  into bundles on the server side (along\n * with resulting documents), and loaded to local cache using `loadBundle`. Once\n * in local cache, use this method to extract a {@link Query} by name.\n *\n * @param firestore - The {@link Firestore} instance to read the query from.\n * @param name - The name of the query.\n * @returns A `Promise` that is resolved with the Query or `null`.\n */\nfunction Eh(t, e) {\n  return Fa(lh(t = Qa(t, ch)), e).then(e => e ? new Ya(t, null, e.query) : null);\n}\nfunction Ah(t) {\n  if (t._initialized || t._terminated) throw new L(B.FAILED_PRECONDITION, \"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an aggregation that can be performed by Firestore.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nclass Rh {\n  /**\n   * Create a new AggregateField<T>\n   * @param _aggregateType Specifies the type of aggregation operation to perform.\n   * @param _internalFieldPath Optionally specifies the field that is aggregated.\n   * @internal\n   */\n  constructor(\n  // TODO (sum/avg) make aggregateType public when the feature is supported\n  t = \"count\", e) {\n    this._aggregateType = t, this._internalFieldPath = e, /** A type string to uniquely identify instances of this class. */\n    this.type = \"AggregateField\";\n  }\n}\n\n/**\n * The results of executing an aggregation query.\n */\nclass Ph {\n  /** @hideconstructor */\n  constructor(t, e, n) {\n    this._userDataWriter = e, this._data = n, /** A type string to uniquely identify instances of this class. */\n    this.type = \"AggregateQuerySnapshot\", this.query = t;\n  }\n  /**\n   * Returns the results of the aggregations performed over the underlying\n   * query.\n   *\n   * The keys of the returned object will be the same as those of the\n   * `AggregateSpec` object specified to the aggregation method, and the values\n   * will be the corresponding aggregation result.\n   *\n   * @returns The results of the aggregations performed over the underlying\n   * query.\n   */\n  data() {\n    return this._userDataWriter.convertValue(this._data.value);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing an array of bytes.\n */\nclass vh {\n  /** @hideconstructor */\n  constructor(t) {\n    this._byteString = t;\n  }\n  /**\n   * Creates a new `Bytes` object from the given Base64 string, converting it to\n   * bytes.\n   *\n   * @param base64 - The Base64 string used to create the `Bytes` object.\n   */\n  static fromBase64String(t) {\n    try {\n      return new vh(Ht.fromBase64String(t));\n    } catch (t) {\n      throw new L(B.INVALID_ARGUMENT, \"Failed to construct data from Base64 string: \" + t);\n    }\n  }\n  /**\n   * Creates a new `Bytes` object from the given Uint8Array.\n   *\n   * @param array - The Uint8Array used to create the `Bytes` object.\n   */\n  static fromUint8Array(t) {\n    return new vh(Ht.fromUint8Array(t));\n  }\n  /**\n   * Returns the underlying bytes as a Base64-encoded string.\n   *\n   * @returns The Base64-encoded string created from the `Bytes` object.\n   */\n  toBase64() {\n    return this._byteString.toBase64();\n  }\n  /**\n   * Returns the underlying bytes in a new `Uint8Array`.\n   *\n   * @returns The Uint8Array created from the `Bytes` object.\n   */\n  toUint8Array() {\n    return this._byteString.toUint8Array();\n  }\n  /**\n   * Returns a string representation of the `Bytes` object.\n   *\n   * @returns A string representation of the `Bytes` object.\n   */\n  toString() {\n    return \"Bytes(base64: \" + this.toBase64() + \")\";\n  }\n  /**\n   * Returns true if this `Bytes` object is equal to the provided one.\n   *\n   * @param other - The `Bytes` object to compare against.\n   * @returns true if this `Bytes` object is equal to the provided one.\n   */\n  isEqual(t) {\n    return this._byteString.isEqual(t._byteString);\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a\n * list of field names (referring to a nested field in the document).\n *\n * Create a `FieldPath` by providing field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n */\nclass bh {\n  /**\n   * Creates a `FieldPath` from the provided field names. If more than one field\n   * name is provided, the path will point to a nested field in a document.\n   *\n   * @param fieldNames - A list of field names.\n   */\n  constructor(...t) {\n    for (let e = 0; e < t.length; ++e) if (0 === t[e].length) throw new L(B.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). Field names must not be empty.\");\n    this._internalPath = new ut(t);\n  }\n  /**\n   * Returns true if this `FieldPath` is equal to the provided one.\n   *\n   * @param other - The `FieldPath` to compare against.\n   * @returns true if this `FieldPath` is equal to the provided one.\n   */\n  isEqual(t) {\n    return this._internalPath.isEqual(t._internalPath);\n  }\n}\n\n/**\n * Returns a special sentinel `FieldPath` to refer to the ID of a document.\n * It can be used in queries to sort or filter by the document ID.\n */\nfunction Vh() {\n  return new bh(\"__name__\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Sentinel values that can be used when writing document fields with `set()`\n * or `update()`.\n */\nclass Sh {\n  /**\n   * @param _methodName - The public API endpoint that returns this class.\n   * @hideconstructor\n   */\n  constructor(t) {\n    this._methodName = t;\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing a geographic location in Firestore. The\n * location is represented as latitude/longitude pair.\n *\n * Latitude values are in the range of [-90, 90].\n * Longitude values are in the range of [-180, 180].\n */\nclass Dh {\n  /**\n   * Creates a new immutable `GeoPoint` object with the provided latitude and\n   * longitude values.\n   * @param latitude - The latitude as number between -90 and 90.\n   * @param longitude - The longitude as number between -180 and 180.\n   */\n  constructor(t, e) {\n    if (!isFinite(t) || t < -90 || t > 90) throw new L(B.INVALID_ARGUMENT, \"Latitude must be a number between -90 and 90, but was: \" + t);\n    if (!isFinite(e) || e < -180 || e > 180) throw new L(B.INVALID_ARGUMENT, \"Longitude must be a number between -180 and 180, but was: \" + e);\n    this._lat = t, this._long = e;\n  }\n  /**\n   * The latitude of this `GeoPoint` instance.\n   */\n  get latitude() {\n    return this._lat;\n  }\n  /**\n   * The longitude of this `GeoPoint` instance.\n   */\n  get longitude() {\n    return this._long;\n  }\n  /**\n   * Returns true if this `GeoPoint` is equal to the provided one.\n   *\n   * @param other - The `GeoPoint` to compare against.\n   * @returns true if this `GeoPoint` is equal to the provided one.\n   */\n  isEqual(t) {\n    return this._lat === t._lat && this._long === t._long;\n  }\n  /** Returns a JSON-serializable representation of this GeoPoint. */\n  toJSON() {\n    return {\n      latitude: this._lat,\n      longitude: this._long\n    };\n  }\n  /**\n   * Actually private to JS consumers of our API, so this function is prefixed\n   * with an underscore.\n   */\n  _compareTo(t) {\n    return X(this._lat, t._lat) || X(this._long, t._long);\n  }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Ch = /^__.*__$/;\n\n/** The result of parsing document data (e.g. for a setData call). */\nclass xh {\n  constructor(t, e, n) {\n    this.data = t, this.fieldMask = e, this.fieldTransforms = n;\n  }\n  toMutation(t, e) {\n    return null !== this.fieldMask ? new is(t, this.data, this.fieldMask, e, this.fieldTransforms) : new ss(t, this.data, e, this.fieldTransforms);\n  }\n}\n\n/** The result of parsing \"update\" data (i.e. for an updateData call). */\nclass Nh {\n  constructor(t,\n  // The fieldMask does not include document transforms.\n  e, n) {\n    this.data = t, this.fieldMask = e, this.fieldTransforms = n;\n  }\n  toMutation(t, e) {\n    return new is(t, this.data, this.fieldMask, e, this.fieldTransforms);\n  }\n}\nfunction kh(t) {\n  switch (t) {\n    case 0 /* UserDataSource.Set */:\n    // fall through\n    case 2 /* UserDataSource.MergeSet */:\n    // fall through\n    case 1 /* UserDataSource.Update */:\n      return !0;\n    case 3 /* UserDataSource.Argument */:\n    case 4 /* UserDataSource.ArrayArgument */:\n      return !1;\n    default:\n      throw $();\n  }\n}\n\n/** A \"context\" object passed around while parsing user data. */\nclass $h {\n  /**\n   * Initializes a ParseContext with the given source and path.\n   *\n   * @param settings - The settings for the parser.\n   * @param databaseId - The database ID of the Firestore instance.\n   * @param serializer - The serializer to use to generate the Value proto.\n   * @param ignoreUndefinedProperties - Whether to ignore undefined properties\n   * rather than throw.\n   * @param fieldTransforms - A mutable list of field transforms encountered\n   * while parsing the data.\n   * @param fieldMask - A mutable list of field paths encountered while parsing\n   * the data.\n   *\n   * TODO(b/34871131): We don't support array paths right now, so path can be\n   * null to indicate the context represents any location within an array (in\n   * which case certain features will not work and errors will be somewhat\n   * compromised).\n   */\n  constructor(t, e, n, s, i, r) {\n    this.settings = t, this.databaseId = e, this.Tt = n, this.ignoreUndefinedProperties = s,\n    // Minor hack: If fieldTransforms is undefined, we assume this is an\n    // external call and we need to validate the entire path.\n    void 0 === i && this.ia(), this.fieldTransforms = i || [], this.fieldMask = r || [];\n  }\n  get path() {\n    return this.settings.path;\n  }\n  get ra() {\n    return this.settings.ra;\n  }\n  /** Returns a new context with the specified settings overwritten. */\n  oa(t) {\n    return new $h(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.Tt, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);\n  }\n  ua(t) {\n    var e;\n    const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t),\n      s = this.oa({\n        path: n,\n        ca: !1\n      });\n    return s.aa(t), s;\n  }\n  ha(t) {\n    var e;\n    const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t),\n      s = this.oa({\n        path: n,\n        ca: !1\n      });\n    return s.ia(), s;\n  }\n  la(t) {\n    // TODO(b/34871131): We don't support array paths right now; so make path\n    // undefined.\n    return this.oa({\n      path: void 0,\n      ca: !0\n    });\n  }\n  fa(t) {\n    return el(t, this.settings.methodName, this.settings.da || !1, this.path, this.settings._a);\n  }\n  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */\n  contains(t) {\n    return void 0 !== this.fieldMask.find(e => t.isPrefixOf(e)) || void 0 !== this.fieldTransforms.find(e => t.isPrefixOf(e.field));\n  }\n  ia() {\n    // TODO(b/34871131): Remove null check once we have proper paths for fields\n    // within arrays.\n    if (this.path) for (let t = 0; t < this.path.length; t++) this.aa(this.path.get(t));\n  }\n  aa(t) {\n    if (0 === t.length) throw this.fa(\"Document fields must not be empty\");\n    if (kh(this.ra) && Ch.test(t)) throw this.fa('Document fields cannot begin and end with \"__\"');\n  }\n}\n\n/**\n * Helper for parsing raw user input (provided via the API) into internal model\n * classes.\n */\nclass Mh {\n  constructor(t, e, n) {\n    this.databaseId = t, this.ignoreUndefinedProperties = e, this.Tt = n || vu(t);\n  }\n  /** Creates a new top-level parse context. */\n  wa(t, e, n, s = !1) {\n    return new $h({\n      ra: t,\n      methodName: e,\n      _a: n,\n      path: ut.emptyPath(),\n      ca: !1,\n      da: s\n    }, this.databaseId, this.Tt, this.ignoreUndefinedProperties);\n  }\n}\nfunction Oh(t) {\n  const e = t._freezeSettings(),\n    n = vu(t._databaseId);\n  return new Mh(t._databaseId, !!e.ignoreUndefinedProperties, n);\n}\n\n/** Parse document data from a set() call. */\nfunction Fh(t, e, n, s, i, r = {}) {\n  const o = t.wa(r.merge || r.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */, e, n, i);\n  Yh(\"Data must be an object, but it was:\", o, s);\n  const u = Hh(s, o);\n  let c, a;\n  if (r.merge) c = new tn(o.fieldMask), a = o.fieldTransforms;else if (r.mergeFields) {\n    const t = [];\n    for (const s of r.mergeFields) {\n      const i = Zh(e, s, n);\n      if (!o.contains(i)) throw new L(B.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);\n      nl(t, i) || t.push(i);\n    }\n    c = new tn(t), a = o.fieldTransforms.filter(t => c.covers(t.field));\n  } else c = null, a = o.fieldTransforms;\n  return new xh(new en(u), c, a);\n}\nclass Bh extends Sh {\n  _toFieldTransform(t) {\n    if (2 /* UserDataSource.MergeSet */ !== t.ra) throw 1 /* UserDataSource.Update */ === t.ra ? t.fa(`${this._methodName}() can only appear at the top level of your update data`) : t.fa(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);\n    // No transform to add for a delete, but we need to add it to our\n    // fieldMask so it gets deleted.\n    return t.fieldMask.push(t.path), null;\n  }\n  isEqual(t) {\n    return t instanceof Bh;\n  }\n}\n\n/**\n * Creates a child context for parsing SerializableFieldValues.\n *\n * This is different than calling `ParseContext.contextWith` because it keeps\n * the fieldTransforms and fieldMask separate.\n *\n * The created context has its `dataSource` set to `UserDataSource.Argument`.\n * Although these values are used with writes, any elements in these FieldValues\n * are not considered writes since they cannot contain any FieldValue sentinels,\n * etc.\n *\n * @param fieldValue - The sentinel FieldValue for which to create a child\n *     context.\n * @param context - The parent context.\n * @param arrayElement - Whether or not the FieldValue has an array.\n */\nfunction Lh(t, e, n) {\n  return new $h({\n    ra: 3 /* UserDataSource.Argument */,\n    _a: e.settings._a,\n    methodName: t._methodName,\n    ca: n\n  }, e.databaseId, e.Tt, e.ignoreUndefinedProperties);\n}\nclass qh extends Sh {\n  _toFieldTransform(t) {\n    return new jn(t.path, new Fn());\n  }\n  isEqual(t) {\n    return t instanceof qh;\n  }\n}\nclass Uh extends Sh {\n  constructor(t, e) {\n    super(t), this.ma = e;\n  }\n  _toFieldTransform(t) {\n    const e = Lh(this, t, /*array=*/!0),\n      n = this.ma.map(t => Wh(t, e)),\n      s = new Bn(n);\n    return new jn(t.path, s);\n  }\n  isEqual(t) {\n    // TODO(mrschmidt): Implement isEquals\n    return this === t;\n  }\n}\nclass Kh extends Sh {\n  constructor(t, e) {\n    super(t), this.ma = e;\n  }\n  _toFieldTransform(t) {\n    const e = Lh(this, t, /*array=*/!0),\n      n = this.ma.map(t => Wh(t, e)),\n      s = new qn(n);\n    return new jn(t.path, s);\n  }\n  isEqual(t) {\n    // TODO(mrschmidt): Implement isEquals\n    return this === t;\n  }\n}\nclass Gh extends Sh {\n  constructor(t, e) {\n    super(t), this.ga = e;\n  }\n  _toFieldTransform(t) {\n    const e = new Kn(t.Tt, Nn(t.Tt, this.ga));\n    return new jn(t.path, e);\n  }\n  isEqual(t) {\n    // TODO(mrschmidt): Implement isEquals\n    return this === t;\n  }\n}\n\n/** Parse update data from an update() call. */\nfunction Qh(t, e, n, s) {\n  const i = t.wa(1 /* UserDataSource.Update */, e, n);\n  Yh(\"Data must be an object, but it was:\", i, s);\n  const r = [],\n    o = en.empty();\n  Ut(s, (t, s) => {\n    const u = tl(e, t, n);\n    // For Compat types, we have to \"extract\" the underlying types before\n    // performing validation.\n    s = getModularInstance(s);\n    const c = i.ha(u);\n    if (s instanceof Bh)\n      // Add it to the field mask, but don't add anything to updateData.\n      r.push(u);else {\n      const t = Wh(s, c);\n      null != t && (r.push(u), o.set(u, t));\n    }\n  });\n  const u = new tn(r);\n  return new Nh(o, u, i.fieldTransforms);\n}\n\n/** Parse update data from a list of field/value arguments. */\nfunction jh(t, e, n, s, i, r) {\n  const o = t.wa(1 /* UserDataSource.Update */, e, n),\n    u = [Zh(e, s, n)],\n    c = [i];\n  if (r.length % 2 != 0) throw new L(B.INVALID_ARGUMENT, `Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);\n  for (let t = 0; t < r.length; t += 2) u.push(Zh(e, r[t])), c.push(r[t + 1]);\n  const a = [],\n    h = en.empty();\n  // We iterate in reverse order to pick the last value for a field if the\n  // user specified the field multiple times.\n  for (let t = u.length - 1; t >= 0; --t) if (!nl(a, u[t])) {\n    const e = u[t];\n    let n = c[t];\n    // For Compat types, we have to \"extract\" the underlying types before\n    // performing validation.\n    n = getModularInstance(n);\n    const s = o.ha(e);\n    if (n instanceof Bh)\n      // Add it to the field mask, but don't add anything to updateData.\n      a.push(e);else {\n      const t = Wh(n, s);\n      null != t && (a.push(e), h.set(e, t));\n    }\n  }\n  const l = new tn(a);\n  return new Nh(h, l, o.fieldTransforms);\n}\n\n/**\n * Parse a \"query value\" (e.g. value in a where filter or a value in a cursor\n * bound).\n *\n * @param allowArrays - Whether the query value is an array that may directly\n * contain additional arrays (e.g. the operand of an `in` query).\n */\nfunction zh(t, e, n, s = !1) {\n  return Wh(n, t.wa(s ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */, e));\n}\n\n/**\n * Parses user data to Protobuf Values.\n *\n * @param input - Data to be parsed.\n * @param context - A context object representing the current path being parsed,\n * the source of the data being parsed, etc.\n * @returns The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\nfunction Wh(t, e) {\n  if (Jh(\n  // Unwrap the API type from the Compat SDK. This will return the API type\n  // from firestore-exp.\n  t = getModularInstance(t))) return Yh(\"Unsupported field value:\", e, t), Hh(t, e);\n  if (t instanceof Sh)\n    // FieldValues usually parse into transforms (except deleteField())\n    // in which case we do not want to include this field in our parsed data\n    // (as doing so will overwrite the field directly prior to the transform\n    // trying to transform it). So we don't add this location to\n    // context.fieldMask and we return null as our parsing result.\n    /**\n    * \"Parses\" the provided FieldValueImpl, adding any necessary transforms to\n    * context.fieldTransforms.\n    */\n    return function (t, e) {\n      // Sentinels are only supported with writes, and not within arrays.\n      if (!kh(e.ra)) throw e.fa(`${t._methodName}() can only be used with update() and set()`);\n      if (!e.path) throw e.fa(`${t._methodName}() is not currently supported inside arrays`);\n      const n = t._toFieldTransform(e);\n      n && e.fieldTransforms.push(n);\n    }\n    /**\n    * Helper to parse a scalar value (i.e. not an Object, Array, or FieldValue)\n    *\n    * @returns The parsed value\n    */(t, e), null;\n  if (void 0 === t && e.ignoreUndefinedProperties)\n    // If the input is undefined it can never participate in the fieldMask, so\n    // don't handle this below. If `ignoreUndefinedProperties` is false,\n    // `parseScalarValue` will reject an undefined value.\n    return null;\n  if (\n  // If context.path is null we are inside an array and we don't support\n  // field mask paths more granular than the top-level array.\n  e.path && e.fieldMask.push(e.path), t instanceof Array) {\n    // TODO(b/34871131): Include the path containing the array in the error\n    // message.\n    // In the case of IN queries, the parsed data is an array (representing\n    // the set of values to be included for the IN query) that may directly\n    // contain additional arrays (each representing an individual field\n    // value), so we disable this validation.\n    if (e.settings.ca && 4 /* UserDataSource.ArrayArgument */ !== e.ra) throw e.fa(\"Nested arrays are not supported\");\n    return function (t, e) {\n      const n = [];\n      let s = 0;\n      for (const i of t) {\n        let t = Wh(i, e.la(s));\n        null == t && (\n        // Just include nulls in the array for fields being replaced with a\n        // sentinel.\n        t = {\n          nullValue: \"NULL_VALUE\"\n        }), n.push(t), s++;\n      }\n      return {\n        arrayValue: {\n          values: n\n        }\n      };\n    }(t, e);\n  }\n  return function (t, e) {\n    if (null === (t = getModularInstance(t))) return {\n      nullValue: \"NULL_VALUE\"\n    };\n    if (\"number\" == typeof t) return Nn(e.Tt, t);\n    if (\"boolean\" == typeof t) return {\n      booleanValue: t\n    };\n    if (\"string\" == typeof t) return {\n      stringValue: t\n    };\n    if (t instanceof Date) {\n      const n = nt.fromDate(t);\n      return {\n        timestampValue: Us(e.Tt, n)\n      };\n    }\n    if (t instanceof nt) {\n      // Firestore backend truncates precision down to microseconds. To ensure\n      // offline mode works the same with regards to truncation, perform the\n      // truncation immediately without waiting for the backend to do that.\n      const n = new nt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));\n      return {\n        timestampValue: Us(e.Tt, n)\n      };\n    }\n    if (t instanceof Dh) return {\n      geoPointValue: {\n        latitude: t.latitude,\n        longitude: t.longitude\n      }\n    };\n    if (t instanceof vh) return {\n      bytesValue: Ks(e.Tt, t._byteString)\n    };\n    if (t instanceof Ja) {\n      const n = e.databaseId,\n        s = t.firestore._databaseId;\n      if (!s.isEqual(n)) throw e.fa(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);\n      return {\n        referenceValue: js(t.firestore._databaseId || e.databaseId, t._key.path)\n      };\n    }\n    throw e.fa(`Unsupported field value: ${Ga(t)}`);\n  }\n  /**\n  * Checks whether an object looks like a JSON object that should be converted\n  * into a struct. Normal class/prototype instances are considered to look like\n  * JSON objects since they should be converted to a struct value. Arrays, Dates,\n  * GeoPoints, etc. are not considered to look like JSON objects since they map\n  * to specific FieldValue types other than ObjectValue.\n  */(t, e);\n}\nfunction Hh(t, e) {\n  const n = {};\n  return Kt(t) ?\n  // If we encounter an empty object, we explicitly add it to the update\n  // mask to ensure that the server creates a map entry.\n  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : Ut(t, (t, s) => {\n    const i = Wh(s, e.ua(t));\n    null != i && (n[t] = i);\n  }), {\n    mapValue: {\n      fields: n\n    }\n  };\n}\nfunction Jh(t) {\n  return !(\"object\" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof nt || t instanceof Dh || t instanceof vh || t instanceof Ja || t instanceof Sh);\n}\nfunction Yh(t, e, n) {\n  if (!Jh(n) || !function (t) {\n    return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n  }(n)) {\n    const s = Ga(n);\n    throw \"an object\" === s ? e.fa(t + \" a custom object\") : e.fa(t + \" \" + s);\n  }\n}\n\n/**\n * Helper that calls fromDotSeparatedString() but wraps any error thrown.\n */\nfunction Zh(t, e, n) {\n  if ((\n  // If required, replace the FieldPath Compat class with with the firestore-exp\n  // FieldPath.\n  e = getModularInstance(e)) instanceof bh) return e._internalPath;\n  if (\"string\" == typeof e) return tl(t, e);\n  throw el(\"Field path arguments must be of type string or \", t, /* hasConverter= */!1, /* path= */void 0, n);\n}\n\n/**\n * Matches any characters in a field path string that are reserved.\n */\nconst Xh = new RegExp(\"[~\\\\*/\\\\[\\\\]]\");\n\n/**\n * Wraps fromDotSeparatedString with an error message about the method that\n * was thrown.\n * @param methodName - The publicly visible method name\n * @param path - The dot-separated string form of a field path which will be\n * split on dots.\n * @param targetDoc - The document against which the field path will be\n * evaluated.\n */\nfunction tl(t, e, n) {\n  if (e.search(Xh) >= 0) throw el(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`, t, /* hasConverter= */!1, /* path= */void 0, n);\n  try {\n    return new bh(...e.split(\".\"))._internalPath;\n  } catch (s) {\n    throw el(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t, /* hasConverter= */!1, /* path= */void 0, n);\n  }\n}\nfunction el(t, e, n, s, i) {\n  const r = s && !s.isEmpty(),\n    o = void 0 !== i;\n  let u = `Function ${e}() called with invalid data`;\n  n && (u += \" (via `toFirestore()`)\"), u += \". \";\n  let c = \"\";\n  return (r || o) && (c += \" (found\", r && (c += ` in field ${s}`), o && (c += ` in document ${i}`), c += \")\"), new L(B.INVALID_ARGUMENT, u + t + c);\n}\n\n/** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */\nfunction nl(t, e) {\n  return t.some(t => t.isEqual(e));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get(<field>)` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */\nclass sl {\n  // Note: This class is stripped down version of the DocumentSnapshot in\n  // the legacy SDK. The changes are:\n  // - No support for SnapshotMetadata.\n  // - No support for SnapshotOptions.\n  /** @hideconstructor protected */\n  constructor(t, e, n, s, i) {\n    this._firestore = t, this._userDataWriter = e, this._key = n, this._document = s, this._converter = i;\n  }\n  /** Property of the `DocumentSnapshot` that provides the document's ID. */\n  get id() {\n    return this._key.path.lastSegment();\n  }\n  /**\n   * The `DocumentReference` for the document included in the `DocumentSnapshot`.\n   */\n  get ref() {\n    return new Ja(this._firestore, this._converter, this._key);\n  }\n  /**\n   * Signals whether or not the document at the snapshot's location exists.\n   *\n   * @returns true if the document exists.\n   */\n  exists() {\n    return null !== this._document;\n  }\n  /**\n   * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n   * the document doesn't exist.\n   *\n   * @returns An `Object` containing all fields in the document or `undefined`\n   * if the document doesn't exist.\n   */\n  data() {\n    if (this._document) {\n      if (this._converter) {\n        // We only want to use the converter and create a new DocumentSnapshot\n        // if a converter has been provided.\n        const t = new il(this._firestore, this._userDataWriter, this._key, this._document, /* converter= */null);\n        return this._converter.fromFirestore(t);\n      }\n      return this._userDataWriter.convertValue(this._document.data.value);\n    }\n  }\n  /**\n   * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n   * document or field doesn't exist.\n   *\n   * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n   * field.\n   * @returns The data at the specified field location or undefined if no such\n   * field exists in the document.\n   */\n  // We are using `any` here to avoid an explicit cast by our users.\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  get(t) {\n    if (this._document) {\n      const e = this._document.data.field(rl(\"DocumentSnapshot.get\", t));\n      if (null !== e) return this._userDataWriter.convertValue(e);\n    }\n  }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get(<field>)` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */\nclass il extends sl {\n  /**\n   * Retrieves all fields in the document as an `Object`.\n   *\n   * @override\n   * @returns An `Object` containing all fields in the document.\n   */\n  data() {\n    return super.data();\n  }\n}\n\n/**\n * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.\n */\nfunction rl(t, e) {\n  return \"string\" == typeof e ? tl(t, e) : e instanceof bh ? e._internalPath : e._delegate._internalPath;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction ol(t) {\n  if (\"L\" /* LimitType.Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new L(B.UNIMPLEMENTED, \"limitToLast() queries require specifying at least one orderBy() clause\");\n}\n\n/**\n * An `AppliableConstraint` is an abstraction of a constraint that can be applied\n * to a Firestore query.\n */\nclass ul {}\n\n/**\n * A `QueryConstraint` is used to narrow the set of documents returned by a\n * Firestore query. `QueryConstraint`s are created by invoking {@link where},\n * {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link\n * (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and\n * can then be passed to {@link (query:1)} to create a new query instance that\n * also contains this `QueryConstraint`.\n */\nclass cl extends ul {}\nfunction al(t, e, ...n) {\n  let s = [];\n  e instanceof ul && s.push(e), s = s.concat(n), function (t) {\n    const e = t.filter(t => t instanceof fl).length,\n      n = t.filter(t => t instanceof hl).length;\n    if (e > 1 || e > 0 && n > 0) throw new L(B.INVALID_ARGUMENT, \"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.\");\n  }\n  /**\n  * @license\n  * Copyright 2020 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */\n  /**\n  * Converts Firestore's internal types to the JavaScript types that we expose\n  * to the user.\n  *\n  * @internal\n  */(s);\n  for (const e of s) t = e._apply(t);\n  return t;\n}\n\n/**\n * A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by\n * a Firestore query by filtering on one or more document fields.\n * `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then\n * be passed to {@link (query:1)} to create a new query instance that also contains\n * this `QueryFieldFilterConstraint`.\n */\nclass hl extends cl {\n  /**\n   * @internal\n   */\n  constructor(t, e, n) {\n    super(), this._field = t, this._op = e, this._value = n, /** The type of this query constraint */\n    this.type = \"where\";\n  }\n  static _create(t, e, n) {\n    return new hl(t, e, n);\n  }\n  _apply(t) {\n    const e = this._parse(t);\n    return Sl(t._query, e), new Ya(t.firestore, t.converter, En(t._query, e));\n  }\n  _parse(t) {\n    const e = Oh(t.firestore),\n      n = function (t, e, n, s, i, r, o) {\n        let u;\n        if (i.isKeyField()) {\n          if (\"array-contains\" /* Operator.ARRAY_CONTAINS */ === r || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === r) throw new L(B.INVALID_ARGUMENT, `Invalid Query. You can't perform '${r}' queries on documentId().`);\n          if (\"in\" /* Operator.IN */ === r || \"not-in\" /* Operator.NOT_IN */ === r) {\n            Vl(o, r);\n            const e = [];\n            for (const n of o) e.push(bl(s, t, n));\n            u = {\n              arrayValue: {\n                values: e\n              }\n            };\n          } else u = bl(s, t, o);\n        } else \"in\" /* Operator.IN */ !== r && \"not-in\" /* Operator.NOT_IN */ !== r && \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ !== r || Vl(o, r), u = zh(n, e, o, /* allowArrays= */\"in\" /* Operator.IN */ === r || \"not-in\" /* Operator.NOT_IN */ === r);\n        return Ve.create(i, r, u);\n      }(t._query, \"where\", e, t.firestore._databaseId, this._field, this._op, this._value);\n    return n;\n  }\n}\n\n/**\n * Creates a {@link QueryFieldFilterConstraint} that enforces that documents\n * must contain the specified field and that the value should satisfy the\n * relation constraint provided.\n *\n * @param fieldPath - The path to compare\n * @param opStr - The operation string (e.g \"&lt;\", \"&lt;=\", \"==\", \"&lt;\",\n *   \"&lt;=\", \"!=\").\n * @param value - The value for comparison\n * @returns The created {@link QueryFieldFilterConstraint}.\n */\nfunction ll(t, e, n) {\n  const s = e,\n    i = rl(\"where\", t);\n  return hl._create(i, s, n);\n}\n\n/**\n * A `QueryCompositeFilterConstraint` is used to narrow the set of documents\n * returned by a Firestore query by performing the logical OR or AND of multiple\n * {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.\n * `QueryCompositeFilterConstraint`s are created by invoking {@link or} or\n * {@link and} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains the `QueryCompositeFilterConstraint`.\n */\nclass fl extends ul {\n  /**\n   * @internal\n   */\n  constructor( /** The type of this query constraint */\n  t, e) {\n    super(), this.type = t, this._queryConstraints = e;\n  }\n  static _create(t, e) {\n    return new fl(t, e);\n  }\n  _parse(t) {\n    const e = this._queryConstraints.map(e => e._parse(t)).filter(t => t.getFilters().length > 0);\n    return 1 === e.length ? e[0] : Se.create(e, this._getOperator());\n  }\n  _apply(t) {\n    const e = this._parse(t);\n    return 0 === e.getFilters().length ? t : (function (t, e) {\n      let n = t;\n      const s = e.getFlattenedFilters();\n      for (const t of s) Sl(n, t), n = En(n, t);\n    }\n    // Checks if any of the provided filter operators are included in the given list of filters and\n    // returns the first one that is, or null if none are.\n    (t._query, e), new Ya(t.firestore, t.converter, En(t._query, e)));\n  }\n  _getQueryConstraints() {\n    return this._queryConstraints;\n  }\n  _getOperator() {\n    return \"and\" === this.type ? \"and\" /* CompositeOperator.AND */ : \"or\" /* CompositeOperator.OR */;\n  }\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of\n * the given filter constraints. A disjunction filter includes a document if it\n * satisfies any of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a disjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */\nfunction dl(...t) {\n  // Only support QueryFilterConstraints\n  return t.forEach(t => Cl(\"or\", t)), fl._create(\"or\" /* CompositeOperator.OR */, t);\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of\n * the given filter constraints. A conjunction filter includes a document if it\n * satisfies all of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a conjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */\nfunction _l(...t) {\n  // Only support QueryFilterConstraints\n  return t.forEach(t => Cl(\"and\", t)), fl._create(\"and\" /* CompositeOperator.AND */, t);\n}\n\n/**\n * A `QueryOrderByConstraint` is used to sort the set of documents returned by a\n * Firestore query. `QueryOrderByConstraint`s are created by invoking\n * {@link orderBy} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains this `QueryOrderByConstraint`.\n *\n * Note: Documents that do not contain the orderBy field will not be present in\n * the query result.\n */\nclass wl extends cl {\n  /**\n   * @internal\n   */\n  constructor(t, e) {\n    super(), this._field = t, this._direction = e, /** The type of this query constraint */\n    this.type = \"orderBy\";\n  }\n  static _create(t, e) {\n    return new wl(t, e);\n  }\n  _apply(t) {\n    const e = function (t, e, n) {\n      if (null !== t.startAt) throw new L(B.INVALID_ARGUMENT, \"Invalid query. You must not call startAt() or startAfter() before calling orderBy().\");\n      if (null !== t.endAt) throw new L(B.INVALID_ARGUMENT, \"Invalid query. You must not call endAt() or endBefore() before calling orderBy().\");\n      const s = new je(e, n);\n      return function (t, e) {\n        if (null === gn(t)) {\n          // This is the first order by. It must match any inequality.\n          const n = yn(t);\n          null !== n && Dl(t, n, e.field);\n        }\n      }(t, s), s;\n    }\n    /**\n    * Create a `Bound` from a query and a document.\n    *\n    * Note that the `Bound` will always include the key of the document\n    * and so only the provided document will compare equal to the returned\n    * position.\n    *\n    * Will throw if the document does not contain all fields of the order by\n    * of the query or if any of the fields in the order by are an uncommitted\n    * server timestamp.\n    */(t._query, this._field, this._direction);\n    return new Ya(t.firestore, t.converter, function (t, e) {\n      // TODO(dimond): validate that orderBy does not list the same key twice.\n      const n = t.explicitOrderBy.concat([e]);\n      return new dn(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);\n    }(t._query, e));\n  }\n}\n\n/**\n * Creates a {@link QueryOrderByConstraint} that sorts the query result by the\n * specified field, optionally in descending order instead of ascending.\n *\n * Note: Documents that do not contain the specified field will not be present\n * in the query result.\n *\n * @param fieldPath - The field to sort by.\n * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If\n * not specified, order will be ascending.\n * @returns The created {@link QueryOrderByConstraint}.\n */\nfunction ml(t, e = \"asc\") {\n  const n = e,\n    s = rl(\"orderBy\", t);\n  return wl._create(s, n);\n}\n\n/**\n * A `QueryLimitConstraint` is used to limit the number of documents returned by\n * a Firestore query.\n * `QueryLimitConstraint`s are created by invoking {@link limit} or\n * {@link limitToLast} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryLimitConstraint`.\n */\nclass gl extends cl {\n  /**\n   * @internal\n   */\n  constructor( /** The type of this query constraint */\n  t, e, n) {\n    super(), this.type = t, this._limit = e, this._limitType = n;\n  }\n  static _create(t, e, n) {\n    return new gl(t, e, n);\n  }\n  _apply(t) {\n    return new Ya(t.firestore, t.converter, An(t._query, this._limit, this._limitType));\n  }\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the first matching\n * documents.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */\nfunction yl(t) {\n  return ja(\"limit\", t), gl._create(\"limit\", t, \"F\" /* LimitType.First */);\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the last matching\n * documents.\n *\n * You must specify at least one `orderBy` clause for `limitToLast` queries,\n * otherwise an exception will be thrown during execution.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */\nfunction pl(t) {\n  return ja(\"limitToLast\", t), gl._create(\"limitToLast\", t, \"L\" /* LimitType.Last */);\n}\n\n/**\n * A `QueryStartAtConstraint` is used to exclude documents from the start of a\n * result set returned by a Firestore query.\n * `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or\n * {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a\n * new query instance that also contains this `QueryStartAtConstraint`.\n */\nclass Il extends cl {\n  /**\n   * @internal\n   */\n  constructor( /** The type of this query constraint */\n  t, e, n) {\n    super(), this.type = t, this._docOrFields = e, this._inclusive = n;\n  }\n  static _create(t, e, n) {\n    return new Il(t, e, n);\n  }\n  _apply(t) {\n    const e = vl(t, this.type, this._docOrFields, this._inclusive);\n    return new Ya(t.firestore, t.converter, function (t, e) {\n      return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);\n    }(t._query, e));\n  }\n}\nfunction Tl(...t) {\n  return Il._create(\"startAt\", t, /*inclusive=*/!0);\n}\nfunction El(...t) {\n  return Il._create(\"startAfter\", t, /*inclusive=*/!1);\n}\n\n/**\n * A `QueryEndAtConstraint` is used to exclude documents from the end of a\n * result set returned by a Firestore query.\n * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or\n * {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryEndAtConstraint`.\n */\nclass Al extends cl {\n  /**\n   * @internal\n   */\n  constructor( /** The type of this query constraint */\n  t, e, n) {\n    super(), this.type = t, this._docOrFields = e, this._inclusive = n;\n  }\n  static _create(t, e, n) {\n    return new Al(t, e, n);\n  }\n  _apply(t) {\n    const e = vl(t, this.type, this._docOrFields, this._inclusive);\n    return new Ya(t.firestore, t.converter, function (t, e) {\n      return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);\n    }(t._query, e));\n  }\n}\nfunction Rl(...t) {\n  return Al._create(\"endBefore\", t, /*inclusive=*/!1);\n}\nfunction Pl(...t) {\n  return Al._create(\"endAt\", t, /*inclusive=*/!0);\n}\n\n/** Helper function to create a bound from a document or fields */\nfunction vl(t, e, n, s) {\n  if (n[0] = getModularInstance(n[0]), n[0] instanceof sl) return function (t, e, n, s, i) {\n    if (!s) throw new L(B.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);\n    const r = [];\n    // Because people expect to continue/end a query at the exact document\n    // provided, we need to use the implicit sort order rather than the explicit\n    // sort order, because it's guaranteed to contain the document key. That way\n    // the position becomes unambiguous and the query continues/ends exactly at\n    // the provided document. Without the key (by using the explicit sort\n    // orders), multiple documents could match the position, yielding duplicate\n    // results.\n    for (const n of In(t)) if (n.field.isKeyField()) r.push(fe(e, s.key));else {\n      const t = s.data.field(n.field);\n      if (te(t)) throw new L(B.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field \"' + n.field + '\" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');\n      if (null === t) {\n        const t = n.field.canonicalString();\n        throw new L(B.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${t}' (used as the orderBy) does not exist.`);\n      }\n      r.push(t);\n    }\n    return new Re(r, i);\n  }\n  /**\n  * Converts a list of field values to a `Bound` for the given query.\n  */(t._query, t.firestore._databaseId, e, n[0]._document, s);\n  {\n    const i = Oh(t.firestore);\n    return function (t, e, n, s, i, r) {\n      // Use explicit order by's because it has to match the query the user made\n      const o = t.explicitOrderBy;\n      if (i.length > o.length) throw new L(B.INVALID_ARGUMENT, `Too many arguments provided to ${s}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);\n      const u = [];\n      for (let r = 0; r < i.length; r++) {\n        const c = i[r];\n        if (o[r].field.isKeyField()) {\n          if (\"string\" != typeof c) throw new L(B.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${s}(), but got a ${typeof c}`);\n          if (!pn(t) && -1 !== c.indexOf(\"/\")) throw new L(B.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${s}() must be a plain document ID, but '${c}' contains a slash.`);\n          const n = t.path.child(rt.fromString(c));\n          if (!ct.isDocumentKey(n)) throw new L(B.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${s}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);\n          const i = new ct(n);\n          u.push(fe(e, i));\n        } else {\n          const t = zh(n, s, c);\n          u.push(t);\n        }\n      }\n      return new Re(u, r);\n    }\n    /**\n    * Parses the given `documentIdValue` into a `ReferenceValue`, throwing\n    * appropriate errors if the value is anything other than a `DocumentReference`\n    * or `string`, or if the string is malformed.\n    */(t._query, t.firestore._databaseId, i, e, n, s);\n  }\n}\nfunction bl(t, e, n) {\n  if (\"string\" == typeof (n = getModularInstance(n))) {\n    if (\"\" === n) throw new L(B.INVALID_ARGUMENT, \"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.\");\n    if (!pn(e) && -1 !== n.indexOf(\"/\")) throw new L(B.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);\n    const s = e.path.child(rt.fromString(n));\n    if (!ct.isDocumentKey(s)) throw new L(B.INVALID_ARGUMENT, `Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${s}' is not because it has an odd number of segments (${s.length}).`);\n    return fe(t, new ct(s));\n  }\n  if (n instanceof Ja) return fe(t, n._key);\n  throw new L(B.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ga(n)}.`);\n}\n\n/**\n * Validates that the value passed into a disjunctive filter satisfies all\n * array requirements.\n */\nfunction Vl(t, e) {\n  if (!Array.isArray(t) || 0 === t.length) throw new L(B.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${e.toString()}' filters.`);\n}\n\n/**\n * Given an operator, returns the set of operators that cannot be used with it.\n *\n * This is not a comprehensive check, and this function should be removed in the\n * long term. Validations should occur in the Firestore backend.\n *\n * Operators in a query must adhere to the following set of rules:\n * 1. Only one inequality per query.\n * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.\n */\nfunction Sl(t, e) {\n  if (e.isInequality()) {\n    const n = yn(t),\n      s = e.field;\n    if (null !== n && !n.isEqual(s)) throw new L(B.INVALID_ARGUMENT, `Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${s.toString()}'`);\n    const i = gn(t);\n    null !== i && Dl(t, s, i);\n  }\n  const n = function (t, e) {\n    for (const n of t) for (const t of n.getFlattenedFilters()) if (e.indexOf(t.op) >= 0) return t.op;\n    return null;\n  }(t.filters, function (t) {\n    switch (t) {\n      case \"!=\" /* Operator.NOT_EQUAL */:\n        return [\"!=\" /* Operator.NOT_EQUAL */, \"not-in\" /* Operator.NOT_IN */];\n\n      case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */:\n      case \"in\" /* Operator.IN */:\n        return [\"not-in\" /* Operator.NOT_IN */];\n\n      case \"not-in\" /* Operator.NOT_IN */:\n        return [\"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */, \"in\" /* Operator.IN */, \"not-in\" /* Operator.NOT_IN */, \"!=\" /* Operator.NOT_EQUAL */];\n\n      default:\n        return [];\n    }\n  }(e.op));\n  if (null !== n)\n    // Special case when it's a duplicate op to give a slightly clearer error message.\n    throw n === e.op ? new L(B.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${e.op.toString()}' filter.`) : new L(B.INVALID_ARGUMENT, `Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`);\n}\nfunction Dl(t, e, n) {\n  if (!n.isEqual(e)) throw new L(B.INVALID_ARGUMENT, `Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`);\n}\nfunction Cl(t, e) {\n  if (!(e instanceof hl || e instanceof fl)) throw new L(B.INVALID_ARGUMENT, `Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);\n}\nclass xl {\n  convertValue(t, e = \"none\") {\n    switch (re(t)) {\n      case 0 /* TypeOrder.NullValue */:\n        return null;\n      case 1 /* TypeOrder.BooleanValue */:\n        return t.booleanValue;\n      case 2 /* TypeOrder.NumberValue */:\n        return Zt(t.integerValue || t.doubleValue);\n      case 3 /* TypeOrder.TimestampValue */:\n        return this.convertTimestamp(t.timestampValue);\n      case 4 /* TypeOrder.ServerTimestampValue */:\n        return this.convertServerTimestamp(t, e);\n      case 5 /* TypeOrder.StringValue */:\n        return t.stringValue;\n      case 6 /* TypeOrder.BlobValue */:\n        return this.convertBytes(Xt(t.bytesValue));\n      case 7 /* TypeOrder.RefValue */:\n        return this.convertReference(t.referenceValue);\n      case 8 /* TypeOrder.GeoPointValue */:\n        return this.convertGeoPoint(t.geoPointValue);\n      case 9 /* TypeOrder.ArrayValue */:\n        return this.convertArray(t.arrayValue, e);\n      case 10 /* TypeOrder.ObjectValue */:\n        return this.convertObject(t.mapValue, e);\n      default:\n        throw $();\n    }\n  }\n  convertObject(t, e) {\n    const n = {};\n    return Ut(t.fields, (t, s) => {\n      n[t] = this.convertValue(s, e);\n    }), n;\n  }\n  convertGeoPoint(t) {\n    return new Dh(Zt(t.latitude), Zt(t.longitude));\n  }\n  convertArray(t, e) {\n    return (t.values || []).map(t => this.convertValue(t, e));\n  }\n  convertServerTimestamp(t, e) {\n    switch (e) {\n      case \"previous\":\n        const n = ee(t);\n        return null == n ? null : this.convertValue(n, e);\n      case \"estimate\":\n        return this.convertTimestamp(ne(t));\n      default:\n        return null;\n    }\n  }\n  convertTimestamp(t) {\n    const e = Yt(t);\n    return new nt(e.seconds, e.nanos);\n  }\n  convertDocumentKey(t, e) {\n    const n = rt.fromString(t);\n    M(pi(n));\n    const s = new Lt(n.get(1), n.get(3)),\n      i = new ct(n.popFirst(5));\n    return s.isEqual(e) ||\n    // TODO(b/64130202): Somehow support foreign references.\n    x(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`), i;\n  }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Converts custom model object of type T into `DocumentData` by applying the\n * converter if it exists.\n *\n * This function is used when converting user objects to `DocumentData`\n * because we want to provide the user with a more specific error message if\n * their `set()` or fails due to invalid data originating from a `toFirestore()`\n * call.\n */\nfunction Nl(t, e, n) {\n  let s;\n  // Cast to `any` in order to satisfy the union type constraint on\n  // toFirestore().\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  return s = t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e, s;\n}\nclass kl extends xl {\n  constructor(t) {\n    super(), this.firestore = t;\n  }\n  convertBytes(t) {\n    return new vh(t);\n  }\n  convertReference(t) {\n    const e = this.convertDocumentKey(t, this.firestore._databaseId);\n    return new Ja(this.firestore, /* converter= */null, e);\n  }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Create an AggregateField object that can be used to compute the sum of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to sum across the result set.\n * @internal TODO (sum/avg) remove when public\n */\nfunction $l(t) {\n  return new Rh(\"sum\", Zh(\"sum\", t));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the average of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to average across the result set.\n * @internal TODO (sum/avg) remove when public\n */\nfunction Ml(t) {\n  return new Rh(\"avg\", Zh(\"average\", t));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the count of\n * documents in the result set of a query.\n * @internal TODO (sum/avg) remove when public\n */\nfunction Ol() {\n  return new Rh(\"count\");\n}\n\n/**\n * Compares two 'AggregateField` instances for equality.\n *\n * @param left Compare this AggregateField to the `right`.\n * @param right Compare this AggregateField to the `left`.\n * @internal TODO (sum/avg) remove when public\n */\nfunction Fl(t, e) {\n  var n, s;\n  return t instanceof Rh && e instanceof Rh && t._aggregateType === e._aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (s = e._internalFieldPath) || void 0 === s ? void 0 : s.canonicalString());\n}\n\n/**\n * Compares two `AggregateQuerySnapshot` instances for equality.\n *\n * Two `AggregateQuerySnapshot` instances are considered \"equal\" if they have\n * underlying queries that compare equal, and the same data.\n *\n * @param left - The first `AggregateQuerySnapshot` to compare.\n * @param right - The second `AggregateQuerySnapshot` to compare.\n *\n * @returns `true` if the objects are \"equal\", as defined above, or `false`\n * otherwise.\n */\nfunction Bl(t, e) {\n  return sh(t.query, e.query) && deepEqual(t.data(), e.data());\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Metadata about a snapshot, describing the state of the snapshot.\n */\nclass Ll {\n  /** @hideconstructor */\n  constructor(t, e) {\n    this.hasPendingWrites = t, this.fromCache = e;\n  }\n  /**\n   * Returns true if this `SnapshotMetadata` is equal to the provided one.\n   *\n   * @param other - The `SnapshotMetadata` to compare against.\n   * @returns true if this `SnapshotMetadata` is equal to the provided one.\n   */\n  isEqual(t) {\n    return this.hasPendingWrites === t.hasPendingWrites && this.fromCache === t.fromCache;\n  }\n}\n\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get(<field>)` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */\nclass ql extends sl {\n  /** @hideconstructor protected */\n  constructor(t, e, n, s, i, r) {\n    super(t, e, n, s, r), this._firestore = t, this._firestoreImpl = t, this.metadata = i;\n  }\n  /**\n   * Returns whether or not the data exists. True if the document exists.\n   */\n  exists() {\n    return super.exists();\n  }\n  /**\n   * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n   * the document doesn't exist.\n   *\n   * By default, `serverTimestamp()` values that have not yet been\n   * set to their final value will be returned as `null`. You can override\n   * this by passing an options object.\n   *\n   * @param options - An options object to configure how data is retrieved from\n   * the snapshot (for example the desired behavior for server timestamps that\n   * have not yet been set to their final value).\n   * @returns An `Object` containing all fields in the document or `undefined` if\n   * the document doesn't exist.\n   */\n  data(t = {}) {\n    if (this._document) {\n      if (this._converter) {\n        // We only want to use the converter and create a new DocumentSnapshot\n        // if a converter has been provided.\n        const e = new Ul(this._firestore, this._userDataWriter, this._key, this._document, this.metadata, /* converter= */null);\n        return this._converter.fromFirestore(e, t);\n      }\n      return this._userDataWriter.convertValue(this._document.data.value, t.serverTimestamps);\n    }\n  }\n  /**\n   * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n   * document or field doesn't exist.\n   *\n   * By default, a `serverTimestamp()` that has not yet been set to\n   * its final value will be returned as `null`. You can override this by\n   * passing an options object.\n   *\n   * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n   * field.\n   * @param options - An options object to configure how the field is retrieved\n   * from the snapshot (for example the desired behavior for server timestamps\n   * that have not yet been set to their final value).\n   * @returns The data at the specified field location or undefined if no such\n   * field exists in the document.\n   */\n  // We are using `any` here to avoid an explicit cast by our users.\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  get(t, e = {}) {\n    if (this._document) {\n      const n = this._document.data.field(rl(\"DocumentSnapshot.get\", t));\n      if (null !== n) return this._userDataWriter.convertValue(n, e.serverTimestamps);\n    }\n  }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get(<field>)` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */\nclass Ul extends ql {\n  /**\n   * Retrieves all fields in the document as an `Object`.\n   *\n   * By default, `serverTimestamp()` values that have not yet been\n   * set to their final value will be returned as `null`. You can override\n   * this by passing an options object.\n   *\n   * @override\n   * @param options - An options object to configure how data is retrieved from\n   * the snapshot (for example the desired behavior for server timestamps that\n   * have not yet been set to their final value).\n   * @returns An `Object` containing all fields in the document.\n   */\n  data(t = {}) {\n    return super.data(t);\n  }\n}\n\n/**\n * A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects\n * representing the results of a query. The documents can be accessed as an\n * array via the `docs` property or enumerated using the `forEach` method. The\n * number of documents can be determined via the `empty` and `size`\n * properties.\n */\nclass Kl {\n  /** @hideconstructor */\n  constructor(t, e, n, s) {\n    this._firestore = t, this._userDataWriter = e, this._snapshot = s, this.metadata = new Ll(s.hasPendingWrites, s.fromCache), this.query = n;\n  }\n  /** An array of all the documents in the `QuerySnapshot`. */\n  get docs() {\n    const t = [];\n    return this.forEach(e => t.push(e)), t;\n  }\n  /** The number of documents in the `QuerySnapshot`. */\n  get size() {\n    return this._snapshot.docs.size;\n  }\n  /** True if there are no documents in the `QuerySnapshot`. */\n  get empty() {\n    return 0 === this.size;\n  }\n  /**\n   * Enumerates all of the documents in the `QuerySnapshot`.\n   *\n   * @param callback - A callback to be called with a `QueryDocumentSnapshot` for\n   * each document in the snapshot.\n   * @param thisArg - The `this` binding for the callback.\n   */\n  forEach(t, e) {\n    this._snapshot.docs.forEach(n => {\n      t.call(e, new Ul(this._firestore, this._userDataWriter, n.key, n, new Ll(this._snapshot.mutatedKeys.has(n.key), this._snapshot.fromCache), this.query.converter));\n    });\n  }\n  /**\n   * Returns an array of the documents changes since the last snapshot. If this\n   * is the first snapshot, all documents will be in the list as 'added'\n   * changes.\n   *\n   * @param options - `SnapshotListenOptions` that control whether metadata-only\n   * changes (i.e. only `DocumentSnapshot.metadata` changed) should trigger\n   * snapshot events.\n   */\n  docChanges(t = {}) {\n    const e = !!t.includeMetadataChanges;\n    if (e && this._snapshot.excludesMetadataChanges) throw new L(B.INVALID_ARGUMENT, \"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().\");\n    return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === e || (this._cachedChanges = /** Calculates the array of `DocumentChange`s for a given `ViewSnapshot`. */\n    function (t, e) {\n      if (t._snapshot.oldDocs.isEmpty()) {\n        let e = 0;\n        return t._snapshot.docChanges.map(n => {\n          const s = new Ul(t._firestore, t._userDataWriter, n.doc.key, n.doc, new Ll(t._snapshot.mutatedKeys.has(n.doc.key), t._snapshot.fromCache), t.query.converter);\n          return n.doc, {\n            type: \"added\",\n            doc: s,\n            oldIndex: -1,\n            newIndex: e++\n          };\n        });\n      }\n      {\n        // A `DocumentSet` that is updated incrementally as changes are applied to use\n        // to lookup the index of a document.\n        let n = t._snapshot.oldDocs;\n        return t._snapshot.docChanges.filter(t => e || 3 /* ChangeType.Metadata */ !== t.type).map(e => {\n          const s = new Ul(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Ll(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter);\n          let i = -1,\n            r = -1;\n          return 0 /* ChangeType.Added */ !== e.type && (i = n.indexOf(e.doc.key), n = n.delete(e.doc.key)), 1 /* ChangeType.Removed */ !== e.type && (n = n.add(e.doc), r = n.indexOf(e.doc.key)), {\n            type: Gl(e.type),\n            doc: s,\n            oldIndex: i,\n            newIndex: r\n          };\n        });\n      }\n    }(this, e), this._cachedChangesIncludeMetadataChanges = e), this._cachedChanges;\n  }\n}\nfunction Gl(t) {\n  switch (t) {\n    case 0 /* ChangeType.Added */:\n      return \"added\";\n    case 2 /* ChangeType.Modified */:\n    case 3 /* ChangeType.Metadata */:\n      return \"modified\";\n    case 1 /* ChangeType.Removed */:\n      return \"removed\";\n    default:\n      return $();\n  }\n}\n\n// TODO(firestoreexp): Add tests for snapshotEqual with different snapshot\n// metadata\n/**\n * Returns true if the provided snapshots are equal.\n *\n * @param left - A snapshot to compare.\n * @param right - A snapshot to compare.\n * @returns true if the snapshots are equal.\n */\nfunction Ql(t, e) {\n  return t instanceof ql && e instanceof ql ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Kl && e instanceof Kl && t._firestore === e._firestore && sh(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Reads the document referred to by this `DocumentReference`.\n *\n * Note: `getDoc()` attempts to provide up-to-date data when possible by waiting\n * for data from the server, but it may return cached data or fail if you are\n * offline and the server cannot be reached. To specify this behavior, invoke\n * {@link getDocFromCache} or {@link getDocFromServer}.\n *\n * @param reference - The reference of the document to fetch.\n * @returns A Promise resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction jl(t) {\n  t = Qa(t, Ja);\n  const e = Qa(t.firestore, ch);\n  return Na(lh(e), t._key).then(n => uf(e, t, n));\n}\nclass zl extends xl {\n  constructor(t) {\n    super(), this.firestore = t;\n  }\n  convertBytes(t) {\n    return new vh(t);\n  }\n  convertReference(t) {\n    const e = this.convertDocumentKey(t, this.firestore._databaseId);\n    return new Ja(this.firestore, /* converter= */null, e);\n  }\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from cache.\n * Returns an error if the document is not currently cached.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction Wl(t) {\n  t = Qa(t, Ja);\n  const e = Qa(t.firestore, ch),\n    n = lh(e),\n    s = new zl(e);\n  return xa(n, t._key).then(n => new ql(e, s, t._key, n, new Ll(null !== n && n.hasLocalMutations, /* fromCache= */!0), t.converter));\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from the server.\n * Returns an error if the network is not available.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction Hl(t) {\n  t = Qa(t, Ja);\n  const e = Qa(t.firestore, ch);\n  return Na(lh(e), t._key, {\n    source: \"server\"\n  }).then(n => uf(e, t, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot`.\n *\n * Note: `getDocs()` attempts to provide up-to-date data when possible by\n * waiting for data from the server, but it may return cached data or fail if\n * you are offline and the server cannot be reached. To specify this behavior,\n * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction Jl(t) {\n  t = Qa(t, Ya);\n  const e = Qa(t.firestore, ch),\n    n = lh(e),\n    s = new zl(e);\n  return ol(t._query), $a(n, t._query).then(n => new Kl(e, s, t, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from cache.\n * Returns an empty result set if no documents matching the query are currently\n * cached.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction Yl(t) {\n  t = Qa(t, Ya);\n  const e = Qa(t.firestore, ch),\n    n = lh(e),\n    s = new zl(e);\n  return ka(n, t._query).then(n => new Kl(e, s, t, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from the\n * server. Returns an error if the network is not available.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction Zl(t) {\n  t = Qa(t, Ya);\n  const e = Qa(t.firestore, ch),\n    n = lh(e),\n    s = new zl(e);\n  return $a(n, t._query, {\n    source: \"server\"\n  }).then(n => new Kl(e, s, t, n));\n}\nfunction Xl(t, e, n) {\n  t = Qa(t, Ja);\n  const s = Qa(t.firestore, ch),\n    i = Nl(t.converter, e, n);\n  return of(s, [Fh(Oh(s), \"setDoc\", t._key, i, null !== t.converter, n).toMutation(t._key, Hn.none())]);\n}\nfunction tf(t, e, n, ...s) {\n  t = Qa(t, Ja);\n  const i = Qa(t.firestore, ch),\n    r = Oh(i);\n  let o;\n  o = \"string\" == typeof (\n  // For Compat types, we have to \"extract\" the underlying types before\n  // performing validation.\n  e = getModularInstance(e)) || e instanceof bh ? jh(r, \"updateDoc\", t._key, e, n, s) : Qh(r, \"updateDoc\", t._key, e);\n  return of(i, [o.toMutation(t._key, Hn.exists(!0))]);\n}\n\n/**\n * Deletes the document referred to by the specified `DocumentReference`.\n *\n * @param reference - A reference to the document to delete.\n * @returns A Promise resolved once the document has been successfully\n * deleted from the backend (note that it won't resolve while you're offline).\n */\nfunction ef(t) {\n  return of(Qa(t.firestore, ch), [new cs(t._key, Hn.none())]);\n}\n\n/**\n * Add a new document to specified `CollectionReference` with the given data,\n * assigning it a document ID automatically.\n *\n * @param reference - A reference to the collection to add this document to.\n * @param data - An Object containing the data for the new document.\n * @returns A `Promise` resolved with a `DocumentReference` pointing to the\n * newly created document after it has been written to the backend (Note that it\n * won't resolve while you're offline).\n */\nfunction nf(t, e) {\n  const n = Qa(t.firestore, ch),\n    s = eh(t),\n    i = Nl(t.converter, e);\n  return of(n, [Fh(Oh(t.firestore), \"addDoc\", s._key, i, null !== t.converter, {}).toMutation(s._key, Hn.exists(!1))]).then(() => s);\n}\nfunction sf(t, ...e) {\n  var n, s, i;\n  t = getModularInstance(t);\n  let r = {\n      includeMetadataChanges: !1\n    },\n    o = 0;\n  \"object\" != typeof e[o] || rh(e[o]) || (r = e[o], o++);\n  const u = {\n    includeMetadataChanges: r.includeMetadataChanges\n  };\n  if (rh(e[o])) {\n    const t = e[o];\n    e[o] = null === (n = t.next) || void 0 === n ? void 0 : n.bind(t), e[o + 1] = null === (s = t.error) || void 0 === s ? void 0 : s.bind(t), e[o + 2] = null === (i = t.complete) || void 0 === i ? void 0 : i.bind(t);\n  }\n  let c, a, h;\n  if (t instanceof Ja) a = Qa(t.firestore, ch), h = wn(t._key.path), c = {\n    next: n => {\n      e[o] && e[o](uf(a, t, n));\n    },\n    error: e[o + 1],\n    complete: e[o + 2]\n  };else {\n    const n = Qa(t, Ya);\n    a = Qa(n.firestore, ch), h = n._query;\n    const s = new zl(a);\n    c = {\n      next: t => {\n        e[o] && e[o](new Kl(a, s, n, t));\n      },\n      error: e[o + 1],\n      complete: e[o + 2]\n    }, ol(t._query);\n  }\n  return function (t, e, n, s) {\n    const i = new wa(s),\n      r = new Tc(e, i, n);\n    return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      return mc(yield Sa(t), r);\n    })), () => {\n      i.bc(), t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n        return gc(yield Sa(t), r);\n      }));\n    };\n  }(lh(a), h, u, c);\n}\nfunction rf(t, e) {\n  return Ma(lh(t = Qa(t, ch)), rh(e) ? e : {\n    next: e\n  });\n}\n\n/**\n * Locally writes `mutations` on the async queue.\n * @internal\n */\nfunction of(t, e) {\n  return function (t, e) {\n    const n = new q();\n    return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      return $c(yield ba(t), e, n);\n    })), n.promise;\n  }(lh(t), e);\n}\n\n/**\n * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`\n * to a {@link DocumentSnapshot}.\n */\nfunction uf(t, e, n) {\n  const s = n.docs.get(e._key),\n    i = new zl(t);\n  return new ql(t, i, e._key, s, new Ll(n.hasPendingWrites, n.fromCache), e.converter);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Calculates the number of documents in the result set of the given query,\n * without actually downloading the documents.\n *\n * Using this function to count the documents is efficient because only the\n * final count, not the documents' data, is downloaded. This function can even\n * count the documents if the result set would be prohibitively large to\n * download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query - The query whose result set size to calculate.\n * @returns A Promise that will be resolved with the count; the count can be\n * retrieved from `snapshot.data().count`, where `snapshot` is the\n * `AggregateQuerySnapshot` to which the returned Promise resolves.\n */\nfunction cf(t) {\n  return af(t, {\n    count: Ol()\n  });\n}\n\n/**\n * Calculates the specified aggregations over the documents in the result\n * set of the given query, without actually downloading the documents.\n *\n * Using this function to perform aggregations is efficient because only the\n * final aggregation values, not the documents' data, is downloaded. This\n * function can even perform aggregations of the documents if the result set\n * would be prohibitively large to download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query The query whose result set to aggregate over.\n * @param aggregateSpec An `AggregateSpec` object that specifies the aggregates\n * to perform over the result set. The AggregateSpec specifies aliases for each\n * aggregate, which can be used to retrieve the aggregate result.\n * @example\n * ```typescript\n * const aggregateSnapshot = await getAggregateFromServer(query, {\n *   countOfDocs: count(),\n *   totalHours: sum('hours'),\n *   averageScore: average('score')\n * });\n *\n * const countOfDocs: number = aggregateSnapshot.data().countOfDocs;\n * const totalHours: number = aggregateSnapshot.data().totalHours;\n * const averageScore: number | null = aggregateSnapshot.data().averageScore;\n * ```\n * @internal TODO (sum/avg) remove when public\n */\nfunction af(t, e) {\n  const n = Qa(t.firestore, ch),\n    s = lh(n),\n    i = function (t, e) {\n      const n = [];\n      for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && n.push(e(t[s], s, t));\n      return n;\n    }(e, (t, e) => new Ft(new Ot(e), t._aggregateType, t._internalFieldPath));\n  // Run the aggregation and convert the results\n  return function (t, e, n) {\n    const s = new q();\n    return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      // TODO (sum/avg) should we update this to use the event manager?\n      // Implement and call executeAggregateQueryViaSnapshotListener, similar\n      // to the implementation in firestoreClientGetDocumentsViaSnapshotListener\n      // above\n      try {\n        if (Ku(yield va(t))) {\n          const i = yield Va(t);\n          s.resolve(xu(i, e, n));\n        } else s.reject(new L(B.UNAVAILABLE, \"Failed to get aggregate result because the client is offline.\"));\n      } catch (t) {\n        s.reject(t);\n      }\n    })), s.promise;\n  }(s, t._query, i).then(e =>\n  /**\n  * Converts the core aggregration result to an `AggregateQuerySnapshot`\n  * that can be returned to the consumer.\n  * @param query\n  * @param aggregateResult Core aggregation result\n  * @internal\n  */\n  function (t, e, n) {\n    const s = new zl(t);\n    return new Ph(e, s, n);\n  }\n  /**\n  * @license\n  * Copyright 2022 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */(n, t, e));\n}\nconst hf = {\n  maxAttempts: 5\n};\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A write batch, used to perform multiple writes as a single atomic unit.\n *\n * A `WriteBatch` object can be acquired by calling {@link writeBatch}. It\n * provides methods for adding writes to the write batch. None of the writes\n * will be committed (or visible locally) until {@link WriteBatch.commit} is\n * called.\n */\nclass lf {\n  /** @hideconstructor */\n  constructor(t, e) {\n    this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1, this._dataReader = Oh(t);\n  }\n  set(t, e, n) {\n    this._verifyNotCommitted();\n    const s = ff(t, this._firestore),\n      i = Nl(s.converter, e, n),\n      r = Fh(this._dataReader, \"WriteBatch.set\", s._key, i, null !== s.converter, n);\n    return this._mutations.push(r.toMutation(s._key, Hn.none())), this;\n  }\n  update(t, e, n, ...s) {\n    this._verifyNotCommitted();\n    const i = ff(t, this._firestore);\n    // For Compat types, we have to \"extract\" the underlying types before\n    // performing validation.\n    let r;\n    return r = \"string\" == typeof (e = getModularInstance(e)) || e instanceof bh ? jh(this._dataReader, \"WriteBatch.update\", i._key, e, n, s) : Qh(this._dataReader, \"WriteBatch.update\", i._key, e), this._mutations.push(r.toMutation(i._key, Hn.exists(!0))), this;\n  }\n  /**\n   * Deletes the document referred to by the provided {@link DocumentReference}.\n   *\n   * @param documentRef - A reference to the document to be deleted.\n   * @returns This `WriteBatch` instance. Used for chaining method calls.\n   */\n  delete(t) {\n    this._verifyNotCommitted();\n    const e = ff(t, this._firestore);\n    return this._mutations = this._mutations.concat(new cs(e._key, Hn.none())), this;\n  }\n  /**\n   * Commits all of the writes in this write batch as a single atomic unit.\n   *\n   * The result of these writes will only be reflected in document reads that\n   * occur after the returned promise resolves. If the client is offline, the\n   * write fails. If you would like to see local modifications or buffer writes\n   * until the client is online, use the full Firestore SDK.\n   *\n   * @returns A `Promise` resolved once all of the writes in the batch have been\n   * successfully written to the backend as an atomic unit (note that it won't\n   * resolve while you're offline).\n   */\n  commit() {\n    return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();\n  }\n  _verifyNotCommitted() {\n    if (this._committed) throw new L(B.FAILED_PRECONDITION, \"A write batch can no longer be used after commit() has been called.\");\n  }\n}\nfunction ff(t, e) {\n  if ((t = getModularInstance(t)).firestore !== e) throw new L(B.INVALID_ARGUMENT, \"Provided document reference is from a different Firestore instance.\");\n  return t;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// TODO(mrschmidt) Consider using `BaseTransaction` as the base class in the\n// legacy SDK.\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\nclass df extends class {\n  /** @hideconstructor */\n  constructor(t, e) {\n    this._firestore = t, this._transaction = e, this._dataReader = Oh(t);\n  }\n  /**\n   * Reads the document referenced by the provided {@link DocumentReference}.\n   *\n   * @param documentRef - A reference to the document to be read.\n   * @returns A `DocumentSnapshot` with the read data.\n   */\n  get(t) {\n    const e = ff(t, this._firestore),\n      n = new kl(this._firestore);\n    return this._transaction.lookup([e._key]).then(t => {\n      if (!t || 1 !== t.length) return $();\n      const s = t[0];\n      if (s.isFoundDocument()) return new sl(this._firestore, n, s.key, s, e.converter);\n      if (s.isNoDocument()) return new sl(this._firestore, n, e._key, null, e.converter);\n      throw $();\n    });\n  }\n  set(t, e, n) {\n    const s = ff(t, this._firestore),\n      i = Nl(s.converter, e, n),\n      r = Fh(this._dataReader, \"Transaction.set\", s._key, i, null !== s.converter, n);\n    return this._transaction.set(s._key, r), this;\n  }\n  update(t, e, n, ...s) {\n    const i = ff(t, this._firestore);\n    // For Compat types, we have to \"extract\" the underlying types before\n    // performing validation.\n    let r;\n    return r = \"string\" == typeof (e = getModularInstance(e)) || e instanceof bh ? jh(this._dataReader, \"Transaction.update\", i._key, e, n, s) : Qh(this._dataReader, \"Transaction.update\", i._key, e), this._transaction.update(i._key, r), this;\n  }\n  /**\n   * Deletes the document referred to by the provided {@link DocumentReference}.\n   *\n   * @param documentRef - A reference to the document to be deleted.\n   * @returns This `Transaction` instance. Used for chaining method calls.\n   */\n  delete(t) {\n    const e = ff(t, this._firestore);\n    return this._transaction.delete(e._key), this;\n  }\n} {\n  // This class implements the same logic as the Transaction API in the Lite SDK\n  // but is subclassed in order to return its own DocumentSnapshot types.\n  /** @hideconstructor */\n  constructor(t, e) {\n    super(t, e), this._firestore = t;\n  }\n  /**\n   * Reads the document referenced by the provided {@link DocumentReference}.\n   *\n   * @param documentRef - A reference to the document to be read.\n   * @returns A `DocumentSnapshot` with the read data.\n   */\n  get(t) {\n    const e = ff(t, this._firestore),\n      n = new zl(this._firestore);\n    return super.get(t).then(t => new ql(this._firestore, n, e._key, t._document, new Ll( /* hasPendingWrites= */!1, /* fromCache= */!1), e.converter));\n  }\n}\n\n/**\n * Executes the given `updateFunction` and then attempts to commit the changes\n * applied within the transaction. If any document read within the transaction\n * has changed, Cloud Firestore retries the `updateFunction`. If it fails to\n * commit after 5 attempts, the transaction fails.\n *\n * The maximum number of writes allowed in a single transaction is 500.\n *\n * @param firestore - A reference to the Firestore database to run this\n * transaction against.\n * @param updateFunction - The function to execute within the transaction\n * context.\n * @param options - An options object to configure maximum number of attempts to\n * commit.\n * @returns If the transaction completed successfully or was explicitly aborted\n * (the `updateFunction` returned a failed promise), the promise returned by the\n * `updateFunction `is returned here. Otherwise, if the transaction failed, a\n * rejected promise with the corresponding failure error is returned.\n */\nfunction _f(t, e, n) {\n  t = Qa(t, ch);\n  const s = Object.assign(Object.assign({}, hf), n);\n  !function (t) {\n    if (t.maxAttempts < 1) throw new L(B.INVALID_ARGUMENT, \"Max attempts must be at least 1\");\n  }(s);\n  return function (t, e, n) {\n    const s = new q();\n    return t.asyncQueue.enqueueAndForget( /*#__PURE__*/_asyncToGenerator(function* () {\n      const i = yield Va(t);\n      new ya(t.asyncQueue, i, n, e, s).run();\n    })), s.promise;\n  }(lh(t), n => e(new df(t, n)), s);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or\n * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.\n */\nfunction wf() {\n  return new Bh(\"deleteField\");\n}\n\n/**\n * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to\n * include a server-generated timestamp in the written data.\n */\nfunction mf() {\n  return new qh(\"serverTimestamp\");\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array\n * value that already exists on the server. Each specified element that doesn't\n * already exist in the array will be added to the end. If the field being\n * modified is not already an array it will be overwritten with an array\n * containing exactly the specified elements.\n *\n * @param elements - The elements to union into the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`.\n */\nfunction gf(...t) {\n  // NOTE: We don't actually parse the data until it's used in set() or\n  // update() since we'd need the Firestore instance to do this.\n  return new Uh(\"arrayUnion\", t);\n}\n\n/**\n * Returns a special value that can be used with {@link (setDoc:1)} or {@link\n * updateDoc:1} that tells the server to remove the given elements from any\n * array value that already exists on the server. All instances of each element\n * specified will be removed from the array. If the field being modified is not\n * already an array it will be overwritten with an empty array.\n *\n * @param elements - The elements to remove from the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */\nfunction yf(...t) {\n  // NOTE: We don't actually parse the data until it's used in set() or\n  // update() since we'd need the Firestore instance to do this.\n  return new Kh(\"arrayRemove\", t);\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by\n * the given value.\n *\n * If either the operand or the current field value uses floating point\n * precision, all arithmetic follows IEEE 754 semantics. If both values are\n * integers, values outside of JavaScript's safe number range\n * (`Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`) are also subject to\n * precision loss. Furthermore, once processed by the Firestore backend, all\n * integer operations are capped between -2^63 and 2^63-1.\n *\n * If the current field value is not of type `number`, or if the field does not\n * yet exist, the transformation sets the field to the given value.\n *\n * @param n - The value to increment by.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */\nfunction pf(t) {\n  return new Gh(\"increment\", t);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Creates a write batch, used for performing multiple writes as a single\n * atomic operation. The maximum number of writes allowed in a single {@link WriteBatch}\n * is 500.\n *\n * Unlike transactions, write batches are persisted offline and therefore are\n * preferable when you don't need to condition your writes on read data.\n *\n * @returns A {@link WriteBatch} that can be used to atomically execute multiple\n * writes.\n */\nfunction If(t) {\n  return lh(t = Qa(t, ch)), new lf(t, e => of(t, e));\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction Tf(t, e) {\n  var n;\n  const s = lh(t = Qa(t, ch));\n  // PORTING NOTE: We don't return an error if the user has not enabled\n  // persistence since `enableIndexeddbPersistence()` can fail on the Web.\n  if (!(null === (n = s.offlineComponents) || void 0 === n ? void 0 : n.indexBackfillerScheduler)) return N(\"Cannot enable indexes when persistence is disabled\"), Promise.resolve();\n  const i = function (t) {\n    const e = \"string\" == typeof t ? function (t) {\n        try {\n          return JSON.parse(t);\n        } catch (t) {\n          throw new L(B.INVALID_ARGUMENT, \"Failed to parse JSON: \" + (null == t ? void 0 : t.message));\n        }\n      }(t) : t,\n      n = [];\n    if (Array.isArray(e.indexes)) for (const t of e.indexes) {\n      const e = Ef(t, \"collectionGroup\"),\n        s = [];\n      if (Array.isArray(t.fields)) for (const e of t.fields) {\n        const t = tl(\"setIndexConfiguration\", Ef(e, \"fieldPath\"));\n        \"CONTAINS\" === e.arrayConfig ? s.push(new dt(t, 2 /* IndexKind.CONTAINS */)) : \"ASCENDING\" === e.order ? s.push(new dt(t, 0 /* IndexKind.ASCENDING */)) : \"DESCENDING\" === e.order && s.push(new dt(t, 1 /* IndexKind.DESCENDING */));\n      }\n\n      n.push(new at(at.UNKNOWN_ID, e, s, wt.empty()));\n    }\n    return n;\n  }(e);\n  return Pa(s).then(t => function () {\n    var _ref43 = _asyncToGenerator(function* (t, e) {\n      const n = F(t),\n        s = n.indexManager,\n        i = [];\n      return n.persistence.runTransaction(\"Configure indexes\", \"readwrite\", t => s.getFieldIndexes(t).next(n => function (t, e, n, s, i) {\n        t = [...t], e = [...e], t.sort(n), e.sort(n);\n        const r = t.length,\n          o = e.length;\n        let u = 0,\n          c = 0;\n        for (; u < o && c < r;) {\n          const r = n(t[c], e[u]);\n          r < 0 ?\n          // The element was removed if the next element in our ordered\n          // walkthrough is only in `before`.\n          i(t[c++]) : r > 0 ?\n          // The element was added if the next element in our ordered walkthrough\n          // is only in `after`.\n          s(e[u++]) : (u++, c++);\n        }\n        for (; u < o;) s(e[u++]);\n        for (; c < r;) i(t[c++]);\n      }(n, e, ft, e => {\n        i.push(s.addFieldIndex(t, e));\n      }, e => {\n        i.push(s.deleteFieldIndex(t, e));\n      })).next(() => At.waitFor(i)));\n    });\n    return function (_x122, _x123) {\n      return _ref43.apply(this, arguments);\n    };\n  }()\n  /**\n  * @license\n  * Copyright 2019 Google LLC\n  *\n  * Licensed under the Apache License, Version 2.0 (the \"License\");\n  * you may not use this file except in compliance with the License.\n  * You may obtain a copy of the License at\n  *\n  *   http://www.apache.org/licenses/LICENSE-2.0\n  *\n  * Unless required by applicable law or agreed to in writing, software\n  * distributed under the License is distributed on an \"AS IS\" BASIS,\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n  */\n  // The format of the LocalStorage key that stores the client state is:\n  //     firestore_clients_<persistence_prefix>_<instance_key>\n  (t, i));\n}\nfunction Ef(t, e) {\n  if (\"string\" != typeof t[e]) throw new L(B.INVALID_ARGUMENT, \"Missing string value for: \" + e);\n  return t[e];\n}\n\n/**\n * Cloud Firestore\n *\n * @packageDocumentation\n */\n!function (t, e = !0) {\n  !function (t) {\n    b = t;\n  }(SDK_VERSION), _registerComponent(new Component(\"firestore\", (t, {\n    instanceIdentifier: n,\n    options: s\n  }) => {\n    const i = t.getProvider(\"app\").getImmediate(),\n      r = new ch(new Q(t.getProvider(\"auth-internal\")), new H(t.getProvider(\"app-check-internal\")), function (t, e) {\n        if (!Object.prototype.hasOwnProperty.apply(t.options, [\"projectId\"])) throw new L(B.INVALID_ARGUMENT, '\"projectId\" not provided in firebase.initializeApp.');\n        return new Lt(t.options.projectId, e);\n      }(i, n), i);\n    return s = Object.assign({\n      useFetchStreams: e\n    }, s), r._setSettings(s), r;\n  }, \"PUBLIC\").setMultipleInstances(!0)), registerVersion(P, \"3.9.0\", t),\n  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n  registerVersion(P, \"3.9.0\", \"esm2017\");\n}();\nexport { xl as AbstractUserDataWriter, Rh as AggregateField, Ph as AggregateQuerySnapshot, vh as Bytes, uh as CACHE_SIZE_UNLIMITED, Za as CollectionReference, Ja as DocumentReference, ql as DocumentSnapshot, bh as FieldPath, Sh as FieldValue, ch as Firestore, L as FirestoreError, Dh as GeoPoint, oh as LoadBundleTask, Ya as Query, fl as QueryCompositeFilterConstraint, cl as QueryConstraint, Ul as QueryDocumentSnapshot, Al as QueryEndAtConstraint, hl as QueryFieldFilterConstraint, gl as QueryLimitConstraint, wl as QueryOrderByConstraint, Kl as QuerySnapshot, Il as QueryStartAtConstraint, Ll as SnapshotMetadata, nt as Timestamp, df as Transaction, lf as WriteBatch, Lt as _DatabaseId, ct as _DocumentKey, J as _EmptyAppCheckTokenProvider, K as _EmptyAuthCredentialsProvider, ut as _FieldPath, Qa as _cast, O as _debugAssert, Wt as _isBase64Available, N as _logWarn, qa as _validateIsNotUsedTogether, nf as addDoc, Fl as aggregateFieldEqual, Bl as aggregateQuerySnapshotEqual, _l as and, yf as arrayRemove, gf as arrayUnion, Ml as average, mh as clearIndexedDbPersistence, Xa as collection, th as collectionGroup, Ha as connectFirestoreEmulator, Ol as count, ef as deleteDoc, wf as deleteField, ph as disableNetwork, eh as doc, Vh as documentId, dh as enableIndexedDbPersistence, _h as enableMultiTabIndexedDbPersistence, yh as enableNetwork, Pl as endAt, Rl as endBefore, lh as ensureFirestoreConfigured, of as executeWrite, af as getAggregateFromServer, cf as getCountFromServer, jl as getDoc, Wl as getDocFromCache, Hl as getDocFromServer, Jl as getDocs, Yl as getDocsFromCache, Zl as getDocsFromServer, hh as getFirestore, pf as increment, ah as initializeFirestore, yl as limit, pl as limitToLast, Th as loadBundle, Eh as namedQuery, sf as onSnapshot, rf as onSnapshotsInSync, dl as or, ml as orderBy, al as query, sh as queryEqual, nh as refEqual, _f as runTransaction, mf as serverTimestamp, Xl as setDoc, Tf as setIndexConfiguration, D as setLogLevel, Ql as snapshotEqual, El as startAfter, Tl as startAt, $l as sum, Ih as terminate, tf as updateDoc, gh as waitForPendingWrites, ll as where, If as writeBatch };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3d3b3ea092f731fd4d90a5943517b4ca344fbcd6c379cec51f531efc8872ba1.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f3d3b3ea092f731fd4d90a5943517b4ca344fbcd6c379cec51f531efc8872ba1.json
deleted file mode 100644
index bb0f4dc3842e576e2b8698e6f0ef3469cad011da..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f3d3b3ea092f731fd4d90a5943517b4ca344fbcd6c379cec51f531efc8872ba1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n  return (source, subscriber) => {\n    let hasState = hasSeed;\n    let state = seed;\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      const i = index++;\n      state = hasState ? accumulator(state, value, i) : (hasState = true, value);\n      emitOnNext && subscriber.next(state);\n    }, emitBeforeComplete && (() => {\n      hasState && subscriber.next(state);\n      subscriber.complete();\n    })));\n  };\n}\n//# sourceMappingURL=scanInternals.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f463bd006385e46c751f3141f3b2dd94ef64e8436f9349092637eb774cb80768.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f463bd006385e46c751f3141f3b2dd94ef64e8436f9349092637eb774cb80768.json
deleted file mode 100644
index b2eaa8b60c31d6181f37ee599307b06c2aa1a4f8..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f463bd006385e46c751f3141f3b2dd94ef64e8436f9349092637eb774cb80768.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n  const scheduleSubscription = scheduler.schedule(function () {\n    work();\n    if (repeat) {\n      parentSubscription.add(this.schedule(null, delay));\n    } else {\n      this.unsubscribe();\n    }\n  }, delay);\n  parentSubscription.add(scheduleSubscription);\n  if (!repeat) {\n    return scheduleSubscription;\n  }\n}\n//# sourceMappingURL=executeSchedule.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f4c3d441b2a5369d87d74b6a2fa906e83ea5c846fec406b3c7d7f5b34c5585af.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f4c3d441b2a5369d87d74b6a2fa906e83ea5c846fec406b3c7d7f5b34c5585af.json
deleted file mode 100644
index f52c9a4264253f03b99113b02bd350067755563a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f4c3d441b2a5369d87d74b6a2fa906e83ea5c846fec406b3c7d7f5b34c5585af.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { argsOrArgArray } from '../util/argsOrArgArray';\nimport { raceWith } from './raceWith';\nexport function race(...args) {\n  return raceWith(...argsOrArgArray(args));\n}\n//# sourceMappingURL=race.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f4fffbd896052c3a96585ddf014e508847b94a53af655aa8de3a47826cc9ee7b.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f4fffbd896052c3a96585ddf014e508847b94a53af655aa8de3a47826cc9ee7b.json
deleted file mode 100644
index cb171ecb753fbb38f3b8e07cc715f739a2919d1a..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f4fffbd896052c3a96585ddf014e508847b94a53af655aa8de3a47826cc9ee7b.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"export const dateTimestampProvider = {\n  now() {\n    return (dateTimestampProvider.delegate || Date).now();\n  },\n  delegate: undefined\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f57eef427e69f3a99f565e7d2fd27ee8c88d628f91cc1868c8baa501f5f2f9c3.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f57eef427e69f3a99f565e7d2fd27ee8c88d628f91cc1868c8baa501f5f2f9c3.json
deleted file mode 100644
index 17b3220bc1e5a606dcc105eb2890beade240d237..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f57eef427e69f3a99f565e7d2fd27ee8c88d628f91cc1868c8baa501f5f2f9c3.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n  const duration = timer(due, scheduler);\n  return delayWhen(() => duration);\n}\n//# sourceMappingURL=delay.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f6681873e6011ea070a59a2ac648930126f56dd9b468aad3678727db02fad33f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f6681873e6011ea070a59a2ac648930126f56dd9b468aad3678727db02fad33f.json
deleted file mode 100644
index 956553cb3ce7ffce173f963f5f4701718021e70e..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f6681873e6011ea070a59a2ac648930126f56dd9b468aad3678727db02fad33f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function windowWhen(closingSelector) {\n  return operate((source, subscriber) => {\n    let window;\n    let closingSubscriber;\n    const handleError = err => {\n      window.error(err);\n      subscriber.error(err);\n    };\n    const openWindow = () => {\n      closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n      window === null || window === void 0 ? void 0 : window.complete();\n      window = new Subject();\n      subscriber.next(window.asObservable());\n      let closingNotifier;\n      try {\n        closingNotifier = innerFrom(closingSelector());\n      } catch (err) {\n        handleError(err);\n        return;\n      }\n      closingNotifier.subscribe(closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError));\n    };\n    openWindow();\n    source.subscribe(createOperatorSubscriber(subscriber, value => window.next(value), () => {\n      window.complete();\n      subscriber.complete();\n    }, handleError, () => {\n      closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n      window = null;\n    }));\n  });\n}\n//# sourceMappingURL=windowWhen.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f6a814c6990d0530b6ce107f6656957b81fbb4f5d50fc0e71eae660af55b2e14.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f6a814c6990d0530b6ce107f6656957b81fbb4f5d50fc0e71eae660af55b2e14.json
deleted file mode 100644
index a6ffdeb548b55a7a9438f0a42f5d4d0aad537af8..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f6a814c6990d0530b6ce107f6656957b81fbb4f5d50fc0e71eae660af55b2e14.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n  return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n  constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n    super(destination);\n    this.onFinalize = onFinalize;\n    this.shouldUnsubscribe = shouldUnsubscribe;\n    this._next = onNext ? function (value) {\n      try {\n        onNext(value);\n      } catch (err) {\n        destination.error(err);\n      }\n    } : super._next;\n    this._error = onError ? function (err) {\n      try {\n        onError(err);\n      } catch (err) {\n        destination.error(err);\n      } finally {\n        this.unsubscribe();\n      }\n    } : super._error;\n    this._complete = onComplete ? function () {\n      try {\n        onComplete();\n      } catch (err) {\n        destination.error(err);\n      } finally {\n        this.unsubscribe();\n      }\n    } : super._complete;\n  }\n  unsubscribe() {\n    var _a;\n    if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n      const {\n        closed\n      } = this;\n      super.unsubscribe();\n      !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n    }\n  }\n}\n//# sourceMappingURL=OperatorSubscriber.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f7d0fb560d4c67341fa1a8944e91feeddef665758f7e8da1428efc0ae0019b72.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f7d0fb560d4c67341fa1a8944e91feeddef665758f7e8da1428efc0ae0019b72.json
deleted file mode 100644
index a915930c7f068db0724f1114fe8cec2c3e6d909d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f7d0fb560d4c67341fa1a8944e91feeddef665758f7e8da1428efc0ae0019b72.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n  return operate((source, subscriber) => {\n    let index = 0;\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      subscriber.next(project.call(thisArg, value, index++));\n    }));\n  });\n}\n//# sourceMappingURL=map.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f7f6cf8f4fac3615e71f1d4893cf1eca3430d70b3fc78d570d34d305b1248936.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f7f6cf8f4fac3615e71f1d4893cf1eca3430d70b3fc78d570d34d305b1248936.json
deleted file mode 100644
index 2de4809380016784ccfeeb83c96b37553e98a35d..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f7f6cf8f4fac3615e71f1d4893cf1eca3430d70b3fc78d570d34d305b1248936.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { map } from './map';\nexport function timestamp(timestampProvider = dateTimestampProvider) {\n  return map(value => ({\n    value,\n    timestamp: timestampProvider.now()\n  }));\n}\n//# sourceMappingURL=timestamp.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/f9bfd1baebf2398c1d32c962fadb9cfda8577a4e453d7e6cf5330290bbc51541.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/f9bfd1baebf2398c1d32c962fadb9cfda8577a4e453d7e6cf5330290bbc51541.json
deleted file mode 100644
index a4173250e2b67437a6bd865362ab6bd2a34a6112..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/f9bfd1baebf2398c1d32c962fadb9cfda8577a4e453d7e6cf5330290bbc51541.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n  const hasConfig = typeof config === 'object';\n  return new Promise((resolve, reject) => {\n    const subscriber = new SafeSubscriber({\n      next: value => {\n        resolve(value);\n        subscriber.unsubscribe();\n      },\n      error: reject,\n      complete: () => {\n        if (hasConfig) {\n          resolve(config.defaultValue);\n        } else {\n          reject(new EmptyError());\n        }\n      }\n    });\n    source.subscribe(subscriber);\n  });\n}\n//# sourceMappingURL=firstValueFrom.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/fb3297bad82521ea48a26ae4fa98df53a1fe7d06bec0833b9c901cfaa6504d0a.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/fb3297bad82521ea48a26ae4fa98df53a1fe7d06bec0833b9c901cfaa6504d0a.json
deleted file mode 100644
index 4277691e6b0a3c97b25894bddc3f40b737b90626..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/fb3297bad82521ea48a26ae4fa98df53a1fe7d06bec0833b9c901cfaa6504d0a.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar esm = {};\n\n/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n\nvar k,\n  goog = goog || {},\n  l = commonjsGlobal || self;\nfunction aa() {}\nfunction ba(a) {\n  var b = typeof a;\n  b = \"object\" != b ? b : a ? Array.isArray(a) ? \"array\" : b : \"null\";\n  return \"array\" == b || \"object\" == b && \"number\" == typeof a.length;\n}\nfunction p(a) {\n  var b = typeof a;\n  return \"object\" == b && null != a || \"function\" == b;\n}\nfunction ca(a) {\n  return Object.prototype.hasOwnProperty.call(a, da) && a[da] || (a[da] = ++ea);\n}\nvar da = \"closure_uid_\" + (1E9 * Math.random() >>> 0),\n  ea = 0;\nfunction fa(a, b, c) {\n  return a.call.apply(a.bind, arguments);\n}\nfunction ha(a, b, c) {\n  if (!a) throw Error();\n  if (2 < arguments.length) {\n    var d = Array.prototype.slice.call(arguments, 2);\n    return function () {\n      var e = Array.prototype.slice.call(arguments);\n      Array.prototype.unshift.apply(e, d);\n      return a.apply(b, e);\n    };\n  }\n  return function () {\n    return a.apply(b, arguments);\n  };\n}\nfunction q(a, b, c) {\n  Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf(\"native code\") ? q = fa : q = ha;\n  return q.apply(null, arguments);\n}\nfunction ia(a, b) {\n  var c = Array.prototype.slice.call(arguments, 1);\n  return function () {\n    var d = c.slice();\n    d.push.apply(d, arguments);\n    return a.apply(this, d);\n  };\n}\nfunction t(a, b) {\n  function c() {}\n  c.prototype = b.prototype;\n  a.X = b.prototype;\n  a.prototype = new c();\n  a.prototype.constructor = a;\n  a.Wb = function (d, e, f) {\n    for (var h = Array(arguments.length - 2), n = 2; n < arguments.length; n++) h[n - 2] = arguments[n];\n    return b.prototype[e].apply(d, h);\n  };\n}\nfunction v() {\n  this.s = this.s;\n  this.o = this.o;\n}\nvar ja = 0;\nv.prototype.s = !1;\nv.prototype.na = function () {\n  if (!this.s && (this.s = !0, this.M(), 0 != ja)) {\n    ca(this);\n  }\n};\nv.prototype.M = function () {\n  if (this.o) for (; this.o.length;) this.o.shift()();\n};\nconst la = Array.prototype.indexOf ? function (a, b) {\n  return Array.prototype.indexOf.call(a, b, void 0);\n} : function (a, b) {\n  if (\"string\" === typeof a) return \"string\" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, 0);\n  for (let c = 0; c < a.length; c++) if (c in a && a[c] === b) return c;\n  return -1;\n};\nfunction ma(a) {\n  const b = a.length;\n  if (0 < b) {\n    const c = Array(b);\n    for (let d = 0; d < b; d++) c[d] = a[d];\n    return c;\n  }\n  return [];\n}\nfunction na(a, b) {\n  for (let c = 1; c < arguments.length; c++) {\n    const d = arguments[c];\n    if (ba(d)) {\n      const e = a.length || 0,\n        f = d.length || 0;\n      a.length = e + f;\n      for (let h = 0; h < f; h++) a[e + h] = d[h];\n    } else a.push(d);\n  }\n}\nfunction w(a, b) {\n  this.type = a;\n  this.g = this.target = b;\n  this.defaultPrevented = !1;\n}\nw.prototype.h = function () {\n  this.defaultPrevented = !0;\n};\nvar oa = function () {\n  if (!l.addEventListener || !Object.defineProperty) return !1;\n  var a = !1,\n    b = Object.defineProperty({}, \"passive\", {\n      get: function () {\n        a = !0;\n      }\n    });\n  try {\n    l.addEventListener(\"test\", aa, b), l.removeEventListener(\"test\", aa, b);\n  } catch (c) {}\n  return a;\n}();\nfunction pa(a) {\n  return /^[\\s\\xa0]*$/.test(a);\n}\nvar qa = String.prototype.trim ? function (a) {\n  return a.trim();\n} : function (a) {\n  return /^[\\s\\xa0]*([\\s\\S]*?)[\\s\\xa0]*$/.exec(a)[1];\n};\nfunction ra(a, b) {\n  return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction sa() {\n  var a = l.navigator;\n  return a && (a = a.userAgent) ? a : \"\";\n}\nfunction x(a) {\n  return -1 != sa().indexOf(a);\n}\nfunction ta(a) {\n  ta[\" \"](a);\n  return a;\n}\nta[\" \"] = aa;\nfunction ua(a) {\n  var b = va;\n  return Object.prototype.hasOwnProperty.call(b, 9) ? b[9] : b[9] = a(9);\n}\nvar wa = x(\"Opera\"),\n  y = x(\"Trident\") || x(\"MSIE\"),\n  xa = x(\"Edge\"),\n  ya = xa || y,\n  za = x(\"Gecko\") && !(-1 != sa().toLowerCase().indexOf(\"webkit\") && !x(\"Edge\")) && !(x(\"Trident\") || x(\"MSIE\")) && !x(\"Edge\"),\n  Aa = -1 != sa().toLowerCase().indexOf(\"webkit\") && !x(\"Edge\");\nfunction Ba() {\n  var a = l.document;\n  return a ? a.documentMode : void 0;\n}\nvar Ea;\na: {\n  var Fa = \"\",\n    Ga = function () {\n      var a = sa();\n      if (za) return /rv:([^\\);]+)(\\)|;)/.exec(a);\n      if (xa) return /Edge\\/([\\d\\.]+)/.exec(a);\n      if (y) return /\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(a);\n      if (Aa) return /WebKit\\/(\\S+)/.exec(a);\n      if (wa) return /(?:Version)[ \\/]?(\\S+)/.exec(a);\n    }();\n  Ga && (Fa = Ga ? Ga[1] : \"\");\n  if (y) {\n    var Ha = Ba();\n    if (null != Ha && Ha > parseFloat(Fa)) {\n      Ea = String(Ha);\n      break a;\n    }\n  }\n  Ea = Fa;\n}\nvar va = {};\nfunction Ia() {\n  return ua(function () {\n    let a = 0;\n    const b = qa(String(Ea)).split(\".\"),\n      c = qa(\"9\").split(\".\"),\n      d = Math.max(b.length, c.length);\n    for (let h = 0; 0 == a && h < d; h++) {\n      var e = b[h] || \"\",\n        f = c[h] || \"\";\n      do {\n        e = /(\\d*)(\\D*)(.*)/.exec(e) || [\"\", \"\", \"\", \"\"];\n        f = /(\\d*)(\\D*)(.*)/.exec(f) || [\"\", \"\", \"\", \"\"];\n        if (0 == e[0].length && 0 == f[0].length) break;\n        a = ra(0 == e[1].length ? 0 : parseInt(e[1], 10), 0 == f[1].length ? 0 : parseInt(f[1], 10)) || ra(0 == e[2].length, 0 == f[2].length) || ra(e[2], f[2]);\n        e = e[3];\n        f = f[3];\n      } while (0 == a);\n    }\n    return 0 <= a;\n  });\n}\nvar Ja;\nif (l.document && y) {\n  var Ka = Ba();\n  Ja = Ka ? Ka : parseInt(Ea, 10) || void 0;\n} else Ja = void 0;\nvar La = Ja;\nfunction z(a, b) {\n  w.call(this, a ? a.type : \"\");\n  this.relatedTarget = this.g = this.target = null;\n  this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0;\n  this.key = \"\";\n  this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;\n  this.state = null;\n  this.pointerId = 0;\n  this.pointerType = \"\";\n  this.i = null;\n  if (a) {\n    var c = this.type = a.type,\n      d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;\n    this.target = a.target || a.srcElement;\n    this.g = b;\n    if (b = a.relatedTarget) {\n      if (za) {\n        a: {\n          try {\n            ta(b.nodeName);\n            var e = !0;\n            break a;\n          } catch (f) {}\n          e = !1;\n        }\n        e || (b = null);\n      }\n    } else \"mouseover\" == c ? b = a.fromElement : \"mouseout\" == c && (b = a.toElement);\n    this.relatedTarget = b;\n    d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0) : (this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY, this.screenX = a.screenX || 0, this.screenY = a.screenY || 0);\n    this.button = a.button;\n    this.key = a.key || \"\";\n    this.ctrlKey = a.ctrlKey;\n    this.altKey = a.altKey;\n    this.shiftKey = a.shiftKey;\n    this.metaKey = a.metaKey;\n    this.pointerId = a.pointerId || 0;\n    this.pointerType = \"string\" === typeof a.pointerType ? a.pointerType : Ma[a.pointerType] || \"\";\n    this.state = a.state;\n    this.i = a;\n    a.defaultPrevented && z.X.h.call(this);\n  }\n}\nt(z, w);\nvar Ma = {\n  2: \"touch\",\n  3: \"pen\",\n  4: \"mouse\"\n};\nz.prototype.h = function () {\n  z.X.h.call(this);\n  var a = this.i;\n  a.preventDefault ? a.preventDefault() : a.returnValue = !1;\n};\nvar A = \"closure_listenable_\" + (1E6 * Math.random() | 0);\nvar Na = 0;\nfunction Oa(a, b, c, d, e) {\n  this.listener = a;\n  this.proxy = null;\n  this.src = b;\n  this.type = c;\n  this.capture = !!d;\n  this.ha = e;\n  this.key = ++Na;\n  this.ba = this.ea = !1;\n}\nfunction Pa(a) {\n  a.ba = !0;\n  a.listener = null;\n  a.proxy = null;\n  a.src = null;\n  a.ha = null;\n}\nfunction Qa(a, b, c) {\n  for (const d in a) b.call(c, a[d], d, a);\n}\nfunction Ra(a) {\n  const b = {};\n  for (const c in a) b[c] = a[c];\n  return b;\n}\nconst Sa = \"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");\nfunction Ta(a, b) {\n  let c, d;\n  for (let e = 1; e < arguments.length; e++) {\n    d = arguments[e];\n    for (c in d) a[c] = d[c];\n    for (let f = 0; f < Sa.length; f++) c = Sa[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);\n  }\n}\nfunction Ua(a) {\n  this.src = a;\n  this.g = {};\n  this.h = 0;\n}\nUa.prototype.add = function (a, b, c, d, e) {\n  var f = a.toString();\n  a = this.g[f];\n  a || (a = this.g[f] = [], this.h++);\n  var h = Va(a, b, d, e);\n  -1 < h ? (b = a[h], c || (b.ea = !1)) : (b = new Oa(b, this.src, f, !!d, e), b.ea = c, a.push(b));\n  return b;\n};\nfunction Wa(a, b) {\n  var c = b.type;\n  if (c in a.g) {\n    var d = a.g[c],\n      e = la(d, b),\n      f;\n    (f = 0 <= e) && Array.prototype.splice.call(d, e, 1);\n    f && (Pa(b), 0 == a.g[c].length && (delete a.g[c], a.h--));\n  }\n}\nfunction Va(a, b, c, d) {\n  for (var e = 0; e < a.length; ++e) {\n    var f = a[e];\n    if (!f.ba && f.listener == b && f.capture == !!c && f.ha == d) return e;\n  }\n  return -1;\n}\nvar Xa = \"closure_lm_\" + (1E6 * Math.random() | 0),\n  Ya = {};\nfunction $a(a, b, c, d, e) {\n  if (d && d.once) return ab(a, b, c, d, e);\n  if (Array.isArray(b)) {\n    for (var f = 0; f < b.length; f++) $a(a, b[f], c, d, e);\n    return null;\n  }\n  c = bb(c);\n  return a && a[A] ? a.N(b, c, p(d) ? !!d.capture : !!d, e) : cb(a, b, c, !1, d, e);\n}\nfunction cb(a, b, c, d, e, f) {\n  if (!b) throw Error(\"Invalid event type\");\n  var h = p(e) ? !!e.capture : !!e,\n    n = db(a);\n  n || (a[Xa] = n = new Ua(a));\n  c = n.add(b, c, d, h, f);\n  if (c.proxy) return c;\n  d = eb();\n  c.proxy = d;\n  d.src = a;\n  d.listener = c;\n  if (a.addEventListener) oa || (e = h), void 0 === e && (e = !1), a.addEventListener(b.toString(), d, e);else if (a.attachEvent) a.attachEvent(fb(b.toString()), d);else if (a.addListener && a.removeListener) a.addListener(d);else throw Error(\"addEventListener and attachEvent are unavailable.\");\n  return c;\n}\nfunction eb() {\n  function a(c) {\n    return b.call(a.src, a.listener, c);\n  }\n  const b = gb;\n  return a;\n}\nfunction ab(a, b, c, d, e) {\n  if (Array.isArray(b)) {\n    for (var f = 0; f < b.length; f++) ab(a, b[f], c, d, e);\n    return null;\n  }\n  c = bb(c);\n  return a && a[A] ? a.O(b, c, p(d) ? !!d.capture : !!d, e) : cb(a, b, c, !0, d, e);\n}\nfunction hb(a, b, c, d, e) {\n  if (Array.isArray(b)) for (var f = 0; f < b.length; f++) hb(a, b[f], c, d, e);else (d = p(d) ? !!d.capture : !!d, c = bb(c), a && a[A]) ? (a = a.i, b = String(b).toString(), b in a.g && (f = a.g[b], c = Va(f, c, d, e), -1 < c && (Pa(f[c]), Array.prototype.splice.call(f, c, 1), 0 == f.length && (delete a.g[b], a.h--)))) : a && (a = db(a)) && (b = a.g[b.toString()], a = -1, b && (a = Va(b, c, d, e)), (c = -1 < a ? b[a] : null) && ib(c));\n}\nfunction ib(a) {\n  if (\"number\" !== typeof a && a && !a.ba) {\n    var b = a.src;\n    if (b && b[A]) Wa(b.i, a);else {\n      var c = a.type,\n        d = a.proxy;\n      b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent ? b.detachEvent(fb(c), d) : b.addListener && b.removeListener && b.removeListener(d);\n      (c = db(b)) ? (Wa(c, a), 0 == c.h && (c.src = null, b[Xa] = null)) : Pa(a);\n    }\n  }\n}\nfunction fb(a) {\n  return a in Ya ? Ya[a] : Ya[a] = \"on\" + a;\n}\nfunction gb(a, b) {\n  if (a.ba) a = !0;else {\n    b = new z(b, this);\n    var c = a.listener,\n      d = a.ha || a.src;\n    a.ea && ib(a);\n    a = c.call(d, b);\n  }\n  return a;\n}\nfunction db(a) {\n  a = a[Xa];\n  return a instanceof Ua ? a : null;\n}\nvar jb = \"__closure_events_fn_\" + (1E9 * Math.random() >>> 0);\nfunction bb(a) {\n  if (\"function\" === typeof a) return a;\n  a[jb] || (a[jb] = function (b) {\n    return a.handleEvent(b);\n  });\n  return a[jb];\n}\nfunction B() {\n  v.call(this);\n  this.i = new Ua(this);\n  this.P = this;\n  this.I = null;\n}\nt(B, v);\nB.prototype[A] = !0;\nB.prototype.removeEventListener = function (a, b, c, d) {\n  hb(this, a, b, c, d);\n};\nfunction C(a, b) {\n  var c,\n    d = a.I;\n  if (d) for (c = []; d; d = d.I) c.push(d);\n  a = a.P;\n  d = b.type || b;\n  if (\"string\" === typeof b) b = new w(b, a);else if (b instanceof w) b.target = b.target || a;else {\n    var e = b;\n    b = new w(d, a);\n    Ta(b, e);\n  }\n  e = !0;\n  if (c) for (var f = c.length - 1; 0 <= f; f--) {\n    var h = b.g = c[f];\n    e = kb(h, d, !0, b) && e;\n  }\n  h = b.g = a;\n  e = kb(h, d, !0, b) && e;\n  e = kb(h, d, !1, b) && e;\n  if (c) for (f = 0; f < c.length; f++) h = b.g = c[f], e = kb(h, d, !1, b) && e;\n}\nB.prototype.M = function () {\n  B.X.M.call(this);\n  if (this.i) {\n    var a = this.i,\n      c;\n    for (c in a.g) {\n      for (var d = a.g[c], e = 0; e < d.length; e++) Pa(d[e]);\n      delete a.g[c];\n      a.h--;\n    }\n  }\n  this.I = null;\n};\nB.prototype.N = function (a, b, c, d) {\n  return this.i.add(String(a), b, !1, c, d);\n};\nB.prototype.O = function (a, b, c, d) {\n  return this.i.add(String(a), b, !0, c, d);\n};\nfunction kb(a, b, c, d) {\n  b = a.i.g[String(b)];\n  if (!b) return !0;\n  b = b.concat();\n  for (var e = !0, f = 0; f < b.length; ++f) {\n    var h = b[f];\n    if (h && !h.ba && h.capture == c) {\n      var n = h.listener,\n        u = h.ha || h.src;\n      h.ea && Wa(a.i, h);\n      e = !1 !== n.call(u, d) && e;\n    }\n  }\n  return e && !d.defaultPrevented;\n}\nvar lb = l.JSON.stringify;\nfunction mb() {\n  var a = nb;\n  let b = null;\n  a.g && (b = a.g, a.g = a.g.next, a.g || (a.h = null), b.next = null);\n  return b;\n}\nclass ob {\n  constructor() {\n    this.h = this.g = null;\n  }\n  add(a, b) {\n    const c = pb.get();\n    c.set(a, b);\n    this.h ? this.h.next = c : this.g = c;\n    this.h = c;\n  }\n}\nvar pb = new class {\n  constructor(a, b) {\n    this.i = a;\n    this.j = b;\n    this.h = 0;\n    this.g = null;\n  }\n  get() {\n    let a;\n    0 < this.h ? (this.h--, a = this.g, this.g = a.next, a.next = null) : a = this.i();\n    return a;\n  }\n}(() => new qb(), a => a.reset());\nclass qb {\n  constructor() {\n    this.next = this.g = this.h = null;\n  }\n  set(a, b) {\n    this.h = a;\n    this.g = b;\n    this.next = null;\n  }\n  reset() {\n    this.next = this.g = this.h = null;\n  }\n}\nfunction rb(a) {\n  l.setTimeout(() => {\n    throw a;\n  }, 0);\n}\nfunction sb(a, b) {\n  ub || vb();\n  wb || (ub(), wb = !0);\n  nb.add(a, b);\n}\nvar ub;\nfunction vb() {\n  var a = l.Promise.resolve(void 0);\n  ub = function () {\n    a.then(xb);\n  };\n}\nvar wb = !1,\n  nb = new ob();\nfunction xb() {\n  for (var a; a = mb();) {\n    try {\n      a.h.call(a.g);\n    } catch (c) {\n      rb(c);\n    }\n    var b = pb;\n    b.j(a);\n    100 > b.h && (b.h++, a.next = b.g, b.g = a);\n  }\n  wb = !1;\n}\nfunction yb(a, b) {\n  B.call(this);\n  this.h = a || 1;\n  this.g = b || l;\n  this.j = q(this.lb, this);\n  this.l = Date.now();\n}\nt(yb, B);\nk = yb.prototype;\nk.ca = !1;\nk.R = null;\nk.lb = function () {\n  if (this.ca) {\n    var a = Date.now() - this.l;\n    0 < a && a < .8 * this.h ? this.R = this.g.setTimeout(this.j, this.h - a) : (this.R && (this.g.clearTimeout(this.R), this.R = null), C(this, \"tick\"), this.ca && (zb(this), this.start()));\n  }\n};\nk.start = function () {\n  this.ca = !0;\n  this.R || (this.R = this.g.setTimeout(this.j, this.h), this.l = Date.now());\n};\nfunction zb(a) {\n  a.ca = !1;\n  a.R && (a.g.clearTimeout(a.R), a.R = null);\n}\nk.M = function () {\n  yb.X.M.call(this);\n  zb(this);\n  delete this.g;\n};\nfunction Ab(a, b, c) {\n  if (\"function\" === typeof a) c && (a = q(a, c));else if (a && \"function\" == typeof a.handleEvent) a = q(a.handleEvent, a);else throw Error(\"Invalid listener argument\");\n  return 2147483647 < Number(b) ? -1 : l.setTimeout(a, b || 0);\n}\nfunction Bb(a) {\n  a.g = Ab(() => {\n    a.g = null;\n    a.i && (a.i = !1, Bb(a));\n  }, a.j);\n  const b = a.h;\n  a.h = null;\n  a.m.apply(null, b);\n}\nclass Cb extends v {\n  constructor(a, b) {\n    super();\n    this.m = a;\n    this.j = b;\n    this.h = null;\n    this.i = !1;\n    this.g = null;\n  }\n  l(a) {\n    this.h = arguments;\n    this.g ? this.i = !0 : Bb(this);\n  }\n  M() {\n    super.M();\n    this.g && (l.clearTimeout(this.g), this.g = null, this.i = !1, this.h = null);\n  }\n}\nfunction D(a) {\n  v.call(this);\n  this.h = a;\n  this.g = {};\n}\nt(D, v);\nvar Db = [];\nfunction Eb(a, b, c, d) {\n  Array.isArray(c) || (c && (Db[0] = c.toString()), c = Db);\n  for (var e = 0; e < c.length; e++) {\n    var f = $a(b, c[e], d || a.handleEvent, !1, a.h || a);\n    if (!f) break;\n    a.g[f.key] = f;\n  }\n}\nfunction Fb(a) {\n  Qa(a.g, function (b, c) {\n    this.g.hasOwnProperty(c) && ib(b);\n  }, a);\n  a.g = {};\n}\nD.prototype.M = function () {\n  D.X.M.call(this);\n  Fb(this);\n};\nD.prototype.handleEvent = function () {\n  throw Error(\"EventHandler.handleEvent not implemented\");\n};\nfunction Gb() {\n  this.g = !0;\n}\nGb.prototype.Aa = function () {\n  this.g = !1;\n};\nfunction Hb(a, b, c, d, e, f) {\n  a.info(function () {\n    if (a.g) {\n      if (f) {\n        var h = \"\";\n        for (var n = f.split(\"&\"), u = 0; u < n.length; u++) {\n          var m = n[u].split(\"=\");\n          if (1 < m.length) {\n            var r = m[0];\n            m = m[1];\n            var F = r.split(\"_\");\n            h = 2 <= F.length && \"type\" == F[1] ? h + (r + \"=\" + m + \"&\") : h + (r + \"=redacted&\");\n          }\n        }\n      } else h = null;\n    } else h = f;\n    return \"XMLHTTP REQ (\" + d + \") [attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + h;\n  });\n}\nfunction Ib(a, b, c, d, e, f, h) {\n  a.info(function () {\n    return \"XMLHTTP RESP (\" + d + \") [ attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + f + \" \" + h;\n  });\n}\nfunction E(a, b, c, d) {\n  a.info(function () {\n    return \"XMLHTTP TEXT (\" + b + \"): \" + Jb(a, c) + (d ? \" \" + d : \"\");\n  });\n}\nfunction Kb(a, b) {\n  a.info(function () {\n    return \"TIMEOUT: \" + b;\n  });\n}\nGb.prototype.info = function () {};\nfunction Jb(a, b) {\n  if (!a.g) return b;\n  if (!b) return null;\n  try {\n    var c = JSON.parse(b);\n    if (c) for (a = 0; a < c.length; a++) if (Array.isArray(c[a])) {\n      var d = c[a];\n      if (!(2 > d.length)) {\n        var e = d[1];\n        if (Array.isArray(e) && !(1 > e.length)) {\n          var f = e[0];\n          if (\"noop\" != f && \"stop\" != f && \"close\" != f) for (var h = 1; h < e.length; h++) e[h] = \"\";\n        }\n      }\n    }\n    return lb(c);\n  } catch (n) {\n    return b;\n  }\n}\nvar G = {},\n  Lb = null;\nfunction Mb() {\n  return Lb = Lb || new B();\n}\nG.Pa = \"serverreachability\";\nfunction Nb(a) {\n  w.call(this, G.Pa, a);\n}\nt(Nb, w);\nfunction H(a) {\n  const b = Mb();\n  C(b, new Nb(b));\n}\nG.STAT_EVENT = \"statevent\";\nfunction Ob(a, b) {\n  w.call(this, G.STAT_EVENT, a);\n  this.stat = b;\n}\nt(Ob, w);\nfunction I(a) {\n  const b = Mb();\n  C(b, new Ob(b, a));\n}\nG.Qa = \"timingevent\";\nfunction Pb(a, b) {\n  w.call(this, G.Qa, a);\n  this.size = b;\n}\nt(Pb, w);\nfunction J(a, b) {\n  if (\"function\" !== typeof a) throw Error(\"Fn must not be null and must be a function\");\n  return l.setTimeout(function () {\n    a();\n  }, b);\n}\nvar Qb = {\n  NO_ERROR: 0,\n  mb: 1,\n  zb: 2,\n  yb: 3,\n  tb: 4,\n  xb: 5,\n  Ab: 6,\n  Ma: 7,\n  TIMEOUT: 8,\n  Db: 9\n};\nvar Rb = {\n  rb: \"complete\",\n  Nb: \"success\",\n  Na: \"error\",\n  Ma: \"abort\",\n  Fb: \"ready\",\n  Gb: \"readystatechange\",\n  TIMEOUT: \"timeout\",\n  Bb: \"incrementaldata\",\n  Eb: \"progress\",\n  ub: \"downloadprogress\",\n  Vb: \"uploadprogress\"\n};\nfunction Sb() {}\nSb.prototype.h = null;\nfunction Tb(a) {\n  return a.h || (a.h = a.i());\n}\nfunction Ub() {}\nvar K = {\n  OPEN: \"a\",\n  qb: \"b\",\n  Na: \"c\",\n  Cb: \"d\"\n};\nfunction Vb() {\n  w.call(this, \"d\");\n}\nt(Vb, w);\nfunction Wb() {\n  w.call(this, \"c\");\n}\nt(Wb, w);\nvar Xb;\nfunction Yb() {}\nt(Yb, Sb);\nYb.prototype.g = function () {\n  return new XMLHttpRequest();\n};\nYb.prototype.i = function () {\n  return {};\n};\nXb = new Yb();\nfunction L(a, b, c, d) {\n  this.l = a;\n  this.j = b;\n  this.m = c;\n  this.U = d || 1;\n  this.S = new D(this);\n  this.O = Zb;\n  a = ya ? 125 : void 0;\n  this.T = new yb(a);\n  this.H = null;\n  this.i = !1;\n  this.s = this.A = this.v = this.K = this.F = this.V = this.B = null;\n  this.D = [];\n  this.g = null;\n  this.C = 0;\n  this.o = this.u = null;\n  this.Y = -1;\n  this.I = !1;\n  this.N = 0;\n  this.L = null;\n  this.$ = this.J = this.Z = this.P = !1;\n  this.h = new $b();\n}\nfunction $b() {\n  this.i = null;\n  this.g = \"\";\n  this.h = !1;\n}\nvar Zb = 45E3,\n  ac = {},\n  bc = {};\nk = L.prototype;\nk.setTimeout = function (a) {\n  this.O = a;\n};\nfunction cc(a, b, c) {\n  a.K = 1;\n  a.v = dc(M(b));\n  a.s = c;\n  a.P = !0;\n  ec(a, null);\n}\nfunction ec(a, b) {\n  a.F = Date.now();\n  N(a);\n  a.A = M(a.v);\n  var c = a.A,\n    d = a.U;\n  Array.isArray(d) || (d = [String(d)]);\n  fc(c.i, \"t\", d);\n  a.C = 0;\n  c = a.l.H;\n  a.h = new $b();\n  a.g = gc(a.l, c ? b : null, !a.s);\n  0 < a.N && (a.L = new Cb(q(a.La, a, a.g), a.N));\n  Eb(a.S, a.g, \"readystatechange\", a.ib);\n  b = a.H ? Ra(a.H) : {};\n  a.s ? (a.u || (a.u = \"POST\"), b[\"Content-Type\"] = \"application/x-www-form-urlencoded\", a.g.da(a.A, a.u, a.s, b)) : (a.u = \"GET\", a.g.da(a.A, a.u, null, b));\n  H();\n  Hb(a.j, a.u, a.A, a.m, a.U, a.s);\n}\nk.ib = function (a) {\n  a = a.target;\n  const b = this.L;\n  b && 3 == O(a) ? b.l() : this.La(a);\n};\nk.La = function (a) {\n  try {\n    if (a == this.g) a: {\n      const r = O(this.g);\n      var b = this.g.Ea();\n      const F = this.g.aa();\n      if (!(3 > r) && (3 != r || ya || this.g && (this.h.h || this.g.fa() || hc(this.g)))) {\n        this.I || 4 != r || 7 == b || (8 == b || 0 >= F ? H(3) : H(2));\n        ic(this);\n        var c = this.g.aa();\n        this.Y = c;\n        b: if (jc(this)) {\n          var d = hc(this.g);\n          a = \"\";\n          var e = d.length,\n            f = 4 == O(this.g);\n          if (!this.h.i) {\n            if (\"undefined\" === typeof TextDecoder) {\n              P(this);\n              Q(this);\n              var h = \"\";\n              break b;\n            }\n            this.h.i = new l.TextDecoder();\n          }\n          for (b = 0; b < e; b++) this.h.h = !0, a += this.h.i.decode(d[b], {\n            stream: f && b == e - 1\n          });\n          d.splice(0, e);\n          this.h.g += a;\n          this.C = 0;\n          h = this.h.g;\n        } else h = this.g.fa();\n        this.i = 200 == c;\n        Ib(this.j, this.u, this.A, this.m, this.U, r, c);\n        if (this.i) {\n          if (this.Z && !this.J) {\n            b: {\n              if (this.g) {\n                var n,\n                  u = this.g;\n                if ((n = u.g ? u.g.getResponseHeader(\"X-HTTP-Initial-Response\") : null) && !pa(n)) {\n                  var m = n;\n                  break b;\n                }\n              }\n              m = null;\n            }\n            if (c = m) E(this.j, this.m, c, \"Initial handshake response via X-HTTP-Initial-Response\"), this.J = !0, kc(this, c);else {\n              this.i = !1;\n              this.o = 3;\n              I(12);\n              P(this);\n              Q(this);\n              break a;\n            }\n          }\n          this.P ? (lc(this, r, h), ya && this.i && 3 == r && (Eb(this.S, this.T, \"tick\", this.hb), this.T.start())) : (E(this.j, this.m, h, null), kc(this, h));\n          4 == r && P(this);\n          this.i && !this.I && (4 == r ? mc(this.l, this) : (this.i = !1, N(this)));\n        } else 400 == c && 0 < h.indexOf(\"Unknown SID\") ? (this.o = 3, I(12)) : (this.o = 0, I(13)), P(this), Q(this);\n      }\n    }\n  } catch (r) {} finally {}\n};\nfunction jc(a) {\n  return a.g ? \"GET\" == a.u && 2 != a.K && a.l.Da : !1;\n}\nfunction lc(a, b, c) {\n  let d = !0,\n    e;\n  for (; !a.I && a.C < c.length;) if (e = nc(a, c), e == bc) {\n    4 == b && (a.o = 4, I(14), d = !1);\n    E(a.j, a.m, null, \"[Incomplete Response]\");\n    break;\n  } else if (e == ac) {\n    a.o = 4;\n    I(15);\n    E(a.j, a.m, c, \"[Invalid Chunk]\");\n    d = !1;\n    break;\n  } else E(a.j, a.m, e, null), kc(a, e);\n  jc(a) && e != bc && e != ac && (a.h.g = \"\", a.C = 0);\n  4 != b || 0 != c.length || a.h.h || (a.o = 1, I(16), d = !1);\n  a.i = a.i && d;\n  d ? 0 < c.length && !a.$ && (a.$ = !0, b = a.l, b.g == a && b.$ && !b.K && (b.j.info(\"Great, no buffering proxy detected. Bytes received: \" + c.length), oc(b), b.K = !0, I(11))) : (E(a.j, a.m, c, \"[Invalid Chunked Response]\"), P(a), Q(a));\n}\nk.hb = function () {\n  if (this.g) {\n    var a = O(this.g),\n      b = this.g.fa();\n    this.C < b.length && (ic(this), lc(this, a, b), this.i && 4 != a && N(this));\n  }\n};\nfunction nc(a, b) {\n  var c = a.C,\n    d = b.indexOf(\"\\n\", c);\n  if (-1 == d) return bc;\n  c = Number(b.substring(c, d));\n  if (isNaN(c)) return ac;\n  d += 1;\n  if (d + c > b.length) return bc;\n  b = b.substr(d, c);\n  a.C = d + c;\n  return b;\n}\nk.cancel = function () {\n  this.I = !0;\n  P(this);\n};\nfunction N(a) {\n  a.V = Date.now() + a.O;\n  pc(a, a.O);\n}\nfunction pc(a, b) {\n  if (null != a.B) throw Error(\"WatchDog timer not null\");\n  a.B = J(q(a.gb, a), b);\n}\nfunction ic(a) {\n  a.B && (l.clearTimeout(a.B), a.B = null);\n}\nk.gb = function () {\n  this.B = null;\n  const a = Date.now();\n  0 <= a - this.V ? (Kb(this.j, this.A), 2 != this.K && (H(), I(17)), P(this), this.o = 2, Q(this)) : pc(this, this.V - a);\n};\nfunction Q(a) {\n  0 == a.l.G || a.I || mc(a.l, a);\n}\nfunction P(a) {\n  ic(a);\n  var b = a.L;\n  b && \"function\" == typeof b.na && b.na();\n  a.L = null;\n  zb(a.T);\n  Fb(a.S);\n  a.g && (b = a.g, a.g = null, b.abort(), b.na());\n}\nfunction kc(a, b) {\n  try {\n    var c = a.l;\n    if (0 != c.G && (c.g == a || qc(c.h, a))) if (!a.J && qc(c.h, a) && 3 == c.G) {\n      try {\n        var d = c.Fa.g.parse(b);\n      } catch (m) {\n        d = null;\n      }\n      if (Array.isArray(d) && 3 == d.length) {\n        var e = d;\n        if (0 == e[0]) a: {\n          if (!c.u) {\n            if (c.g) if (c.g.F + 3E3 < a.F) rc(c), sc(c);else break a;\n            tc(c);\n            I(18);\n          }\n        } else c.Ba = e[1], 0 < c.Ba - c.T && 37500 > e[2] && c.L && 0 == c.A && !c.v && (c.v = J(q(c.cb, c), 6E3));\n        if (1 >= uc(c.h) && c.ja) {\n          try {\n            c.ja();\n          } catch (m) {}\n          c.ja = void 0;\n        }\n      } else R(c, 11);\n    } else if ((a.J || c.g == a) && rc(c), !pa(b)) for (e = c.Fa.g.parse(b), b = 0; b < e.length; b++) {\n      let m = e[b];\n      c.T = m[0];\n      m = m[1];\n      if (2 == c.G) {\n        if (\"c\" == m[0]) {\n          c.I = m[1];\n          c.ka = m[2];\n          const r = m[3];\n          null != r && (c.ma = r, c.j.info(\"VER=\" + c.ma));\n          const F = m[4];\n          null != F && (c.Ca = F, c.j.info(\"SVER=\" + c.Ca));\n          const Ca = m[5];\n          null != Ca && \"number\" === typeof Ca && 0 < Ca && (d = 1.5 * Ca, c.J = d, c.j.info(\"backChannelRequestTimeoutMs_=\" + d));\n          d = c;\n          const Z = a.g;\n          if (Z) {\n            const Da = Z.g ? Z.g.getResponseHeader(\"X-Client-Wire-Protocol\") : null;\n            if (Da) {\n              var f = d.h;\n              f.g || -1 == Da.indexOf(\"spdy\") && -1 == Da.indexOf(\"quic\") && -1 == Da.indexOf(\"h2\") || (f.j = f.l, f.g = new Set(), f.h && (vc(f, f.h), f.h = null));\n            }\n            if (d.D) {\n              const tb = Z.g ? Z.g.getResponseHeader(\"X-HTTP-Session-Id\") : null;\n              tb && (d.za = tb, S(d.F, d.D, tb));\n            }\n          }\n          c.G = 3;\n          c.l && c.l.xa();\n          c.$ && (c.P = Date.now() - a.F, c.j.info(\"Handshake RTT: \" + c.P + \"ms\"));\n          d = c;\n          var h = a;\n          d.sa = wc(d, d.H ? d.ka : null, d.V);\n          if (h.J) {\n            xc(d.h, h);\n            var n = h,\n              u = d.J;\n            u && n.setTimeout(u);\n            n.B && (ic(n), N(n));\n            d.g = h;\n          } else yc(d);\n          0 < c.i.length && zc(c);\n        } else \"stop\" != m[0] && \"close\" != m[0] || R(c, 7);\n      } else 3 == c.G && (\"stop\" == m[0] || \"close\" == m[0] ? \"stop\" == m[0] ? R(c, 7) : Ac(c) : \"noop\" != m[0] && c.l && c.l.wa(m), c.A = 0);\n    }\n    H(4);\n  } catch (m) {}\n}\nfunction Bc(a) {\n  if (a.W && \"function\" == typeof a.W) return a.W();\n  if (\"undefined\" !== typeof Map && a instanceof Map || \"undefined\" !== typeof Set && a instanceof Set) return Array.from(a.values());\n  if (\"string\" === typeof a) return a.split(\"\");\n  if (ba(a)) {\n    for (var b = [], c = a.length, d = 0; d < c; d++) b.push(a[d]);\n    return b;\n  }\n  b = [];\n  c = 0;\n  for (d in a) b[c++] = a[d];\n  return b;\n}\nfunction Cc(a) {\n  if (a.oa && \"function\" == typeof a.oa) return a.oa();\n  if (!a.W || \"function\" != typeof a.W) {\n    if (\"undefined\" !== typeof Map && a instanceof Map) return Array.from(a.keys());\n    if (!(\"undefined\" !== typeof Set && a instanceof Set)) {\n      if (ba(a) || \"string\" === typeof a) {\n        var b = [];\n        a = a.length;\n        for (var c = 0; c < a; c++) b.push(c);\n        return b;\n      }\n      b = [];\n      c = 0;\n      for (const d in a) b[c++] = d;\n      return b;\n    }\n  }\n}\nfunction Dc(a, b) {\n  if (a.forEach && \"function\" == typeof a.forEach) a.forEach(b, void 0);else if (ba(a) || \"string\" === typeof a) Array.prototype.forEach.call(a, b, void 0);else for (var c = Cc(a), d = Bc(a), e = d.length, f = 0; f < e; f++) b.call(void 0, d[f], c && c[f], a);\n}\nvar Ec = RegExp(\"^(?:([^:/?#.]+):)?(?://(?:([^\\\\\\\\/?#]*)@)?([^\\\\\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\\\\\/?#]|$))?([^?#]+)?(?:\\\\?([^#]*))?(?:#([\\\\s\\\\S]*))?$\");\nfunction Fc(a, b) {\n  if (a) {\n    a = a.split(\"&\");\n    for (var c = 0; c < a.length; c++) {\n      var d = a[c].indexOf(\"=\"),\n        e = null;\n      if (0 <= d) {\n        var f = a[c].substring(0, d);\n        e = a[c].substring(d + 1);\n      } else f = a[c];\n      b(f, e ? decodeURIComponent(e.replace(/\\+/g, \" \")) : \"\");\n    }\n  }\n}\nfunction T(a, b) {\n  this.g = this.s = this.j = \"\";\n  this.m = null;\n  this.o = this.l = \"\";\n  this.h = !1;\n  if (a instanceof T) {\n    this.h = void 0 !== b ? b : a.h;\n    Gc(this, a.j);\n    this.s = a.s;\n    this.g = a.g;\n    Hc(this, a.m);\n    this.l = a.l;\n    b = a.i;\n    var c = new Ic();\n    c.i = b.i;\n    b.g && (c.g = new Map(b.g), c.h = b.h);\n    Jc(this, c);\n    this.o = a.o;\n  } else a && (c = String(a).match(Ec)) ? (this.h = !!b, Gc(this, c[1] || \"\", !0), this.s = Kc(c[2] || \"\"), this.g = Kc(c[3] || \"\", !0), Hc(this, c[4]), this.l = Kc(c[5] || \"\", !0), Jc(this, c[6] || \"\", !0), this.o = Kc(c[7] || \"\")) : (this.h = !!b, this.i = new Ic(null, this.h));\n}\nT.prototype.toString = function () {\n  var a = [],\n    b = this.j;\n  b && a.push(Lc(b, Mc, !0), \":\");\n  var c = this.g;\n  if (c || \"file\" == b) a.push(\"//\"), (b = this.s) && a.push(Lc(b, Mc, !0), \"@\"), a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), c = this.m, null != c && a.push(\":\", String(c));\n  if (c = this.l) this.g && \"/\" != c.charAt(0) && a.push(\"/\"), a.push(Lc(c, \"/\" == c.charAt(0) ? Nc : Oc, !0));\n  (c = this.i.toString()) && a.push(\"?\", c);\n  (c = this.o) && a.push(\"#\", Lc(c, Pc));\n  return a.join(\"\");\n};\nfunction M(a) {\n  return new T(a);\n}\nfunction Gc(a, b, c) {\n  a.j = c ? Kc(b, !0) : b;\n  a.j && (a.j = a.j.replace(/:$/, \"\"));\n}\nfunction Hc(a, b) {\n  if (b) {\n    b = Number(b);\n    if (isNaN(b) || 0 > b) throw Error(\"Bad port number \" + b);\n    a.m = b;\n  } else a.m = null;\n}\nfunction Jc(a, b, c) {\n  b instanceof Ic ? (a.i = b, Qc(a.i, a.h)) : (c || (b = Lc(b, Rc)), a.i = new Ic(b, a.h));\n}\nfunction S(a, b, c) {\n  a.i.set(b, c);\n}\nfunction dc(a) {\n  S(a, \"zx\", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ Date.now()).toString(36));\n  return a;\n}\nfunction Kc(a, b) {\n  return a ? b ? decodeURI(a.replace(/%25/g, \"%2525\")) : decodeURIComponent(a) : \"\";\n}\nfunction Lc(a, b, c) {\n  return \"string\" === typeof a ? (a = encodeURI(a).replace(b, Sc), c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), a) : null;\n}\nfunction Sc(a) {\n  a = a.charCodeAt(0);\n  return \"%\" + (a >> 4 & 15).toString(16) + (a & 15).toString(16);\n}\nvar Mc = /[#\\/\\?@]/g,\n  Oc = /[#\\?:]/g,\n  Nc = /[#\\?]/g,\n  Rc = /[#\\?@]/g,\n  Pc = /#/g;\nfunction Ic(a, b) {\n  this.h = this.g = null;\n  this.i = a || null;\n  this.j = !!b;\n}\nfunction U(a) {\n  a.g || (a.g = new Map(), a.h = 0, a.i && Fc(a.i, function (b, c) {\n    a.add(decodeURIComponent(b.replace(/\\+/g, \" \")), c);\n  }));\n}\nk = Ic.prototype;\nk.add = function (a, b) {\n  U(this);\n  this.i = null;\n  a = V(this, a);\n  var c = this.g.get(a);\n  c || this.g.set(a, c = []);\n  c.push(b);\n  this.h += 1;\n  return this;\n};\nfunction Tc(a, b) {\n  U(a);\n  b = V(a, b);\n  a.g.has(b) && (a.i = null, a.h -= a.g.get(b).length, a.g.delete(b));\n}\nfunction Uc(a, b) {\n  U(a);\n  b = V(a, b);\n  return a.g.has(b);\n}\nk.forEach = function (a, b) {\n  U(this);\n  this.g.forEach(function (c, d) {\n    c.forEach(function (e) {\n      a.call(b, e, d, this);\n    }, this);\n  }, this);\n};\nk.oa = function () {\n  U(this);\n  const a = Array.from(this.g.values()),\n    b = Array.from(this.g.keys()),\n    c = [];\n  for (let d = 0; d < b.length; d++) {\n    const e = a[d];\n    for (let f = 0; f < e.length; f++) c.push(b[d]);\n  }\n  return c;\n};\nk.W = function (a) {\n  U(this);\n  let b = [];\n  if (\"string\" === typeof a) Uc(this, a) && (b = b.concat(this.g.get(V(this, a))));else {\n    a = Array.from(this.g.values());\n    for (let c = 0; c < a.length; c++) b = b.concat(a[c]);\n  }\n  return b;\n};\nk.set = function (a, b) {\n  U(this);\n  this.i = null;\n  a = V(this, a);\n  Uc(this, a) && (this.h -= this.g.get(a).length);\n  this.g.set(a, [b]);\n  this.h += 1;\n  return this;\n};\nk.get = function (a, b) {\n  if (!a) return b;\n  a = this.W(a);\n  return 0 < a.length ? String(a[0]) : b;\n};\nfunction fc(a, b, c) {\n  Tc(a, b);\n  0 < c.length && (a.i = null, a.g.set(V(a, b), ma(c)), a.h += c.length);\n}\nk.toString = function () {\n  if (this.i) return this.i;\n  if (!this.g) return \"\";\n  const a = [],\n    b = Array.from(this.g.keys());\n  for (var c = 0; c < b.length; c++) {\n    var d = b[c];\n    const f = encodeURIComponent(String(d)),\n      h = this.W(d);\n    for (d = 0; d < h.length; d++) {\n      var e = f;\n      \"\" !== h[d] && (e += \"=\" + encodeURIComponent(String(h[d])));\n      a.push(e);\n    }\n  }\n  return this.i = a.join(\"&\");\n};\nfunction V(a, b) {\n  b = String(b);\n  a.j && (b = b.toLowerCase());\n  return b;\n}\nfunction Qc(a, b) {\n  b && !a.j && (U(a), a.i = null, a.g.forEach(function (c, d) {\n    var e = d.toLowerCase();\n    d != e && (Tc(this, d), fc(this, e, c));\n  }, a));\n  a.j = b;\n}\nvar Vc = class {\n  constructor(a, b) {\n    this.h = a;\n    this.g = b;\n  }\n};\nfunction Wc(a) {\n  this.l = a || Xc;\n  l.PerformanceNavigationTiming ? (a = l.performance.getEntriesByType(\"navigation\"), a = 0 < a.length && (\"hq\" == a[0].nextHopProtocol || \"h2\" == a[0].nextHopProtocol)) : a = !!(l.g && l.g.Ga && l.g.Ga() && l.g.Ga().$b);\n  this.j = a ? this.l : 1;\n  this.g = null;\n  1 < this.j && (this.g = new Set());\n  this.h = null;\n  this.i = [];\n}\nvar Xc = 10;\nfunction Yc(a) {\n  return a.h ? !0 : a.g ? a.g.size >= a.j : !1;\n}\nfunction uc(a) {\n  return a.h ? 1 : a.g ? a.g.size : 0;\n}\nfunction qc(a, b) {\n  return a.h ? a.h == b : a.g ? a.g.has(b) : !1;\n}\nfunction vc(a, b) {\n  a.g ? a.g.add(b) : a.h = b;\n}\nfunction xc(a, b) {\n  a.h && a.h == b ? a.h = null : a.g && a.g.has(b) && a.g.delete(b);\n}\nWc.prototype.cancel = function () {\n  this.i = Zc(this);\n  if (this.h) this.h.cancel(), this.h = null;else if (this.g && 0 !== this.g.size) {\n    for (const a of this.g.values()) a.cancel();\n    this.g.clear();\n  }\n};\nfunction Zc(a) {\n  if (null != a.h) return a.i.concat(a.h.D);\n  if (null != a.g && 0 !== a.g.size) {\n    let b = a.i;\n    for (const c of a.g.values()) b = b.concat(c.D);\n    return b;\n  }\n  return ma(a.i);\n}\nfunction $c() {}\n$c.prototype.stringify = function (a) {\n  return l.JSON.stringify(a, void 0);\n};\n$c.prototype.parse = function (a) {\n  return l.JSON.parse(a, void 0);\n};\nfunction ad() {\n  this.g = new $c();\n}\nfunction bd(a, b, c) {\n  const d = c || \"\";\n  try {\n    Dc(a, function (e, f) {\n      let h = e;\n      p(e) && (h = lb(e));\n      b.push(d + f + \"=\" + encodeURIComponent(h));\n    });\n  } catch (e) {\n    throw b.push(d + \"type=\" + encodeURIComponent(\"_badmap\")), e;\n  }\n}\nfunction cd(a, b) {\n  const c = new Gb();\n  if (l.Image) {\n    const d = new Image();\n    d.onload = ia(dd, c, d, \"TestLoadImage: loaded\", !0, b);\n    d.onerror = ia(dd, c, d, \"TestLoadImage: error\", !1, b);\n    d.onabort = ia(dd, c, d, \"TestLoadImage: abort\", !1, b);\n    d.ontimeout = ia(dd, c, d, \"TestLoadImage: timeout\", !1, b);\n    l.setTimeout(function () {\n      if (d.ontimeout) d.ontimeout();\n    }, 1E4);\n    d.src = a;\n  } else b(!1);\n}\nfunction dd(a, b, c, d, e) {\n  try {\n    b.onload = null, b.onerror = null, b.onabort = null, b.ontimeout = null, e(d);\n  } catch (f) {}\n}\nfunction ed(a) {\n  this.l = a.ac || null;\n  this.j = a.jb || !1;\n}\nt(ed, Sb);\ned.prototype.g = function () {\n  return new fd(this.l, this.j);\n};\ned.prototype.i = function (a) {\n  return function () {\n    return a;\n  };\n}({});\nfunction fd(a, b) {\n  B.call(this);\n  this.D = a;\n  this.u = b;\n  this.m = void 0;\n  this.readyState = gd;\n  this.status = 0;\n  this.responseType = this.responseText = this.response = this.statusText = \"\";\n  this.onreadystatechange = null;\n  this.v = new Headers();\n  this.h = null;\n  this.C = \"GET\";\n  this.B = \"\";\n  this.g = !1;\n  this.A = this.j = this.l = null;\n}\nt(fd, B);\nvar gd = 0;\nk = fd.prototype;\nk.open = function (a, b) {\n  if (this.readyState != gd) throw this.abort(), Error(\"Error reopening a connection\");\n  this.C = a;\n  this.B = b;\n  this.readyState = 1;\n  hd(this);\n};\nk.send = function (a) {\n  if (1 != this.readyState) throw this.abort(), Error(\"need to call open() first. \");\n  this.g = !0;\n  const b = {\n    headers: this.v,\n    method: this.C,\n    credentials: this.m,\n    cache: void 0\n  };\n  a && (b.body = a);\n  (this.D || l).fetch(new Request(this.B, b)).then(this.Wa.bind(this), this.ga.bind(this));\n};\nk.abort = function () {\n  this.response = this.responseText = \"\";\n  this.v = new Headers();\n  this.status = 0;\n  this.j && this.j.cancel(\"Request was aborted.\").catch(() => {});\n  1 <= this.readyState && this.g && 4 != this.readyState && (this.g = !1, id(this));\n  this.readyState = gd;\n};\nk.Wa = function (a) {\n  if (this.g && (this.l = a, this.h || (this.status = this.l.status, this.statusText = this.l.statusText, this.h = a.headers, this.readyState = 2, hd(this)), this.g && (this.readyState = 3, hd(this), this.g))) if (\"arraybuffer\" === this.responseType) a.arrayBuffer().then(this.Ua.bind(this), this.ga.bind(this));else if (\"undefined\" !== typeof l.ReadableStream && \"body\" in a) {\n    this.j = a.body.getReader();\n    if (this.u) {\n      if (this.responseType) throw Error('responseType must be empty for \"streamBinaryChunks\" mode responses.');\n      this.response = [];\n    } else this.response = this.responseText = \"\", this.A = new TextDecoder();\n    jd(this);\n  } else a.text().then(this.Va.bind(this), this.ga.bind(this));\n};\nfunction jd(a) {\n  a.j.read().then(a.Ta.bind(a)).catch(a.ga.bind(a));\n}\nk.Ta = function (a) {\n  if (this.g) {\n    if (this.u && a.value) this.response.push(a.value);else if (!this.u) {\n      var b = a.value ? a.value : new Uint8Array(0);\n      if (b = this.A.decode(b, {\n        stream: !a.done\n      })) this.response = this.responseText += b;\n    }\n    a.done ? id(this) : hd(this);\n    3 == this.readyState && jd(this);\n  }\n};\nk.Va = function (a) {\n  this.g && (this.response = this.responseText = a, id(this));\n};\nk.Ua = function (a) {\n  this.g && (this.response = a, id(this));\n};\nk.ga = function () {\n  this.g && id(this);\n};\nfunction id(a) {\n  a.readyState = 4;\n  a.l = null;\n  a.j = null;\n  a.A = null;\n  hd(a);\n}\nk.setRequestHeader = function (a, b) {\n  this.v.append(a, b);\n};\nk.getResponseHeader = function (a) {\n  return this.h ? this.h.get(a.toLowerCase()) || \"\" : \"\";\n};\nk.getAllResponseHeaders = function () {\n  if (!this.h) return \"\";\n  const a = [],\n    b = this.h.entries();\n  for (var c = b.next(); !c.done;) c = c.value, a.push(c[0] + \": \" + c[1]), c = b.next();\n  return a.join(\"\\r\\n\");\n};\nfunction hd(a) {\n  a.onreadystatechange && a.onreadystatechange.call(a);\n}\nObject.defineProperty(fd.prototype, \"withCredentials\", {\n  get: function () {\n    return \"include\" === this.m;\n  },\n  set: function (a) {\n    this.m = a ? \"include\" : \"same-origin\";\n  }\n});\nvar kd = l.JSON.parse;\nfunction W(a) {\n  B.call(this);\n  this.headers = new Map();\n  this.u = a || null;\n  this.h = !1;\n  this.C = this.g = null;\n  this.H = \"\";\n  this.m = 0;\n  this.j = \"\";\n  this.l = this.F = this.v = this.D = !1;\n  this.B = 0;\n  this.A = null;\n  this.J = ld;\n  this.K = this.L = !1;\n}\nt(W, B);\nvar ld = \"\",\n  md = /^https?$/i,\n  nd = [\"POST\", \"PUT\"];\nk = W.prototype;\nk.Ka = function (a) {\n  this.L = a;\n};\nk.da = function (a, b, c, d) {\n  if (this.g) throw Error(\"[goog.net.XhrIo] Object is active with another request=\" + this.H + \"; newUri=\" + a);\n  b = b ? b.toUpperCase() : \"GET\";\n  this.H = a;\n  this.j = \"\";\n  this.m = 0;\n  this.D = !1;\n  this.h = !0;\n  this.g = this.u ? this.u.g() : Xb.g();\n  this.C = this.u ? Tb(this.u) : Tb(Xb);\n  this.g.onreadystatechange = q(this.Ha, this);\n  try {\n    this.F = !0, this.g.open(b, String(a), !0), this.F = !1;\n  } catch (f) {\n    od(this, f);\n    return;\n  }\n  a = c || \"\";\n  c = new Map(this.headers);\n  if (d) if (Object.getPrototypeOf(d) === Object.prototype) for (var e in d) c.set(e, d[e]);else if (\"function\" === typeof d.keys && \"function\" === typeof d.get) for (const f of d.keys()) c.set(f, d.get(f));else throw Error(\"Unknown input type for opt_headers: \" + String(d));\n  d = Array.from(c.keys()).find(f => \"content-type\" == f.toLowerCase());\n  e = l.FormData && a instanceof l.FormData;\n  !(0 <= la(nd, b)) || d || e || c.set(\"Content-Type\", \"application/x-www-form-urlencoded;charset=utf-8\");\n  for (const [f, h] of c) this.g.setRequestHeader(f, h);\n  this.J && (this.g.responseType = this.J);\n  \"withCredentials\" in this.g && this.g.withCredentials !== this.L && (this.g.withCredentials = this.L);\n  try {\n    pd(this), 0 < this.B && ((this.K = qd(this.g)) ? (this.g.timeout = this.B, this.g.ontimeout = q(this.qa, this)) : this.A = Ab(this.qa, this.B, this)), this.v = !0, this.g.send(a), this.v = !1;\n  } catch (f) {\n    od(this, f);\n  }\n};\nfunction qd(a) {\n  return y && Ia() && \"number\" === typeof a.timeout && void 0 !== a.ontimeout;\n}\nk.qa = function () {\n  \"undefined\" != typeof goog && this.g && (this.j = \"Timed out after \" + this.B + \"ms, aborting\", this.m = 8, C(this, \"timeout\"), this.abort(8));\n};\nfunction od(a, b) {\n  a.h = !1;\n  a.g && (a.l = !0, a.g.abort(), a.l = !1);\n  a.j = b;\n  a.m = 5;\n  rd(a);\n  sd(a);\n}\nfunction rd(a) {\n  a.D || (a.D = !0, C(a, \"complete\"), C(a, \"error\"));\n}\nk.abort = function (a) {\n  this.g && this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1, this.m = a || 7, C(this, \"complete\"), C(this, \"abort\"), sd(this));\n};\nk.M = function () {\n  this.g && (this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1), sd(this, !0));\n  W.X.M.call(this);\n};\nk.Ha = function () {\n  this.s || (this.F || this.v || this.l ? td(this) : this.fb());\n};\nk.fb = function () {\n  td(this);\n};\nfunction td(a) {\n  if (a.h && \"undefined\" != typeof goog && (!a.C[1] || 4 != O(a) || 2 != a.aa())) if (a.v && 4 == O(a)) Ab(a.Ha, 0, a);else if (C(a, \"readystatechange\"), 4 == O(a)) {\n    a.h = !1;\n    try {\n      const n = a.aa();\n      a: switch (n) {\n        case 200:\n        case 201:\n        case 202:\n        case 204:\n        case 206:\n        case 304:\n        case 1223:\n          var b = !0;\n          break a;\n        default:\n          b = !1;\n      }\n      var c;\n      if (!(c = b)) {\n        var d;\n        if (d = 0 === n) {\n          var e = String(a.H).match(Ec)[1] || null;\n          if (!e && l.self && l.self.location) {\n            var f = l.self.location.protocol;\n            e = f.substr(0, f.length - 1);\n          }\n          d = !md.test(e ? e.toLowerCase() : \"\");\n        }\n        c = d;\n      }\n      if (c) C(a, \"complete\"), C(a, \"success\");else {\n        a.m = 6;\n        try {\n          var h = 2 < O(a) ? a.g.statusText : \"\";\n        } catch (u) {\n          h = \"\";\n        }\n        a.j = h + \" [\" + a.aa() + \"]\";\n        rd(a);\n      }\n    } finally {\n      sd(a);\n    }\n  }\n}\nfunction sd(a, b) {\n  if (a.g) {\n    pd(a);\n    const c = a.g,\n      d = a.C[0] ? aa : null;\n    a.g = null;\n    a.C = null;\n    b || C(a, \"ready\");\n    try {\n      c.onreadystatechange = d;\n    } catch (e) {}\n  }\n}\nfunction pd(a) {\n  a.g && a.K && (a.g.ontimeout = null);\n  a.A && (l.clearTimeout(a.A), a.A = null);\n}\nfunction O(a) {\n  return a.g ? a.g.readyState : 0;\n}\nk.aa = function () {\n  try {\n    return 2 < O(this) ? this.g.status : -1;\n  } catch (a) {\n    return -1;\n  }\n};\nk.fa = function () {\n  try {\n    return this.g ? this.g.responseText : \"\";\n  } catch (a) {\n    return \"\";\n  }\n};\nk.Sa = function (a) {\n  if (this.g) {\n    var b = this.g.responseText;\n    a && 0 == b.indexOf(a) && (b = b.substring(a.length));\n    return kd(b);\n  }\n};\nfunction hc(a) {\n  try {\n    if (!a.g) return null;\n    if (\"response\" in a.g) return a.g.response;\n    switch (a.J) {\n      case ld:\n      case \"text\":\n        return a.g.responseText;\n      case \"arraybuffer\":\n        if (\"mozResponseArrayBuffer\" in a.g) return a.g.mozResponseArrayBuffer;\n    }\n    return null;\n  } catch (b) {\n    return null;\n  }\n}\nk.Ea = function () {\n  return this.m;\n};\nk.Oa = function () {\n  return \"string\" === typeof this.j ? this.j : String(this.j);\n};\nfunction ud(a) {\n  let b = \"\";\n  Qa(a, function (c, d) {\n    b += d;\n    b += \":\";\n    b += c;\n    b += \"\\r\\n\";\n  });\n  return b;\n}\nfunction vd(a, b, c) {\n  a: {\n    for (d in c) {\n      var d = !1;\n      break a;\n    }\n    d = !0;\n  }\n  d || (c = ud(c), \"string\" === typeof a ? null != c && encodeURIComponent(String(c)) : S(a, b, c));\n}\nfunction wd(a, b, c) {\n  return c && c.internalChannelParams ? c.internalChannelParams[a] || b : b;\n}\nfunction xd(a) {\n  this.Ca = 0;\n  this.i = [];\n  this.j = new Gb();\n  this.ka = this.sa = this.F = this.V = this.g = this.za = this.D = this.ia = this.o = this.S = this.s = null;\n  this.ab = this.U = 0;\n  this.Za = wd(\"failFast\", !1, a);\n  this.L = this.v = this.u = this.m = this.l = null;\n  this.Y = !0;\n  this.pa = this.Ba = this.T = -1;\n  this.Z = this.A = this.C = 0;\n  this.Xa = wd(\"baseRetryDelayMs\", 5E3, a);\n  this.bb = wd(\"retryDelaySeedMs\", 1E4, a);\n  this.$a = wd(\"forwardChannelMaxRetries\", 2, a);\n  this.ta = wd(\"forwardChannelRequestTimeoutMs\", 2E4, a);\n  this.ra = a && a.xmlHttpFactory || void 0;\n  this.Da = a && a.Zb || !1;\n  this.J = void 0;\n  this.H = a && a.supportsCrossDomainXhr || !1;\n  this.I = \"\";\n  this.h = new Wc(a && a.concurrentRequestLimit);\n  this.Fa = new ad();\n  this.O = a && a.fastHandshake || !1;\n  this.N = a && a.encodeInitMessageHeaders || !1;\n  this.O && this.N && (this.N = !1);\n  this.Ya = a && a.Xb || !1;\n  a && a.Aa && this.j.Aa();\n  a && a.forceLongPolling && (this.Y = !1);\n  this.$ = !this.O && this.Y && a && a.detectBufferingProxy || !1;\n  this.ja = void 0;\n  this.P = 0;\n  this.K = !1;\n  this.la = this.B = null;\n}\nk = xd.prototype;\nk.ma = 8;\nk.G = 1;\nfunction Ac(a) {\n  yd(a);\n  if (3 == a.G) {\n    var b = a.U++,\n      c = M(a.F);\n    S(c, \"SID\", a.I);\n    S(c, \"RID\", b);\n    S(c, \"TYPE\", \"terminate\");\n    zd(a, c);\n    b = new L(a, a.j, b, void 0);\n    b.K = 2;\n    b.v = dc(M(c));\n    c = !1;\n    l.navigator && l.navigator.sendBeacon && (c = l.navigator.sendBeacon(b.v.toString(), \"\"));\n    !c && l.Image && (new Image().src = b.v, c = !0);\n    c || (b.g = gc(b.l, null), b.g.da(b.v));\n    b.F = Date.now();\n    N(b);\n  }\n  Ad(a);\n}\nfunction sc(a) {\n  a.g && (oc(a), a.g.cancel(), a.g = null);\n}\nfunction yd(a) {\n  sc(a);\n  a.u && (l.clearTimeout(a.u), a.u = null);\n  rc(a);\n  a.h.cancel();\n  a.m && (\"number\" === typeof a.m && l.clearTimeout(a.m), a.m = null);\n}\nfunction zc(a) {\n  Yc(a.h) || a.m || (a.m = !0, sb(a.Ja, a), a.C = 0);\n}\nfunction Bd(a, b) {\n  if (uc(a.h) >= a.h.j - (a.m ? 1 : 0)) return !1;\n  if (a.m) return a.i = b.D.concat(a.i), !0;\n  if (1 == a.G || 2 == a.G || a.C >= (a.Za ? 0 : a.$a)) return !1;\n  a.m = J(q(a.Ja, a, b), Cd(a, a.C));\n  a.C++;\n  return !0;\n}\nk.Ja = function (a) {\n  if (this.m) if (this.m = null, 1 == this.G) {\n    if (!a) {\n      this.U = Math.floor(1E5 * Math.random());\n      a = this.U++;\n      const e = new L(this, this.j, a, void 0);\n      let f = this.s;\n      this.S && (f ? (f = Ra(f), Ta(f, this.S)) : f = this.S);\n      null !== this.o || this.N || (e.H = f, f = null);\n      if (this.O) a: {\n        var b = 0;\n        for (var c = 0; c < this.i.length; c++) {\n          b: {\n            var d = this.i[c];\n            if (\"__data__\" in d.g && (d = d.g.__data__, \"string\" === typeof d)) {\n              d = d.length;\n              break b;\n            }\n            d = void 0;\n          }\n          if (void 0 === d) break;\n          b += d;\n          if (4096 < b) {\n            b = c;\n            break a;\n          }\n          if (4096 === b || c === this.i.length - 1) {\n            b = c + 1;\n            break a;\n          }\n        }\n        b = 1E3;\n      } else b = 1E3;\n      b = Dd(this, e, b);\n      c = M(this.F);\n      S(c, \"RID\", a);\n      S(c, \"CVER\", 22);\n      this.D && S(c, \"X-HTTP-Session-Id\", this.D);\n      zd(this, c);\n      f && (this.N ? b = \"headers=\" + encodeURIComponent(String(ud(f))) + \"&\" + b : this.o && vd(c, this.o, f));\n      vc(this.h, e);\n      this.Ya && S(c, \"TYPE\", \"init\");\n      this.O ? (S(c, \"$req\", b), S(c, \"SID\", \"null\"), e.Z = !0, cc(e, c, null)) : cc(e, c, b);\n      this.G = 2;\n    }\n  } else 3 == this.G && (a ? Ed(this, a) : 0 == this.i.length || Yc(this.h) || Ed(this));\n};\nfunction Ed(a, b) {\n  var c;\n  b ? c = b.m : c = a.U++;\n  const d = M(a.F);\n  S(d, \"SID\", a.I);\n  S(d, \"RID\", c);\n  S(d, \"AID\", a.T);\n  zd(a, d);\n  a.o && a.s && vd(d, a.o, a.s);\n  c = new L(a, a.j, c, a.C + 1);\n  null === a.o && (c.H = a.s);\n  b && (a.i = b.D.concat(a.i));\n  b = Dd(a, c, 1E3);\n  c.setTimeout(Math.round(.5 * a.ta) + Math.round(.5 * a.ta * Math.random()));\n  vc(a.h, c);\n  cc(c, d, b);\n}\nfunction zd(a, b) {\n  a.ia && Qa(a.ia, function (c, d) {\n    S(b, d, c);\n  });\n  a.l && Dc({}, function (c, d) {\n    S(b, d, c);\n  });\n}\nfunction Dd(a, b, c) {\n  c = Math.min(a.i.length, c);\n  var d = a.l ? q(a.l.Ra, a.l, a) : null;\n  a: {\n    var e = a.i;\n    let f = -1;\n    for (;;) {\n      const h = [\"count=\" + c];\n      -1 == f ? 0 < c ? (f = e[0].h, h.push(\"ofs=\" + f)) : f = 0 : h.push(\"ofs=\" + f);\n      let n = !0;\n      for (let u = 0; u < c; u++) {\n        let m = e[u].h;\n        const r = e[u].g;\n        m -= f;\n        if (0 > m) f = Math.max(0, e[u].h - 100), n = !1;else try {\n          bd(r, h, \"req\" + m + \"_\");\n        } catch (F) {\n          d && d(r);\n        }\n      }\n      if (n) {\n        d = h.join(\"&\");\n        break a;\n      }\n    }\n  }\n  a = a.i.splice(0, c);\n  b.D = a;\n  return d;\n}\nfunction yc(a) {\n  a.g || a.u || (a.Z = 1, sb(a.Ia, a), a.A = 0);\n}\nfunction tc(a) {\n  if (a.g || a.u || 3 <= a.A) return !1;\n  a.Z++;\n  a.u = J(q(a.Ia, a), Cd(a, a.A));\n  a.A++;\n  return !0;\n}\nk.Ia = function () {\n  this.u = null;\n  Fd(this);\n  if (this.$ && !(this.K || null == this.g || 0 >= this.P)) {\n    var a = 2 * this.P;\n    this.j.info(\"BP detection timer enabled: \" + a);\n    this.B = J(q(this.eb, this), a);\n  }\n};\nk.eb = function () {\n  this.B && (this.B = null, this.j.info(\"BP detection timeout reached.\"), this.j.info(\"Buffering proxy detected and switch to long-polling!\"), this.L = !1, this.K = !0, I(10), sc(this), Fd(this));\n};\nfunction oc(a) {\n  null != a.B && (l.clearTimeout(a.B), a.B = null);\n}\nfunction Fd(a) {\n  a.g = new L(a, a.j, \"rpc\", a.Z);\n  null === a.o && (a.g.H = a.s);\n  a.g.N = 0;\n  var b = M(a.sa);\n  S(b, \"RID\", \"rpc\");\n  S(b, \"SID\", a.I);\n  S(b, \"CI\", a.L ? \"0\" : \"1\");\n  S(b, \"AID\", a.T);\n  S(b, \"TYPE\", \"xmlhttp\");\n  zd(a, b);\n  a.o && a.s && vd(b, a.o, a.s);\n  a.J && a.g.setTimeout(a.J);\n  var c = a.g;\n  a = a.ka;\n  c.K = 1;\n  c.v = dc(M(b));\n  c.s = null;\n  c.P = !0;\n  ec(c, a);\n}\nk.cb = function () {\n  null != this.v && (this.v = null, sc(this), tc(this), I(19));\n};\nfunction rc(a) {\n  null != a.v && (l.clearTimeout(a.v), a.v = null);\n}\nfunction mc(a, b) {\n  var c = null;\n  if (a.g == b) {\n    rc(a);\n    oc(a);\n    a.g = null;\n    var d = 2;\n  } else if (qc(a.h, b)) c = b.D, xc(a.h, b), d = 1;else return;\n  if (0 != a.G) if (a.pa = b.Y, b.i) {\n    if (1 == d) {\n      c = b.s ? b.s.length : 0;\n      b = Date.now() - b.F;\n      var e = a.C;\n      d = Mb();\n      C(d, new Pb(d, c));\n      zc(a);\n    } else yc(a);\n  } else if (e = b.o, 3 == e || 0 == e && 0 < a.pa || !(1 == d && Bd(a, b) || 2 == d && tc(a))) switch (c && 0 < c.length && (b = a.h, b.i = b.i.concat(c)), e) {\n    case 1:\n      R(a, 5);\n      break;\n    case 4:\n      R(a, 10);\n      break;\n    case 3:\n      R(a, 6);\n      break;\n    default:\n      R(a, 2);\n  }\n}\nfunction Cd(a, b) {\n  let c = a.Xa + Math.floor(Math.random() * a.bb);\n  a.l || (c *= 2);\n  return c * b;\n}\nfunction R(a, b) {\n  a.j.info(\"Error code \" + b);\n  if (2 == b) {\n    var c = null;\n    a.l && (c = null);\n    var d = q(a.kb, a);\n    c || (c = new T(\"//www.google.com/images/cleardot.gif\"), l.location && \"http\" == l.location.protocol || Gc(c, \"https\"), dc(c));\n    cd(c.toString(), d);\n  } else I(2);\n  a.G = 0;\n  a.l && a.l.va(b);\n  Ad(a);\n  yd(a);\n}\nk.kb = function (a) {\n  a ? (this.j.info(\"Successfully pinged google.com\"), I(2)) : (this.j.info(\"Failed to ping google.com\"), I(1));\n};\nfunction Ad(a) {\n  a.G = 0;\n  a.la = [];\n  if (a.l) {\n    const b = Zc(a.h);\n    if (0 != b.length || 0 != a.i.length) na(a.la, b), na(a.la, a.i), a.h.i.length = 0, ma(a.i), a.i.length = 0;\n    a.l.ua();\n  }\n}\nfunction wc(a, b, c) {\n  var d = c instanceof T ? M(c) : new T(c, void 0);\n  if (\"\" != d.g) b && (d.g = b + \".\" + d.g), Hc(d, d.m);else {\n    var e = l.location;\n    d = e.protocol;\n    b = b ? b + \".\" + e.hostname : e.hostname;\n    e = +e.port;\n    var f = new T(null, void 0);\n    d && Gc(f, d);\n    b && (f.g = b);\n    e && Hc(f, e);\n    c && (f.l = c);\n    d = f;\n  }\n  c = a.D;\n  b = a.za;\n  c && b && S(d, c, b);\n  S(d, \"VER\", a.ma);\n  zd(a, d);\n  return d;\n}\nfunction gc(a, b, c) {\n  if (b && !a.H) throw Error(\"Can't create secondary domain capable XhrIo object.\");\n  b = c && a.Da && !a.ra ? new W(new ed({\n    jb: !0\n  })) : new W(a.ra);\n  b.Ka(a.H);\n  return b;\n}\nfunction Gd() {}\nk = Gd.prototype;\nk.xa = function () {};\nk.wa = function () {};\nk.va = function () {};\nk.ua = function () {};\nk.Ra = function () {};\nfunction Hd() {\n  if (y && !(10 <= Number(La))) throw Error(\"Environmental error: no available transport.\");\n}\nHd.prototype.g = function (a, b) {\n  return new X(a, b);\n};\nfunction X(a, b) {\n  B.call(this);\n  this.g = new xd(b);\n  this.l = a;\n  this.h = b && b.messageUrlParams || null;\n  a = b && b.messageHeaders || null;\n  b && b.clientProtocolHeaderRequired && (a ? a[\"X-Client-Protocol\"] = \"webchannel\" : a = {\n    \"X-Client-Protocol\": \"webchannel\"\n  });\n  this.g.s = a;\n  a = b && b.initMessageHeaders || null;\n  b && b.messageContentType && (a ? a[\"X-WebChannel-Content-Type\"] = b.messageContentType : a = {\n    \"X-WebChannel-Content-Type\": b.messageContentType\n  });\n  b && b.ya && (a ? a[\"X-WebChannel-Client-Profile\"] = b.ya : a = {\n    \"X-WebChannel-Client-Profile\": b.ya\n  });\n  this.g.S = a;\n  (a = b && b.Yb) && !pa(a) && (this.g.o = a);\n  this.A = b && b.supportsCrossDomainXhr || !1;\n  this.v = b && b.sendRawJson || !1;\n  (b = b && b.httpSessionIdParam) && !pa(b) && (this.g.D = b, a = this.h, null !== a && b in a && (a = this.h, b in a && delete a[b]));\n  this.j = new Y(this);\n}\nt(X, B);\nX.prototype.m = function () {\n  this.g.l = this.j;\n  this.A && (this.g.H = !0);\n  var a = this.g,\n    b = this.l,\n    c = this.h || void 0;\n  I(0);\n  a.V = b;\n  a.ia = c || {};\n  a.L = a.Y;\n  a.F = wc(a, null, a.V);\n  zc(a);\n};\nX.prototype.close = function () {\n  Ac(this.g);\n};\nX.prototype.u = function (a) {\n  var b = this.g;\n  if (\"string\" === typeof a) {\n    var c = {};\n    c.__data__ = a;\n    a = c;\n  } else this.v && (c = {}, c.__data__ = lb(a), a = c);\n  b.i.push(new Vc(b.ab++, a));\n  3 == b.G && zc(b);\n};\nX.prototype.M = function () {\n  this.g.l = null;\n  delete this.j;\n  Ac(this.g);\n  delete this.g;\n  X.X.M.call(this);\n};\nfunction Id(a) {\n  Vb.call(this);\n  var b = a.__sm__;\n  if (b) {\n    a: {\n      for (const c in b) {\n        a = c;\n        break a;\n      }\n      a = void 0;\n    }\n    if (this.i = a) a = this.i, b = null !== b && a in b ? b[a] : void 0;\n    this.data = b;\n  } else this.data = a;\n}\nt(Id, Vb);\nfunction Jd() {\n  Wb.call(this);\n  this.status = 1;\n}\nt(Jd, Wb);\nfunction Y(a) {\n  this.g = a;\n}\nt(Y, Gd);\nY.prototype.xa = function () {\n  C(this.g, \"a\");\n};\nY.prototype.wa = function (a) {\n  C(this.g, new Id(a));\n};\nY.prototype.va = function (a) {\n  C(this.g, new Jd());\n};\nY.prototype.ua = function () {\n  C(this.g, \"b\");\n}; /*\n   Copyright 2017 Google LLC\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n   http://www.apache.org/licenses/LICENSE-2.0\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n   */\nHd.prototype.createWebChannel = Hd.prototype.g;\nX.prototype.send = X.prototype.u;\nX.prototype.open = X.prototype.m;\nX.prototype.close = X.prototype.close;\nQb.NO_ERROR = 0;\nQb.TIMEOUT = 8;\nQb.HTTP_ERROR = 6;\nRb.COMPLETE = \"complete\";\nUb.EventType = K;\nK.OPEN = \"a\";\nK.CLOSE = \"b\";\nK.ERROR = \"c\";\nK.MESSAGE = \"d\";\nB.prototype.listen = B.prototype.N;\nW.prototype.listenOnce = W.prototype.O;\nW.prototype.getLastError = W.prototype.Oa;\nW.prototype.getLastErrorCode = W.prototype.Ea;\nW.prototype.getStatus = W.prototype.aa;\nW.prototype.getResponseJson = W.prototype.Sa;\nW.prototype.getResponseText = W.prototype.fa;\nW.prototype.send = W.prototype.da;\nW.prototype.setWithCredentials = W.prototype.Ka;\nvar createWebChannelTransport = esm.createWebChannelTransport = function () {\n  return new Hd();\n};\nvar getStatEventTarget = esm.getStatEventTarget = function () {\n  return Mb();\n};\nvar ErrorCode = esm.ErrorCode = Qb;\nvar EventType = esm.EventType = Rb;\nvar Event = esm.Event = G;\nvar Stat = esm.Stat = {\n  sb: 0,\n  vb: 1,\n  wb: 2,\n  Pb: 3,\n  Ub: 4,\n  Rb: 5,\n  Sb: 6,\n  Qb: 7,\n  Ob: 8,\n  Tb: 9,\n  PROXY: 10,\n  NOPROXY: 11,\n  Mb: 12,\n  Ib: 13,\n  Jb: 14,\n  Hb: 15,\n  Kb: 16,\n  Lb: 17,\n  ob: 18,\n  nb: 19,\n  pb: 20\n};\nvar FetchXmlHttpFactory = esm.FetchXmlHttpFactory = ed;\nvar WebChannel = esm.WebChannel = Ub;\nvar XhrIo = esm.XhrIo = W;\nexport { ErrorCode, Event, EventType, FetchXmlHttpFactory, Stat, WebChannel, XhrIo, createWebChannelTransport, esm as default, getStatEventTarget };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/fb9338809b1b0513667543cf60cc65018f6f7952dfcc97c1cb9d158ccf54bd6c.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/fb9338809b1b0513667543cf60cc65018f6f7952dfcc97c1cb9d158ccf54bd6c.json
deleted file mode 100644
index 15da3d7f671c8488b6439c240ee17e22138d5b77..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/fb9338809b1b0513667543cf60cc65018f6f7952dfcc97c1cb9d158ccf54bd6c.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import _asyncToGenerator from \"/Users/zinaboukercha/takima-project/takima-AR/takima-AR/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Deferred, ErrorFactory, isIndexedDBAvailable, uuidv4, getGlobal, base64, issuedAtTime, calculateBackoffMillis, getModularInstance } from '@firebase/util';\nimport { Logger } from '@firebase/logger';\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst APP_CHECK_STATES = new Map();\nconst DEFAULT_STATE = {\n  activated: false,\n  tokenObservers: []\n};\nconst DEBUG_STATE = {\n  initialized: false,\n  enabled: false\n};\n/**\r\n * Gets a reference to the state object.\r\n */\nfunction getStateReference(app) {\n  return APP_CHECK_STATES.get(app) || Object.assign({}, DEFAULT_STATE);\n}\n/**\r\n * Set once on initialization. The map should hold the same reference to the\r\n * same object until this entry is deleted.\r\n */\nfunction setInitialState(app, state) {\n  APP_CHECK_STATES.set(app, state);\n  return APP_CHECK_STATES.get(app);\n}\nfunction getDebugState() {\n  return DEBUG_STATE;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst BASE_ENDPOINT = 'https://content-firebaseappcheck.googleapis.com/v1';\nconst EXCHANGE_RECAPTCHA_TOKEN_METHOD = 'exchangeRecaptchaV3Token';\nconst EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD = 'exchangeRecaptchaEnterpriseToken';\nconst EXCHANGE_DEBUG_TOKEN_METHOD = 'exchangeDebugToken';\nconst TOKEN_REFRESH_TIME = {\n  /**\r\n   * The offset time before token natural expiration to run the refresh.\r\n   * This is currently 5 minutes.\r\n   */\n  OFFSET_DURATION: 5 * 60 * 1000,\n  /**\r\n   * This is the first retrial wait after an error. This is currently\r\n   * 30 seconds.\r\n   */\n  RETRIAL_MIN_WAIT: 30 * 1000,\n  /**\r\n   * This is the maximum retrial wait, currently 16 minutes.\r\n   */\n  RETRIAL_MAX_WAIT: 16 * 60 * 1000\n};\n/**\r\n * One day in millis, for certain error code backoffs.\r\n */\nconst ONE_DAY = 24 * 60 * 60 * 1000;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Port from auth proactiverefresh.js\r\n *\r\n */\n// TODO: move it to @firebase/util?\n// TODO: allow to config whether refresh should happen in the background\nclass Refresher {\n  constructor(operation, retryPolicy, getWaitDuration, lowerBound, upperBound) {\n    this.operation = operation;\n    this.retryPolicy = retryPolicy;\n    this.getWaitDuration = getWaitDuration;\n    this.lowerBound = lowerBound;\n    this.upperBound = upperBound;\n    this.pending = null;\n    this.nextErrorWaitInterval = lowerBound;\n    if (lowerBound > upperBound) {\n      throw new Error('Proactive refresh lower bound greater than upper bound!');\n    }\n  }\n  start() {\n    this.nextErrorWaitInterval = this.lowerBound;\n    this.process(true).catch(() => {\n      /* we don't care about the result */\n    });\n  }\n  stop() {\n    if (this.pending) {\n      this.pending.reject('cancelled');\n      this.pending = null;\n    }\n  }\n  isRunning() {\n    return !!this.pending;\n  }\n  process(hasSucceeded) {\n    var _this = this;\n    return _asyncToGenerator(function* () {\n      _this.stop();\n      try {\n        _this.pending = new Deferred();\n        yield sleep(_this.getNextRun(hasSucceeded));\n        // Why do we resolve a promise, then immediate wait for it?\n        // We do it to make the promise chain cancellable.\n        // We can call stop() which rejects the promise before the following line execute, which makes\n        // the code jump to the catch block.\n        // TODO: unit test this\n        _this.pending.resolve();\n        yield _this.pending.promise;\n        _this.pending = new Deferred();\n        yield _this.operation();\n        _this.pending.resolve();\n        yield _this.pending.promise;\n        _this.process(true).catch(() => {\n          /* we don't care about the result */\n        });\n      } catch (error) {\n        if (_this.retryPolicy(error)) {\n          _this.process(false).catch(() => {\n            /* we don't care about the result */\n          });\n        } else {\n          _this.stop();\n        }\n      }\n    })();\n  }\n  getNextRun(hasSucceeded) {\n    if (hasSucceeded) {\n      // If last operation succeeded, reset next error wait interval and return\n      // the default wait duration.\n      this.nextErrorWaitInterval = this.lowerBound;\n      // Return typical wait duration interval after a successful operation.\n      return this.getWaitDuration();\n    } else {\n      // Get next error wait interval.\n      const currentErrorWaitInterval = this.nextErrorWaitInterval;\n      // Double interval for next consecutive error.\n      this.nextErrorWaitInterval *= 2;\n      // Make sure next wait interval does not exceed the maximum upper bound.\n      if (this.nextErrorWaitInterval > this.upperBound) {\n        this.nextErrorWaitInterval = this.upperBound;\n      }\n      return currentErrorWaitInterval;\n    }\n  }\n}\nfunction sleep(ms) {\n  return new Promise(resolve => {\n    setTimeout(resolve, ms);\n  });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERRORS = {\n  [\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */]: 'You have already called initializeAppCheck() for FirebaseApp {$appName} with ' + 'different options. To avoid this error, call initializeAppCheck() with the ' + 'same options as when it was originally called. This will return the ' + 'already initialized instance.',\n  [\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */]: 'App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. ' + 'Call initializeAppCheck() before instantiating other Firebase services.',\n  [\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */]: 'Fetch failed to connect to a network. Check Internet connection. ' + 'Original error: {$originalErrorMessage}.',\n  [\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */]: 'Fetch client could not parse response.' + ' Original error: {$originalErrorMessage}.',\n  [\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */]: 'Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.',\n  [\"storage-open\" /* AppCheckError.STORAGE_OPEN */]: 'Error thrown when opening storage. Original error: {$originalErrorMessage}.',\n  [\"storage-get\" /* AppCheckError.STORAGE_GET */]: 'Error thrown when reading from storage. Original error: {$originalErrorMessage}.',\n  [\"storage-set\" /* AppCheckError.STORAGE_WRITE */]: 'Error thrown when writing to storage. Original error: {$originalErrorMessage}.',\n  [\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */]: 'ReCAPTCHA error.',\n  [\"throttled\" /* AppCheckError.THROTTLED */]: `Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}`\n};\nconst ERROR_FACTORY = new ErrorFactory('appCheck', 'AppCheck', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getRecaptcha(isEnterprise = false) {\n  var _a;\n  if (isEnterprise) {\n    return (_a = self.grecaptcha) === null || _a === void 0 ? void 0 : _a.enterprise;\n  }\n  return self.grecaptcha;\n}\nfunction ensureActivated(app) {\n  if (!getStateReference(app).activated) {\n    throw ERROR_FACTORY.create(\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */, {\n      appName: app.name\n    });\n  }\n}\nfunction getDurationString(durationInMillis) {\n  const totalSeconds = Math.round(durationInMillis / 1000);\n  const days = Math.floor(totalSeconds / (3600 * 24));\n  const hours = Math.floor((totalSeconds - days * 3600 * 24) / 3600);\n  const minutes = Math.floor((totalSeconds - days * 3600 * 24 - hours * 3600) / 60);\n  const seconds = totalSeconds - days * 3600 * 24 - hours * 3600 - minutes * 60;\n  let result = '';\n  if (days) {\n    result += pad(days) + 'd:';\n  }\n  if (hours) {\n    result += pad(hours) + 'h:';\n  }\n  result += pad(minutes) + 'm:' + pad(seconds) + 's';\n  return result;\n}\nfunction pad(value) {\n  if (value === 0) {\n    return '00';\n  }\n  return value >= 10 ? value.toString() : '0' + value;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction exchangeToken(_x, _x2) {\n  return _exchangeToken.apply(this, arguments);\n}\nfunction _exchangeToken() {\n  _exchangeToken = _asyncToGenerator(function* ({\n    url,\n    body\n  }, heartbeatServiceProvider) {\n    const headers = {\n      'Content-Type': 'application/json'\n    };\n    // If heartbeat service exists, add heartbeat header string to the header.\n    const heartbeatService = heartbeatServiceProvider.getImmediate({\n      optional: true\n    });\n    if (heartbeatService) {\n      const heartbeatsHeader = yield heartbeatService.getHeartbeatsHeader();\n      if (heartbeatsHeader) {\n        headers['X-Firebase-Client'] = heartbeatsHeader;\n      }\n    }\n    const options = {\n      method: 'POST',\n      body: JSON.stringify(body),\n      headers\n    };\n    let response;\n    try {\n      response = yield fetch(url, options);\n    } catch (originalError) {\n      throw ERROR_FACTORY.create(\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */, {\n        originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n      });\n    }\n    if (response.status !== 200) {\n      throw ERROR_FACTORY.create(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */, {\n        httpStatus: response.status\n      });\n    }\n    let responseBody;\n    try {\n      // JSON parsing throws SyntaxError if the response body isn't a JSON string.\n      responseBody = yield response.json();\n    } catch (originalError) {\n      throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n        originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n      });\n    }\n    // Protobuf duration format.\n    // https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Duration\n    const match = responseBody.ttl.match(/^([\\d.]+)(s)$/);\n    if (!match || !match[2] || isNaN(Number(match[1]))) {\n      throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n        originalErrorMessage: `ttl field (timeToLive) is not in standard Protobuf Duration ` + `format: ${responseBody.ttl}`\n      });\n    }\n    const timeToLiveAsNumber = Number(match[1]) * 1000;\n    const now = Date.now();\n    return {\n      token: responseBody.token,\n      expireTimeMillis: now + timeToLiveAsNumber,\n      issuedAtTimeMillis: now\n    };\n  });\n  return _exchangeToken.apply(this, arguments);\n}\nfunction getExchangeRecaptchaV3TokenRequest(app, reCAPTCHAToken) {\n  const {\n    projectId,\n    appId,\n    apiKey\n  } = app.options;\n  return {\n    url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_TOKEN_METHOD}?key=${apiKey}`,\n    body: {\n      'recaptcha_v3_token': reCAPTCHAToken\n    }\n  };\n}\nfunction getExchangeRecaptchaEnterpriseTokenRequest(app, reCAPTCHAToken) {\n  const {\n    projectId,\n    appId,\n    apiKey\n  } = app.options;\n  return {\n    url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD}?key=${apiKey}`,\n    body: {\n      'recaptcha_enterprise_token': reCAPTCHAToken\n    }\n  };\n}\nfunction getExchangeDebugTokenRequest(app, debugToken) {\n  const {\n    projectId,\n    appId,\n    apiKey\n  } = app.options;\n  return {\n    url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_DEBUG_TOKEN_METHOD}?key=${apiKey}`,\n    body: {\n      // eslint-disable-next-line\n      debug_token: debugToken\n    }\n  };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebase-app-check-database';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'firebase-app-check-store';\nconst DEBUG_TOKEN_KEY = 'debug-token';\nlet dbPromise = null;\nfunction getDBPromise() {\n  if (dbPromise) {\n    return dbPromise;\n  }\n  dbPromise = new Promise((resolve, reject) => {\n    try {\n      const request = indexedDB.open(DB_NAME, DB_VERSION);\n      request.onsuccess = event => {\n        resolve(event.target.result);\n      };\n      request.onerror = event => {\n        var _a;\n        reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n          originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n        }));\n      };\n      request.onupgradeneeded = event => {\n        const db = event.target.result;\n        // We don't use 'break' in this switch statement, the fall-through\n        // behavior is what we want, because if there are multiple versions between\n        // the old version and the current version, we want ALL the migrations\n        // that correspond to those versions to run, not only the last one.\n        // eslint-disable-next-line default-case\n        switch (event.oldVersion) {\n          case 0:\n            db.createObjectStore(STORE_NAME, {\n              keyPath: 'compositeKey'\n            });\n        }\n      };\n    } catch (e) {\n      reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n        originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n      }));\n    }\n  });\n  return dbPromise;\n}\nfunction readTokenFromIndexedDB(app) {\n  return read(computeKey(app));\n}\nfunction writeTokenToIndexedDB(app, token) {\n  return write(computeKey(app), token);\n}\nfunction writeDebugTokenToIndexedDB(token) {\n  return write(DEBUG_TOKEN_KEY, token);\n}\nfunction readDebugTokenFromIndexedDB() {\n  return read(DEBUG_TOKEN_KEY);\n}\nfunction write(_x3, _x4) {\n  return _write.apply(this, arguments);\n}\nfunction _write() {\n  _write = _asyncToGenerator(function* (key, value) {\n    const db = yield getDBPromise();\n    const transaction = db.transaction(STORE_NAME, 'readwrite');\n    const store = transaction.objectStore(STORE_NAME);\n    const request = store.put({\n      compositeKey: key,\n      value\n    });\n    return new Promise((resolve, reject) => {\n      request.onsuccess = _event => {\n        resolve();\n      };\n      transaction.onerror = event => {\n        var _a;\n        reject(ERROR_FACTORY.create(\"storage-set\" /* AppCheckError.STORAGE_WRITE */, {\n          originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n        }));\n      };\n    });\n  });\n  return _write.apply(this, arguments);\n}\nfunction read(_x5) {\n  return _read.apply(this, arguments);\n}\nfunction _read() {\n  _read = _asyncToGenerator(function* (key) {\n    const db = yield getDBPromise();\n    const transaction = db.transaction(STORE_NAME, 'readonly');\n    const store = transaction.objectStore(STORE_NAME);\n    const request = store.get(key);\n    return new Promise((resolve, reject) => {\n      request.onsuccess = event => {\n        const result = event.target.result;\n        if (result) {\n          resolve(result.value);\n        } else {\n          resolve(undefined);\n        }\n      };\n      transaction.onerror = event => {\n        var _a;\n        reject(ERROR_FACTORY.create(\"storage-get\" /* AppCheckError.STORAGE_GET */, {\n          originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n        }));\n      };\n    });\n  });\n  return _read.apply(this, arguments);\n}\nfunction computeKey(app) {\n  return `${app.options.appId}-${app.name}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logger = new Logger('@firebase/app-check');\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Always resolves. In case of an error reading from indexeddb, resolve with undefined\r\n */\nfunction readTokenFromStorage(_x6) {\n  return _readTokenFromStorage.apply(this, arguments);\n}\n/**\r\n * Always resolves. In case of an error writing to indexeddb, print a warning and resolve the promise\r\n */\nfunction _readTokenFromStorage() {\n  _readTokenFromStorage = _asyncToGenerator(function* (app) {\n    if (isIndexedDBAvailable()) {\n      let token = undefined;\n      try {\n        token = yield readTokenFromIndexedDB(app);\n      } catch (e) {\n        // swallow the error and return undefined\n        logger.warn(`Failed to read token from IndexedDB. Error: ${e}`);\n      }\n      return token;\n    }\n    return undefined;\n  });\n  return _readTokenFromStorage.apply(this, arguments);\n}\nfunction writeTokenToStorage(app, token) {\n  if (isIndexedDBAvailable()) {\n    return writeTokenToIndexedDB(app, token).catch(e => {\n      // swallow the error and resolve the promise\n      logger.warn(`Failed to write token to IndexedDB. Error: ${e}`);\n    });\n  }\n  return Promise.resolve();\n}\nfunction readOrCreateDebugTokenFromStorage() {\n  return _readOrCreateDebugTokenFromStorage.apply(this, arguments);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _readOrCreateDebugTokenFromStorage() {\n  _readOrCreateDebugTokenFromStorage = _asyncToGenerator(function* () {\n    /**\r\n     * Theoretically race condition can happen if we read, then write in 2 separate transactions.\r\n     * But it won't happen here, because this function will be called exactly once.\r\n     */\n    let existingDebugToken = undefined;\n    try {\n      existingDebugToken = yield readDebugTokenFromIndexedDB();\n    } catch (_e) {\n      // failed to read from indexeddb. We assume there is no existing debug token, and generate a new one.\n    }\n    if (!existingDebugToken) {\n      // create a new debug token\n      const newToken = uuidv4();\n      // We don't need to block on writing to indexeddb\n      // In case persistence failed, a new debug token will be generated everytime the page is refreshed.\n      // It renders the debug token useless because you have to manually register(whitelist) the new token in the firebase console again and again.\n      // If you see this error trying to use debug token, it probably means you are using a browser that doesn't support indexeddb.\n      // You should switch to a different browser that supports indexeddb\n      writeDebugTokenToIndexedDB(newToken).catch(e => logger.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`));\n      return newToken;\n    } else {\n      return existingDebugToken;\n    }\n  });\n  return _readOrCreateDebugTokenFromStorage.apply(this, arguments);\n}\nfunction isDebugMode() {\n  const debugState = getDebugState();\n  return debugState.enabled;\n}\nfunction getDebugToken() {\n  return _getDebugToken.apply(this, arguments);\n}\nfunction _getDebugToken() {\n  _getDebugToken = _asyncToGenerator(function* () {\n    const state = getDebugState();\n    if (state.enabled && state.token) {\n      return state.token.promise;\n    } else {\n      // should not happen!\n      throw Error(`\n            Can't get debug token in production mode.\n        `);\n    }\n  });\n  return _getDebugToken.apply(this, arguments);\n}\nfunction initializeDebugMode() {\n  const globals = getGlobal();\n  const debugState = getDebugState();\n  // Set to true if this function has been called, whether or not\n  // it enabled debug mode.\n  debugState.initialized = true;\n  if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== 'string' && globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== true) {\n    return;\n  }\n  debugState.enabled = true;\n  const deferredToken = new Deferred();\n  debugState.token = deferredToken;\n  if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN === 'string') {\n    deferredToken.resolve(globals.FIREBASE_APPCHECK_DEBUG_TOKEN);\n  } else {\n    deferredToken.resolve(readOrCreateDebugTokenFromStorage());\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Initial hardcoded value agreed upon across platforms for initial launch.\n// Format left open for possible dynamic error values and other fields in the future.\nconst defaultTokenErrorData = {\n  error: 'UNKNOWN_ERROR'\n};\n/**\r\n * Stringify and base64 encode token error data.\r\n *\r\n * @param tokenError Error data, currently hardcoded.\r\n */\nfunction formatDummyToken(tokenErrorData) {\n  return base64.encodeString(JSON.stringify(tokenErrorData), /* webSafe= */false);\n}\n/**\r\n * This function always resolves.\r\n * The result will contain an error field if there is any error.\r\n * In case there is an error, the token field in the result will be populated with a dummy value\r\n */\nfunction getToken$2(_x7) {\n  return _getToken$.apply(this, arguments);\n}\nfunction _getToken$() {\n  _getToken$ = _asyncToGenerator(function* (appCheck, forceRefresh = false) {\n    const app = appCheck.app;\n    ensureActivated(app);\n    const state = getStateReference(app);\n    /**\r\n     * First check if there is a token in memory from a previous `getToken()` call.\r\n     */\n    let token = state.token;\n    let error = undefined;\n    /**\r\n     * If an invalid token was found in memory, clear token from\r\n     * memory and unset the local variable `token`.\r\n     */\n    if (token && !isValid(token)) {\n      state.token = undefined;\n      token = undefined;\n    }\n    /**\r\n     * If there is no valid token in memory, try to load token from indexedDB.\r\n     */\n    if (!token) {\n      // cachedTokenPromise contains the token found in IndexedDB or undefined if not found.\n      const cachedToken = yield state.cachedTokenPromise;\n      if (cachedToken) {\n        if (isValid(cachedToken)) {\n          token = cachedToken;\n        } else {\n          // If there was an invalid token in the indexedDB cache, clear it.\n          yield writeTokenToStorage(app, undefined);\n        }\n      }\n    }\n    // Return the cached token (from either memory or indexedDB) if it's valid\n    if (!forceRefresh && token && isValid(token)) {\n      return {\n        token: token.token\n      };\n    }\n    // Only set to true if this `getToken()` call is making the actual\n    // REST call to the exchange endpoint, versus waiting for an already\n    // in-flight call (see debug and regular exchange endpoint paths below)\n    let shouldCallListeners = false;\n    /**\r\n     * DEBUG MODE\r\n     * If debug mode is set, and there is no cached token, fetch a new App\r\n     * Check token using the debug token, and return it directly.\r\n     */\n    if (isDebugMode()) {\n      // Avoid making another call to the exchange endpoint if one is in flight.\n      if (!state.exchangeTokenPromise) {\n        state.exchangeTokenPromise = exchangeToken(getExchangeDebugTokenRequest(app, yield getDebugToken()), appCheck.heartbeatServiceProvider).finally(() => {\n          // Clear promise when settled - either resolved or rejected.\n          state.exchangeTokenPromise = undefined;\n        });\n        shouldCallListeners = true;\n      }\n      const tokenFromDebugExchange = yield state.exchangeTokenPromise;\n      // Write debug token to indexedDB.\n      yield writeTokenToStorage(app, tokenFromDebugExchange);\n      // Write debug token to state.\n      state.token = tokenFromDebugExchange;\n      return {\n        token: tokenFromDebugExchange.token\n      };\n    }\n    /**\r\n     * There are no valid tokens in memory or indexedDB and we are not in\r\n     * debug mode.\r\n     * Request a new token from the exchange endpoint.\r\n     */\n    try {\n      // Avoid making another call to the exchange endpoint if one is in flight.\n      if (!state.exchangeTokenPromise) {\n        // state.provider is populated in initializeAppCheck()\n        // ensureActivated() at the top of this function checks that\n        // initializeAppCheck() has been called.\n        state.exchangeTokenPromise = state.provider.getToken().finally(() => {\n          // Clear promise when settled - either resolved or rejected.\n          state.exchangeTokenPromise = undefined;\n        });\n        shouldCallListeners = true;\n      }\n      token = yield getStateReference(app).exchangeTokenPromise;\n    } catch (e) {\n      if (e.code === `appCheck/${\"throttled\" /* AppCheckError.THROTTLED */}`) {\n        // Warn if throttled, but do not treat it as an error.\n        logger.warn(e.message);\n      } else {\n        // `getToken()` should never throw, but logging error text to console will aid debugging.\n        logger.error(e);\n      }\n      // Always save error to be added to dummy token.\n      error = e;\n    }\n    let interopTokenResult;\n    if (!token) {\n      // If token is undefined, there must be an error.\n      // Return a dummy token along with the error.\n      interopTokenResult = makeDummyTokenResult(error);\n    } else if (error) {\n      if (isValid(token)) {\n        // It's also possible a valid token exists, but there's also an error.\n        // (Such as if the token is almost expired, tries to refresh, and\n        // the exchange request fails.)\n        // We add a special error property here so that the refresher will\n        // count this as a failed attempt and use the backoff instead of\n        // retrying repeatedly with no delay, but any 3P listeners will not\n        // be hindered in getting the still-valid token.\n        interopTokenResult = {\n          token: token.token,\n          internalError: error\n        };\n      } else {\n        // No invalid tokens should make it to this step. Memory and cached tokens\n        // are checked. Other tokens are from fresh exchanges. But just in case.\n        interopTokenResult = makeDummyTokenResult(error);\n      }\n    } else {\n      interopTokenResult = {\n        token: token.token\n      };\n      // write the new token to the memory state as well as the persistent storage.\n      // Only do it if we got a valid new token\n      state.token = token;\n      yield writeTokenToStorage(app, token);\n    }\n    if (shouldCallListeners) {\n      notifyTokenListeners(app, interopTokenResult);\n    }\n    return interopTokenResult;\n  });\n  return _getToken$.apply(this, arguments);\n}\nfunction addTokenListener(appCheck, type, listener, onError) {\n  const {\n    app\n  } = appCheck;\n  const state = getStateReference(app);\n  const tokenObserver = {\n    next: listener,\n    error: onError,\n    type\n  };\n  state.tokenObservers = [...state.tokenObservers, tokenObserver];\n  // Invoke the listener async immediately if there is a valid token\n  // in memory.\n  if (state.token && isValid(state.token)) {\n    const validToken = state.token;\n    Promise.resolve().then(() => {\n      listener({\n        token: validToken.token\n      });\n      initTokenRefresher(appCheck);\n    }).catch(() => {\n      /* we don't care about exceptions thrown in listeners */\n    });\n  }\n  /**\r\n   * Wait for any cached token promise to resolve before starting the token\r\n   * refresher. The refresher checks to see if there is an existing token\r\n   * in state and calls the exchange endpoint if not. We should first let the\r\n   * IndexedDB check have a chance to populate state if it can.\r\n   *\r\n   * Listener call isn't needed here because cachedTokenPromise will call any\r\n   * listeners that exist when it resolves.\r\n   */\n  // state.cachedTokenPromise is always populated in `activate()`.\n  void state.cachedTokenPromise.then(() => initTokenRefresher(appCheck));\n}\nfunction removeTokenListener(app, listener) {\n  const state = getStateReference(app);\n  const newObservers = state.tokenObservers.filter(tokenObserver => tokenObserver.next !== listener);\n  if (newObservers.length === 0 && state.tokenRefresher && state.tokenRefresher.isRunning()) {\n    state.tokenRefresher.stop();\n  }\n  state.tokenObservers = newObservers;\n}\n/**\r\n * Logic to create and start refresher as needed.\r\n */\nfunction initTokenRefresher(appCheck) {\n  const {\n    app\n  } = appCheck;\n  const state = getStateReference(app);\n  // Create the refresher but don't start it if `isTokenAutoRefreshEnabled`\n  // is not true.\n  let refresher = state.tokenRefresher;\n  if (!refresher) {\n    refresher = createTokenRefresher(appCheck);\n    state.tokenRefresher = refresher;\n  }\n  if (!refresher.isRunning() && state.isTokenAutoRefreshEnabled) {\n    refresher.start();\n  }\n}\nfunction createTokenRefresher(appCheck) {\n  const {\n    app\n  } = appCheck;\n  return new Refresher(\n  /*#__PURE__*/\n  // Keep in mind when this fails for any reason other than the ones\n  // for which we should retry, it will effectively stop the proactive refresh.\n  _asyncToGenerator(function* () {\n    const state = getStateReference(app);\n    // If there is no token, we will try to load it from storage and use it\n    // If there is a token, we force refresh it because we know it's going to expire soon\n    let result;\n    if (!state.token) {\n      result = yield getToken$2(appCheck);\n    } else {\n      result = yield getToken$2(appCheck, true);\n    }\n    /**\r\n     * getToken() always resolves. In case the result has an error field defined, it means\r\n     * the operation failed, and we should retry.\r\n     */\n    if (result.error) {\n      throw result.error;\n    }\n    /**\r\n     * A special `internalError` field reflects that there was an error\r\n     * getting a new token from the exchange endpoint, but there's still a\r\n     * previous token that's valid for now and this should be passed to 2P/3P\r\n     * requests for a token. But we want this callback (`this.operation` in\r\n     * `Refresher`) to throw in order to kick off the Refresher's retry\r\n     * backoff. (Setting `hasSucceeded` to false.)\r\n     */\n    if (result.internalError) {\n      throw result.internalError;\n    }\n  }), () => {\n    return true;\n  }, () => {\n    const state = getStateReference(app);\n    if (state.token) {\n      // issuedAtTime + (50% * total TTL) + 5 minutes\n      let nextRefreshTimeMillis = state.token.issuedAtTimeMillis + (state.token.expireTimeMillis - state.token.issuedAtTimeMillis) * 0.5 + 5 * 60 * 1000;\n      // Do not allow refresh time to be past (expireTime - 5 minutes)\n      const latestAllowableRefresh = state.token.expireTimeMillis - 5 * 60 * 1000;\n      nextRefreshTimeMillis = Math.min(nextRefreshTimeMillis, latestAllowableRefresh);\n      return Math.max(0, nextRefreshTimeMillis - Date.now());\n    } else {\n      return 0;\n    }\n  }, TOKEN_REFRESH_TIME.RETRIAL_MIN_WAIT, TOKEN_REFRESH_TIME.RETRIAL_MAX_WAIT);\n}\nfunction notifyTokenListeners(app, token) {\n  const observers = getStateReference(app).tokenObservers;\n  for (const observer of observers) {\n    try {\n      if (observer.type === \"EXTERNAL\" /* ListenerType.EXTERNAL */ && token.error != null) {\n        // If this listener was added by a 3P call, send any token error to\n        // the supplied error handler. A 3P observer always has an error\n        // handler.\n        observer.error(token.error);\n      } else {\n        // If the token has no error field, always return the token.\n        // If this is a 2P listener, return the token, whether or not it\n        // has an error field.\n        observer.next(token);\n      }\n    } catch (e) {\n      // Errors in the listener function itself are always ignored.\n    }\n  }\n}\nfunction isValid(token) {\n  return token.expireTimeMillis - Date.now() > 0;\n}\nfunction makeDummyTokenResult(error) {\n  return {\n    token: formatDummyToken(defaultTokenErrorData),\n    error\n  };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * AppCheck Service class.\r\n */\nclass AppCheckService {\n  constructor(app, heartbeatServiceProvider) {\n    this.app = app;\n    this.heartbeatServiceProvider = heartbeatServiceProvider;\n  }\n  _delete() {\n    const {\n      tokenObservers\n    } = getStateReference(this.app);\n    for (const tokenObserver of tokenObservers) {\n      removeTokenListener(this.app, tokenObserver.next);\n    }\n    return Promise.resolve();\n  }\n}\nfunction factory(app, heartbeatServiceProvider) {\n  return new AppCheckService(app, heartbeatServiceProvider);\n}\nfunction internalFactory(appCheck) {\n  return {\n    getToken: forceRefresh => getToken$2(appCheck, forceRefresh),\n    addTokenListener: listener => addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, listener),\n    removeTokenListener: listener => removeTokenListener(appCheck.app, listener)\n  };\n}\nconst name = \"@firebase/app-check\";\nconst version = \"0.6.4\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_URL = 'https://www.google.com/recaptcha/api.js';\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js';\nfunction initializeV3(app, siteKey) {\n  const initialized = new Deferred();\n  const state = getStateReference(app);\n  state.reCAPTCHAState = {\n    initialized\n  };\n  const divId = makeDiv(app);\n  const grecaptcha = getRecaptcha(false);\n  if (!grecaptcha) {\n    loadReCAPTCHAV3Script(() => {\n      const grecaptcha = getRecaptcha(false);\n      if (!grecaptcha) {\n        // it shouldn't happen.\n        throw new Error('no recaptcha');\n      }\n      queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n    });\n  } else {\n    queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n  }\n  return initialized.promise;\n}\nfunction initializeEnterprise(app, siteKey) {\n  const initialized = new Deferred();\n  const state = getStateReference(app);\n  state.reCAPTCHAState = {\n    initialized\n  };\n  const divId = makeDiv(app);\n  const grecaptcha = getRecaptcha(true);\n  if (!grecaptcha) {\n    loadReCAPTCHAEnterpriseScript(() => {\n      const grecaptcha = getRecaptcha(true);\n      if (!grecaptcha) {\n        // it shouldn't happen.\n        throw new Error('no recaptcha');\n      }\n      queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n    });\n  } else {\n    queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n  }\n  return initialized.promise;\n}\n/**\r\n * Add listener to render the widget and resolve the promise when\r\n * the grecaptcha.ready() event fires.\r\n */\nfunction queueWidgetRender(app, siteKey, grecaptcha, container, initialized) {\n  grecaptcha.ready(() => {\n    // Invisible widgets allow us to set a different siteKey for each widget,\n    // so we use them to support multiple apps\n    renderInvisibleWidget(app, siteKey, grecaptcha, container);\n    initialized.resolve(grecaptcha);\n  });\n}\n/**\r\n * Add invisible div to page.\r\n */\nfunction makeDiv(app) {\n  const divId = `fire_app_check_${app.name}`;\n  const invisibleDiv = document.createElement('div');\n  invisibleDiv.id = divId;\n  invisibleDiv.style.display = 'none';\n  document.body.appendChild(invisibleDiv);\n  return divId;\n}\nfunction getToken$1(_x8) {\n  return _getToken$2.apply(this, arguments);\n}\n/**\r\n *\r\n * @param app\r\n * @param container - Id of a HTML element.\r\n */\nfunction _getToken$2() {\n  _getToken$2 = _asyncToGenerator(function* (app) {\n    ensureActivated(app);\n    // ensureActivated() guarantees that reCAPTCHAState is set\n    const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n    const recaptcha = yield reCAPTCHAState.initialized.promise;\n    return new Promise((resolve, _reject) => {\n      // Updated after initialization is complete.\n      const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n      recaptcha.ready(() => {\n        resolve(\n        // widgetId is guaranteed to be available if reCAPTCHAState.initialized.promise resolved.\n        recaptcha.execute(reCAPTCHAState.widgetId, {\n          action: 'fire_app_check'\n        }));\n      });\n    });\n  });\n  return _getToken$2.apply(this, arguments);\n}\nfunction renderInvisibleWidget(app, siteKey, grecaptcha, container) {\n  const widgetId = grecaptcha.render(container, {\n    sitekey: siteKey,\n    size: 'invisible'\n  });\n  const state = getStateReference(app);\n  state.reCAPTCHAState = Object.assign(Object.assign({}, state.reCAPTCHAState), {\n    // state.reCAPTCHAState is set in the initialize()\n    widgetId\n  });\n}\nfunction loadReCAPTCHAV3Script(onload) {\n  const script = document.createElement('script');\n  script.src = RECAPTCHA_URL;\n  script.onload = onload;\n  document.head.appendChild(script);\n}\nfunction loadReCAPTCHAEnterpriseScript(onload) {\n  const script = document.createElement('script');\n  script.src = RECAPTCHA_ENTERPRISE_URL;\n  script.onload = onload;\n  document.head.appendChild(script);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * App Check provider that can obtain a reCAPTCHA V3 token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaV3Provider {\n  /**\r\n   * Create a ReCaptchaV3Provider instance.\r\n   * @param siteKey - ReCAPTCHA V3 siteKey.\r\n   */\n  constructor(_siteKey) {\n    this._siteKey = _siteKey;\n    /**\r\n     * Throttle requests on certain error codes to prevent too many retries\r\n     * in a short time.\r\n     */\n    this._throttleData = null;\n  }\n  /**\r\n   * Returns an App Check token.\r\n   * @internal\r\n   */\n  getToken() {\n    var _this2 = this;\n    return _asyncToGenerator(function* () {\n      var _a, _b;\n      throwIfThrottled(_this2._throttleData);\n      // Top-level `getToken()` has already checked that App Check is initialized\n      // and therefore this._app and this._heartbeatServiceProvider are available.\n      const attestedClaimsToken = yield getToken$1(_this2._app).catch(_e => {\n        // reCaptcha.execute() throws null which is not very descriptive.\n        throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n      });\n\n      let result;\n      try {\n        result = yield exchangeToken(getExchangeRecaptchaV3TokenRequest(_this2._app, attestedClaimsToken), _this2._heartbeatServiceProvider);\n      } catch (e) {\n        if ((_a = e.code) === null || _a === void 0 ? void 0 : _a.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n          _this2._throttleData = setBackoff(Number((_b = e.customData) === null || _b === void 0 ? void 0 : _b.httpStatus), _this2._throttleData);\n          throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n            time: getDurationString(_this2._throttleData.allowRequestsAfter - Date.now()),\n            httpStatus: _this2._throttleData.httpStatus\n          });\n        } else {\n          throw e;\n        }\n      }\n      // If successful, clear throttle data.\n      _this2._throttleData = null;\n      return result;\n    })();\n  }\n  /**\r\n   * @internal\r\n   */\n  initialize(app) {\n    this._app = app;\n    this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n    initializeV3(app, this._siteKey).catch(() => {\n      /* we don't care about the initialization result */\n    });\n  }\n  /**\r\n   * @internal\r\n   */\n  isEqual(otherProvider) {\n    if (otherProvider instanceof ReCaptchaV3Provider) {\n      return this._siteKey === otherProvider._siteKey;\n    } else {\n      return false;\n    }\n  }\n}\n/**\r\n * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaEnterpriseProvider {\n  /**\r\n   * Create a ReCaptchaEnterpriseProvider instance.\r\n   * @param siteKey - reCAPTCHA Enterprise score-based site key.\r\n   */\n  constructor(_siteKey) {\n    this._siteKey = _siteKey;\n    /**\r\n     * Throttle requests on certain error codes to prevent too many retries\r\n     * in a short time.\r\n     */\n    this._throttleData = null;\n  }\n  /**\r\n   * Returns an App Check token.\r\n   * @internal\r\n   */\n  getToken() {\n    var _this3 = this;\n    return _asyncToGenerator(function* () {\n      var _a, _b;\n      throwIfThrottled(_this3._throttleData);\n      // Top-level `getToken()` has already checked that App Check is initialized\n      // and therefore this._app and this._heartbeatServiceProvider are available.\n      const attestedClaimsToken = yield getToken$1(_this3._app).catch(_e => {\n        // reCaptcha.execute() throws null which is not very descriptive.\n        throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n      });\n\n      let result;\n      try {\n        result = yield exchangeToken(getExchangeRecaptchaEnterpriseTokenRequest(_this3._app, attestedClaimsToken), _this3._heartbeatServiceProvider);\n      } catch (e) {\n        if ((_a = e.code) === null || _a === void 0 ? void 0 : _a.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n          _this3._throttleData = setBackoff(Number((_b = e.customData) === null || _b === void 0 ? void 0 : _b.httpStatus), _this3._throttleData);\n          throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n            time: getDurationString(_this3._throttleData.allowRequestsAfter - Date.now()),\n            httpStatus: _this3._throttleData.httpStatus\n          });\n        } else {\n          throw e;\n        }\n      }\n      // If successful, clear throttle data.\n      _this3._throttleData = null;\n      return result;\n    })();\n  }\n  /**\r\n   * @internal\r\n   */\n  initialize(app) {\n    this._app = app;\n    this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n    initializeEnterprise(app, this._siteKey).catch(() => {\n      /* we don't care about the initialization result */\n    });\n  }\n  /**\r\n   * @internal\r\n   */\n  isEqual(otherProvider) {\n    if (otherProvider instanceof ReCaptchaEnterpriseProvider) {\n      return this._siteKey === otherProvider._siteKey;\n    } else {\n      return false;\n    }\n  }\n}\n/**\r\n * Custom provider class.\r\n * @public\r\n */\nclass CustomProvider {\n  constructor(_customProviderOptions) {\n    this._customProviderOptions = _customProviderOptions;\n  }\n  /**\r\n   * @internal\r\n   */\n  getToken() {\n    var _this4 = this;\n    return _asyncToGenerator(function* () {\n      // custom provider\n      const customToken = yield _this4._customProviderOptions.getToken();\n      // Try to extract IAT from custom token, in case this token is not\n      // being newly issued. JWT timestamps are in seconds since epoch.\n      const issuedAtTimeSeconds = issuedAtTime(customToken.token);\n      // Very basic validation, use current timestamp as IAT if JWT\n      // has no `iat` field or value is out of bounds.\n      const issuedAtTimeMillis = issuedAtTimeSeconds !== null && issuedAtTimeSeconds < Date.now() && issuedAtTimeSeconds > 0 ? issuedAtTimeSeconds * 1000 : Date.now();\n      return Object.assign(Object.assign({}, customToken), {\n        issuedAtTimeMillis\n      });\n    })();\n  }\n  /**\r\n   * @internal\r\n   */\n  initialize(app) {\n    this._app = app;\n  }\n  /**\r\n   * @internal\r\n   */\n  isEqual(otherProvider) {\n    if (otherProvider instanceof CustomProvider) {\n      return this._customProviderOptions.getToken.toString() === otherProvider._customProviderOptions.getToken.toString();\n    } else {\n      return false;\n    }\n  }\n}\n/**\r\n * Set throttle data to block requests until after a certain time\r\n * depending on the failed request's status code.\r\n * @param httpStatus - Status code of failed request.\r\n * @param throttleData - `ThrottleData` object containing previous throttle\r\n * data state.\r\n * @returns Data about current throttle state and expiration time.\r\n */\nfunction setBackoff(httpStatus, throttleData) {\n  /**\r\n   * Block retries for 1 day for the following error codes:\r\n   *\r\n   * 404: Likely malformed URL.\r\n   *\r\n   * 403:\r\n   * - Attestation failed\r\n   * - Wrong API key\r\n   * - Project deleted\r\n   */\n  if (httpStatus === 404 || httpStatus === 403) {\n    return {\n      backoffCount: 1,\n      allowRequestsAfter: Date.now() + ONE_DAY,\n      httpStatus\n    };\n  } else {\n    /**\r\n     * For all other error codes, the time when it is ok to retry again\r\n     * is based on exponential backoff.\r\n     */\n    const backoffCount = throttleData ? throttleData.backoffCount : 0;\n    const backoffMillis = calculateBackoffMillis(backoffCount, 1000, 2);\n    return {\n      backoffCount: backoffCount + 1,\n      allowRequestsAfter: Date.now() + backoffMillis,\n      httpStatus\n    };\n  }\n}\nfunction throwIfThrottled(throttleData) {\n  if (throttleData) {\n    if (Date.now() - throttleData.allowRequestsAfter <= 0) {\n      // If before, throw.\n      throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n        time: getDurationString(throttleData.allowRequestsAfter - Date.now()),\n        httpStatus: throttleData.httpStatus\n      });\n    }\n  }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Activate App Check for the given app. Can be called only once per app.\r\n * @param app - the {@link @firebase/app#FirebaseApp} to activate App Check for\r\n * @param options - App Check initialization options\r\n * @public\r\n */\nfunction initializeAppCheck(app = getApp(), options) {\n  app = getModularInstance(app);\n  const provider = _getProvider(app, 'app-check');\n  // Ensure initializeDebugMode() is only called once.\n  if (!getDebugState().initialized) {\n    initializeDebugMode();\n  }\n  // Log a message containing the debug token when `initializeAppCheck()`\n  // is called in debug mode.\n  if (isDebugMode()) {\n    // Do not block initialization to get the token for the message.\n    void getDebugToken().then(token =>\n    // Not using logger because I don't think we ever want this accidentally hidden.\n    console.log(`App Check debug token: ${token}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`));\n  }\n  if (provider.isInitialized()) {\n    const existingInstance = provider.getImmediate();\n    const initialOptions = provider.getOptions();\n    if (initialOptions.isTokenAutoRefreshEnabled === options.isTokenAutoRefreshEnabled && initialOptions.provider.isEqual(options.provider)) {\n      return existingInstance;\n    } else {\n      throw ERROR_FACTORY.create(\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */, {\n        appName: app.name\n      });\n    }\n  }\n  const appCheck = provider.initialize({\n    options\n  });\n  _activate(app, options.provider, options.isTokenAutoRefreshEnabled);\n  // If isTokenAutoRefreshEnabled is false, do not send any requests to the\n  // exchange endpoint without an explicit call from the user either directly\n  // or through another Firebase library (storage, functions, etc.)\n  if (getStateReference(app).isTokenAutoRefreshEnabled) {\n    // Adding a listener will start the refresher and fetch a token if needed.\n    // This gets a token ready and prevents a delay when an internal library\n    // requests the token.\n    // Listener function does not need to do anything, its base functionality\n    // of calling getToken() already fetches token and writes it to memory/storage.\n    addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, () => {});\n  }\n  return appCheck;\n}\n/**\r\n * Activate App Check\r\n * @param app - Firebase app to activate App Check for.\r\n * @param provider - reCAPTCHA v3 provider or\r\n * custom token provider.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. If undefined, defaults to the\r\n * value of `app.automaticDataCollectionEnabled`, which defaults to\r\n * false and can be set in the app config.\r\n */\nfunction _activate(app, provider, isTokenAutoRefreshEnabled) {\n  // Create an entry in the APP_CHECK_STATES map. Further changes should\n  // directly mutate this object.\n  const state = setInitialState(app, Object.assign({}, DEFAULT_STATE));\n  state.activated = true;\n  state.provider = provider; // Read cached token from storage if it exists and store it in memory.\n  state.cachedTokenPromise = readTokenFromStorage(app).then(cachedToken => {\n    if (cachedToken && isValid(cachedToken)) {\n      state.token = cachedToken;\n      // notify all listeners with the cached token\n      notifyTokenListeners(app, {\n        token: cachedToken.token\n      });\n    }\n    return cachedToken;\n  });\n  // Use value of global `automaticDataCollectionEnabled` (which\n  // itself defaults to false if not specified in config) if\n  // `isTokenAutoRefreshEnabled` param was not provided by user.\n  state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled === undefined ? app.automaticDataCollectionEnabled : isTokenAutoRefreshEnabled;\n  state.provider.initialize(app);\n}\n/**\r\n * Set whether App Check will automatically refresh tokens as needed.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. This overrides any value set\r\n * during `initializeAppCheck()`.\r\n * @public\r\n */\nfunction setTokenAutoRefreshEnabled(appCheckInstance, isTokenAutoRefreshEnabled) {\n  const app = appCheckInstance.app;\n  const state = getStateReference(app);\n  // This will exist if any product libraries have called\n  // `addTokenListener()`\n  if (state.tokenRefresher) {\n    if (isTokenAutoRefreshEnabled === true) {\n      state.tokenRefresher.start();\n    } else {\n      state.tokenRefresher.stop();\n    }\n  }\n  state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled;\n}\n/**\r\n * Get the current App Check token. Attaches to the most recent\r\n * in-flight request if one is present. Returns null if no token\r\n * is present and no token requests are in-flight.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param forceRefresh - If true, will always try to fetch a fresh token.\r\n * If false, will use a cached token if found in storage.\r\n * @public\r\n */\nfunction getToken(_x9, _x10) {\n  return _getToken.apply(this, arguments);\n}\n/**\r\n * Wraps `addTokenListener`/`removeTokenListener` methods in an `Observer`\r\n * pattern for public use.\r\n */\nfunction _getToken() {\n  _getToken = _asyncToGenerator(function* (appCheckInstance, forceRefresh) {\n    const result = yield getToken$2(appCheckInstance, forceRefresh);\n    if (result.error) {\n      throw result.error;\n    }\n    return {\n      token: result.token\n    };\n  });\n  return _getToken.apply(this, arguments);\n}\nfunction onTokenChanged(appCheckInstance, onNextOrObserver, onError,\n/**\r\n * NOTE: Although an `onCompletion` callback can be provided, it will\r\n * never be called because the token stream is never-ending.\r\n * It is added only for API consistency with the observer pattern, which\r\n * we follow in JS APIs.\r\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nonCompletion) {\n  let nextFn = () => {};\n  let errorFn = () => {};\n  if (onNextOrObserver.next != null) {\n    nextFn = onNextOrObserver.next.bind(onNextOrObserver);\n  } else {\n    nextFn = onNextOrObserver;\n  }\n  if (onNextOrObserver.error != null) {\n    errorFn = onNextOrObserver.error.bind(onNextOrObserver);\n  } else if (onError) {\n    errorFn = onError;\n  }\n  addTokenListener(appCheckInstance, \"EXTERNAL\" /* ListenerType.EXTERNAL */, nextFn, errorFn);\n  return () => removeTokenListener(appCheckInstance.app, nextFn);\n}\n\n/**\r\n * Firebase App Check\r\n *\r\n * @packageDocumentation\r\n */\nconst APP_CHECK_NAME = 'app-check';\nconst APP_CHECK_NAME_INTERNAL = 'app-check-internal';\nfunction registerAppCheck() {\n  // The public interface\n  _registerComponent(new Component(APP_CHECK_NAME, container => {\n    // getImmediate for FirebaseApp will always succeed\n    const app = container.getProvider('app').getImmediate();\n    const heartbeatServiceProvider = container.getProvider('heartbeat');\n    return factory(app, heartbeatServiceProvider);\n  }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n  /**\r\n   * Initialize app-check-internal after app-check is initialized to make AppCheck available to\r\n   * other Firebase SDKs\r\n   */.setInstanceCreatedCallback((container, _identifier, _appcheckService) => {\n    container.getProvider(APP_CHECK_NAME_INTERNAL).initialize();\n  }));\n  // The internal interface used by other Firebase products\n  _registerComponent(new Component(APP_CHECK_NAME_INTERNAL, container => {\n    const appCheck = container.getProvider('app-check').getImmediate();\n    return internalFactory(appCheck);\n  }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n  registerVersion(name, version);\n}\nregisterAppCheck();\nexport { CustomProvider, ReCaptchaEnterpriseProvider, ReCaptchaV3Provider, getToken, initializeAppCheck, onTokenChanged, setTokenAutoRefreshEnabled };\n//# sourceMappingURL=index.esm2017.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/fbbac6c6f598b40fb0554043838e83aeabc0745d80b41dc0bb5d6c208248ba22.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/fbbac6c6f598b40fb0554043838e83aeabc0745d80b41dc0bb5d6c208248ba22.json
deleted file mode 100644
index 1fe3f724cf779e6398c38b0273eb135667662fe0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/fbbac6c6f598b40fb0554043838e83aeabc0745d80b41dc0bb5d6c208248ba22.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function expand(project, concurrent = Infinity, scheduler) {\n  concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;\n  return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler));\n}\n//# sourceMappingURL=expand.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/fcfbe9510e6289eed94c5d9fccecdd383a9383e0503ea046a34f84249c02547f.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/fcfbe9510e6289eed94c5d9fccecdd383a9383e0503ea046a34f84249c02547f.json
deleted file mode 100644
index 8ff6213db254e5726e1127cfd37bacae7fe51922..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/fcfbe9510e6289eed94c5d9fccecdd383a9383e0503ea046a34f84249c02547f.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { createErrorClass } from './createErrorClass';\nexport const NotFoundError = createErrorClass(_super => function NotFoundErrorImpl(message) {\n  _super(this);\n  this.name = 'NotFoundError';\n  this.message = message;\n});\n//# sourceMappingURL=NotFoundError.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/fd25a157c02938a58c4c3e1451b2107d5a04fe1240b66b85c0ff0521389d56a5.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/fd25a157c02938a58c4c3e1451b2107d5a04fe1240b66b85c0ff0521389d56a5.json
deleted file mode 100644
index 8af8480f0dfac277fb4b454dce296b66182658db..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/fd25a157c02938a58c4c3e1451b2107d5a04fe1240b66b85c0ff0521389d56a5.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function min(comparer) {\n  return reduce(isFunction(comparer) ? (x, y) => comparer(x, y) < 0 ? x : y : (x, y) => x < y ? x : y);\n}\n//# sourceMappingURL=min.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/feee31b24b768ddb4df0fbc6f5d8d7e3b1388a6c332a0b3bb7e57afaddc2f3ea.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/feee31b24b768ddb4df0fbc6f5d8d7e3b1388a6c332a0b3bb7e57afaddc2f3ea.json
deleted file mode 100644
index 487adce160430c7715604162cb621657671125b0..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/feee31b24b768ddb4df0fbc6f5d8d7e3b1388a6c332a0b3bb7e57afaddc2f3ea.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport const defaultThrottleConfig = {\n  leading: true,\n  trailing: false\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n  return operate((source, subscriber) => {\n    const {\n      leading,\n      trailing\n    } = config;\n    let hasValue = false;\n    let sendValue = null;\n    let throttled = null;\n    let isComplete = false;\n    const endThrottling = () => {\n      throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n      throttled = null;\n      if (trailing) {\n        send();\n        isComplete && subscriber.complete();\n      }\n    };\n    const cleanupThrottling = () => {\n      throttled = null;\n      isComplete && subscriber.complete();\n    };\n    const startThrottle = value => throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling));\n    const send = () => {\n      if (hasValue) {\n        hasValue = false;\n        const value = sendValue;\n        sendValue = null;\n        subscriber.next(value);\n        !isComplete && startThrottle(value);\n      }\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, value => {\n      hasValue = true;\n      sendValue = value;\n      !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n    }, () => {\n      isComplete = true;\n      !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n    }));\n  });\n}\n//# sourceMappingURL=throttle.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ff875e5b6db188a4c3ab637676a37fd9a6e4f3d5d832a83f18802b9245eece25.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ff875e5b6db188a4c3ab637676a37fd9a6e4f3d5d832a83f18802b9245eece25.json
deleted file mode 100644
index 95999e6b959787f4934249251d1da84ba3a7461f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ff875e5b6db188a4c3ab637676a37fd9a6e4f3d5d832a83f18802b9245eece25.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport const queueScheduler = new QueueScheduler(QueueAction);\nexport const queue = queueScheduler;\n//# sourceMappingURL=queue.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.angular/cache/15.2.4/babel-webpack/ffb10c63a5db7a17c1ef4b20bfc3a0aaa05685e67b9fb1832dff9144602c62c0.json b/takima-AR/.angular/cache/15.2.4/babel-webpack/ffb10c63a5db7a17c1ef4b20bfc3a0aaa05685e67b9fb1832dff9144602c62c0.json
deleted file mode 100644
index 02cb6002a81c0fc59c408efd03fa61ec53ccfd6f..0000000000000000000000000000000000000000
--- a/takima-AR/.angular/cache/15.2.4/babel-webpack/ffb10c63a5db7a17c1ef4b20bfc3a0aaa05685e67b9fb1832dff9144602c62c0.json
+++ /dev/null
@@ -1 +0,0 @@
-{"ast":null,"code":"\"use strict\";\n\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n  var list = [];\n\n  // return the list of modules as css string\n  list.toString = function toString() {\n    return this.map(function (item) {\n      var content = \"\";\n      var needLayer = typeof item[5] !== \"undefined\";\n      if (item[4]) {\n        content += \"@supports (\".concat(item[4], \") {\");\n      }\n      if (item[2]) {\n        content += \"@media \".concat(item[2], \" {\");\n      }\n      if (needLayer) {\n        content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n      }\n      content += cssWithMappingToString(item);\n      if (needLayer) {\n        content += \"}\";\n      }\n      if (item[2]) {\n        content += \"}\";\n      }\n      if (item[4]) {\n        content += \"}\";\n      }\n      return content;\n    }).join(\"\");\n  };\n\n  // import a list of modules into the list\n  list.i = function i(modules, media, dedupe, supports, layer) {\n    if (typeof modules === \"string\") {\n      modules = [[null, modules, undefined]];\n    }\n    var alreadyImportedModules = {};\n    if (dedupe) {\n      for (var k = 0; k < this.length; k++) {\n        var id = this[k][0];\n        if (id != null) {\n          alreadyImportedModules[id] = true;\n        }\n      }\n    }\n    for (var _k = 0; _k < modules.length; _k++) {\n      var item = [].concat(modules[_k]);\n      if (dedupe && alreadyImportedModules[item[0]]) {\n        continue;\n      }\n      if (typeof layer !== \"undefined\") {\n        if (typeof item[5] === \"undefined\") {\n          item[5] = layer;\n        } else {\n          item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n          item[5] = layer;\n        }\n      }\n      if (media) {\n        if (!item[2]) {\n          item[2] = media;\n        } else {\n          item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n          item[2] = media;\n        }\n      }\n      if (supports) {\n        if (!item[4]) {\n          item[4] = \"\".concat(supports);\n        } else {\n          item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n          item[4] = supports;\n        }\n      }\n      list.push(item);\n    }\n  };\n  return list;\n};","map":null,"metadata":{},"sourceType":"script","externalDependencies":[]}
\ No newline at end of file
diff --git a/takima-AR/.firebaserc b/takima-AR/.firebaserc
deleted file mode 100644
index 93949f967b27c9ff2b921e35f4fd09321ed68c57..0000000000000000000000000000000000000000
--- a/takima-AR/.firebaserc
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-  "targets": {
-    "takima-ar-eee39": {
-      "hosting": {
-        "takima-AR": [
-          "takima"
-        ]
-      }
-    }
-  },
-  "projects": {
-    "default": "takima-ar-eee39"
-  }
-}
\ No newline at end of file
diff --git a/takima-AR/dist/takima-ar/3rdpartylicenses.txt b/takima-AR/dist/takima-ar/3rdpartylicenses.txt
deleted file mode 100644
index cd545db9eb5d6409d19dfe5e3c04a83430c959ed..0000000000000000000000000000000000000000
--- a/takima-AR/dist/takima-ar/3rdpartylicenses.txt
+++ /dev/null
@@ -1,324 +0,0 @@
-@angular/common
-MIT
-
-@angular/core
-MIT
-
-@angular/fire
-MIT
-
-@angular/platform-browser
-MIT
-
-@angular/router
-MIT
-
-@firebase/analytics
-Apache-2.0
-
-@firebase/app
-Apache-2.0
-
-@firebase/app-check
-Apache-2.0
-
-@firebase/auth
-Apache-2.0
-
-@firebase/component
-Apache-2.0
-
-@firebase/firestore
-Apache-2.0
-
-@firebase/installations
-Apache-2.0
-
-@firebase/logger
-Apache-2.0
-
-@firebase/messaging
-Apache-2.0
-
-@firebase/remote-config
-Apache-2.0
-
-@firebase/storage
-Apache-2.0
-
-@firebase/util
-Apache-2.0
-
-@firebase/webchannel-wrapper
-Apache-2.0
-
-firebase/analytics
-
-firebase/app
-
-firebase/app-check
-
-firebase/auth
-
-firebase/firestore
-
-firebase/messaging
-
-firebase/remote-config
-
-firebase/storage
-
-idb
-ISC
-ISC License (ISC)
-Copyright (c) 2016, Jake Archibald <jaffathecake@gmail.com>
-
-Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-rxjs
-Apache-2.0
-                               Apache License
-                         Version 2.0, January 2004
-                      http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
-    "License" shall mean the terms and conditions for use, reproduction,
-    and distribution as defined by Sections 1 through 9 of this document.
-
-    "Licensor" shall mean the copyright owner or entity authorized by
-    the copyright owner that is granting the License.
-
-    "Legal Entity" shall mean the union of the acting entity and all
-    other entities that control, are controlled by, or are under common
-    control with that entity. For the purposes of this definition,
-    "control" means (i) the power, direct or indirect, to cause the
-    direction or management of such entity, whether by contract or
-    otherwise, or (ii) ownership of fifty percent (50%) or more of the
-    outstanding shares, or (iii) beneficial ownership of such entity.
-
-    "You" (or "Your") shall mean an individual or Legal Entity
-    exercising permissions granted by this License.
-
-    "Source" form shall mean the preferred form for making modifications,
-    including but not limited to software source code, documentation
-    source, and configuration files.
-
-    "Object" form shall mean any form resulting from mechanical
-    transformation or translation of a Source form, including but
-    not limited to compiled object code, generated documentation,
-    and conversions to other media types.
-
-    "Work" shall mean the work of authorship, whether in Source or
-    Object form, made available under the License, as indicated by a
-    copyright notice that is included in or attached to the work
-    (an example is provided in the Appendix below).
-
-    "Derivative Works" shall mean any work, whether in Source or Object
-    form, that is based on (or derived from) the Work and for which the
-    editorial revisions, annotations, elaborations, or other modifications
-    represent, as a whole, an original work of authorship. For the purposes
-    of this License, Derivative Works shall not include works that remain
-    separable from, or merely link (or bind by name) to the interfaces of,
-    the Work and Derivative Works thereof.
-
-    "Contribution" shall mean any work of authorship, including
-    the original version of the Work and any modifications or additions
-    to that Work or Derivative Works thereof, that is intentionally
-    submitted to Licensor for inclusion in the Work by the copyright owner
-    or by an individual or Legal Entity authorized to submit on behalf of
-    the copyright owner. For the purposes of this definition, "submitted"
-    means any form of electronic, verbal, or written communication sent
-    to the Licensor or its representatives, including but not limited to
-    communication on electronic mailing lists, source code control systems,
-    and issue tracking systems that are managed by, or on behalf of, the
-    Licensor for the purpose of discussing and improving the Work, but
-    excluding communication that is conspicuously marked or otherwise
-    designated in writing by the copyright owner as "Not a Contribution."
-
-    "Contributor" shall mean Licensor and any individual or Legal Entity
-    on behalf of whom a Contribution has been received by Licensor and
-    subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
-    this License, each Contributor hereby grants to You a perpetual,
-    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-    copyright license to reproduce, prepare Derivative Works of,
-    publicly display, publicly perform, sublicense, and distribute the
-    Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
-    this License, each Contributor hereby grants to You a perpetual,
-    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-    (except as stated in this section) patent license to make, have made,
-    use, offer to sell, sell, import, and otherwise transfer the Work,
-    where such license applies only to those patent claims licensable
-    by such Contributor that are necessarily infringed by their
-    Contribution(s) alone or by combination of their Contribution(s)
-    with the Work to which such Contribution(s) was submitted. If You
-    institute patent litigation against any entity (including a
-    cross-claim or counterclaim in a lawsuit) alleging that the Work
-    or a Contribution incorporated within the Work constitutes direct
-    or contributory patent infringement, then any patent licenses
-    granted to You under this License for that Work shall terminate
-    as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
-    Work or Derivative Works thereof in any medium, with or without
-    modifications, and in Source or Object form, provided that You
-    meet the following conditions:
-
-    (a) You must give any other recipients of the Work or
-        Derivative Works a copy of this License; and
-
-    (b) You must cause any modified files to carry prominent notices
-        stating that You changed the files; and
-
-    (c) You must retain, in the Source form of any Derivative Works
-        that You distribute, all copyright, patent, trademark, and
-        attribution notices from the Source form of the Work,
-        excluding those notices that do not pertain to any part of
-        the Derivative Works; and
-
-    (d) If the Work includes a "NOTICE" text file as part of its
-        distribution, then any Derivative Works that You distribute must
-        include a readable copy of the attribution notices contained
-        within such NOTICE file, excluding those notices that do not
-        pertain to any part of the Derivative Works, in at least one
-        of the following places: within a NOTICE text file distributed
-        as part of the Derivative Works; within the Source form or
-        documentation, if provided along with the Derivative Works; or,
-        within a display generated by the Derivative Works, if and
-        wherever such third-party notices normally appear. The contents
-        of the NOTICE file are for informational purposes only and
-        do not modify the License. You may add Your own attribution
-        notices within Derivative Works that You distribute, alongside
-        or as an addendum to the NOTICE text from the Work, provided
-        that such additional attribution notices cannot be construed
-        as modifying the License.
-
-    You may add Your own copyright statement to Your modifications and
-    may provide additional or different license terms and conditions
-    for use, reproduction, or distribution of Your modifications, or
-    for any such Derivative Works as a whole, provided Your use,
-    reproduction, and distribution of the Work otherwise complies with
-    the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
-    any Contribution intentionally submitted for inclusion in the Work
-    by You to the Licensor shall be under the terms and conditions of
-    this License, without any additional terms or conditions.
-    Notwithstanding the above, nothing herein shall supersede or modify
-    the terms of any separate license agreement you may have executed
-    with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
-    names, trademarks, service marks, or product names of the Licensor,
-    except as required for reasonable and customary use in describing the
-    origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
-    agreed to in writing, Licensor provides the Work (and each
-    Contributor provides its Contributions) on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-    implied, including, without limitation, any warranties or conditions
-    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-    PARTICULAR PURPOSE. You are solely responsible for determining the
-    appropriateness of using or redistributing the Work and assume any
-    risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
-    whether in tort (including negligence), contract, or otherwise,
-    unless required by applicable law (such as deliberate and grossly
-    negligent acts) or agreed to in writing, shall any Contributor be
-    liable to You for damages, including any direct, indirect, special,
-    incidental, or consequential damages of any character arising as a
-    result of this License or out of the use or inability to use the
-    Work (including but not limited to damages for loss of goodwill,
-    work stoppage, computer failure or malfunction, or any and all
-    other commercial damages or losses), even if such Contributor
-    has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
-    the Work or Derivative Works thereof, You may choose to offer,
-    and charge a fee for, acceptance of support, warranty, indemnity,
-    or other liability obligations and/or rights consistent with this
-    License. However, in accepting such obligations, You may act only
-    on Your own behalf and on Your sole responsibility, not on behalf
-    of any other Contributor, and only if You agree to indemnify,
-    defend, and hold each Contributor harmless for any liability
-    incurred by, or claims asserted against, such Contributor by reason
-    of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
-    To apply the Apache License to your work, attach the following
-    boilerplate notice, with the fields enclosed by brackets "[]"
-    replaced with your own identifying information. (Don't include
-    the brackets!)  The text should be enclosed in the appropriate
-    comment syntax for the file format. We also recommend that a
-    file or class name and description of purpose be included on the
-    same "printed page" as the copyright notice for easier
-    identification within third-party archives.
-
- Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- 
-
-
-tslib
-0BSD
-Copyright (c) Microsoft Corporation.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-zone.js
-MIT
-The MIT License
-
-Copyright (c) 2010-2022 Google LLC. https://angular.io/license
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/takima-AR/dist/takima-ar/favicon.ico b/takima-AR/dist/takima-ar/favicon.ico
deleted file mode 100644
index 997406ad22c29aae95893fb3d666c30258a09537..0000000000000000000000000000000000000000
Binary files a/takima-AR/dist/takima-ar/favicon.ico and /dev/null differ
diff --git a/takima-AR/dist/takima-ar/index.html b/takima-AR/dist/takima-ar/index.html
deleted file mode 100644
index 3afcc442f4a94057279284d2fa4f0dd09e318c52..0000000000000000000000000000000000000000
--- a/takima-AR/dist/takima-ar/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html><html lang="en"><head>
-  <meta charset="utf-8">
-  <title>TakimaAR</title>
-  <base href="/">
-  <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link rel="icon" type="image/x-icon" href="favicon.ico">
-<link rel="stylesheet" href="styles.ef46db3751d8e999.css"></head>
-<body>
-  <app-root></app-root>
-<script src="runtime.baa2baa42427523d.js" type="module"></script><script src="polyfills.cf832c4a72c09765.js" type="module"></script><script src="main.0cce7bf8379ccdec.js" type="module"></script>
-
-</body></html>
\ No newline at end of file
diff --git a/takima-AR/dist/takima-ar/main.0cce7bf8379ccdec.js b/takima-AR/dist/takima-ar/main.0cce7bf8379ccdec.js
deleted file mode 100644
index f41168505bcfa6775136daa553d7bb698d71873c..0000000000000000000000000000000000000000
--- a/takima-AR/dist/takima-ar/main.0cce7bf8379ccdec.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunktakima_AR=self.webpackChunktakima_AR||[]).push([[179],{19:()=>{function De(t){return"function"==typeof t}function eu(t){const n=t(r=>{Error.call(r),r.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const Fl=eu(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((r,i)=>`${i+1}) ${r.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=n});function go(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class In{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const s of n)s.remove(this);else n.remove(this);const{initialTeardown:r}=this;if(De(r))try{r()}catch(s){e=s instanceof Fl?s.errors:[s]}const{_finalizers:i}=this;if(i){this._finalizers=null;for(const s of i)try{gD(s)}catch(o){e=e??[],o instanceof Fl?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Fl(e)}}add(e){var n;if(e&&e!==this)if(this.closed)gD(e);else{if(e instanceof In){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}_hasParent(e){const{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){const{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&go(n,e)}remove(e){const{_finalizers:n}=this;n&&go(n,e),e instanceof In&&e._removeParent(this)}}In.EMPTY=(()=>{const t=new In;return t.closed=!0,t})();const fD=In.EMPTY;function pD(t){return t instanceof In||t&&"closed"in t&&De(t.remove)&&De(t.add)&&De(t.unsubscribe)}function gD(t){De(t)?t():t.unsubscribe()}const es={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ul={setTimeout(t,e,...n){const{delegate:r}=Ul;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Ul;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function mD(t){Ul.setTimeout(()=>{const{onUnhandledError:e}=es;if(!e)throw t;e(t)})}function yD(){}const bV=Wp("C",void 0,void 0);function Wp(t,e,n){return{kind:t,value:e,error:n}}let ts=null;function Vl(t){if(es.useDeprecatedSynchronousErrorHandling){const e=!ts;if(e&&(ts={errorThrown:!1,error:null}),t(),e){const{errorThrown:n,error:r}=ts;if(ts=null,n)throw r}}else t()}class Kp extends In{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,pD(e)&&e.add(this)):this.destination=MV}static create(e,n,r){return new tu(e,n,r)}next(e){this.isStopped?Yp(function CV(t){return Wp("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Yp(function DV(t){return Wp("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Yp(bV,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const AV=Function.prototype.bind;function Qp(t,e){return AV.call(t,e)}class xV{constructor(e){this.partialObserver=e}next(e){const{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(r){$l(r)}}error(e){const{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(r){$l(r)}else $l(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){$l(n)}}}class tu extends Kp{constructor(e,n,r){let i;if(super(),De(e)||!e)i={next:e??void 0,error:n??void 0,complete:r??void 0};else{let s;this&&es.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&Qp(e.next,s),error:e.error&&Qp(e.error,s),complete:e.complete&&Qp(e.complete,s)}):i=e}this.destination=new xV(i)}}function $l(t){es.useDeprecatedSynchronousErrorHandling?function SV(t){es.useDeprecatedSynchronousErrorHandling&&ts&&(ts.errorThrown=!0,ts.error=t)}(t):mD(t)}function Yp(t,e){const{onStoppedNotification:n}=es;n&&Ul.setTimeout(()=>n(t,e))}const MV={closed:!0,next:yD,error:function RV(t){throw t},complete:yD},Xp="function"==typeof Symbol&&Symbol.observable||"@@observable";function ns(t){return t}function _D(t){return 0===t.length?ns:1===t.length?t[0]:function(n){return t.reduce((r,i)=>i(r),n)}}let Qe=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){const r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,i){const s=function PV(t){return t&&t instanceof Kp||function NV(t){return t&&De(t.next)&&De(t.error)&&De(t.complete)}(t)&&pD(t)}(n)?n:new tu(n,r,i);return Vl(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return new(r=vD(r))((i,s)=>{const o=new tu({next:a=>{try{n(a)}catch(u){s(u),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(n){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(n)}[Xp](){return this}pipe(...n){return _D(n)(this)}toPromise(n){return new(n=vD(n))((r,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>r(s))})}}return t.create=e=>new t(e),t})();function vD(t){var e;return null!==(e=t??es.Promise)&&void 0!==e?e:Promise}const OV=eu(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Pr=(()=>{class t extends Qe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){const r=new wD(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new OV}next(n){Vl(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(n)}})}error(n){Vl(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;const{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Vl(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return(null===(n=this.observers)||void 0===n?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){const{hasError:r,isStopped:i,observers:s}=this;return r||i?fD:(this.currentObservers=null,s.push(n),new In(()=>{this.currentObservers=null,go(s,n)}))}_checkFinalizedStatuses(n){const{hasError:r,thrownError:i,isStopped:s}=this;r?n.error(i):s&&n.complete()}asObservable(){const n=new Qe;return n.source=this,n}}return t.create=(e,n)=>new wD(e,n),t})();class wD extends Pr{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===r||r.call(n,e)}error(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===r||r.call(n,e)}complete(){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===n||n.call(e)}_subscribe(e){var n,r;return null!==(r=null===(n=this.source)||void 0===n?void 0:n.subscribe(e))&&void 0!==r?r:fD}}function ID(t){return De(t?.lift)}function yt(t){return e=>{if(ID(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _t(t,e,n,r,i){return new LV(t,e,n,r,i)}class LV extends Kp{constructor(e,n,r,i,s,o){super(e),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=n?function(a){try{n(a)}catch(u){e.error(u)}}:super._next,this._error=i?function(a){try{i(a)}catch(u){e.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function ue(t,e){return yt((n,r)=>{let i=0;n.subscribe(_t(r,s=>{r.next(t.call(e,s,i++))}))})}function TD(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function rs(t){return this instanceof rs?(this.v=t,this):new rs(t)}function $V(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=function DD(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=t[s]&&function(o){return new Promise(function(a,u){!function i(s,o,a,u){Promise.resolve(u).then(function(c){s({value:c,done:a})},o)}(a,u,(o=t[s](o)).done,o.value)})}}}const CD=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function SD(t){return De(t?.then)}function AD(t){return De(t[Xp])}function xD(t){return Symbol.asyncIterator&&De(t?.[Symbol.asyncIterator])}function RD(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const MD=function jV(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function kD(t){return De(t?.[MD])}function ND(t){return function VV(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(f){return new Promise(function(p,g){s.push([h,f,p,g])>1||a(h,f)})})}function a(h,f){try{!function u(h){h.value instanceof rs?Promise.resolve(h.value.v).then(c,l):d(s[0][2],h)}(r[h](f))}catch(p){d(s[0][3],p)}}function c(h){a("next",h)}function l(h){a("throw",h)}function d(h,f){h(f),s.shift(),s.length&&a(s[0][0],s[0][1])}}(this,arguments,function*(){const n=t.getReader();try{for(;;){const{value:r,done:i}=yield rs(n.read());if(i)return yield rs(void 0);yield yield rs(r)}}finally{n.releaseLock()}})}function PD(t){return De(t?.getReader)}function Wn(t){if(t instanceof Qe)return t;if(null!=t){if(AD(t))return function GV(t){return new Qe(e=>{const n=t[Xp]();if(De(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(CD(t))return function HV(t){return new Qe(e=>{for(let n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}(t);if(SD(t))return function zV(t){return new Qe(e=>{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,mD)})}(t);if(xD(t))return OD(t);if(kD(t))return function qV(t){return new Qe(e=>{for(const n of t)if(e.next(n),e.closed)return;e.complete()})}(t);if(PD(t))return function WV(t){return OD(ND(t))}(t)}throw RD(t)}function OD(t){return new Qe(e=>{(function KV(t,e){var n,r,i,s;return function FV(t,e,n,r){return new(n||(n=Promise))(function(s,o){function a(l){try{c(r.next(l))}catch(d){o(d)}}function u(l){try{c(r.throw(l))}catch(d){o(d)}}function c(l){l.done?s(l.value):function i(s){return s instanceof n?s:new n(function(o){o(s)})}(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})}(this,void 0,void 0,function*(){try{for(n=$V(t);!(r=yield n.next()).done;)if(e.next(r.value),e.closed)return}catch(o){i={error:o}}finally{try{r&&!r.done&&(s=n.return)&&(yield s.call(n))}finally{if(i)throw i.error}}e.complete()})})(t,e).catch(n=>e.error(n))})}function Or(t,e,n,r=0,i=!1){const s=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(s),!i)return s}function Dt(t,e,n=1/0){return De(e)?Dt((r,i)=>ue((s,o)=>e(r,s,i,o))(Wn(t(r,i))),n):("number"==typeof e&&(n=e),yt((r,i)=>function QV(t,e,n,r,i,s,o,a){const u=[];let c=0,l=0,d=!1;const h=()=>{d&&!u.length&&!c&&e.complete()},f=g=>c<r?p(g):u.push(g),p=g=>{s&&e.next(g),c++;let m=!1;Wn(n(g,l++)).subscribe(_t(e,v=>{i?.(v),s?f(v):e.next(v)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;u.length&&c<r;){const v=u.shift();o?Or(e,o,()=>p(v)):p(v)}h()}catch(v){e.error(v)}}))};return t.subscribe(_t(e,f,()=>{d=!0,h()})),()=>{a?.()}}(r,i,t,n)))}function mo(t=1/0){return Dt(ns,t)}const cr=new Qe(t=>t.complete());function Jp(t){return t[t.length-1]}function nu(t){return function XV(t){return t&&De(t.schedule)}(Jp(t))?t.pop():void 0}function Bl(t,e=0){return yt((n,r)=>{n.subscribe(_t(r,i=>Or(r,t,()=>r.next(i),e),()=>Or(r,t,()=>r.complete(),e),i=>Or(r,t,()=>r.error(i),e)))})}function jl(t,e=0){return yt((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function LD(t,e){if(!t)throw new Error("Iterable cannot be null");return new Qe(n=>{Or(n,e,()=>{const r=t[Symbol.asyncIterator]();Or(n,e,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function ut(t,e){return e?function s$(t,e){if(null!=t){if(AD(t))return function e$(t,e){return Wn(t).pipe(jl(e),Bl(e))}(t,e);if(CD(t))return function n$(t,e){return new Qe(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}(t,e);if(SD(t))return function t$(t,e){return Wn(t).pipe(jl(e),Bl(e))}(t,e);if(xD(t))return LD(t,e);if(kD(t))return function r$(t,e){return new Qe(n=>{let r;return Or(n,e,()=>{r=t[MD](),Or(n,e,()=>{let i,s;try{({value:i,done:s}=r.next())}catch(o){return void n.error(o)}s?n.complete():n.next(i)},0,!0)}),()=>De(r?.return)&&r.return()})}(t,e);if(PD(t))return function i$(t,e){return LD(ND(t),e)}(t,e)}throw RD(t)}(t,e):Wn(t)}function eg(t,e,...n){if(!0===e)return void t();if(!1===e)return;const r=new tu({next:()=>{r.unsubscribe(),t()}});return Wn(e(...n)).subscribe(r)}function be(t){for(let e in t)if(t[e]===be)return e;throw Error("Could not find renamed property on target object.")}function Ce(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Ce).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function ng(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const u$=be({__forward_ref__:be});function rg(t){return t.__forward_ref__=rg,t.toString=function(){return Ce(this())},t}function z(t){return ig(t)?t():t}function ig(t){return"function"==typeof t&&t.hasOwnProperty(u$)&&t.__forward_ref__===rg}function sg(t){return t&&!!t.\u0275providers}class R extends Error{constructor(e,n){super(Gl(e,n)),this.code=e}}function Gl(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function Z(t){return"string"==typeof t?t:null==t?"":String(t)}function Hl(t,e){throw new R(-201,!1)}function Fn(t,e){null==t&&function ve(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t}`+(null==r?"":` [Expected=> ${n} ${r} ${e} <=Actual]`))}(e,t,null,"!=")}function W(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Kn(t){return{providers:t.providers||[],imports:t.imports||[]}}function zl(t){return UD(t,ql)||UD(t,$D)}function UD(t,e){return t.hasOwnProperty(e)?t[e]:null}function VD(t){return t&&(t.hasOwnProperty(og)||t.hasOwnProperty(y$))?t[og]:null}const ql=be({\u0275prov:be}),og=be({\u0275inj:be}),$D=be({ngInjectableDef:be}),y$=be({ngInjectorDef:be});var q=(()=>((q=q||{})[q.Default=0]="Default",q[q.Host=1]="Host",q[q.Self=2]="Self",q[q.SkipSelf=4]="SkipSelf",q[q.Optional=8]="Optional",q))();let ag;function Un(t){const e=ag;return ag=t,e}function BD(t,e,n){const r=zl(t);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&q.Optional?null:void 0!==e?e:void Hl(Ce(t))}const xe=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),ru={},ug="__NG_DI_FLAG__",Wl="ngTempTokenPath",v$="ngTokenPath",w$=/\n/gm,I$="\u0275",jD="__source";let iu;function yo(t){const e=iu;return iu=t,e}function E$(t,e=q.Default){if(void 0===iu)throw new R(-203,!1);return null===iu?BD(t,void 0,e):iu.get(t,e&q.Optional?null:void 0,e)}function B(t,e=q.Default){return(function _$(){return ag}()||E$)(z(t),e)}function le(t,e=q.Default){return B(t,Kl(e))}function Kl(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function cg(t){const e=[];for(let n=0;n<t.length;n++){const r=z(t[n]);if(Array.isArray(r)){if(0===r.length)throw new R(900,!1);let i,s=q.Default;for(let o=0;o<r.length;o++){const a=r[o],u=T$(a);"number"==typeof u?-1===u?i=a.token:s|=u:i=a}e.push(B(i,s))}else e.push(B(r))}return e}function su(t,e){return t[ug]=e,t.prototype[ug]=e,t}function T$(t){return t[ug]}function Lr(t){return{toString:t}.toString()}var lr=(()=>((lr=lr||{})[lr.OnPush=0]="OnPush",lr[lr.Default=1]="Default",lr))(),dr=(()=>{return(t=dr||(dr={}))[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",dr;var t})();const Fr={},ye=[],Ql=be({\u0275cmp:be}),lg=be({\u0275dir:be}),dg=be({\u0275pipe:be}),HD=be({\u0275mod:be}),Ur=be({\u0275fac:be}),ou=be({__NG_ELEMENT_ID__:be});let C$=0;function hg(t){return Lr(()=>{const e=qD(t),n={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===lr.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||dr.Emulated,id:"c"+C$++,styles:t.styles||ye,_:null,schemas:t.schemas||null,tView:null};WD(n);const r=t.dependencies;return n.directiveDefs=Yl(r,!1),n.pipeDefs=Yl(r,!0),n})}function A$(t){return we(t)||Ft(t)}function x$(t){return null!==t}function hr(t){return Lr(()=>({type:t.type,bootstrap:t.bootstrap||ye,declarations:t.declarations||ye,imports:t.imports||ye,exports:t.exports||ye,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function zD(t,e){if(null==t)return Fr;const n={};for(const r in t)if(t.hasOwnProperty(r)){let i=t[r],s=i;Array.isArray(i)&&(s=i[1],i=i[0]),n[i]=r,e&&(e[i]=s)}return n}function Kt(t){return Lr(()=>{const e=qD(t);return WD(e),e})}function we(t){return t[Ql]||null}function Ft(t){return t[lg]||null}function cn(t){return t[dg]||null}function Tn(t,e){const n=t[HD]||null;if(!n&&!0===e)throw new Error(`Type ${Ce(t)} does not have '\u0275mod' property.`);return n}function qD(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||ye,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:zD(t.inputs,e),outputs:zD(t.outputs)}}function WD(t){t.features?.forEach(e=>e(t))}function Yl(t,e){if(!t)return null;const n=e?cn:A$;return()=>("function"==typeof t?t():t).map(r=>n(r)).filter(x$)}const Vr=0,N=1,re=2,He=3,Qn=4,is=5,Ut=6,vo=7,Ye=8,Xl=9,Zl=10,se=11,fg=12,au=13,KD=14,wo=15,Vt=16,uu=17,Io=18,fr=19,cu=20,QD=21,Re=22,pg=1,YD=2,Jl=7,ed=8,Eo=9,Qt=10;function bn(t){return Array.isArray(t)&&"object"==typeof t[pg]}function Yn(t){return Array.isArray(t)&&!0===t[pg]}function gg(t){return 0!=(4&t.flags)}function lu(t){return t.componentOffset>-1}function td(t){return 1==(1&t.flags)}function Xn(t){return!!t.template}function M$(t){return 0!=(256&t[re])}function ss(t,e){return t.hasOwnProperty(Ur)?t[Ur]:null}class P${constructor(e,n,r){this.previousValue=e,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function os(){return JD}function JD(t){return t.type.prototype.ngOnChanges&&(t.setInput=L$),O$}function O$(){const t=tC(this),e=t?.current;if(e){const n=t.previous;if(n===Fr)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function L$(t,e,n,r){const i=this.declaredInputs[n],s=tC(t)||function F$(t,e){return t[eC]=e}(t,{previous:Fr,current:null}),o=s.current||(s.current={}),a=s.previous,u=a[i];o[i]=new P$(u&&u.currentValue,e,a===Fr),t[r]=e}os.ngInherit=!0;const eC="__ngSimpleChanges__";function tC(t){return t[eC]||null}const Vn=function(t,e,n){},nC="svg";function Ct(t){for(;Array.isArray(t);)t=t[Vr];return t}function Dn(t,e){return Ct(e[t.index])}function iC(t,e){return t.data[e]}function Cn(t,e){const n=e[t];return bn(n)?n:n[Vr]}function rd(t){return 64==(64&t[re])}function vi(t,e){return null==e?null:t[e]}function sC(t){t[Io]=0}function yg(t,e){t[is]+=e;let n=t,r=t[He];for(;null!==r&&(1===e&&1===n[is]||-1===e&&0===n[is]);)r[is]+=e,n=r,r=r[He]}const J={lFrame:gC(null),bindingsEnabled:!0};function aC(){return J.bindingsEnabled}function T(){return J.lFrame.lView}function de(){return J.lFrame.tView}function as(t){return J.lFrame.contextLView=t,t[Ye]}function us(t){return J.lFrame.contextLView=null,t}function St(){let t=uC();for(;null!==t&&64===t.type;)t=t.parent;return t}function uC(){return J.lFrame.currentTNode}function pr(t,e){const n=J.lFrame;n.currentTNode=t,n.isParent=e}function _g(){return J.lFrame.isParent}function bo(){return J.lFrame.bindingIndex++}function Y$(t,e){const n=J.lFrame;n.bindingIndex=n.bindingRootIndex=t,wg(e)}function wg(t){J.lFrame.currentDirectiveIndex=t}function Eg(t){J.lFrame.currentQueryIndex=t}function Z$(t){const e=t[N];return 2===e.type?e.declTNode:1===e.type?t[Ut]:null}function fC(t,e,n){if(n&q.SkipSelf){let i=e,s=t;for(;!(i=i.parent,null!==i||n&q.Host||(i=Z$(s),null===i||(s=s[wo],10&i.type))););if(null===i)return!1;e=i,t=s}const r=J.lFrame=pC();return r.currentTNode=e,r.lView=t,!0}function Tg(t){const e=pC(),n=t[N];J.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function pC(){const t=J.lFrame,e=null===t?null:t.child;return null===e?gC(t):e}function gC(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function mC(){const t=J.lFrame;return J.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const yC=mC;function bg(){const t=mC();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Xt(){return J.lFrame.selectedIndex}function cs(t){J.lFrame.selectedIndex=t}function Me(){J.lFrame.currentNamespace=nC}function ke(){!function nB(){J.lFrame.currentNamespace=null}()}function id(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){const s=t.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:u,ngAfterViewChecked:c,ngOnDestroy:l}=s;o&&(t.contentHooks||(t.contentHooks=[])).push(-n,o),a&&((t.contentHooks||(t.contentHooks=[])).push(n,a),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,a)),u&&(t.viewHooks||(t.viewHooks=[])).push(-n,u),c&&((t.viewHooks||(t.viewHooks=[])).push(n,c),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,c)),null!=l&&(t.destroyHooks||(t.destroyHooks=[])).push(n,l)}}function sd(t,e,n){_C(t,e,3,n)}function od(t,e,n,r){(3&t[re])===n&&_C(t,e,n,r)}function Dg(t,e){let n=t[re];(3&n)===e&&(n&=2047,n+=1,t[re]=n)}function _C(t,e,n,r){const s=r??-1,o=e.length-1;let a=0;for(let u=void 0!==r?65535&t[Io]:0;u<o;u++)if("number"==typeof e[u+1]){if(a=e[u],null!=r&&a>=r)break}else e[u]<0&&(t[Io]+=65536),(a<s||-1==s)&&(sB(t,n,e,u),t[Io]=(4294901760&t[Io])+u+2),u++}function sB(t,e,n,r){const i=n[r]<0,s=n[r+1],a=t[i?-n[r]:n[r]];if(i){if(t[re]>>11<t[Io]>>16&&(3&t[re])===e){t[re]+=2048,Vn(4,a,s);try{s.call(a)}finally{Vn(5,a,s)}}}else{Vn(4,a,s);try{s.call(a)}finally{Vn(5,a,s)}}}const Do=-1;class hu{constructor(e,n,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function Sg(t,e,n){let r=0;for(;r<n.length;){const i=n[r];if("number"==typeof i){if(0!==i)break;r++;const s=n[r++],o=n[r++],a=n[r++];t.setAttribute(e,o,a,s)}else{const s=i,o=n[++r];wC(s)?t.setProperty(e,s,o):t.setAttribute(e,s,o),r++}}return r}function vC(t){return 3===t||4===t||6===t}function wC(t){return 64===t.charCodeAt(0)}function fu(t,e){if(null!==e&&0!==e.length)if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){const i=e[r];"number"==typeof i?n=i:0===n||IC(t,n,i,null,-1===n||2===n?e[++r]:null)}}return t}function IC(t,e,n,r,i){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const a=t[s++];if("number"==typeof a){if(a===e){o=-1;break}if(a>e){o=s-1;break}}}for(;s<t.length;){const a=t[s];if("number"==typeof a)break;if(a===n){if(null===r)return void(null!==i&&(t[s+1]=i));if(r===t[s+1])return void(t[s+2]=i)}s++,null!==r&&s++,null!==i&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,n),null!==r&&t.splice(s++,0,r),null!==i&&t.splice(s++,0,i)}function EC(t){return t!==Do}function ad(t){return 32767&t}function ud(t,e){let n=function cB(t){return t>>16}(t),r=e;for(;n>0;)r=r[wo],n--;return r}let Ag=!0;function cd(t){const e=Ag;return Ag=t,e}const TC=255,bC=5;let lB=0;const gr={};function ld(t,e){const n=DC(t,e);if(-1!==n)return n;const r=e[N];r.firstCreatePass&&(t.injectorIndex=e.length,xg(r.data,t),xg(e,null),xg(r.blueprint,null));const i=Rg(t,e),s=t.injectorIndex;if(EC(i)){const o=ad(i),a=ud(i,e),u=a[N].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|u[o+c]}return e[s+8]=i,s}function xg(t,e){t.push(0,0,0,0,0,0,0,0,e)}function DC(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Rg(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,i=e;for(;null!==i;){if(r=NC(i),null===r)return Do;if(n++,i=i[wo],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return Do}function Mg(t,e,n){!function dB(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(ou)&&(r=n[ou]),null==r&&(r=n[ou]=lB++);const i=r&TC;e.data[t+(i>>bC)]|=1<<i}(t,e,n)}function CC(t,e,n){if(n&q.Optional||void 0!==t)return t;Hl()}function SC(t,e,n,r){if(n&q.Optional&&void 0===r&&(r=null),!(n&(q.Self|q.Host))){const i=t[Xl],s=Un(void 0);try{return i?i.get(e,r,n&q.Optional):BD(e,r,n&q.Optional)}finally{Un(s)}}return CC(r,0,n)}function AC(t,e,n,r=q.Default,i){if(null!==t){if(1024&e[re]){const o=function mB(t,e,n,r,i){let s=t,o=e;for(;null!==s&&null!==o&&1024&o[re]&&!(256&o[re]);){const a=xC(s,o,n,r|q.Self,gr);if(a!==gr)return a;let u=s.parent;if(!u){const c=o[QD];if(c){const l=c.get(n,gr,r);if(l!==gr)return l}u=NC(o),o=o[wo]}s=u}return i}(t,e,n,r,gr);if(o!==gr)return o}const s=xC(t,e,n,r,gr);if(s!==gr)return s}return SC(e,n,r,i)}function xC(t,e,n,r,i){const s=function pB(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(ou)?t[ou]:void 0;return"number"==typeof e?e>=0?e&TC:gB:e}(n);if("function"==typeof s){if(!fC(e,t,r))return r&q.Host?CC(i,0,r):SC(e,n,r,i);try{const o=s(r);if(null!=o||r&q.Optional)return o;Hl()}finally{yC()}}else if("number"==typeof s){let o=null,a=DC(t,e),u=Do,c=r&q.Host?e[Vt][Ut]:null;for((-1===a||r&q.SkipSelf)&&(u=-1===a?Rg(t,e):e[a+8],u!==Do&&MC(r,!1)?(o=e[N],a=ad(u),e=ud(u,e)):a=-1);-1!==a;){const l=e[N];if(RC(s,a,l.data)){const d=fB(a,e,n,o,r,c);if(d!==gr)return d}u=e[a+8],u!==Do&&MC(r,e[N].data[a+8]===c)&&RC(s,a,e)?(o=l,a=ad(u),e=ud(u,e)):a=-1}}return i}function fB(t,e,n,r,i,s){const o=e[N],a=o.data[t+8],l=function dd(t,e,n,r,i){const s=t.providerIndexes,o=e.data,a=1048575&s,u=t.directiveStart,l=s>>20,h=i?a+l:t.directiveEnd;for(let f=r?a:a+l;f<h;f++){const p=o[f];if(f<u&&n===p||f>=u&&p.type===n)return f}if(i){const f=o[u];if(f&&Xn(f)&&f.type===n)return u}return null}(a,o,n,null==r?lu(a)&&Ag:r!=o&&0!=(3&a.type),i&q.Host&&s===a);return null!==l?ls(e,o,l,a):gr}function ls(t,e,n,r){let i=t[n];const s=e.data;if(function oB(t){return t instanceof hu}(i)){const o=i;o.resolving&&function c$(t,e){const n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new R(-200,`Circular dependency in DI detected for ${t}${n}`)}(function _e(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Z(t)}(s[n]));const a=cd(o.canSeeViewProviders);o.resolving=!0;const u=o.injectImpl?Un(o.injectImpl):null;fC(t,r,q.Default);try{i=t[n]=o.factory(void 0,s,t,r),e.firstCreatePass&&n>=r.directiveStart&&function iB(t,e,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=e.type.prototype;if(r){const o=JD(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o)}i&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,i),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{null!==u&&Un(u),cd(a),o.resolving=!1,yC()}}return i}function RC(t,e,n){return!!(n[e+(t>>bC)]&1<<t)}function MC(t,e){return!(t&q.Self||t&q.Host&&e)}class Co{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,r){return AC(this._tNode,this._lView,e,Kl(r),n)}}function gB(){return new Co(St(),T())}function kg(t){return ig(t)?()=>{const e=kg(z(t));return e&&e()}:ss(t)}function NC(t){const e=t[N],n=e.type;return 2===n?e.declTNode:1===n?t[Ut]:null}const Ao="__parameters__";function Ro(t,e,n){return Lr(()=>{const r=function Ng(t){return function(...n){if(t){const r=t(...n);for(const i in r)this[i]=r[i]}}}(e);function i(...s){if(this instanceof i)return r.apply(this,s),this;const o=new i(...s);return a.annotation=o,a;function a(u,c,l){const d=u.hasOwnProperty(Ao)?u[Ao]:Object.defineProperty(u,Ao,{value:[]})[Ao];for(;d.length<=l;)d.push(null);return(d[l]=d[l]||[]).push(o),u}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}class j{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=W({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function ds(t,e){t.forEach(n=>Array.isArray(n)?ds(n,e):e(n))}function OC(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function fd(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}const lt=su(Ro("Optional"),8),yu=su(Ro("SkipSelf"),4);var ln=(()=>((ln=ln||{})[ln.Important=1]="Important",ln[ln.DashCase=2]="DashCase",ln))();const Bg=new Map;let jB=0;const Gg="__ngContext__";function $t(t,e){bn(e)?(t[Gg]=e[cu],function HB(t){Bg.set(t[cu],t)}(e)):t[Gg]=e}let Hg;function zg(t,e){return Hg(t,e)}function Iu(t){const e=t[He];return Yn(e)?e[He]:e}function qg(t){return nS(t[au])}function Wg(t){return nS(t[Qn])}function nS(t){for(;null!==t&&!Yn(t);)t=t[Qn];return t}function No(t,e,n,r,i){if(null!=r){let s,o=!1;Yn(r)?s=r:bn(r)&&(o=!0,r=r[Vr]);const a=Ct(r);0===t&&null!==n?null==i?uS(e,n,a):hs(e,n,a,i||null,!0):1===t&&null!==n?hs(e,n,a,i||null,!0):2===t?function em(t,e,n){const r=yd(t,e);r&&function l3(t,e,n,r){t.removeChild(e,n,r)}(t,r,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=s&&function f3(t,e,n,r,i){const s=n[Jl];s!==Ct(n)&&No(e,t,r,s,i);for(let a=Qt;a<n.length;a++){const u=n[a];Eu(u[N],u,t,e,r,s)}}(e,t,s,n,i)}}function Qg(t,e,n){return t.createElement(e,n)}function iS(t,e){const n=t[Eo],r=n.indexOf(e),i=e[He];512&e[re]&&(e[re]&=-513,yg(i,-1)),n.splice(r,1)}function Yg(t,e){if(t.length<=Qt)return;const n=Qt+e,r=t[n];if(r){const i=r[uu];null!==i&&i!==t&&iS(i,r),e>0&&(t[n-1][Qn]=r[Qn]);const s=fd(t,Qt+e);!function n3(t,e){Eu(t,e,e[se],2,null,null),e[Vr]=null,e[Ut]=null}(r[N],r);const o=s[fr];null!==o&&o.detachView(s[N]),r[He]=null,r[Qn]=null,r[re]&=-65}return r}function sS(t,e){if(!(128&e[re])){const n=e[se];n.destroyNode&&Eu(t,e,n,3,null,null),function s3(t){let e=t[au];if(!e)return Xg(t[N],t);for(;e;){let n=null;if(bn(e))n=e[au];else{const r=e[Qt];r&&(n=r)}if(!n){for(;e&&!e[Qn]&&e!==t;)bn(e)&&Xg(e[N],e),e=e[He];null===e&&(e=t),bn(e)&&Xg(e[N],e),n=e&&e[Qn]}e=n}}(e)}}function Xg(t,e){if(!(128&e[re])){e[re]&=-65,e[re]|=128,function c3(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r<n.length;r+=2){const i=e[n[r]];if(!(i instanceof hu)){const s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){const a=i[s[o]],u=s[o+1];Vn(4,a,u);try{u.call(a)}finally{Vn(5,a,u)}}else{Vn(4,i,s);try{s.call(i)}finally{Vn(5,i,s)}}}}}(t,e),function u3(t,e){const n=t.cleanup,r=e[vo];let i=-1;if(null!==n)for(let s=0;s<n.length-1;s+=2)if("string"==typeof n[s]){const o=n[s+3];o>=0?r[i=o]():r[i=-o].unsubscribe(),s+=2}else{const o=r[i=n[s+1]];n[s].call(o)}if(null!==r){for(let s=i+1;s<r.length;s++)(0,r[s])();e[vo]=null}}(t,e),1===e[N].type&&e[se].destroy();const n=e[uu];if(null!==n&&Yn(e[He])){n!==e[He]&&iS(n,e);const r=e[fr];null!==r&&r.detachView(t)}!function zB(t){Bg.delete(t[cu])}(e)}}function oS(t,e,n){return function aS(t,e,n){let r=e;for(;null!==r&&40&r.type;)r=(e=r).parent;if(null===r)return n[Vr];{const{componentOffset:i}=r;if(i>-1){const{encapsulation:s}=t.data[r.directiveStart+i];if(s===dr.None||s===dr.Emulated)return null}return Dn(r,n)}}(t,e.parent,n)}function hs(t,e,n,r,i){t.insertBefore(e,n,r,i)}function uS(t,e,n){t.appendChild(e,n)}function cS(t,e,n,r,i){null!==r?hs(t,e,n,r,i):uS(t,e,n)}function yd(t,e){return t.parentNode(e)}let Zg,rm,hS=function dS(t,e,n){return 40&t.type?Dn(t,n):null};function _d(t,e,n,r){const i=oS(t,r,e),s=e[se],a=function lS(t,e,n){return hS(t,e,n)}(r.parent||e[Ut],r,e);if(null!=i)if(Array.isArray(n))for(let u=0;u<n.length;u++)cS(s,i,n[u],a,!1);else cS(s,i,n,a,!1);void 0!==Zg&&Zg(s,r,e,n,i)}function vd(t,e){if(null!==e){const n=e.type;if(3&n)return Dn(e,t);if(4&n)return Jg(-1,t[e.index]);if(8&n){const r=e.child;if(null!==r)return vd(t,r);{const i=t[e.index];return Yn(i)?Jg(-1,i):Ct(i)}}if(32&n)return zg(e,t)()||Ct(t[e.index]);{const r=pS(t,e);return null!==r?Array.isArray(r)?r[0]:vd(Iu(t[Vt]),r):vd(t,e.next)}}return null}function pS(t,e){return null!==e?t[Vt][Ut].projection[e.projection]:null}function Jg(t,e){const n=Qt+t+1;if(n<e.length){const r=e[n],i=r[N].firstChild;if(null!==i)return vd(r,i)}return e[Jl]}function tm(t,e,n,r,i,s,o){for(;null!=n;){const a=r[n.index],u=n.type;if(o&&0===e&&(a&&$t(Ct(a),r),n.flags|=2),32!=(32&n.flags))if(8&u)tm(t,e,n.child,r,i,s,!1),No(e,t,i,a,s);else if(32&u){const c=zg(n,r);let l;for(;l=c();)No(e,t,i,l,s);No(e,t,i,a,s)}else 16&u?gS(t,e,r,n,i,s):No(e,t,i,a,s);n=o?n.projectionNext:n.next}}function Eu(t,e,n,r,i,s){tm(n,r,t.firstChild,e,i,s,!1)}function gS(t,e,n,r,i,s){const o=n[Vt],u=o[Ut].projection[r.projection];if(Array.isArray(u))for(let c=0;c<u.length;c++)No(e,t,i,u[c],s);else tm(t,e,u,o[He],i,s,!0)}function mS(t,e,n){""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n)}function yS(t,e,n){const{mergedAttrs:r,classes:i,styles:s}=n;null!==r&&Sg(t,e,r),null!==i&&mS(t,e,i),null!==s&&function g3(t,e,n){t.setAttribute(e,"style",n)}(t,e,s)}const Td=new j("ENVIRONMENT_INITIALIZER"),kS=new j("INJECTOR",-1),NS=new j("INJECTOR_DEF_TYPES");class PS{get(e,n=ru){if(n===ru){const r=new Error(`NullInjectorError: No provider for ${Ce(e)}!`);throw r.name="NullInjectorError",r}return n}}function j3(...t){return{\u0275providers:OS(0,t),\u0275fromNgModule:!0}}function OS(t,...e){const n=[],r=new Set;let i;return ds(e,s=>{const o=s;cm(o,n,[],r)&&(i||(i=[]),i.push(o))}),void 0!==i&&LS(i,n),n}function LS(t,e){for(let n=0;n<t.length;n++){const{providers:i}=t[n];lm(i,s=>{e.push(s)})}}function cm(t,e,n,r){if(!(t=z(t)))return!1;let i=null,s=VD(t);const o=!s&&we(t);if(s||o){if(o&&!o.standalone)return!1;i=t}else{const u=t.ngModule;if(s=VD(u),!s)return!1;i=u}const a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){const u="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of u)cm(c,e,n,r)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;r.add(i);try{ds(s.imports,l=>{cm(l,e,n,r)&&(c||(c=[]),c.push(l))})}finally{}void 0!==c&&LS(c,e)}if(!a){const c=ss(i)||(()=>new i);e.push({provide:i,useFactory:c,deps:ye},{provide:NS,useValue:i,multi:!0},{provide:Td,useValue:()=>B(i),multi:!0})}const u=s.providers;null==u||a||lm(u,l=>{e.push(l)})}}return i!==t&&void 0!==t.providers}function lm(t,e){for(let n of t)sg(n)&&(n=n.\u0275providers),Array.isArray(n)?lm(n,e):e(n)}const G3=be({provide:String,useValue:be});function dm(t){return null!==t&&"object"==typeof t&&G3 in t}function fs(t){return"function"==typeof t}const hm=new j("Set Injector scope."),bd={},z3={};let fm;function Dd(){return void 0===fm&&(fm=new PS),fm}class Gr{}class VS extends Gr{get destroyed(){return this._destroyed}constructor(e,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,gm(e,o=>this.processProvider(o)),this.records.set(kS,Oo(void 0,this)),i.has("environment")&&this.records.set(Gr,Oo(void 0,this));const s=this.records.get(hm);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(NS.multi,ye,q.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const n=yo(this),r=Un(void 0);try{return e()}finally{yo(n),Un(r)}}get(e,n=ru,r=q.Default){this.assertNotDestroyed(),r=Kl(r);const i=yo(this),s=Un(void 0);try{if(!(r&q.SkipSelf)){let a=this.records.get(e);if(void 0===a){const u=function Y3(t){return"function"==typeof t||"object"==typeof t&&t instanceof j}(e)&&zl(e);a=u&&this.injectableDefInScope(u)?Oo(pm(e),bd):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&q.Self?Dd():this.parent).get(e,n=r&q.Optional&&n===ru?null:n)}catch(o){if("NullInjectorError"===o.name){if((o[Wl]=o[Wl]||[]).unshift(Ce(e)),i)throw o;return function b$(t,e,n,r){const i=t[Wl];throw e[jD]&&i.unshift(e[jD]),t.message=function D$(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==I$?t.slice(2):t;let i=Ce(e);if(Array.isArray(e))i=e.map(Ce).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):Ce(a)))}i=`{${s.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(w$,"\n  ")}`}("\n"+t.message,i,n,r),t[v$]=i,t[Wl]=null,t}(o,e,"R3InjectorError",this.source)}throw o}finally{Un(s),yo(i)}}resolveInjectorInitializers(){const e=yo(this),n=Un(void 0);try{const r=this.get(Td.multi,ye,q.Self);for(const i of r)i()}finally{yo(e),Un(n)}}toString(){const e=[],n=this.records;for(const r of n.keys())e.push(Ce(r));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new R(205,!1)}processProvider(e){let n=fs(e=z(e))?e:z(e&&e.provide);const r=function W3(t){return dm(t)?Oo(void 0,t.useValue):Oo(function $S(t,e,n){let r;if(fs(t)){const i=z(t);return ss(i)||pm(i)}if(dm(t))r=()=>z(t.useValue);else if(function US(t){return!(!t||!t.useFactory)}(t))r=()=>t.useFactory(...cg(t.deps||[]));else if(function FS(t){return!(!t||!t.useExisting)}(t))r=()=>B(z(t.useExisting));else{const i=z(t&&(t.useClass||t.provide));if(!function K3(t){return!!t.deps}(t))return ss(i)||pm(i);r=()=>new i(...cg(t.deps))}return r}(t),bd)}(e);if(fs(e)||!0!==e.multi)this.records.get(n);else{let i=this.records.get(n);i||(i=Oo(void 0,bd,!0),i.factory=()=>cg(i.multi),this.records.set(n,i)),n=e,i.multi.push(e)}this.records.set(n,r)}hydrate(e,n){return n.value===bd&&(n.value=z3,n.value=n.factory()),"object"==typeof n.value&&n.value&&function Q3(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=z(e.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}}function pm(t){const e=zl(t),n=null!==e?e.factory:ss(t);if(null!==n)return n;if(t instanceof j)throw new R(204,!1);if(t instanceof Function)return function q3(t){const e=t.length;if(e>0)throw function mu(t,e){const n=[];for(let r=0;r<t;r++)n.push(e);return n}(e,"?"),new R(204,!1);const n=function g$(t){const e=t&&(t[ql]||t[$D]);return e?(function m$(t){if(t.hasOwnProperty("name"))return t.name;(""+t).match(/^function\s*([^\s(]+)/)}(t),e):null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new R(204,!1)}function Oo(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function gm(t,e){for(const n of t)Array.isArray(n)?gm(n,e):n&&sg(n)?gm(n.\u0275providers,e):e(n)}class X3{}class BS{}class J3{resolveComponentFactory(e){throw function Z3(t){const e=Error(`No component factory found for ${Ce(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(e)}}let Cu=(()=>{class t{}return t.NULL=new J3,t})();function ej(){return Lo(St(),T())}function Lo(t,e){return new Ii(Dn(t,e))}let Ii=(()=>{class t{constructor(n){this.nativeElement=n}}return t.__NG_ELEMENT_ID__=ej,t})();class GS{}let rj=(()=>{class t{}return t.\u0275prov=W({token:t,providedIn:"root",factory:()=>null}),t})();class Su{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const HS=new Su("15.2.3"),mm={},ym="ngOriginalError";function _m(t){return t[ym]}class Fo{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e);this._console.error("ERROR",e),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(e){let n=e&&_m(e);for(;n&&_m(n);)n=_m(n);return n||null}}function Hr(t){return t instanceof Function?t():t}function qS(t,e,n){let r=t.length;for(;;){const i=t.indexOf(e,n);if(-1===i)return i;if(0===i||t.charCodeAt(i-1)<=32){const s=e.length;if(i+s===r||t.charCodeAt(i+s)<=32)return i}n=i+1}}const WS="ng-template";function pj(t,e,n){let r=0;for(;r<t.length;){let i=t[r++];if(n&&"class"===i){if(i=t[r],-1!==qS(i.toLowerCase(),e,0))return!0}else if(1===i){for(;r<t.length&&"string"==typeof(i=t[r++]);)if(i.toLowerCase()===e)return!0;return!1}}return!1}function KS(t){return 4===t.type&&t.value!==WS}function gj(t,e,n){return e===(4!==t.type||n?t.value:WS)}function mj(t,e,n){let r=4;const i=t.attrs||[],s=function vj(t){for(let e=0;e<t.length;e++)if(vC(t[e]))return e;return t.length}(i);let o=!1;for(let a=0;a<e.length;a++){const u=e[a];if("number"!=typeof u){if(!o)if(4&r){if(r=2|1&r,""!==u&&!gj(t,u,n)||""===u&&1===e.length){if(Zn(r))return!1;o=!0}}else{const c=8&r?u:e[++a];if(8&r&&null!==t.attrs){if(!pj(t.attrs,c,n)){if(Zn(r))return!1;o=!0}continue}const d=yj(8&r?"class":u,i,KS(t),n);if(-1===d){if(Zn(r))return!1;o=!0;continue}if(""!==c){let h;h=d>s?"":i[d+1].toLowerCase();const f=8&r?h:null;if(f&&-1!==qS(f,c,0)||2&r&&c!==h){if(Zn(r))return!1;o=!0}}}}else{if(!o&&!Zn(r)&&!Zn(u))return!1;if(o&&Zn(u))continue;o=!1,r=u|1&r}}return Zn(r)||o}function Zn(t){return 0==(1&t)}function yj(t,e,n,r){if(null===e)return-1;let i=0;if(r||!n){let s=!1;for(;i<e.length;){const o=e[i];if(o===t)return i;if(3===o||6===o)s=!0;else{if(1===o||2===o){let a=e[++i];for(;"string"==typeof a;)a=e[++i];continue}if(4===o)break;if(0===o){i+=4;continue}}i+=s?1:2}return-1}return function wj(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const r=t[n];if("number"==typeof r)return-1;if(r===e)return n;n++}return-1}(e,t)}function QS(t,e,n=!1){for(let r=0;r<e.length;r++)if(mj(t,e[r],n))return!0;return!1}function YS(t,e){return t?":not("+e.trim()+")":e}function Ej(t){let e=t[0],n=1,r=2,i="",s=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&r){const a=t[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else 8&r?i+="."+o:4&r&&(i+=" "+o);else""!==i&&!Zn(o)&&(e+=YS(s,i),i=""),r=o,s=s||!Zn(r);n++}return""!==i&&(e+=YS(s,i)),e}const ee={};function Ei(t){XS(de(),T(),Xt()+t,!1)}function XS(t,e,n,r){if(!r)if(3==(3&e[re])){const s=t.preOrderCheckHooks;null!==s&&sd(e,s,n)}else{const s=t.preOrderHooks;null!==s&&od(e,s,0,n)}cs(n)}function t1(t,e=null,n=null,r){const i=n1(t,e,n,r);return i.resolveInjectorInitializers(),i}function n1(t,e=null,n=null,r,i=new Set){const s=[n||ye,j3(t)];return r=r||("object"==typeof t?void 0:Ce(t)),new VS(s,e||Dd(),r||null,i)}let An=(()=>{class t{static create(n,r){if(Array.isArray(n))return t1({name:""},r,n,"");{const i=n.name??"";return t1({name:i},n.parent,n.providers,i)}}}return t.THROW_IF_NOT_FOUND=ru,t.NULL=new PS,t.\u0275prov=W({token:t,providedIn:"any",factory:()=>B(kS)}),t.__NG_ELEMENT_ID__=-1,t})();function K(t,e=q.Default){const n=T();return null===n?B(t,e):AC(St(),n,z(t),e)}function l1(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r<n.length;r+=2){const s=n[r+1];if(-1!==s){const o=t.data[s];Eg(n[r]),o.contentQueries(2,e[s],s)}}}function Ad(t,e,n,r,i,s,o,a,u,c,l){const d=e.blueprint.slice();return d[Vr]=i,d[re]=76|r,(null!==l||t&&1024&t[re])&&(d[re]|=1024),sC(d),d[He]=d[wo]=t,d[Ye]=n,d[Zl]=o||t&&t[Zl],d[se]=a||t&&t[se],d[fg]=u||t&&t[fg]||null,d[Xl]=c||t&&t[Xl]||null,d[Ut]=s,d[cu]=function GB(){return jB++}(),d[QD]=l,d[Vt]=2==e.type?t[Vt]:d,d}function $o(t,e,n,r,i){let s=t.data[e];if(null===s)s=function Tm(t,e,n,r,i){const s=uC(),o=_g(),u=t.data[e]=function Kj(t,e,n,r,i,s){return{type:n,index:r,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:0,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,n,e,r,i);return null===t.firstChild&&(t.firstChild=u),null!==s&&(o?null==s.child&&null!==u.parent&&(s.child=u):null===s.next&&(s.next=u,u.prev=s)),u}(t,e,n,r,i),function Q$(){return J.lFrame.inI18n}()&&(s.flags|=32);else if(64&s.type){s.type=n,s.value=r,s.attrs=i;const o=function du(){const t=J.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();s.injectorIndex=null===o?-1:o.injectorIndex}return pr(s,!0),s}function Au(t,e,n,r){if(0===n)return-1;const i=e.length;for(let s=0;s<n;s++)e.push(r),t.blueprint.push(r),t.data.push(null);return i}function bm(t,e,n){Tg(e);try{const r=t.viewQuery;null!==r&&Pm(1,r,n);const i=t.template;null!==i&&d1(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&l1(t,e),t.staticViewQueries&&Pm(2,t.viewQuery,n);const s=t.components;null!==s&&function zj(t,e){for(let n=0;n<e.length;n++)f4(t,e[n])}(e,s)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),r}finally{e[re]&=-5,bg()}}function xd(t,e,n,r){const i=e[re];if(128!=(128&i)){Tg(e);try{sC(e),function lC(t){return J.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==n&&d1(t,e,n,2,r);const o=3==(3&i);if(o){const c=t.preOrderCheckHooks;null!==c&&sd(e,c,null)}else{const c=t.preOrderHooks;null!==c&&od(e,c,0,null),Dg(e,0)}if(function d4(t){for(let e=qg(t);null!==e;e=Wg(e)){if(!e[YD])continue;const n=e[Eo];for(let r=0;r<n.length;r++){const i=n[r];512&i[re]||yg(i[He],1),i[re]|=512}}}(e),function l4(t){for(let e=qg(t);null!==e;e=Wg(e))for(let n=Qt;n<e.length;n++){const r=e[n],i=r[N];rd(r)&&xd(i,r,i.template,r[Ye])}}(e),null!==t.contentQueries&&l1(t,e),o){const c=t.contentCheckHooks;null!==c&&sd(e,c)}else{const c=t.contentHooks;null!==c&&od(e,c,1),Dg(e,1)}!function Gj(t,e){const n=t.hostBindingOpCodes;if(null!==n)try{for(let r=0;r<n.length;r++){const i=n[r];if(i<0)cs(~i);else{const s=i,o=n[++r],a=n[++r];Y$(o,s),a(2,e[s])}}}finally{cs(-1)}}(t,e);const a=t.components;null!==a&&function Hj(t,e){for(let n=0;n<e.length;n++)h4(t,e[n])}(e,a);const u=t.viewQuery;if(null!==u&&Pm(2,u,r),o){const c=t.viewCheckHooks;null!==c&&sd(e,c)}else{const c=t.viewHooks;null!==c&&od(e,c,2),Dg(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),e[re]&=-41,512&e[re]&&(e[re]&=-513,yg(e[He],-1))}finally{bg()}}}function d1(t,e,n,r,i){const s=Xt(),o=2&r;try{cs(-1),o&&e.length>Re&&XS(t,e,Re,!1),Vn(o?2:0,i),n(r,i)}finally{cs(s),Vn(o?3:1,i)}}function Dm(t,e,n){if(gg(e)){const i=e.directiveEnd;for(let s=e.directiveStart;s<i;s++){const o=t.data[s];o.contentQueries&&o.contentQueries(1,n[s],s)}}}function Cm(t,e,n){aC()&&(function e4(t,e,n,r){const i=n.directiveStart,s=n.directiveEnd;lu(n)&&function a4(t,e,n){const r=Dn(e,t),i=h1(n),s=t[Zl],o=Rd(t,Ad(t,i,null,n.onPush?32:16,r,e,s,s.createRenderer(r,n),null,null,null));t[e.index]=o}(e,n,t.data[i+n.componentOffset]),t.firstCreatePass||ld(n,e),$t(r,e);const o=n.initialInputs;for(let a=i;a<s;a++){const u=t.data[a],c=ls(e,t,a,n);$t(c,e),null!==o&&u4(0,a-i,c,u,0,o),Xn(u)&&(Cn(n.index,e)[Ye]=ls(e,t,a,n))}}(t,e,n,Dn(n,e)),64==(64&n.flags)&&_1(t,e,n))}function Sm(t,e,n=Dn){const r=e.localNames;if(null!==r){let i=e.index+1;for(let s=0;s<r.length;s+=2){const o=r[s+1],a=-1===o?n(e,t):t[o];t[i++]=a}}}function h1(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Am(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Am(t,e,n,r,i,s,o,a,u,c){const l=Re+r,d=l+i,h=function qj(t,e){const n=[];for(let r=0;r<e;r++)n.push(r<t?null:ee);return n}(l,d),f="function"==typeof c?c():c;return h[N]={type:t,blueprint:h,template:n,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,l),bindingStartIndex:l,expandoStartIndex:d,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:u,consts:f,incompleteFirstPass:!1}}function p1(t,e,n,r){for(let i in t)if(t.hasOwnProperty(i)){n=null===n?{}:n;const s=t[i];null===r?g1(n,e,i,s):r.hasOwnProperty(i)&&g1(n,e,r[i],s)}return n}function g1(t,e,n,r){t.hasOwnProperty(n)?t[n].push(e,r):t[n]=[e,r]}function m1(t,e){const n=Cn(e,t);16&n[re]||(n[re]|=32)}function xm(t,e,n,r){if(aC()){const i=null===r?null:{"":-1},s=function n4(t,e){const n=t.directiveRegistry;let r=null,i=null;if(n)for(let s=0;s<n.length;s++){const o=n[s];if(QS(e,o.selectors,!1))if(r||(r=[]),Xn(o))if(null!==o.findHostDirectiveDefs){const a=[];i=i||new Map,o.findHostDirectiveDefs(o,a,i),r.unshift(...a,o),Rm(t,e,a.length)}else r.unshift(o),Rm(t,e,0);else i=i||new Map,o.findHostDirectiveDefs?.(o,r,i),r.push(o)}return null===r?null:[r,i]}(t,n);let o,a;null===s?o=a=null:[o,a]=s,null!==o&&y1(t,e,n,o,i,a),i&&function r4(t,e,n){if(e){const r=t.localNames=[];for(let i=0;i<e.length;i+=2){const s=n[e[i+1]];if(null==s)throw new R(-301,!1);r.push(e[i],s)}}}(n,r,i)}n.mergedAttrs=fu(n.mergedAttrs,n.attrs)}function y1(t,e,n,r,i,s){for(let c=0;c<r.length;c++)Mg(ld(n,e),t,r[c].type);!function s4(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}(n,t.data.length,r.length);for(let c=0;c<r.length;c++){const l=r[c];l.providersResolver&&l.providersResolver(l)}let o=!1,a=!1,u=Au(t,e,r.length,null);for(let c=0;c<r.length;c++){const l=r[c];n.mergedAttrs=fu(n.mergedAttrs,l.hostAttrs),o4(t,n,e,u,l),i4(u,l,i),null!==l.contentQueries&&(n.flags|=4),(null!==l.hostBindings||null!==l.hostAttrs||0!==l.hostVars)&&(n.flags|=64);const d=l.type.prototype;!o&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index),o=!0),!a&&(d.ngOnChanges||d.ngDoCheck)&&((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index),a=!0),u++}!function Qj(t,e,n){const i=e.directiveEnd,s=t.data,o=e.attrs,a=[];let u=null,c=null;for(let l=e.directiveStart;l<i;l++){const d=s[l],h=n?n.get(d):null,p=h?h.outputs:null;u=p1(d.inputs,l,u,h?h.inputs:null),c=p1(d.outputs,l,c,p);const g=null===u||null===o||KS(e)?null:c4(u,l,o);a.push(g)}null!==u&&(u.hasOwnProperty("class")&&(e.flags|=8),u.hasOwnProperty("style")&&(e.flags|=16)),e.initialInputs=a,e.inputs=u,e.outputs=c}(t,n,s)}function _1(t,e,n){const r=n.directiveStart,i=n.directiveEnd,s=n.index,o=function X$(){return J.lFrame.currentDirectiveIndex}();try{cs(s);for(let a=r;a<i;a++){const u=t.data[a],c=e[a];wg(a),(null!==u.hostBindings||0!==u.hostVars||null!==u.hostAttrs)&&t4(u,c)}}finally{cs(-1),wg(o)}}function t4(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Rm(t,e,n){e.componentOffset=n,(t.components||(t.components=[])).push(e.index)}function i4(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;Xn(e)&&(n[""]=t)}}function o4(t,e,n,r,i){t.data[r]=i;const s=i.factory||(i.factory=ss(i.type)),o=new hu(s,Xn(i),K);t.blueprint[r]=o,n[r]=o,function Zj(t,e,n,r,i){const s=i.hostBindings;if(s){let o=t.hostBindingOpCodes;null===o&&(o=t.hostBindingOpCodes=[]);const a=~e.index;(function Jj(t){let e=t.length;for(;e>0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(o)!=a&&o.push(a),o.push(n,r,s)}}(t,e,r,Au(t,n,i.hostVars,ee),i)}function u4(t,e,n,r,i,s){const o=s[e];if(null!==o){const a=r.setInput;for(let u=0;u<o.length;){const c=o[u++],l=o[u++],d=o[u++];null!==a?r.setInput(n,d,c,l):n[l]=d}}}function c4(t,e,n){let r=null,i=0;for(;i<n.length;){const s=n[i];if(0!==s)if(5!==s){if("number"==typeof s)break;if(t.hasOwnProperty(s)){null===r&&(r=[]);const o=t[s];for(let a=0;a<o.length;a+=2)if(o[a]===e){r.push(s,o[a+1],n[i+1]);break}}i+=2}else i+=2;else i+=4}return r}function v1(t,e,n,r){return[t,!0,!1,e,null,0,r,n,null,null]}function h4(t,e){const n=Cn(e,t);if(rd(n)){const r=n[N];48&n[re]?xd(r,n,r.template,n[Ye]):n[is]>0&&km(n)}}function km(t){for(let r=qg(t);null!==r;r=Wg(r))for(let i=Qt;i<r.length;i++){const s=r[i];if(rd(s))if(512&s[re]){const o=s[N];xd(o,s,o.template,s[Ye])}else s[is]>0&&km(s)}const n=t[N].components;if(null!==n)for(let r=0;r<n.length;r++){const i=Cn(n[r],t);rd(i)&&i[is]>0&&km(i)}}function f4(t,e){const n=Cn(e,t),r=n[N];(function p4(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])})(r,n),bm(r,n,n[Ye])}function Rd(t,e){return t[au]?t[KD][Qn]=e:t[au]=e,t[KD]=e,e}function Nm(t){for(;t;){t[re]|=32;const e=Iu(t);if(M$(t)&&!e)return t;t=e}return null}function Md(t,e,n,r=!0){const i=e[Zl];i.begin&&i.begin();try{xd(t,e,t.template,n)}catch(o){throw r&&T1(e,o),o}finally{i.end&&i.end()}}function Pm(t,e,n){Eg(0),e(t,n)}function w1(t){return t[vo]||(t[vo]=[])}function I1(t){return t.cleanup||(t.cleanup=[])}function T1(t,e){const n=t[Xl],r=n?n.get(Fo,null):null;r&&r.handleError(e)}function Om(t,e,n,r,i){for(let s=0;s<n.length;){const o=n[s++],a=n[s++],u=e[o],c=t.data[o];null!==c.setInput?c.setInput(u,i,r,a):u[a]=i}}function zr(t,e,n){const r=function nd(t,e){return Ct(e[t])}(e,t);!function rS(t,e,n){t.setValue(e,n)}(t[se],r,n)}function kd(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const a=e[o];"number"==typeof a?s=a:1==s?i=ng(i,a):2==s&&(r=ng(r,a+": "+e[++o]+";"))}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=i:t.classesWithoutHost=i}function Nd(t,e,n,r,i=!1){for(;null!==n;){const s=e[n.index];if(null!==s&&r.push(Ct(s)),Yn(s))for(let a=Qt;a<s.length;a++){const u=s[a],c=u[N].firstChild;null!==c&&Nd(u[N],u,c,r)}const o=n.type;if(8&o)Nd(t,e,n.child,r);else if(32&o){const a=zg(n,e);let u;for(;u=a();)r.push(u)}else if(16&o){const a=pS(e,n);if(Array.isArray(a))r.push(...a);else{const u=Iu(e[Vt]);Nd(u[N],u,a,r,!0)}}n=i?n.projectionNext:n.next}return r}class xu{get rootNodes(){const e=this._lView,n=e[N];return Nd(n,e,n.firstChild,[])}constructor(e,n){this._lView=e,this._cdRefInjectingView=n,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[Ye]}set context(e){this._lView[Ye]=e}get destroyed(){return 128==(128&this._lView[re])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[He];if(Yn(e)){const n=e[ed],r=n?n.indexOf(this):-1;r>-1&&(Yg(e,r),fd(n,r))}this._attachedToViewContainer=!1}sS(this._lView[N],this._lView)}onDestroy(e){!function f1(t,e,n,r){const i=w1(e);null===n?i.push(r):(i.push(n),t.firstCreatePass&&I1(t).push(r,i.length-1))}(this._lView[N],this._lView,null,e)}markForCheck(){Nm(this._cdRefInjectingView||this._lView)}detach(){this._lView[re]&=-65}reattach(){this._lView[re]|=64}detectChanges(){Md(this._lView[N],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new R(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function i3(t,e){Eu(t,e,e[se],2,null,null)}(this._lView[N],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new R(902,!1);this._appRef=e}}class g4 extends xu{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;Md(e[N],e,e[Ye],!1)}checkNoChanges(){}get context(){return null}}class b1 extends Cu{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=we(e);return new Ru(n,this.ngModule)}}function D1(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}class y4{constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,r){r=Kl(r);const i=this.injector.get(e,mm,r);return i!==mm||n===mm?i:this.parentInjector.get(e,n,r)}}class Ru extends BS{get inputs(){return D1(this.componentDef.inputs)}get outputs(){return D1(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function Tj(t){return t.map(Ej).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}create(e,n,r,i){let s=(i=i||this.ngModule)instanceof Gr?i:i?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new y4(e,s):e,a=o.get(GS,null);if(null===a)throw new R(407,!1);const u=o.get(rj,null),c=a.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",d=r?function Wj(t,e,n){return t.selectRootElement(e,n===dr.ShadowDom)}(c,r,this.componentDef.encapsulation):Qg(c,l,function m4(t){const e=t.toLowerCase();return"svg"===e?nC:"math"===e?"math":null}(l)),h=this.componentDef.onPush?288:272,f=Am(0,null,null,1,0,null,null,null,null,null),p=Ad(null,f,null,h,null,null,a,c,u,o,null);let g,m;Tg(p);try{const v=this.componentDef;let E,y=null;v.findHostDirectiveDefs?(E=[],y=new Map,v.findHostDirectiveDefs(v,E,y),E.push(v)):E=[v];const C=function v4(t,e){const n=t[N],r=Re;return t[r]=e,$o(n,r,2,"#host",null)}(p,d),O=function w4(t,e,n,r,i,s,o,a){const u=i[N];!function I4(t,e,n,r){for(const i of t)e.mergedAttrs=fu(e.mergedAttrs,i.hostAttrs);null!==e.mergedAttrs&&(kd(e,e.mergedAttrs,!0),null!==n&&yS(r,n,e))}(r,t,e,o);const c=s.createRenderer(e,n),l=Ad(i,h1(n),null,n.onPush?32:16,i[t.index],t,s,c,a||null,null,null);return u.firstCreatePass&&Rm(u,t,r.length-1),Rd(i,l),i[t.index]=l}(C,d,v,E,p,a,c);m=iC(f,Re),d&&function T4(t,e,n,r){if(r)Sg(t,n,["ng-version",HS.full]);else{const{attrs:i,classes:s}=function bj(t){const e=[],n=[];let r=1,i=2;for(;r<t.length;){let s=t[r];if("string"==typeof s)2===i?""!==s&&e.push(s,t[++r]):8===i&&n.push(s);else{if(!Zn(i))break;i=s}r++}return{attrs:e,classes:n}}(e.selectors[0]);i&&Sg(t,n,i),s&&s.length>0&&mS(t,n,s.join(" "))}}(c,v,d,r),void 0!==n&&function b4(t,e,n){const r=t.projection=[];for(let i=0;i<e.length;i++){const s=n[i];r.push(null!=s?Array.from(s):null)}}(m,this.ngContentSelectors,n),g=function E4(t,e,n,r,i,s){const o=St(),a=i[N],u=Dn(o,i);y1(a,i,o,n,null,r);for(let l=0;l<n.length;l++)$t(ls(i,a,o.directiveStart+l,o),i);_1(a,i,o),u&&$t(u,i);const c=ls(i,a,o.directiveStart+o.componentOffset,o);if(t[Ye]=i[Ye]=c,null!==s)for(const l of s)l(c,e);return Dm(a,o,t),c}(O,v,E,y,p,[D4]),bm(f,p,null)}finally{bg()}return new _4(this.componentType,g,Lo(m,p),p,m)}}class _4 extends X3{constructor(e,n,r,i,s){super(),this.location=r,this._rootLView=i,this._tNode=s,this.instance=n,this.hostView=this.changeDetectorRef=new g4(i),this.componentType=e}setInput(e,n){const r=this._tNode.inputs;let i;if(null!==r&&(i=r[e])){const s=this._rootLView;Om(s[N],s,i,e,n),m1(s,this._tNode.index)}}get injector(){return new Co(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}function D4(){const t=St();id(T()[N],t)}function Bt(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function gs(t,e,n,r,i,s,o,a){const u=T(),c=de(),l=t+Re,d=c.firstCreatePass?function V4(t,e,n,r,i,s,o,a,u){const c=e.consts,l=$o(e,t,4,o||null,vi(c,a));xm(e,n,l,vi(c,u)),id(e,l);const d=l.tView=Am(2,l,r,i,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,l),d.queries=e.queries.embeddedTView(l)),l}(l,c,u,e,n,r,i,s,o):c.data[l];pr(d,!1);const h=u[se].createComment("");_d(c,u,h,d),$t(h,u),Rd(u,u[l]=v1(h,u,h,d)),td(d)&&Cm(c,u,d),null!=o&&Sm(u,d,a)}function Ti(t){return function To(t,e){return t[e]}(function K$(){return J.lFrame.contextLView}(),Re+t)}function bi(t,e,n){const r=T();return Bt(r,bo(),e)&&function xn(t,e,n,r,i,s,o,a){const u=Dn(e,n);let l,c=e.inputs;!a&&null!=c&&(l=c[r])?(Om(t,n,l,r,i),lu(e)&&m1(n,e.index)):3&e.type&&(r=function Yj(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(r),i=null!=o?o(i,e.value||"",r):i,s.setProperty(u,r,i))}(de(),function $e(){const t=J.lFrame;return iC(t.tView,t.selectedIndex)}(),r,t,e,r[se],n,!1),bi}function Vm(t,e,n,r,i){const o=i?"class":"style";Om(t,n,e.inputs[o],o,r)}function M(t,e,n,r){const i=T(),s=de(),o=Re+t,a=i[se],u=s.firstCreatePass?function B4(t,e,n,r,i,s){const o=e.consts,u=$o(e,t,2,r,vi(o,i));return xm(e,n,u,vi(o,s)),null!==u.attrs&&kd(u,u.attrs,!1),null!==u.mergedAttrs&&kd(u,u.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,u),u}(o,s,i,e,n,r):s.data[o],c=i[o]=Qg(a,e,function rB(){return J.lFrame.currentNamespace}()),l=td(u);return pr(u,!0),yS(a,c,u),32!=(32&u.flags)&&_d(s,i,c,u),0===function G$(){return J.lFrame.elementDepthCount}()&&$t(c,i),function H$(){J.lFrame.elementDepthCount++}(),l&&(Cm(s,i,u),Dm(s,u,i)),null!==r&&Sm(i,u),M}function V(){let t=St();_g()?function vg(){J.lFrame.isParent=!1}():(t=t.parent,pr(t,!1));const e=t;!function z$(){J.lFrame.elementDepthCount--}();const n=de();return n.firstCreatePass&&(id(n,t),gg(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function aB(t){return 0!=(8&t.flags)}(e)&&Vm(n,e,T(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function uB(t){return 0!=(16&t.flags)}(e)&&Vm(n,e,T(),e.stylesWithoutHost,!1),V}function he(t,e,n,r){return M(t,e,n,r),V(),he}function Ld(t){return!!t&&"function"==typeof t.then}const G1=function j1(t){return!!t&&"function"==typeof t.subscribe};function qr(t,e,n,r){const i=T(),s=de(),o=St();return function z1(t,e,n,r,i,s,o){const a=td(r),c=t.firstCreatePass&&I1(t),l=e[Ye],d=w1(e);let h=!0;if(3&r.type||o){const g=Dn(r,e),m=o?o(g):g,v=d.length,E=o?C=>o(Ct(C[r.index])):r.index;let y=null;if(!o&&a&&(y=function G4(t,e,n,r){const i=t.cleanup;if(null!=i)for(let s=0;s<i.length-1;s+=2){const o=i[s];if(o===n&&i[s+1]===r){const a=e[vo],u=i[s+2];return a.length>u?a[u]:null}"string"==typeof o&&(s+=2)}return null}(t,e,i,r.index)),null!==y)(y.__ngLastListenerFn__||y).__ngNextListenerFn__=s,y.__ngLastListenerFn__=s,h=!1;else{s=W1(r,e,l,s,!1);const C=n.listen(m,i,s);d.push(s,C),c&&c.push(i,E,v,v+1)}}else s=W1(r,e,l,s,!1);const f=r.outputs;let p;if(h&&null!==f&&(p=f[i])){const g=p.length;if(g)for(let m=0;m<g;m+=2){const O=e[p[m]][p[m+1]].subscribe(s),L=d.length;d.push(s,O),c&&c.push(i,r.index,L,-(L+1))}}}(s,i,i[se],o,t,e,r),qr}function q1(t,e,n,r){try{return Vn(6,e,n),!1!==n(r)}catch(i){return T1(t,i),!1}finally{Vn(7,e,n)}}function W1(t,e,n,r,i){return function s(o){if(o===Function)return r;Nm(t.componentOffset>-1?Cn(t.index,e):e);let u=q1(e,n,r,o),c=s.__ngNextListenerFn__;for(;c;)u=q1(e,n,c,o)&&u,c=c.__ngNextListenerFn__;return i&&!1===u&&(o.preventDefault(),o.returnValue=!1),u}}function ge(t,e=""){const n=T(),r=de(),i=t+Re,s=r.firstCreatePass?$o(r,i,1,e,null):r.data[i],o=n[i]=function Kg(t,e){return t.createText(e)}(n[se],e);_d(r,n,o,s),pr(s,!1)}function Vd(t,e,n){const r=T(),i=function jo(t,e,n,r){return Bt(t,bo(),n)?e+Z(n)+r:ee}(r,t,e,n);return i!==ee&&zr(r,Xt(),i),Vd}const Zo="en-US";let $A=Zo;class Jo{}class hx{}class fx extends Jo{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new b1(this);const r=Tn(e);this._bootstrapComponents=Hr(r.bootstrap),this._r3Injector=n1(e,n,[{provide:Jo,useValue:this},{provide:Cu,useValue:this.componentFactoryResolver}],Ce(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class Jm extends hx{constructor(e){super(),this.moduleType=e}create(e){return new fx(this.moduleType,e)}}class OG extends Jo{constructor(e,n,r){super(),this.componentFactoryResolver=new b1(this),this.instance=null;const i=new VS([...e,{provide:Jo,useValue:this},{provide:Cu,useValue:this.componentFactoryResolver}],n||Dd(),r,new Set(["environment"]));this.injector=i,i.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function Hd(t,e,n=null){return new OG(t,e,n).injector}let LG=(()=>{class t{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n.id)){const r=OS(0,n.type),i=r.length>0?Hd([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n.id,i)}return this.cachedInjectors.get(n.id)}ngOnDestroy(){try{for(const n of this.cachedInjectors.values())null!==n&&n.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=W({token:t,providedIn:"environment",factory:()=>new t(B(Gr))}),t})();function px(t){t.getStandaloneInjector=e=>e.get(LG).getOrCreateStandaloneInjector(t)}function ty(t){return e=>{setTimeout(t,void 0,e)}}const Jt=class uH extends Pr{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,r){let i=e,s=n||(()=>null),o=r;if(e&&"object"==typeof e){const u=e;i=u.next?.bind(u),s=u.error?.bind(u),o=u.complete?.bind(u)}this.__isAsync&&(s=ty(s),i&&(i=ty(i)),o&&(o=ty(o)));const a=super.subscribe({next:i,error:s,complete:o});return e instanceof In&&e.add(a),a}};let Wr=(()=>{class t{}return t.__NG_ELEMENT_ID__=hH,t})();const lH=Wr,dH=class extends lH{constructor(e,n,r){super(),this._declarationLView=e,this._declarationTContainer=n,this.elementRef=r}createEmbeddedView(e,n){const r=this._declarationTContainer.tView,i=Ad(this._declarationLView,r,e,16,null,r.declTNode,null,null,null,null,n||null);i[uu]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[fr];return null!==o&&(i[fr]=o.createEmbeddedView(r)),bm(r,i,e),new xu(i)}};function hH(){return function zd(t,e){return 4&t.type?new dH(e,t,Lo(t,e)):null}(St(),T())}let tr=(()=>{class t{}return t.__NG_ELEMENT_ID__=fH,t})();function fH(){return function Ax(t,e){let n;const r=e[t.index];if(Yn(r))n=r;else{let i;if(8&t.type)i=Ct(r);else{const s=e[se];i=s.createComment("");const o=Dn(t,e);hs(s,yd(s,o),i,function d3(t,e){return t.nextSibling(e)}(s,o),!1)}e[t.index]=n=v1(r,e,i,t),Rd(e,n)}return new Cx(n,t,e)}(St(),T())}const pH=tr,Cx=class extends pH{constructor(e,n,r){super(),this._lContainer=e,this._hostTNode=n,this._hostLView=r}get element(){return Lo(this._hostTNode,this._hostLView)}get injector(){return new Co(this._hostTNode,this._hostLView)}get parentInjector(){const e=Rg(this._hostTNode,this._hostLView);if(EC(e)){const n=ud(e,this._hostLView),r=ad(e);return new Co(n[N].data[r+8],n)}return new Co(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const n=Sx(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-Qt}createEmbeddedView(e,n,r){let i,s;"number"==typeof r?i=r:null!=r&&(i=r.index,s=r.injector);const o=e.createEmbeddedView(n||{},s);return this.insert(o,i),o}createComponent(e,n,r,i,s){const o=e&&!function gu(t){return"function"==typeof t}(e);let a;if(o)a=n;else{const d=n||{};a=d.index,r=d.injector,i=d.projectableNodes,s=d.environmentInjector||d.ngModuleRef}const u=o?e:new Ru(we(e)),c=r||this.parentInjector;if(!s&&null==u.ngModule){const h=(o?c:this.parentInjector).get(Gr,null);h&&(s=h)}const l=u.create(c,i,void 0,s);return this.insert(l.hostView,a),l}insert(e,n){const r=e._lView,i=r[N];if(function j$(t){return Yn(t[He])}(r)){const l=this.indexOf(e);if(-1!==l)this.detach(l);else{const d=r[He],h=new Cx(d,d[Ut],d[He]);h.detach(h.indexOf(e))}}const s=this._adjustIndex(n),o=this._lContainer;!function o3(t,e,n,r){const i=Qt+r,s=n.length;r>0&&(n[i-1][Qn]=e),r<s-Qt?(e[Qn]=n[i],OC(n,Qt+r,e)):(n.push(e),e[Qn]=null),e[He]=n;const o=e[uu];null!==o&&n!==o&&function a3(t,e){const n=t[Eo];e[Vt]!==e[He][He][Vt]&&(t[YD]=!0),null===n?t[Eo]=[e]:n.push(e)}(o,e);const a=e[fr];null!==a&&a.insertView(t),e[re]|=64}(i,r,o,s);const a=Jg(s,o),u=r[se],c=yd(u,o[Jl]);return null!==c&&function r3(t,e,n,r,i,s){r[Vr]=i,r[Ut]=e,Eu(t,r,n,1,i,s)}(i,o[Ut],u,r,c,a),e.attachToViewContainerRef(),OC(ry(o),s,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=Sx(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),r=Yg(this._lContainer,n);r&&(fd(ry(this._lContainer),n),sS(r[N],r))}detach(e){const n=this._adjustIndex(e,-1),r=Yg(this._lContainer,n);return r&&null!=fd(ry(this._lContainer),n)?new xu(r):null}_adjustIndex(e,n=0){return e??this.length+n}};function Sx(t){return t[ed]}function ry(t){return t[ed]||(t[ed]=[])}function Wd(...t){}const Kd=new j("Application Initializer");let Qd=(()=>{class t{constructor(n){this.appInits=n,this.resolve=Wd,this.reject=Wd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const n=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i<this.appInits.length;i++){const s=this.appInits[i]();if(Ld(s))n.push(s);else if(G1(s)){const o=new Promise((a,u)=>{s.subscribe({complete:a,error:u})});n.push(o)}}Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),0===n.length&&r(),this.initialized=!0}}return t.\u0275fac=function(n){return new(n||t)(B(Kd,8))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Bu=new j("AppId",{providedIn:"root",factory:function eR(){return`${py()}${py()}${py()}`}});function py(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const tR=new j("Platform Initializer"),Yd=new j("Platform ID",{providedIn:"platform",factory:()=>"unknown"});let jH=(()=>{class t{log(n){console.log(n)}warn(n){console.warn(n)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Kr=new j("LocaleId",{providedIn:"root",factory:()=>le(Kr,q.Optional|q.SkipSelf)||function GH(){return typeof $localize<"u"&&$localize.locale||Zo}()});class zH{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}let nR=(()=>{class t{compileModuleSync(n){return new Jm(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){const r=this.compileModuleSync(n),s=Hr(Tn(n).declarations).reduce((o,a)=>{const u=we(a);return u&&o.push(new Ru(u)),o},[]);return new zH(r,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const KH=(()=>Promise.resolve(0))();function gy(t){typeof Zone>"u"?KH.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Ne{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Jt(!1),this.onMicrotaskEmpty=new Jt(!1),this.onStable=new Jt(!1),this.onError=new Jt(!1),typeof Zone>"u")throw new R(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function QH(){let t=xe.requestAnimationFrame,e=xe.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function ZH(t){const e=()=>{!function XH(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(xe,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,yy(t),t.isCheckStableRunning=!0,my(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),yy(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,s,o,a)=>{try{return sR(t),n.invokeTask(i,s,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||t.shouldCoalesceRunChangeDetection)&&e(),oR(t)}},onInvoke:(n,r,i,s,o,a,u)=>{try{return sR(t),n.invoke(i,s,o,a,u)}finally{t.shouldCoalesceRunChangeDetection&&e(),oR(t)}},onHasTask:(n,r,i,s)=>{n.hasTask(i,s),r===i&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,yy(t),my(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,i,s)=>(n.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ne.isInAngularZone())throw new R(909,!1)}static assertNotInAngularZone(){if(Ne.isInAngularZone())throw new R(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,i){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,e,YH,Wd,Wd);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}}const YH={};function my(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function yy(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function sR(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function oR(t){t._nesting--,my(t)}class JH{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Jt,this.onMicrotaskEmpty=new Jt,this.onStable=new Jt,this.onError=new Jt}run(e,n,r){return e.apply(n,r)}runGuarded(e,n,r){return e.apply(n,r)}runOutsideAngular(e){return e()}runTask(e,n,r,i){return e.apply(n,r)}}const aR=new j(""),Xd=new j("");let wy,_y=(()=>{class t{constructor(n,r,i){this._ngZone=n,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,wy||(function e5(t){wy=t}(i),i.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ne.assertNotInAngularZone(),gy(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())gy(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb(this._didWork)}this._didWork=!1});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,i){let s=-1;r&&r>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),n(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:n,timeoutId:s,updateCb:i})}whenStable(n,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,i){return[]}}return t.\u0275fac=function(n){return new(n||t)(B(Ne),B(vy),B(Xd))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})(),vy=(()=>{class t{constructor(){this._applications=new Map}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return wy?.findTestabilityInTree(this,n,r)??null}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Qr=!1;let Ci=null;const uR=new j("AllowMultipleToken"),Iy=new j("PlatformDestroyListeners"),cR=new j("appBootstrapListener");class lR{constructor(e,n){this.name=e,this.token=n}}function hR(t,e,n=[]){const r=`Platform: ${e}`,i=new j(r);return(s=[])=>{let o=Ey();if(!o||o.injector.get(uR,!1)){const a=[...n,...s,{provide:i,useValue:!0}];t?t(a):function r5(t){if(Ci&&!Ci.get(uR,!1))throw new R(400,!1);Ci=t;const e=t.get(pR);(function dR(t){const e=t.get(tR,null);e&&e.forEach(n=>n())})(t)}(function fR(t=[],e){return An.create({name:e,providers:[{provide:hm,useValue:"platform"},{provide:Iy,useValue:new Set([()=>Ci=null])},...t]})}(a,r))}return function s5(t){const e=Ey();if(!e)throw new R(401,!1);return e}()}}function Ey(){return Ci?.get(pR)??null}let pR=(()=>{class t{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const i=function mR(t,e){let n;return n="noop"===t?new JH:("zone.js"===t?void 0:t)||new Ne(e),n}(r?.ngZone,function gR(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(r)),s=[{provide:Ne,useValue:i}];return i.run(()=>{const o=An.create({providers:s,parent:this.injector,name:n.moduleType.name}),a=n.create(o),u=a.injector.get(Fo,null);if(!u)throw new R(402,!1);return i.runOutsideAngular(()=>{const c=i.onError.subscribe({next:l=>{u.handleError(l)}});a.onDestroy(()=>{Jd(this._modules,a),c.unsubscribe()})}),function yR(t,e,n){try{const r=n();return Ld(r)?r.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(u,i,()=>{const c=a.injector.get(Qd);return c.runInitializers(),c.donePromise.then(()=>(function BA(t){Fn(t,"Expected localeId to be defined"),"string"==typeof t&&($A=t.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Kr,Zo)||Zo),this._moduleDoBootstrap(a),a))})})}bootstrapModule(n,r=[]){const i=_R({},r);return function t5(t,e,n){const r=new Jm(n);return Promise.resolve(r)}(0,0,n).then(s=>this.bootstrapModuleFactory(s,i))}_moduleDoBootstrap(n){const r=n.injector.get(Zd);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!n.instance.ngDoBootstrap)throw new R(-403,!1);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new R(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const n=this._injector.get(Iy,null);n&&(n.forEach(r=>r()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(n){return new(n||t)(B(An))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function _R(t,e){return Array.isArray(e)?e.reduce(_R,t):{...t,...e}}let Zd=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(n,r,i){this._zone=n,this._injector=r,this._exceptionHandler=i,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const s=new Qe(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Qe(a=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{Ne.assertNotInAngularZone(),gy(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Ne.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{u.unsubscribe(),c.unsubscribe()}});this.isStable=function o$(...t){const e=nu(t),n=function JV(t,e){return"number"==typeof Jp(t)?t.pop():e}(t,1/0),r=t;return r.length?1===r.length?Wn(r[0]):mo(n)(ut(r,e)):cr}(s,o.pipe(function a$(t={}){const{connector:e=(()=>new Pr),resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=t;return s=>{let o,a,u,c=0,l=!1,d=!1;const h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),o=u=void 0,l=d=!1},p=()=>{const g=o;f(),g?.unsubscribe()};return yt((g,m)=>{c++,!d&&!l&&h();const v=u=u??e();m.add(()=>{c--,0===c&&!d&&!l&&(a=eg(p,i))}),v.subscribe(m),!o&&c>0&&(o=new tu({next:E=>v.next(E),error:E=>{d=!0,h(),a=eg(f,n,E),v.error(E)},complete:()=>{l=!0,h(),a=eg(f,r),v.complete()}}),Wn(g).subscribe(o))})(s)}}()))}bootstrap(n,r){const i=n instanceof BS;if(!this._injector.get(Qd).done){!i&&function _o(t){const e=we(t)||Ft(t)||cn(t);return null!==e&&e.standalone}(n);throw new R(405,Qr)}let o;o=i?n:this._injector.get(Cu).resolveComponentFactory(n),this.componentTypes.push(o.componentType);const a=function n5(t){return t.isBoundToModule}(o)?void 0:this._injector.get(Jo),c=o.create(An.NULL,[],r||o.selector,a),l=c.location.nativeElement,d=c.injector.get(aR,null);return d?.registerApplication(l),c.onDestroy(()=>{this.detachView(c.hostView),Jd(this.components,c),d?.unregisterApplication(l)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new R(101,!1);try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(n))}finally{this._runningTick=!1}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;Jd(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const r=this._injector.get(cR,[]);r.push(...this._bootstrapListeners),r.forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Jd(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new R(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(n){return new(n||t)(B(Ne),B(Gr),B(Fo))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Jd(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let Ty=(()=>{class t{}return t.__NG_ELEMENT_ID__=a5,t})();function a5(t){return function u5(t,e,n){if(lu(t)&&!n){const r=Cn(t.index,e);return new xu(r,r)}return 47&t.type?new xu(e[Vt],e):null}(St(),T(),16==(16&t))}const I5=hR(null,"core",[]);let E5=(()=>{class t{constructor(n){}}return t.\u0275fac=function(n){return new(n||t)(B(Zd))},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({}),t})(),xy=null;function vs(){return xy}class D5{}const hn=new j("DocumentToken");let Ry=(()=>{class t{historyGo(n){throw new Error("Not implemented")}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return function C5(){return B(xR)}()},providedIn:"platform"}),t})();const S5=new j("Location Initialized");let xR=(()=>{class t extends Ry{constructor(n){super(),this._doc=n,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return vs().getBaseHref(this._doc)}onPopState(n){const r=vs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){const r=vs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){RR()?this._history.pushState(n,r,i):this._location.hash=i}replaceState(n,r,i){RR()?this._history.replaceState(n,r,i):this._location.hash=i}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}}return t.\u0275fac=function(n){return new(n||t)(B(hn))},t.\u0275prov=W({token:t,factory:function(){return function A5(){return new xR(B(hn))}()},providedIn:"platform"}),t})();function RR(){return!!window.history.pushState}function My(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function MR(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Yr(t){return t&&"?"!==t[0]?"?"+t:t}let ws=(()=>{class t{historyGo(n){throw new Error("Not implemented")}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return le(NR)},providedIn:"root"}),t})();const kR=new j("appBaseHref");let NR=(()=>{class t extends ws{constructor(n,r){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??le(hn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return My(this._baseHref,n)}path(n=!1){const r=this._platformLocation.pathname+Yr(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){const o=this.prepareExternalUrl(i+Yr(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){const o=this.prepareExternalUrl(i+Yr(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}}return t.\u0275fac=function(n){return new(n||t)(B(Ry),B(kR,8))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),x5=(()=>{class t extends ws{constructor(n,r){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(n){const r=My(this._baseHref,n);return r.length>0?"#"+r:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+Yr(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+Yr(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}}return t.\u0275fac=function(n){return new(n||t)(B(Ry),B(kR,8))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})(),ky=(()=>{class t{constructor(n){this._subject=new Jt,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;const r=this._locationStrategy.getBaseHref();this._basePath=function k5(t){if(new RegExp("^(https?:)?//").test(t)){const[,n]=t.split(/\/\/[^\/]+/);return n}return t}(MR(PR(r))),this._locationStrategy.onPopState(i=>{this._subject.emit({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Yr(r))}normalize(n){return t.stripTrailingSlash(function M5(t,e){if(!t||!e.startsWith(t))return e;const n=e.substring(t.length);return""===n||["/",";","?","#"].includes(n[0])?n:e}(this._basePath,PR(n)))}prepareExternalUrl(n){return n&&"/"!==n[0]&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Yr(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Yr(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{const r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r,complete:i})}}return t.normalizeQueryParams=Yr,t.joinWithSlash=My,t.stripTrailingSlash=MR,t.\u0275fac=function(n){return new(n||t)(B(ws))},t.\u0275prov=W({token:t,factory:function(){return function R5(){return new ky(B(ws))}()},providedIn:"root"}),t})();function PR(t){return t.replace(/\/index.html$/,"")}class Gy{constructor(e,n){this._viewContainerRef=e,this._templateRef=n,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let hh=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){const r=n==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||r,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),r}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(const r of this._defaultViews)r.enforceState(n)}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275dir=Kt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),KR=(()=>{class t{constructor(n,r,i){this.ngSwitch=i,i._addCase(),this._view=new Gy(n,r)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(n){return new(n||t)(K(tr),K(Wr),K(hh,9))},t.\u0275dir=Kt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),QR=(()=>{class t{constructor(n,r,i){i._addDefault(new Gy(n,r))}}return t.\u0275fac=function(n){return new(n||t)(K(tr),K(Wr),K(hh,9))},t.\u0275dir=Kt({type:t,selectors:[["","ngSwitchDefault",""]],standalone:!0}),t})(),z8=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({}),t})();let Q8=(()=>{class t{}return t.\u0275prov=W({token:t,providedIn:"root",factory:()=>new Y8(B(hn),window)}),t})();class Y8{constructor(e,n){this.document=e,this.window=n,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const n=function X8(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const r=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let i=r.currentNode;for(;i;){const s=i.shadowRoot;if(s){const o=s.getElementById(e)||s.querySelector(`[name="${e}"]`);if(o)return o}i=r.nextNode()}}return null}(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const n=this.window.history;n&&n.scrollRestoration&&(n.scrollRestoration=e)}}scrollToElement(e){const n=e.getBoundingClientRect(),r=n.left+this.window.pageXOffset,i=n.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(r-s[0],i-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=JR(this.window.history)||JR(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function JR(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Dz extends D5{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class Ky extends Dz{static makeCurrent(){!function b5(t){xy||(xy=t)}(new Ky)}onAndCancel(e,n,r){return e.addEventListener(n,r,!1),()=>{e.removeEventListener(n,r,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=function Cz(){return qu=qu||document.querySelector("base"),qu?qu.getAttribute("href"):null}();return null==n?null:function Sz(t){gh=gh||document.createElement("a"),gh.setAttribute("href",t);const e=gh.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){qu=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function g8(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const r=n.indexOf("="),[i,s]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}(document.cookie,e)}}let gh,qu=null;const iM=new j("TRANSITION_ID"),xz=[{provide:Kd,useFactory:function Az(t,e,n){return()=>{n.get(Qd).donePromise.then(()=>{const r=vs(),i=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let s=0;s<i.length;s++)r.remove(i[s])})}},deps:[iM,hn,An],multi:!0}];let Mz=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();const mh=new j("EventManagerPlugins");let yh=(()=>{class t{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i){return this._findPluginFor(r).addEventListener(n,r,i)}addGlobalEventListener(n,r,i){return this._findPluginFor(r).addGlobalEventListener(n,r,i)}getZone(){return this._zone}_findPluginFor(n){const r=this._eventNameToPlugin.get(n);if(r)return r;const i=this._plugins;for(let s=0;s<i.length;s++){const o=i[s];if(o.supports(n))return this._eventNameToPlugin.set(n,o),o}throw new Error(`No event manager plugin found for event ${n}`)}}return t.\u0275fac=function(n){return new(n||t)(B(mh),B(Ne))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();class sM{constructor(e){this._doc=e}addGlobalEventListener(e,n,r){const i=vs().getGlobalEventTarget(this._doc,e);if(!i)throw new Error(`Unsupported event target ${i} for event ${n}`);return this.addEventListener(i,n,r)}}let oM=(()=>{class t{constructor(){this.usageCount=new Map}addStyles(n){for(const r of n)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(n){for(const r of n)0===this.changeUsageCount(r,-1)&&this.onStyleRemoved(r)}onStyleRemoved(n){}onStyleAdded(n){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(n,r){const i=this.usageCount;let s=i.get(n)??0;return s+=r,s>0?i.set(n,s):i.delete(n),s}ngOnDestroy(){for(const n of this.getAllStyles())this.onStyleRemoved(n);this.usageCount.clear()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})(),Wu=(()=>{class t extends oM{constructor(n){super(),this.doc=n,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(n){for(const r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){const r=this.styleRef;r.get(n)?.forEach(s=>s.remove()),r.delete(n)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}addStyleToHost(n,r){const i=this.doc.createElement("style");i.textContent=r,n.appendChild(i);const s=this.styleRef.get(r);s?s.push(i):this.styleRef.set(r,[i])}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}}return t.\u0275fac=function(n){return new(n||t)(B(hn))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();const Qy={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Yy=/%COMP%/g,cM=new j("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function lM(t,e){return e.flat(100).map(n=>n.replace(Yy,t))}function dM(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Xy=(()=>{class t{constructor(n,r,i,s){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestory=s,this.rendererByCompId=new Map,this.defaultRenderer=new Zy(n)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;const i=this.getOrCreateRenderer(n,r);return i instanceof pM?i.applyToHost(n):i instanceof Jy&&i.applyStyles(),i}getOrCreateRenderer(n,r){const i=this.rendererByCompId;let s=i.get(r.id);if(!s){const o=this.eventManager,a=this.sharedStylesHost,u=this.removeStylesOnCompDestory;switch(r.encapsulation){case dr.Emulated:s=new pM(o,a,r,this.appId,u);break;case dr.ShadowDom:return new Uz(o,a,n,r);default:s=new Jy(o,a,r,u)}s.onDestroy=()=>i.delete(r.id),i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(n){return new(n||t)(B(yh),B(Wu),B(Bu),B(cM))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();class Zy{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(Qy[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){(fM(e)?e.content:e).appendChild(n)}insertBefore(e,n,r){e&&(fM(e)?e.content:e).insertBefore(n,r)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return n||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,r,i){if(i){n=i+":"+n;const s=Qy[i];s?e.setAttributeNS(s,n,r):e.setAttribute(n,r)}else e.setAttribute(n,r)}removeAttribute(e,n,r){if(r){const i=Qy[r];i?e.removeAttributeNS(i,n):e.removeAttribute(`${r}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,r,i){i&(ln.DashCase|ln.Important)?e.style.setProperty(n,r,i&ln.Important?"important":""):e.style[n]=r}removeStyle(e,n,r){r&ln.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,r){e[n]=r}setValue(e,n){e.nodeValue=n}listen(e,n,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,dM(r)):this.eventManager.addEventListener(e,n,dM(r))}}function fM(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class Uz extends Zy{constructor(e,n,r,i){super(e),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=lM(i.id,i.styles);for(const o of s){const a=document.createElement("style");a.textContent=o,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,r){return super.insertBefore(this.nodeOrShadowRoot(e),n,r)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class Jy extends Zy{constructor(e,n,r,i,s=r.id){super(e),this.sharedStylesHost=n,this.removeStylesOnCompDestory=i,this.rendererUsageCount=0,this.styles=lM(s,r.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class pM extends Jy{constructor(e,n,r,i,s){const o=i+"-"+r.id;super(e,n,r,s,o),this.contentAttr=function Oz(t){return"_ngcontent-%COMP%".replace(Yy,t)}(o),this.hostAttr=function Lz(t){return"_nghost-%COMP%".replace(Yy,t)}(o)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){const r=super.createElement(e,n);return super.setAttribute(r,this.contentAttr,""),r}}let Vz=(()=>{class t extends sM{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i){return n.addEventListener(r,i,!1),()=>this.removeEventListener(n,r,i)}removeEventListener(n,r,i){return n.removeEventListener(r,i)}}return t.\u0275fac=function(n){return new(n||t)(B(hn))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();const gM=["alt","control","meta","shift"],$z={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Bz={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let jz=(()=>{class t extends sM{constructor(n){super(n)}supports(n){return null!=t.parseEventName(n)}addEventListener(n,r,i){const s=t.parseEventName(r),o=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>vs().onAndCancel(n,s.domEventName,o))}static parseEventName(n){const r=n.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const s=t._normalizeKey(r.pop());let o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),gM.forEach(c=>{const l=r.indexOf(c);l>-1&&(r.splice(l,1),o+=c+".")}),o+=s,0!=r.length||0===s.length)return null;const u={};return u.domEventName=i,u.fullKey=o,u}static matchEventFullKeyCode(n,r){let i=$z[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),gM.forEach(o=>{o!==i&&(0,Bz[o])(n)&&(s+=o+".")}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{t.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return"esc"===n?"escape":n}}return t.\u0275fac=function(n){return new(n||t)(B(hn))},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();const yM=[{provide:Yd,useValue:"browser"},{provide:tR,useValue:function Gz(){Ky.makeCurrent()},multi:!0},{provide:hn,useFactory:function zz(){return function v3(t){rm=t}(document),document},deps:[]}],qz=hR(I5,"browser",yM),_M=new j(""),vM=[{provide:Xd,useClass:class Rz{addToWindow(e){xe.getAngularTestability=(r,i=!0)=>{const s=e.findTestabilityInTree(r,i);if(null==s)throw new Error("Could not find testability for element.");return s},xe.getAllAngularTestabilities=()=>e.getAllTestabilities(),xe.getAllAngularRootElements=()=>e.getAllRootElements(),xe.frameworkStabilizers||(xe.frameworkStabilizers=[]),xe.frameworkStabilizers.push(r=>{const i=xe.getAllAngularTestabilities();let s=i.length,o=!1;const a=function(u){o=o||u,s--,0==s&&r(o)};i.forEach(function(u){u.whenStable(a)})})}findTestabilityInTree(e,n,r){return null==n?null:e.getTestability(n)??(r?vs().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},deps:[]},{provide:aR,useClass:_y,deps:[Ne,vy,Xd]},{provide:_y,useClass:_y,deps:[Ne,vy,Xd]}],wM=[{provide:hm,useValue:"root"},{provide:Fo,useFactory:function Hz(){return new Fo},deps:[]},{provide:mh,useClass:Vz,multi:!0,deps:[hn,Ne,Yd]},{provide:mh,useClass:jz,multi:!0,deps:[hn]},{provide:Xy,useClass:Xy,deps:[yh,Wu,Bu,cM]},{provide:GS,useExisting:Xy},{provide:oM,useExisting:Wu},{provide:Wu,useClass:Wu,deps:[hn]},{provide:yh,useClass:yh,deps:[mh,Ne]},{provide:class Z8{},useClass:Mz,deps:[]},[]];let Wz=(()=>{class t{constructor(n){}static withServerTransition(n){return{ngModule:t,providers:[{provide:Bu,useValue:n.appId},{provide:iM,useExisting:Bu},xz]}}}return t.\u0275fac=function(n){return new(n||t)(B(_M,12))},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({providers:[...wM,...vM],imports:[z8,E5]}),t})(),IM=(()=>{class t{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}}return t.\u0275fac=function(n){return new(n||t)(B(hn))},t.\u0275prov=W({token:t,factory:function(n){let r=null;return r=n?new n:function Qz(){return new IM(B(hn))}(),r},providedIn:"root"}),t})();function H(...t){return ut(t,nu(t))}typeof window<"u"&&window;class sr extends Pr{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){const{hasError:e,thrownError:n,_value:r}=this;if(e)throw n;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}}const _h=eu(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:t7}=Array,{getPrototypeOf:n7,prototype:r7,keys:i7}=Object;const{isArray:a7}=Array;function bM(...t){const e=nu(t),n=function ZV(t){return De(Jp(t))?t.pop():void 0}(t),{args:r,keys:i}=function s7(t){if(1===t.length){const e=t[0];if(t7(e))return{args:e,keys:null};if(function o7(t){return t&&"object"==typeof t&&n7(t)===r7}(e)){const n=i7(e);return{args:n.map(r=>e[r]),keys:n}}}return{args:t,keys:null}}(t);if(0===r.length)return ut([],e);const s=new Qe(function d7(t,e,n=ns){return r=>{DM(e,()=>{const{length:i}=t,s=new Array(i);let o=i,a=i;for(let u=0;u<i;u++)DM(e,()=>{const c=ut(t[u],e);let l=!1;c.subscribe(_t(r,d=>{s[u]=d,l||(l=!0,a--),a||r.next(n(s.slice()))},()=>{--o||r.complete()}))},r)},r)}}(r,e,i?o=>function l7(t,e){return t.reduce((n,r,i)=>(n[r]=e[i],n),{})}(i,o):ns));return n?s.pipe(function c7(t){return ue(e=>function u7(t,e){return a7(e)?t(...e):t(e)}(t,e))}(n)):s}function DM(t,e,n){t?Or(n,t,e):e()}function n_(...t){return function h7(){return mo(1)}()(ut(t,nu(t)))}function CM(t){return new Qe(e=>{Wn(t()).subscribe(e)})}function Ku(t,e){const n=De(t)?t:()=>t,r=i=>i.error(n());return new Qe(e?i=>e.schedule(r,0,i):r)}function r_(){return yt((t,e)=>{let n=null;t._refCount++;const r=_t(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(n=null);const i=t._connection,s=n;n=null,i&&(!s||i===s)&&i.unsubscribe(),e.unsubscribe()});t.subscribe(r),r.closed||(n=t.connect())})}class SM extends Qe{constructor(e,n){super(),this.source=e,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,ID(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new In;const n=this.getSubject();e.add(this.source.subscribe(_t(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),e.closed&&(this._connection=null,e=In.EMPTY)}return e}refCount(){return r_()(this)}}function wr(t,e){return yt((n,r)=>{let i=null,s=0,o=!1;const a=()=>o&&!i&&r.complete();n.subscribe(_t(r,u=>{i?.unsubscribe();let c=0;const l=s++;Wn(t(u,l)).subscribe(i=_t(r,d=>r.next(e?e(u,d,l,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function Qu(t){return t<=0?()=>cr:yt((e,n)=>{let r=0;e.subscribe(_t(n,i=>{++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function Ai(t,e){return yt((n,r)=>{let i=0;n.subscribe(_t(r,s=>t.call(e,s,i++)&&r.next(s)))})}function vh(t){return yt((e,n)=>{let r=!1;e.subscribe(_t(n,i=>{r=!0,n.next(i)},()=>{r||n.next(t),n.complete()}))})}function AM(t=p7){return yt((e,n)=>{let r=!1;e.subscribe(_t(n,i=>{r=!0,n.next(i)},()=>r?n.complete():n.error(t())))})}function p7(){return new _h}function xi(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Ai((i,s)=>t(i,s,r)):ns,Qu(1),n?vh(e):AM(()=>new _h))}function Is(t,e){return De(e)?Dt(t,e,1):Dt(t,1)}function At(t,e,n){const r=De(t)||e||n?{next:t,error:e,complete:n}:t;return r?yt((i,s)=>{var o;null===(o=r.subscribe)||void 0===o||o.call(r);let a=!0;i.subscribe(_t(s,u=>{var c;null===(c=r.next)||void 0===c||c.call(r,u),s.next(u)},()=>{var u;a=!1,null===(u=r.complete)||void 0===u||u.call(r),s.complete()},u=>{var c;a=!1,null===(c=r.error)||void 0===c||c.call(r,u),s.error(u)},()=>{var u,c;a&&(null===(u=r.unsubscribe)||void 0===u||u.call(r)),null===(c=r.finalize)||void 0===c||c.call(r)}))}):ns}function Ri(t){return yt((e,n)=>{let s,r=null,i=!1;r=e.subscribe(_t(n,void 0,void 0,o=>{s=Wn(t(o,Ri(t)(e))),r?(r.unsubscribe(),r=null,s.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,s.subscribe(n))})}function xM(t,e){return yt(function g7(t,e,n,r,i){return(s,o)=>{let a=n,u=e,c=0;s.subscribe(_t(o,l=>{const d=c++;u=a?t(u,l,d):(a=!0,l),r&&o.next(u)},i&&(()=>{a&&o.next(u),o.complete()})))}}(t,e,arguments.length>=2,!0))}function i_(t){return t<=0?()=>cr:yt((e,n)=>{let r=[];e.subscribe(_t(n,i=>{r.push(i),t<r.length&&r.shift()},()=>{for(const i of r)n.next(i);n.complete()},void 0,()=>{r=null}))})}function RM(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Ai((i,s)=>t(i,s,r)):ns,i_(1),n?vh(e):AM(()=>new _h))}function s_(t){return yt((e,n)=>{try{e.subscribe(n)}finally{n.add(t)}})}const te="primary",Yu=Symbol("RouteTitle");class _7{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const n=this.params[e];return Array.isArray(n)?n[0]:n}return null}getAll(e){if(this.has(e)){const n=this.params[e];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function na(t){return new _7(t)}function v7(t,e,n){const r=n.path.split("/");if(r.length>t.length||"full"===n.pathMatch&&(e.hasChildren()||r.length<t.length))return null;const i={};for(let s=0;s<r.length;s++){const o=r[s],a=t[s];if(o.startsWith(":"))i[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function Ir(t,e){const n=t?Object.keys(t):void 0,r=e?Object.keys(e):void 0;if(!n||!r||n.length!=r.length)return!1;let i;for(let s=0;s<n.length;s++)if(i=n[s],!MM(t[i],e[i]))return!1;return!0}function MM(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const n=[...t].sort(),r=[...e].sort();return n.every((i,s)=>r[s]===i)}return t===e}function kM(t){return Array.prototype.concat.apply([],t)}function NM(t){return t.length>0?t[t.length-1]:null}function xt(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Mi(t){return G1(t)?t:Ld(t)?ut(Promise.resolve(t)):H(t)}const wh=!1,I7={exact:function LM(t,e,n){if(!Es(t.segments,e.segments)||!Ih(t.segments,e.segments,n)||t.numberOfChildren!==e.numberOfChildren)return!1;for(const r in e.children)if(!t.children[r]||!LM(t.children[r],e.children[r],n))return!1;return!0},subset:FM},PM={exact:function E7(t,e){return Ir(t,e)},subset:function T7(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>MM(t[n],e[n]))},ignored:()=>!0};function OM(t,e,n){return I7[n.paths](t.root,e.root,n.matrixParams)&&PM[n.queryParams](t.queryParams,e.queryParams)&&!("exact"===n.fragment&&t.fragment!==e.fragment)}function FM(t,e,n){return UM(t,e,e.segments,n)}function UM(t,e,n,r){if(t.segments.length>n.length){const i=t.segments.slice(0,n.length);return!(!Es(i,n)||e.hasChildren()||!Ih(i,n,r))}if(t.segments.length===n.length){if(!Es(t.segments,n)||!Ih(t.segments,n,r))return!1;for(const i in e.children)if(!t.children[i]||!FM(t.children[i],e.children[i],r))return!1;return!0}{const i=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!!(Es(t.segments,i)&&Ih(t.segments,i,r)&&t.children[te])&&UM(t.children[te],e,s,r)}}function Ih(t,e,n){return e.every((r,i)=>PM[n](t[i].parameters,r.parameters))}class ki{constructor(e=new oe([],{}),n={},r=null){this.root=e,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=na(this.queryParams)),this._queryParamMap}toString(){return C7.serialize(this)}}class oe{constructor(e,n){this.segments=e,this.children=n,this.parent=null,xt(n,(r,i)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Eh(this)}}class Xu{constructor(e,n){this.path=e,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=na(this.parameters)),this._parameterMap}toString(){return BM(this)}}function Es(t,e){return t.length===e.length&&t.every((n,r)=>n.path===e[r].path)}let Zu=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return new o_},providedIn:"root"}),t})();class o_{parse(e){const n=new O7(e);return new ki(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(e){const n=`/${Ju(e.root,!0)}`,r=function x7(t){const e=Object.keys(t).map(n=>{const r=t[n];return Array.isArray(r)?r.map(i=>`${Th(n)}=${Th(i)}`).join("&"):`${Th(n)}=${Th(r)}`}).filter(n=>!!n);return e.length?`?${e.join("&")}`:""}(e.queryParams);return`${n}${r}${"string"==typeof e.fragment?`#${function S7(t){return encodeURI(t)}(e.fragment)}`:""}`}}const C7=new o_;function Eh(t){return t.segments.map(e=>BM(e)).join("/")}function Ju(t,e){if(!t.hasChildren())return Eh(t);if(e){const n=t.children[te]?Ju(t.children[te],!1):"",r=[];return xt(t.children,(i,s)=>{s!==te&&r.push(`${s}:${Ju(i,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}{const n=function D7(t,e){let n=[];return xt(t.children,(r,i)=>{i===te&&(n=n.concat(e(r,i)))}),xt(t.children,(r,i)=>{i!==te&&(n=n.concat(e(r,i)))}),n}(t,(r,i)=>i===te?[Ju(t.children[te],!1)]:[`${i}:${Ju(r,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[te]?`${Eh(t)}/${n[0]}`:`${Eh(t)}/(${n.join("//")})`}}function VM(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Th(t){return VM(t).replace(/%3B/gi,";")}function a_(t){return VM(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function bh(t){return decodeURIComponent(t)}function $M(t){return bh(t.replace(/\+/g,"%20"))}function BM(t){return`${a_(t.path)}${function A7(t){return Object.keys(t).map(e=>`;${a_(e)}=${a_(t[e])}`).join("")}(t.parameters)}`}const R7=/^[^\/()?;=#]+/;function Dh(t){const e=t.match(R7);return e?e[0]:""}const M7=/^[^=?&#]+/,N7=/^[^&#]+/;class O7{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new oe([],{}):new oe([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(e.length>0||Object.keys(n).length>0)&&(r[te]=new oe(e,n)),r}parseSegment(){const e=Dh(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new R(4009,wh);return this.capture(e),new Xu(bh(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const n=Dh(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){const i=Dh(this.remaining);i&&(r=i,this.capture(r))}e[bh(n)]=bh(r)}parseQueryParam(e){const n=function k7(t){const e=t.match(M7);return e?e[0]:""}(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){const o=function P7(t){const e=t.match(N7);return e?e[0]:""}(this.remaining);o&&(r=o,this.capture(r))}const i=$M(n),s=$M(r);if(e.hasOwnProperty(i)){let o=e[i];Array.isArray(o)||(o=[o],e[i]=o),o.push(s)}else e[i]=s}parseParens(e){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=Dh(this.remaining),i=this.remaining[r.length];if("/"!==i&&")"!==i&&";"!==i)throw new R(4010,wh);let s;r.indexOf(":")>-1?(s=r.slice(0,r.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=te);const o=this.parseChildren();n[s]=1===Object.keys(o).length?o[te]:new oe([],o),this.consumeOptional("//")}return n}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new R(4011,wh)}}function u_(t){return t.segments.length>0?new oe([],{[te]:t}):t}function Ch(t){const e={};for(const r of Object.keys(t.children)){const s=Ch(t.children[r]);(s.segments.length>0||s.hasChildren())&&(e[r]=s)}return function L7(t){if(1===t.numberOfChildren&&t.children[te]){const e=t.children[te];return new oe(t.segments.concat(e.segments),e.children)}return t}(new oe(t.segments,e))}function Ts(t){return t instanceof ki}const c_=!1;function F7(t,e,n,r,i){if(0===n.length)return ra(e.root,e.root,e.root,r,i);const s=function qM(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new zM(!0,0,t);let e=0,n=!1;const r=t.reduce((i,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return xt(s.outlets,(u,c)=>{a[c]="string"==typeof u?u.split("/"):u}),[...i,{outlets:a}]}if(s.segmentPath)return[...i,s.segmentPath]}return"string"!=typeof s?[...i,s]:0===o?(s.split("/").forEach((a,u)=>{0==u&&"."===a||(0==u&&""===a?n=!0:".."===a?e++:""!=a&&i.push(a))}),i):[...i,s]},[]);return new zM(n,e,r)}(n);return s.toRoot()?ra(e.root,e.root,new oe([],{}),r,i):function o(u){const c=function V7(t,e,n,r){if(t.isAbsolute)return new ia(e.root,!0,0);if(-1===r)return new ia(n,n===e.root,0);return function WM(t,e,n){let r=t,i=e,s=n;for(;s>i;){if(s-=i,r=r.parent,!r)throw new R(4005,c_&&"Invalid number of '../'");i=r.segments.length}return new ia(r,!1,i-s)}(n,r+(ec(t.commands[0])?0:1),t.numberOfDoubleDots)}(s,e,t.snapshot?._urlSegment,u),l=c.processChildren?sa(c.segmentGroup,c.index,s.commands):l_(c.segmentGroup,c.index,s.commands);return ra(e.root,c.segmentGroup,l,r,i)}(t.snapshot?._lastPathIndex)}function ec(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function tc(t){return"object"==typeof t&&null!=t&&t.outlets}function ra(t,e,n,r,i){let o,s={};r&&xt(r,(u,c)=>{s[c]=Array.isArray(u)?u.map(l=>`${l}`):`${u}`}),o=t===e?n:HM(t,e,n);const a=u_(Ch(o));return new ki(a,s,i)}function HM(t,e,n){const r={};return xt(t.children,(i,s)=>{r[s]=i===e?n:HM(i,e,n)}),new oe(t.segments,r)}class zM{constructor(e,n,r){if(this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=r,e&&r.length>0&&ec(r[0]))throw new R(4003,c_&&"Root segment cannot have matrix parameters");const i=r.find(tc);if(i&&i!==NM(r))throw new R(4004,c_&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ia{constructor(e,n,r){this.segmentGroup=e,this.processChildren=n,this.index=r}}function l_(t,e,n){if(t||(t=new oe([],{})),0===t.segments.length&&t.hasChildren())return sa(t,e,n);const r=function B7(t,e,n){let r=0,i=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=n.length)return s;const o=t.segments[i],a=n[r];if(tc(a))break;const u=`${a}`,c=r<n.length-1?n[r+1]:null;if(i>0&&void 0===u)break;if(u&&c&&"object"==typeof c&&void 0===c.outlets){if(!QM(u,c,o))return s;r+=2}else{if(!QM(u,{},o))return s;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){const s=new oe(t.segments.slice(0,r.pathIndex),{});return s.children[te]=new oe(t.segments.slice(r.pathIndex),t.children),sa(s,0,i)}return r.match&&0===i.length?new oe(t.segments,{}):r.match&&!t.hasChildren()?d_(t,e,n):r.match?sa(t,0,i):d_(t,e,n)}function sa(t,e,n){if(0===n.length)return new oe(t.segments,{});{const r=function $7(t){return tc(t[0])?t[0].outlets:{[te]:t}}(n),i={};return!r[te]&&t.children[te]&&1===t.numberOfChildren&&0===t.children[te].segments.length?sa(t.children[te],e,n):(xt(r,(s,o)=>{"string"==typeof s&&(s=[s]),null!==s&&(i[o]=l_(t.children[o],e,s))}),xt(t.children,(s,o)=>{void 0===r[o]&&(i[o]=s)}),new oe(t.segments,i))}}function d_(t,e,n){const r=t.segments.slice(0,e);let i=0;for(;i<n.length;){const s=n[i];if(tc(s)){const u=j7(s.outlets);return new oe(r,u)}if(0===i&&ec(n[0])){r.push(new Xu(t.segments[e].path,KM(n[0]))),i++;continue}const o=tc(s)?s.outlets[te]:`${s}`,a=i<n.length-1?n[i+1]:null;o&&a&&ec(a)?(r.push(new Xu(o,KM(a))),i+=2):(r.push(new Xu(o,{})),i++)}return new oe(r,{})}function j7(t){const e={};return xt(t,(n,r)=>{"string"==typeof n&&(n=[n]),null!==n&&(e[r]=d_(new oe([],{}),0,n))}),e}function KM(t){const e={};return xt(t,(n,r)=>e[r]=`${n}`),e}function QM(t,e,n){return t==n.path&&Ir(e,n.parameters)}const nc="imperative";class Er{constructor(e,n){this.id=e,this.url=n}}class h_ extends Er{constructor(e,n,r="imperative",i=null){super(e,n),this.type=0,this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class bs extends Er{constructor(e,n,r){super(e,n),this.urlAfterRedirects=r,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Sh extends Er{constructor(e,n,r,i){super(e,n),this.reason=r,this.code=i,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Ah extends Er{constructor(e,n,r,i){super(e,n),this.reason=r,this.code=i,this.type=16}}class f_ extends Er{constructor(e,n,r,i){super(e,n),this.error=r,this.target=i,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class G7 extends Er{constructor(e,n,r,i){super(e,n),this.urlAfterRedirects=r,this.state=i,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class H7 extends Er{constructor(e,n,r,i){super(e,n),this.urlAfterRedirects=r,this.state=i,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class z7 extends Er{constructor(e,n,r,i,s){super(e,n),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class q7 extends Er{constructor(e,n,r,i){super(e,n),this.urlAfterRedirects=r,this.state=i,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W7 extends Er{constructor(e,n,r,i){super(e,n),this.urlAfterRedirects=r,this.state=i,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class K7{constructor(e){this.route=e,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Q7{constructor(e){this.route=e,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Y7{constructor(e){this.snapshot=e,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class X7{constructor(e){this.snapshot=e,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Z7{constructor(e){this.snapshot=e,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class J7{constructor(e){this.snapshot=e,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class YM{constructor(e,n,r){this.routerEvent=e,this.position=n,this.anchor=r,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let nq=(()=>{class t{createUrlTree(n,r,i,s,o,a){return F7(n||r.root,i,s,o,a)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})(),iq=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(e){return nq.\u0275fac(e)},providedIn:"root"}),t})();class XM{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const n=this.pathFromRoot(e);return n.length>1?n[n.length-2]:null}children(e){const n=p_(e,this._root);return n?n.children.map(r=>r.value):[]}firstChild(e){const n=p_(e,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(e){const n=g_(e,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return g_(e,this._root).map(n=>n.value)}}function p_(t,e){if(t===e.value)return e;for(const n of e.children){const r=p_(t,n);if(r)return r}return null}function g_(t,e){if(t===e.value)return[e];for(const n of e.children){const r=g_(t,n);if(r.length)return r.unshift(e),r}return[]}class Zr{constructor(e,n){this.value=e,this.children=n}toString(){return`TreeNode(${this.value})`}}function oa(t){const e={};return t&&t.children.forEach(n=>e[n.value.outlet]=n),e}class ZM extends XM{constructor(e,n){super(e),this.snapshot=n,m_(this,e)}toString(){return this.snapshot.toString()}}function JM(t,e){const n=function sq(t,e){const o=new xh([],{},{},"",{},te,e,null,t.root,-1,{});return new tk("",new Zr(o,[]))}(t,e),r=new sr([new Xu("",{})]),i=new sr({}),s=new sr({}),o=new sr({}),a=new sr(""),u=new aa(r,i,o,a,s,te,e,n.root);return u.snapshot=n.root,new ZM(new Zr(u,[]),n)}class aa{constructor(e,n,r,i,s,o,a,u){this.url=e,this.params=n,this.queryParams=r,this.fragment=i,this.data=s,this.outlet=o,this.component=a,this.title=this.data?.pipe(ue(c=>c[Yu]))??H(void 0),this._futureSnapshot=u}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(ue(e=>na(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ue(e=>na(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function ek(t,e="emptyOnly"){const n=t.pathFromRoot;let r=0;if("always"!==e)for(r=n.length-1;r>=1;){const i=n[r],s=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(s.component)break;r--}}return function oq(t){return t.reduce((e,n)=>({params:{...e.params,...n.params},data:{...e.data,...n.data},resolve:{...n.data,...e.resolve,...n.routeConfig?.data,...n._resolvedData}}),{params:{},data:{},resolve:{}})}(n.slice(r))}class xh{get title(){return this.data?.[Yu]}constructor(e,n,r,i,s,o,a,u,c,l,d){this.url=e,this.params=n,this.queryParams=r,this.fragment=i,this.data=s,this.outlet=o,this.component=a,this.routeConfig=u,this._urlSegment=c,this._lastPathIndex=l,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=na(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=na(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class tk extends XM{constructor(e,n){super(n),this.url=e,m_(this,n)}toString(){return nk(this._root)}}function m_(t,e){e.value._routerState=t,e.children.forEach(n=>m_(t,n))}function nk(t){const e=t.children.length>0?` { ${t.children.map(nk).join(", ")} } `:"";return`${t.value}${e}`}function y_(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Ir(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Ir(e.params,n.params)||t.params.next(n.params),function w7(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!Ir(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),Ir(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function __(t,e){const n=Ir(t.params,e.params)&&function b7(t,e){return Es(t,e)&&t.every((n,r)=>Ir(n.parameters,e[r].parameters))}(t.url,e.url);return n&&!(!t.parent!=!e.parent)&&(!t.parent||__(t.parent,e.parent))}function rc(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const r=n.value;r._futureSnapshot=e.value;const i=function uq(t,e,n){return e.children.map(r=>{for(const i of n.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return rc(t,r,i);return rc(t,r)})}(t,e,n);return new Zr(r,i)}{if(t.shouldAttach(e.value)){const s=t.retrieve(e.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>rc(t,a)),o}}const r=function cq(t){return new aa(new sr(t.url),new sr(t.params),new sr(t.queryParams),new sr(t.fragment),new sr(t.data),t.outlet,t.component,t)}(e.value),i=e.children.map(s=>rc(t,s));return new Zr(r,i)}}const v_="ngNavigationCancelingError";function rk(t,e){const{redirectTo:n,navigationBehaviorOptions:r}=Ts(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,i=ik(!1,0,e);return i.url=n,i.navigationBehaviorOptions=r,i}function ik(t,e,n){const r=new Error("NavigationCancelingError: "+(t||""));return r[v_]=!0,r.cancellationCode=e,n&&(r.url=n),r}function sk(t){return ok(t)&&Ts(t.url)}function ok(t){return t&&t[v_]}class lq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ic,this.attachRef=null}}let ic=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(n,r){const i=this.getOrCreateContext(n);i.outlet=r,this.contexts.set(n,i)}onChildOutletDestroyed(n){const r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new lq,this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Rh=!1;let w_=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=te,this.activateEvents=new Jt,this.deactivateEvents=new Jt,this.attachEvents=new Jt,this.detachEvents=new Jt,this.parentContexts=le(ic),this.location=le(tr),this.changeDetector=le(Ty),this.environmentInjector=le(Gr)}ngOnChanges(n){if(n.name){const{firstChange:r,previousValue:i}=n.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new R(4012,Rh);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new R(4012,Rh);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new R(4012,Rh);this.location.detach();const n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){const n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new R(4013,Rh);this._activatedRoute=n;const i=this.location,o=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new dq(n,a,i.injector);if(r&&function hq(t){return!!t.resolveComponentFactory}(r)){const c=r.resolveComponentFactory(o);this.activated=i.createComponent(c,i.length,u)}else this.activated=i.createComponent(o,{index:i.length,injector:u,environmentInjector:r??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275dir=Kt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[os]}),t})();class dq{constructor(e,n,r){this.route=e,this.childContexts=n,this.parent=r}get(e,n){return e===aa?this.route:e===ic?this.childContexts:this.parent.get(e,n)}}let I_=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=hg({type:t,selectors:[["ng-component"]],standalone:!0,features:[px],decls:1,vars:0,template:function(n,r){1&n&&he(0,"router-outlet")},dependencies:[w_],encapsulation:2}),t})();function ak(t,e){return t.providers&&!t._injector&&(t._injector=Hd(t.providers,e,`Route: ${t.path}`)),t._injector??e}function T_(t){const e=t.children&&t.children.map(T_),n=e?{...t,children:e}:{...t};return!n.component&&!n.loadComponent&&(e||n.loadChildren)&&n.outlet&&n.outlet!==te&&(n.component=I_),n}function Hn(t){return t.outlet||te}function uk(t,e){const n=t.filter(r=>Hn(r)===e);return n.push(...t.filter(r=>Hn(r)!==e)),n}function sc(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){const n=e.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class yq{constructor(e,n,r,i){this.routeReuseStrategy=e,this.futureState=n,this.currState=r,this.forwardEvent=i}activate(e){const n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,e),y_(this.futureState.root),this.activateChildRoutes(n,r,e)}deactivateChildRoutes(e,n,r){const i=oa(n);e.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,i[o],r),delete i[o]}),xt(i,(s,o)=>{this.deactivateRouteAndItsChildren(s,r)})}deactivateRoutes(e,n,r){const i=e.value,s=n?n.value:null;if(i===s)if(i.component){const o=r.getContext(i.outlet);o&&this.deactivateChildRoutes(e,n,o.children)}else this.deactivateChildRoutes(e,n,r);else s&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(e,n){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,n):this.deactivateRouteAndOutlet(e,n)}detachAndStoreRouteSubtree(e,n){const r=n.getContext(e.value.outlet),i=r&&e.value.component?r.children:n,s=oa(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],i);if(r&&r.outlet){const o=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,n){const r=n.getContext(e.value.outlet),i=r&&e.value.component?r.children:n,s=oa(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],i);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(e,n,r){const i=oa(n);e.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],r),this.forwardEvent(new J7(s.value.snapshot))}),e.children.length&&this.forwardEvent(new X7(e.value.snapshot))}activateRoutes(e,n,r){const i=e.value,s=n?n.value:null;if(y_(i),i===s)if(i.component){const o=r.getOrCreateContext(i.outlet);this.activateChildRoutes(e,n,o.children)}else this.activateChildRoutes(e,n,r);else if(i.component){const o=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),y_(a.route.value),this.activateChildRoutes(e,null,o.children)}else{const a=sc(i.snapshot),u=a?.get(Cu)??null;o.attachRef=null,o.route=i,o.resolver=u,o.injector=a,o.outlet&&o.outlet.activateWith(i,o.injector),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,r)}}class ck{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Mh{constructor(e,n){this.component=e,this.route=n}}function _q(t,e,n){const r=t._root;return oc(r,e?e._root:null,n,[r.value])}function ua(t,e){const n=Symbol(),r=e.get(t,n);return r===n?"function"!=typeof t||function p$(t){return null!==zl(t)}(t)?e.get(t):t:r}function oc(t,e,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=oa(e);return t.children.forEach(o=>{(function wq(t,e,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const u=function Iq(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Es(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Es(t.url,e.url)||!Ir(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!__(t,e)||!Ir(t.queryParams,e.queryParams);default:return!__(t,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new ck(r)):(s.data=o.data,s._resolvedData=o._resolvedData),oc(t,e,s.component?a?a.children:null:n,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Mh(a.outlet.component,o))}else o&&ac(e,a,i),i.canActivateChecks.push(new ck(r)),oc(t,null,s.component?a?a.children:null:n,r,i)})(o,s[o.value.outlet],n,r.concat([o.value]),i),delete s[o.value.outlet]}),xt(s,(o,a)=>ac(o,n.getContext(a),i)),i}function ac(t,e,n){const r=oa(t),i=t.value;xt(r,(s,o)=>{ac(s,i.component?e?e.children.getContext(o):null:e,n)}),n.canDeactivateChecks.push(new Mh(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}function uc(t){return"function"==typeof t}function b_(t){return t instanceof _h||"EmptyError"===t?.name}const kh=Symbol("INITIAL_VALUE");function ca(){return wr(t=>bM(t.map(e=>e.pipe(Qu(1),function f7(...t){const e=nu(t);return yt((n,r)=>{(e?n_(t,n,e):n_(t,n)).subscribe(r)})}(kh)))).pipe(ue(e=>{for(const n of e)if(!0!==n){if(n===kh)return kh;if(!1===n||n instanceof ki)return n}return!0}),Ai(e=>e!==kh),Qu(1)))}function lk(t){return function kV(...t){return _D(t)}(At(e=>{if(Ts(e))throw rk(0,e)}),ue(e=>!0===e))}const D_={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function dk(t,e,n,r,i){const s=C_(t,e,n);return s.matched?function Uq(t,e,n,r){const i=e.canMatch;return i&&0!==i.length?H(i.map(o=>{const a=ua(o,t);return Mi(function Sq(t){return t&&uc(t.canMatch)}(a)?a.canMatch(e,n):t.runInContext(()=>a(e,n)))})).pipe(ca(),lk()):H(!0)}(r=ak(e,r),e,n).pipe(ue(o=>!0===o?s:{...D_})):H(s)}function C_(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{...D_}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const i=(e.matcher||v7)(n,t,e);if(!i)return{...D_};const s={};xt(i.posParams,(a,u)=>{s[u]=a.path});const o=i.consumed.length>0?{...s,...i.consumed[i.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:o,positionalParamSegments:i.posParams??{}}}function Nh(t,e,n,r){if(n.length>0&&function Bq(t,e,n){return n.some(r=>Ph(t,e,r)&&Hn(r)!==te)}(t,n,r)){const s=new oe(e,function $q(t,e,n,r){const i={};i[te]=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(const s of n)if(""===s.path&&Hn(s)!==te){const o=new oe([],{});o._sourceSegment=t,o._segmentIndexShift=e.length,i[Hn(s)]=o}return i}(t,e,r,new oe(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function jq(t,e,n){return n.some(r=>Ph(t,e,r))}(t,n,r)){const s=new oe(t.segments,function Vq(t,e,n,r,i){const s={};for(const o of r)if(Ph(t,n,o)&&!i[Hn(o)]){const a=new oe([],{});a._sourceSegment=t,a._segmentIndexShift=e.length,s[Hn(o)]=a}return{...i,...s}}(t,e,n,r,t.children));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}const i=new oe(t.segments,t.children);return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:n}}function Ph(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path}function hk(t,e,n,r){return!!(Hn(t)===r||r!==te&&Ph(e,n,t))&&("**"===t.path||C_(e,t,n).matched)}function fk(t,e,n){return 0===e.length&&!t.children[n]}const Oh=!1;class Lh{constructor(e){this.segmentGroup=e||null}}class pk{constructor(e){this.urlTree=e}}function cc(t){return Ku(new Lh(t))}function gk(t){return Ku(new pk(t))}class qq{constructor(e,n,r,i,s){this.injector=e,this.configLoader=n,this.urlSerializer=r,this.urlTree=i,this.config=s,this.allowRedirects=!0}apply(){const e=Nh(this.urlTree.root,[],[],this.config).segmentGroup,n=new oe(e.segments,e.children);return this.expandSegmentGroup(this.injector,this.config,n,te).pipe(ue(s=>this.createUrlTree(Ch(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ri(s=>{if(s instanceof pk)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof Lh?this.noMatchError(s):s}))}match(e){return this.expandSegmentGroup(this.injector,this.config,e.root,te).pipe(ue(i=>this.createUrlTree(Ch(i),e.queryParams,e.fragment))).pipe(Ri(i=>{throw i instanceof Lh?this.noMatchError(i):i}))}noMatchError(e){return new R(4002,Oh)}createUrlTree(e,n,r){const i=u_(e);return new ki(i,n,r)}expandSegmentGroup(e,n,r,i){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(e,n,r).pipe(ue(s=>new oe([],s))):this.expandSegment(e,r,n,r.segments,i,!0)}expandChildren(e,n,r){const i=[];for(const s of Object.keys(r.children))"primary"===s?i.unshift(s):i.push(s);return ut(i).pipe(Is(s=>{const o=r.children[s],a=uk(n,s);return this.expandSegmentGroup(e,a,o,s).pipe(ue(u=>({segment:u,outlet:s})))}),xM((s,o)=>(s[o.outlet]=o.segment,s),{}),RM())}expandSegment(e,n,r,i,s,o){return ut(r).pipe(Is(a=>this.expandSegmentAgainstRoute(e,n,r,a,i,s,o).pipe(Ri(c=>{if(c instanceof Lh)return H(null);throw c}))),xi(a=>!!a),Ri((a,u)=>{if(b_(a))return fk(n,i,s)?H(new oe([],{})):cc(n);throw a}))}expandSegmentAgainstRoute(e,n,r,i,s,o,a){return hk(i,n,s,o)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,n,i,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,n,r,i,s,o):cc(n):cc(n)}expandSegmentAgainstRouteUsingRedirect(e,n,r,i,s,o){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,r,i,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,n,r,i,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,i){const s=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?gk(s):this.lineralizeSegments(r,s).pipe(Dt(o=>{const a=new oe(o,{});return this.expandSegment(e,a,n,o,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,n,r,i,s,o){const{matched:a,consumedSegments:u,remainingSegments:c,positionalParamSegments:l}=C_(n,i,s);if(!a)return cc(n);const d=this.applyRedirectCommands(u,i.redirectTo,l);return i.redirectTo.startsWith("/")?gk(d):this.lineralizeSegments(i,d).pipe(Dt(h=>this.expandSegment(e,n,r,h.concat(c),o,!1)))}matchSegmentAgainstRoute(e,n,r,i,s){return"**"===r.path?(e=ak(r,e),r.loadChildren?(r._loadedRoutes?H({routes:r._loadedRoutes,injector:r._loadedInjector}):this.configLoader.loadChildren(e,r)).pipe(ue(a=>(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,new oe(i,{})))):H(new oe(i,{}))):dk(n,r,i,e).pipe(wr(({matched:o,consumedSegments:a,remainingSegments:u})=>o?this.getChildConfig(e=r._injector??e,r,i).pipe(Dt(l=>{const d=l.injector??e,h=l.routes,{segmentGroup:f,slicedSegments:p}=Nh(n,a,u,h),g=new oe(f.segments,f.children);if(0===p.length&&g.hasChildren())return this.expandChildren(d,h,g).pipe(ue(y=>new oe(a,y)));if(0===h.length&&0===p.length)return H(new oe(a,{}));const m=Hn(r)===s;return this.expandSegment(d,g,h,p,m?te:s,!0).pipe(ue(E=>new oe(a.concat(E.segments),E.children)))})):cc(n)))}getChildConfig(e,n,r){return n.children?H({routes:n.children,injector:e}):n.loadChildren?void 0!==n._loadedRoutes?H({routes:n._loadedRoutes,injector:n._loadedInjector}):function Fq(t,e,n,r){const i=e.canLoad;return void 0===i||0===i.length?H(!0):H(i.map(o=>{const a=ua(o,t);return Mi(function Tq(t){return t&&uc(t.canLoad)}(a)?a.canLoad(e,n):t.runInContext(()=>a(e,n)))})).pipe(ca(),lk())}(e,n,r).pipe(Dt(i=>i?this.configLoader.loadChildren(e,n).pipe(At(s=>{n._loadedRoutes=s.routes,n._loadedInjector=s.injector})):function Hq(t){return Ku(ik(Oh,3))}())):H({routes:[],injector:e})}lineralizeSegments(e,n){let r=[],i=n.root;for(;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return H(r);if(i.numberOfChildren>1||!i.children[te])return e.redirectTo,Ku(new R(4e3,Oh));i=i.children[te]}}applyRedirectCommands(e,n,r){return this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),e,r)}applyRedirectCreateUrlTree(e,n,r,i){const s=this.createSegmentGroup(e,n.root,r,i);return new ki(s,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(e,n){const r={};return xt(e,(i,s)=>{if("string"==typeof i&&i.startsWith(":")){const a=i.substring(1);r[s]=n[a]}else r[s]=i}),r}createSegmentGroup(e,n,r,i){const s=this.createSegments(e,n.segments,r,i);let o={};return xt(n.children,(a,u)=>{o[u]=this.createSegmentGroup(e,a,r,i)}),new oe(s,o)}createSegments(e,n,r,i){return n.map(s=>s.path.startsWith(":")?this.findPosParam(e,s,i):this.findOrReturn(s,r))}findPosParam(e,n,r){const i=r[n.path.substring(1)];if(!i)throw new R(4001,Oh);return i}findOrReturn(e,n){let r=0;for(const i of n){if(i.path===e.path)return n.splice(r),i;r++}return e}}class Kq{}class Xq{constructor(e,n,r,i,s,o,a){this.injector=e,this.rootComponentType=n,this.config=r,this.urlTree=i,this.url=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a}recognize(){const e=Nh(this.urlTree.root,[],[],this.config.filter(n=>void 0===n.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,e,te).pipe(ue(n=>{if(null===n)return null;const r=new xh([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},te,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Zr(r,n),s=new tk(this.url,i);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(e){const n=e.value,r=ek(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(e,n,r,i){return 0===r.segments.length&&r.hasChildren()?this.processChildren(e,n,r):this.processSegment(e,n,r,r.segments,i)}processChildren(e,n,r){return ut(Object.keys(r.children)).pipe(Is(i=>{const s=r.children[i],o=uk(n,i);return this.processSegmentGroup(e,o,s,i)}),xM((i,s)=>i&&s?(i.push(...s),i):null),function m7(t,e=!1){return yt((n,r)=>{let i=0;n.subscribe(_t(r,s=>{const o=t(s,i++);(o||e)&&r.next(s),!o&&r.complete()}))})}(i=>null!==i),vh(null),RM(),ue(i=>{if(null===i)return null;const s=yk(i);return function Zq(t){t.sort((e,n)=>e.value.outlet===te?-1:n.value.outlet===te?1:e.value.outlet.localeCompare(n.value.outlet))}(s),s}))}processSegment(e,n,r,i,s){return ut(n).pipe(Is(o=>this.processSegmentAgainstRoute(o._injector??e,o,r,i,s)),xi(o=>!!o),Ri(o=>{if(b_(o))return fk(r,i,s)?H([]):H(null);throw o}))}processSegmentAgainstRoute(e,n,r,i,s){if(n.redirectTo||!hk(n,r,i,s))return H(null);let o;if("**"===n.path){const a=i.length>0?NM(i).parameters:{},u=vk(r)+i.length;o=H({snapshot:new xh(i,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wk(n),Hn(n),n.component??n._loadedComponent??null,n,_k(r),u,Ik(n)),consumedSegments:[],remainingSegments:[]})}else o=dk(r,n,i,e).pipe(ue(({matched:a,consumedSegments:u,remainingSegments:c,parameters:l})=>{if(!a)return null;const d=vk(r)+u.length;return{snapshot:new xh(u,l,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wk(n),Hn(n),n.component??n._loadedComponent??null,n,_k(r),d,Ik(n)),consumedSegments:u,remainingSegments:c}}));return o.pipe(wr(a=>{if(null===a)return H(null);const{snapshot:u,consumedSegments:c,remainingSegments:l}=a;e=n._injector??e;const d=n._loadedInjector??e,h=function Jq(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(n),{segmentGroup:f,slicedSegments:p}=Nh(r,c,l,h.filter(m=>void 0===m.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(ue(m=>null===m?null:[new Zr(u,m)]));if(0===h.length&&0===p.length)return H([new Zr(u,[])]);const g=Hn(n)===s;return this.processSegment(d,h,f,p,g?te:s).pipe(ue(m=>null===m?null:[new Zr(u,m)]))}))}}function eW(t){const e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function yk(t){const e=[],n=new Set;for(const r of t){if(!eW(r)){e.push(r);continue}const i=e.find(s=>r.value.routeConfig===s.value.routeConfig);void 0!==i?(i.children.push(...r.children),n.add(i)):e.push(r)}for(const r of n){const i=yk(r.children);e.push(new Zr(r.value,i))}return e.filter(r=>!n.has(r))}function _k(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function vk(t){let e=t,n=e._segmentIndexShift??0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift??0;return n-1}function wk(t){return t.data||{}}function Ik(t){return t.resolve||{}}function Ek(t){return"string"==typeof t.title||null===t.title}function S_(t){return wr(e=>{const n=t(e);return n?ut(n).pipe(ue(()=>e)):H(e)})}const la=new j("ROUTES");let A_=(()=>{class t{constructor(n,r){this.injector=n,this.compiler=r,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return H(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);const r=Mi(n.loadComponent()).pipe(ue(bk),At(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),s_(()=>{this.componentLoaders.delete(n)})),i=new SM(r,()=>new Pr).pipe(r_());return this.componentLoaders.set(n,i),i}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return H({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);const s=this.loadModuleFactoryOrRoutes(r.loadChildren).pipe(ue(a=>{this.onLoadEndListener&&this.onLoadEndListener(r);let u,c,l=!1;Array.isArray(a)?c=a:(u=a.create(n).injector,c=kM(u.get(la,[],q.Self|q.Optional)));return{routes:c.map(T_),injector:u}}),s_(()=>{this.childrenLoaders.delete(r)})),o=new SM(s,()=>new Pr).pipe(r_());return this.childrenLoaders.set(r,o),o}loadModuleFactoryOrRoutes(n){return Mi(n()).pipe(ue(bk),Dt(i=>i instanceof hx||Array.isArray(i)?H(i):ut(this.compiler.compileModuleAsync(i))))}}return t.\u0275fac=function(n){return new(n||t)(B(An),B(nR))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function bk(t){return function cW(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let Uh=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Pr,this.configLoader=le(A_),this.environmentInjector=le(Gr),this.urlSerializer=le(Zu),this.rootContexts=le(ic),this.navigationId=0,this.afterPreactivation=()=>H(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=i=>this.events.next(new Q7(i)),this.configLoader.onLoadStartListener=i=>this.events.next(new K7(i))}complete(){this.transitions?.complete()}handleNavigationRequest(n){const r=++this.navigationId;this.transitions?.next({...this.transitions.value,...n,id:r})}setupNavigations(n){return this.transitions=new sr({id:0,targetPageId:0,currentUrlTree:n.currentUrlTree,currentRawUrl:n.currentUrlTree,extractedUrl:n.urlHandlingStrategy.extract(n.currentUrlTree),urlAfterRedirects:n.urlHandlingStrategy.extract(n.currentUrlTree),rawUrl:n.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:nc,restoredState:null,currentSnapshot:n.routerState.snapshot,targetSnapshot:null,currentRouterState:n.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ai(r=>0!==r.id),ue(r=>({...r,extractedUrl:n.urlHandlingStrategy.extract(r.rawUrl)})),wr(r=>{let i=!1,s=!1;return H(r).pipe(At(o=>{this.currentNavigation={id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),wr(o=>{const a=n.browserUrlTree.toString(),u=!n.navigated||o.extractedUrl.toString()!==a||a!==n.currentUrlTree.toString();if(!u&&"reload"!==(o.extras.onSameUrlNavigation??n.onSameUrlNavigation)){const l="";return this.events.next(new Ah(o.id,n.serializeUrl(r.rawUrl),l,0)),n.rawUrlTree=o.rawUrl,o.resolve(null),cr}if(n.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return Dk(o.source)&&(n.browserUrlTree=o.extractedUrl),H(o).pipe(wr(l=>{const d=this.transitions?.getValue();return this.events.next(new h_(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),d!==this.transitions?.getValue()?cr:Promise.resolve(l)}),function Wq(t,e,n,r){return wr(i=>function zq(t,e,n,r,i){return new qq(t,e,n,r,i).apply()}(t,e,n,i.extractedUrl,r).pipe(ue(s=>({...i,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,n.config),At(l=>{this.currentNavigation={...this.currentNavigation,finalUrl:l.urlAfterRedirects},r.urlAfterRedirects=l.urlAfterRedirects}),function nW(t,e,n,r,i){return Dt(s=>function Yq(t,e,n,r,i,s,o="emptyOnly"){return new Xq(t,e,n,r,i,o,s).recognize().pipe(wr(a=>null===a?function Qq(t){return new Qe(e=>e.error(t))}(new Kq):H(a)))}(t,e,n,s.urlAfterRedirects,r.serialize(s.urlAfterRedirects),r,i).pipe(ue(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,n.config,this.urlSerializer,n.paramsInheritanceStrategy),At(l=>{if(r.targetSnapshot=l.targetSnapshot,"eager"===n.urlUpdateStrategy){if(!l.extras.skipLocationChange){const h=n.urlHandlingStrategy.merge(l.urlAfterRedirects,l.rawUrl);n.setBrowserUrl(h,l)}n.browserUrlTree=l.urlAfterRedirects}const d=new G7(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}));if(u&&n.urlHandlingStrategy.shouldProcessUrl(n.rawUrlTree)){const{id:l,extractedUrl:d,source:h,restoredState:f,extras:p}=o,g=new h_(l,this.urlSerializer.serialize(d),h,f);this.events.next(g);const m=JM(d,this.rootComponentType).snapshot;return H(r={...o,targetSnapshot:m,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const l="";return this.events.next(new Ah(o.id,n.serializeUrl(r.extractedUrl),l,1)),n.rawUrlTree=o.rawUrl,o.resolve(null),cr}}),At(o=>{const a=new H7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),ue(o=>r={...o,guards:_q(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function xq(t,e){return Dt(n=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:o}}=n;return 0===o.length&&0===s.length?H({...n,guardsResult:!0}):function Rq(t,e,n,r){return ut(t).pipe(Dt(i=>function Lq(t,e,n,r,i){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?H(s.map(a=>{const u=sc(e)??i,c=ua(a,u);return Mi(function Cq(t){return t&&uc(t.canDeactivate)}(c)?c.canDeactivate(t,e,n,r):u.runInContext(()=>c(t,e,n,r))).pipe(xi())})).pipe(ca()):H(!0)}(i.component,i.route,n,e,r)),xi(i=>!0!==i,!0))}(o,r,i,t).pipe(Dt(a=>a&&function Eq(t){return"boolean"==typeof t}(a)?function Mq(t,e,n,r){return ut(e).pipe(Is(i=>n_(function Nq(t,e){return null!==t&&e&&e(new Y7(t)),H(!0)}(i.route.parent,r),function kq(t,e){return null!==t&&e&&e(new Z7(t)),H(!0)}(i.route,r),function Oq(t,e,n){const r=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>function vq(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(o)).filter(o=>null!==o).map(o=>CM(()=>H(o.guards.map(u=>{const c=sc(o.node)??n,l=ua(u,c);return Mi(function Dq(t){return t&&uc(t.canActivateChild)}(l)?l.canActivateChild(r,t):c.runInContext(()=>l(r,t))).pipe(xi())})).pipe(ca())));return H(s).pipe(ca())}(t,i.path,n),function Pq(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return H(!0);const i=r.map(s=>CM(()=>{const o=sc(e)??n,a=ua(s,o);return Mi(function bq(t){return t&&uc(t.canActivate)}(a)?a.canActivate(e,t):o.runInContext(()=>a(e,t))).pipe(xi())}));return H(i).pipe(ca())}(t,i.route,n))),xi(i=>!0!==i,!0))}(r,s,t,e):H(a)),ue(a=>({...n,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),At(o=>{if(r.guardsResult=o.guardsResult,Ts(o.guardsResult))throw rk(0,o.guardsResult);const a=new z7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),Ai(o=>!!o.guardsResult||(n.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),S_(o=>{if(o.guards.canActivateChecks.length)return H(o).pipe(At(a=>{const u=new q7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}),wr(a=>{let u=!1;return H(a).pipe(function rW(t,e){return Dt(n=>{const{targetSnapshot:r,guards:{canActivateChecks:i}}=n;if(!i.length)return H(n);let s=0;return ut(i).pipe(Is(o=>function iW(t,e,n,r){const i=t.routeConfig,s=t._resolve;return void 0!==i?.title&&!Ek(i)&&(s[Yu]=i.title),function sW(t,e,n,r){const i=function oW(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===i.length)return H({});const s={};return ut(i).pipe(Dt(o=>function aW(t,e,n,r){const i=sc(e)??r,s=ua(t,i);return Mi(s.resolve?s.resolve(e,n):i.runInContext(()=>s(e,n)))}(t[o],e,n,r).pipe(xi(),At(a=>{s[o]=a}))),i_(1),function y7(t){return ue(()=>t)}(s),Ri(o=>b_(o)?cr:Ku(o)))}(s,t,e,r).pipe(ue(o=>(t._resolvedData=o,t.data=ek(t,n).resolve,i&&Ek(i)&&(t.data[Yu]=i.title),null)))}(o.route,r,t,e)),At(()=>s++),i_(1),Dt(o=>s===i.length?H(n):cr))})}(n.paramsInheritanceStrategy,this.environmentInjector),At({next:()=>u=!0,complete:()=>{u||(n.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),At(a=>{const u=new W7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}))}),S_(o=>{const a=u=>{const c=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(u.routeConfig).pipe(At(l=>{u.component=l}),ue(()=>{})));for(const l of u.children)c.push(...a(l));return c};return bM(a(o.targetSnapshot.root)).pipe(vh(),Qu(1))}),S_(()=>this.afterPreactivation()),ue(o=>{const a=function aq(t,e,n){const r=rc(t,e._root,n?n._root:void 0);return new ZM(r,e)}(n.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return r={...o,targetRouterState:a}}),At(o=>{n.currentUrlTree=o.urlAfterRedirects,n.rawUrlTree=n.urlHandlingStrategy.merge(o.urlAfterRedirects,o.rawUrl),n.routerState=o.targetRouterState,"deferred"===n.urlUpdateStrategy&&(o.extras.skipLocationChange||n.setBrowserUrl(n.rawUrlTree,o),n.browserUrlTree=o.urlAfterRedirects)}),((t,e,n)=>ue(r=>(new yq(e,r.targetRouterState,r.currentRouterState,n).activate(t),r)))(this.rootContexts,n.routeReuseStrategy,o=>this.events.next(o)),At({next:o=>{i=!0,this.lastSuccessfulNavigation=this.currentNavigation,n.navigated=!0,this.events.next(new bs(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(n.currentUrlTree))),n.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),s_(()=>{i||s||this.cancelNavigationTransition(r,"",1),this.currentNavigation?.id===r.id&&(this.currentNavigation=null)}),Ri(o=>{if(s=!0,ok(o)){sk(o)||(n.navigated=!0,n.restoreHistory(r,!0));const a=new Sh(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),sk(o)){const u=n.urlHandlingStrategy.merge(o.url,n.rawUrlTree),c={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===n.urlUpdateStrategy||Dk(r.source)};n.scheduleNavigation(u,nc,null,c,{resolve:r.resolve,reject:r.reject,promise:r.promise})}else r.resolve(!1)}else{n.restoreHistory(r,!0);const a=new f_(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);this.events.next(a);try{r.resolve(n.errorHandler(o))}catch(u){r.reject(u)}}return cr}))}))}cancelNavigationTransition(n,r,i){const s=new Sh(n.id,this.urlSerializer.serialize(n.extractedUrl),r,i);this.events.next(s),n.resolve(!1)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Dk(t){return t!==nc}let Ck=(()=>{class t{buildTitle(n){let r,i=n.root;for(;void 0!==i;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(s=>s.outlet===te);return r}getResolvedTitleForRoute(n){return n.data[Yu]}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return le(lW)},providedIn:"root"}),t})(),lW=(()=>{class t extends Ck{constructor(n){super(),this.title=n}updateTitle(n){const r=this.buildTitle(n);void 0!==r&&this.title.setTitle(r)}}return t.\u0275fac=function(n){return new(n||t)(B(IM))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),dW=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return le(fW)},providedIn:"root"}),t})();class hW{shouldDetach(e){return!1}store(e,n){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,n){return e.routeConfig===n.routeConfig}}let fW=(()=>{class t extends hW{}return t.\u0275fac=function(){let e;return function(r){return(e||(e=function kC(t){return Lr(()=>{const e=t.prototype.constructor,n=e[Ur]||kg(e),r=Object.prototype;let i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){const s=i[Ur]||kg(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}(t)))(r||t)}}(),t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Vh=new j("",{providedIn:"root",factory:()=>({})});let gW=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:function(){return le(mW)},providedIn:"root"}),t})(),mW=(()=>{class t{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function yW(t){throw t}function _W(t,e,n){return e.parse("/")}const vW={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},wW={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Rn=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=le(jH),this.isNgZoneEnabled=!1,this.options=le(Vh,{optional:!0})||{},this.errorHandler=this.options.errorHandler||yW,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||_W,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=le(gW),this.routeReuseStrategy=le(dW),this.urlCreationStrategy=le(iq),this.titleStrategy=le(Ck),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=kM(le(la,{optional:!0})??[]),this.navigationTransitions=le(Uh),this.urlSerializer=le(Zu),this.location=le(ky),this.isNgZoneEnabled=le(Ne)instanceof Ne&&Ne.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new ki,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=JM(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(n=>{this.lastSuccessfulId=n.id,this.currentPageId=n.targetPageId},n=>{this.console.warn(`Unhandled Navigation Error: ${n}`)})}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const n=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),nc,n)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(n=>{const r="popstate"===n.type?"popstate":"hashchange";"popstate"===r&&setTimeout(()=>{this.navigateToSyncWithBrowser(n.url,r,n.state)},0)}))}navigateToSyncWithBrowser(n,r,i){const s={replaceUrl:!0},o=i?.navigationId?i:null;if(i){const u={...i};delete u.navigationId,delete u.\u0275routerPageId,0!==Object.keys(u).length&&(s.state=u)}const a=this.parseUrl(n);this.scheduleNavigation(a,r,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(n){this.config=n.map(T_),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(n,r={}){const{relativeTo:i,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:o;let l=null;switch(a){case"merge":l={...this.currentUrlTree.queryParams,...s};break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=s||null}return null!==l&&(l=this.removeEmptyProps(l)),this.urlCreationStrategy.createUrlTree(i,this.routerState,this.currentUrlTree,n,l,c??null)}navigateByUrl(n,r={skipLocationChange:!1}){const i=Ts(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(s,nc,null,r)}navigate(n,r={skipLocationChange:!1}){return function IW(t){for(let e=0;e<t.length;e++){const n=t[e];if(null==n)throw new R(4008,false)}}(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){let r;try{r=this.urlSerializer.parse(n)}catch(i){r=this.malformedUriErrorHandler(i,this.urlSerializer,n)}return r}isActive(n,r){let i;if(i=!0===r?{...vW}:!1===r?{...wW}:r,Ts(n))return OM(this.currentUrlTree,n,i);const s=this.parseUrl(n);return OM(this.currentUrlTree,s,i)}removeEmptyProps(n){return Object.keys(n).reduce((r,i)=>{const s=n[i];return null!=s&&(r[i]=s),r},{})}scheduleNavigation(n,r,i,s,o){if(this.disposed)return Promise.resolve(!1);let a,u,c,l;return o?(a=o.resolve,u=o.reject,c=o.promise):c=new Promise((d,h)=>{a=d,u=h}),l="computed"===this.canceledNavigationResolution?i&&i.\u0275routerPageId?i.\u0275routerPageId:s.replaceUrl||s.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:l,source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(n,r){const i=this.urlSerializer.serialize(n),s={...r.extras.state,...this.generateNgRouterState(r.id,r.targetPageId)};this.location.isCurrentPathEqualTo(i)||r.extras.replaceUrl?this.location.replaceState(i,"",s):this.location.go(i,"",s)}restoreHistory(n,r=!1){if("computed"===this.canceledNavigationResolution){const i=this.currentPageId-n.targetPageId;"popstate"!==n.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===i?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===i&&(this.resetState(n),this.browserUrlTree=n.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(i)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=n.currentRouterState,this.currentUrlTree=n.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return"computed"===this.canceledNavigationResolution?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class Sk{}let bW=(()=>{class t{constructor(n,r,i,s,o){this.router=n,this.injector=i,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(Ai(n=>n instanceof bs),Is(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){const i=[];for(const s of r){s.providers&&!s._injector&&(s._injector=Hd(s.providers,n,`Route: ${s.path}`));const o=s._injector??n,a=s._loadedInjector??o;s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent?i.push(this.preloadConfig(o,s)):(s.children||s._loadedRoutes)&&i.push(this.processRoutes(a,s.children??s._loadedRoutes))}return ut(i).pipe(mo())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let i;i=r.loadChildren&&void 0===r.canLoad?this.loader.loadChildren(n,r):H(null);const s=i.pipe(Dt(o=>null===o?H(void 0):(r._loadedRoutes=o.routes,r._loadedInjector=o.injector,this.processRoutes(o.injector??n,o.routes))));return r.loadComponent&&!r._loadedComponent?ut([s,this.loader.loadComponent(r)]).pipe(mo()):s})}}return t.\u0275fac=function(n){return new(n||t)(B(Rn),B(nR),B(Gr),B(Sk),B(A_))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const M_=new j("");let Ak=(()=>{class t{constructor(n,r,i,s,o={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=i,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration=o.scrollPositionRestoration||"disabled",o.anchorScrolling=o.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof h_?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof bs&&(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof YM&&(n.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(n.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new YM(n,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(n){!function c1(){throw new Error("invalid")}()},t.\u0275prov=W({token:t,factory:t.\u0275fac}),t})();var Mn=(()=>((Mn=Mn||{})[Mn.COMPLETE=0]="COMPLETE",Mn[Mn.FAILED=1]="FAILED",Mn[Mn.REDIRECTING=2]="REDIRECTING",Mn))();const da=!1;function Ni(t,e){return{\u0275kind:t,\u0275providers:e}}const k_=new j("",{providedIn:"root",factory:()=>!1});function Rk(){const t=le(An);return e=>{const n=t.get(Zd);if(e!==n.components[0])return;const r=t.get(Rn),i=t.get(Mk);1===t.get(N_)&&r.initialNavigation(),t.get(kk,null,q.Optional)?.setUpPreloading(),t.get(M_,null,q.Optional)?.init(),r.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.unsubscribe())}}const Mk=new j(da?"bootstrap done indicator":"",{factory:()=>new Pr}),N_=new j(da?"initial navigation":"",{providedIn:"root",factory:()=>1});function xW(){let t=[];return t=da?[{provide:Td,multi:!0,useFactory:()=>{const e=le(Rn);return()=>e.events.subscribe(n=>{console.group?.(`Router Event: ${n.constructor.name}`),console.log(function eq(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(n)),console.log(n),console.groupEnd?.()})}}]:[],Ni(1,t)}const kk=new j(da?"router preloader":"");function RW(t){return Ni(0,[{provide:kk,useExisting:bW},{provide:Sk,useExisting:t}])}const lc=!1,Nk=new j(lc?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),MW=[ky,{provide:Zu,useClass:o_},Rn,ic,{provide:aa,useFactory:function xk(t){return t.routerState.root},deps:[Rn]},A_,lc?{provide:k_,useValue:!0}:[]];function kW(){return new lR("Router",Rn)}let Pk=(()=>{class t{constructor(n){}static forRoot(n,r){return{ngModule:t,providers:[MW,lc&&r?.enableTracing?xW().\u0275providers:[],{provide:la,multi:!0,useValue:n},{provide:Nk,useFactory:LW,deps:[[Rn,new lt,new yu]]},{provide:Vh,useValue:r||{}},r?.useHash?{provide:ws,useClass:x5}:{provide:ws,useClass:NR},{provide:M_,useFactory:()=>{const t=le(Q8),e=le(Ne),n=le(Vh),r=le(Uh),i=le(Zu);return n.scrollOffset&&t.setOffset(n.scrollOffset),new Ak(i,r,t,e,n)}},r?.preloadingStrategy?RW(r.preloadingStrategy).\u0275providers:[],{provide:lR,multi:!0,useFactory:kW},r?.initialNavigation?FW(r):[],[{provide:Ok,useFactory:Rk},{provide:cR,multi:!0,useExisting:Ok}]]}}static forChild(n){return{ngModule:t,providers:[{provide:la,multi:!0,useValue:n}]}}}return t.\u0275fac=function(n){return new(n||t)(B(Nk,8))},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({imports:[I_]}),t})();function LW(t){if(lc&&t)throw new R(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function FW(t){return["disabled"===t.initialNavigation?Ni(3,[{provide:Kd,multi:!0,useFactory:()=>{const e=le(Rn);return()=>{e.setUpLocationChangeListener()}}},{provide:N_,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ni(2,[{provide:N_,useValue:0},{provide:Kd,multi:!0,deps:[An],useFactory:e=>{const n=e.get(S5,Promise.resolve());return()=>n.then(()=>new Promise(r=>{const i=e.get(Rn),s=e.get(Mk);(function DW(t,e){t.events.pipe(Ai(n=>n instanceof bs||n instanceof Sh||n instanceof f_||n instanceof Ah),ue(n=>n instanceof bs||n instanceof Ah?Mn.COMPLETE:n instanceof Sh&&(0===n.code||1===n.code)?Mn.REDIRECTING:Mn.FAILED),Ai(n=>n!==Mn.REDIRECTING),Qu(1)).subscribe(()=>{e()})})(i,()=>{r(!0)}),e.get(Uh).afterPreactivation=()=>(r(!0),s.closed?H(void 0):s),i.initialNavigation()}))}}]).\u0275providers:[]]}const Ok=new j(lc?"Router Initializer":""),VW=[];let $W=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({imports:[Pk.forRoot(VW),Pk]}),t})();function BW(t,e){1&t&&(M(0,"pre"),ge(1,"ng generate component xyz"),V())}function jW(t,e){1&t&&(M(0,"pre"),ge(1,"ng add @angular/material"),V())}function GW(t,e){1&t&&(M(0,"pre"),ge(1,"ng add @angular/pwa"),V())}function HW(t,e){1&t&&(M(0,"pre"),ge(1,"ng add _____"),V())}function zW(t,e){1&t&&(M(0,"pre"),ge(1,"ng test"),V())}function qW(t,e){1&t&&(M(0,"pre"),ge(1,"ng build"),V())}let WW=(()=>{class t{constructor(){this.title="takima-AR"}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=hg({type:t,selectors:[["app-root"]],decls:152,vars:7,consts:[["role","banner",1,"toolbar"],["width","40","alt","Angular Logo","src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="],[1,"spacer"],["aria-label","Angular on twitter","target","_blank","rel","noopener","href","https://twitter.com/angular","title","Twitter"],["id","twitter-logo","height","24","data-name","Logo","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 400 400"],["width","400","height","400","fill","none"],["d","M153.62,301.59c94.34,0,145.94-78.16,145.94-145.94,0-2.22,0-4.43-.15-6.63A104.36,104.36,0,0,0,325,122.47a102.38,102.38,0,0,1-29.46,8.07,51.47,51.47,0,0,0,22.55-28.37,102.79,102.79,0,0,1-32.57,12.45,51.34,51.34,0,0,0-87.41,46.78A145.62,145.62,0,0,1,92.4,107.81a51.33,51.33,0,0,0,15.88,68.47A50.91,50.91,0,0,1,85,169.86c0,.21,0,.43,0,.65a51.31,51.31,0,0,0,41.15,50.28,51.21,51.21,0,0,1-23.16.88,51.35,51.35,0,0,0,47.92,35.62,102.92,102.92,0,0,1-63.7,22A104.41,104.41,0,0,1,75,278.55a145.21,145.21,0,0,0,78.62,23","fill","#fff"],["aria-label","Angular on YouTube","target","_blank","rel","noopener","href","https://youtube.com/angular","title","YouTube"],["id","youtube-logo","height","24","width","24","data-name","Logo","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M21.58 7.19c-.23-.86-.91-1.54-1.77-1.77C18.25 5 12 5 12 5s-6.25 0-7.81.42c-.86.23-1.54.91-1.77 1.77C2 8.75 2 12 2 12s0 3.25.42 4.81c.23.86.91 1.54 1.77 1.77C5.75 19 12 19 12 19s6.25 0 7.81-.42c.86-.23 1.54-.91 1.77-1.77C22 15.25 22 12 22 12s0-3.25-.42-4.81zM10 15V9l5.2 3-5.2 3z"],["role","main",1,"content"],[1,"card","highlight-card","card-small"],["id","rocket","xmlns","http://www.w3.org/2000/svg","width","101.678","height","101.678","viewBox","0 0 101.678 101.678"],["id","Group_83","data-name","Group 83","transform","translate(-141 -696)"],["id","Ellipse_8","data-name","Ellipse 8","cx","50.839","cy","50.839","r","50.839","transform","translate(141 696)","fill","#dd0031"],["id","Group_47","data-name","Group 47","transform","translate(165.185 720.185)"],["id","Path_33","data-name","Path 33","d","M3.4,42.615a3.084,3.084,0,0,0,3.553,3.553,21.419,21.419,0,0,0,12.215-6.107L9.511,30.4A21.419,21.419,0,0,0,3.4,42.615Z","transform","translate(0.371 3.363)","fill","#fff"],["id","Path_34","data-name","Path 34","d","M53.3,3.221A3.09,3.09,0,0,0,50.081,0,48.227,48.227,0,0,0,18.322,13.437c-6-1.666-14.991-1.221-18.322,7.218A33.892,33.892,0,0,1,9.439,25.1l-.333.666a3.013,3.013,0,0,0,.555,3.553L23.985,43.641a2.9,2.9,0,0,0,3.553.555l.666-.333A33.892,33.892,0,0,1,32.647,53.3c8.55-3.664,8.884-12.326,7.218-18.322A48.227,48.227,0,0,0,53.3,3.221ZM34.424,9.772a6.439,6.439,0,1,1,9.106,9.106,6.368,6.368,0,0,1-9.106,0A6.467,6.467,0,0,1,34.424,9.772Z","transform","translate(0 0.005)","fill","#fff"],["id","rocket-smoke","xmlns","http://www.w3.org/2000/svg","width","516.119","height","1083.632","viewBox","0 0 516.119 1083.632"],["id","Path_40","data-name","Path 40","d","M644.6,141S143.02,215.537,147.049,870.207s342.774,201.755,342.774,201.755S404.659,847.213,388.815,762.2c-27.116-145.51-11.551-384.124,271.9-609.1C671.15,139.365,644.6,141,644.6,141Z","transform","translate(-147.025 -140.939)","fill","#f5f5f5"],[1,"card-container"],["target","_blank","rel","noopener","href","https://angular.io/tutorial",1,"card"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24",1,"material-icons"],["d","M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["target","_blank","rel","noopener","href","https://angular.io/cli",1,"card"],["d","M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"],["target","_blank","rel","noopener","href","https://material.angular.io",1,"card"],["xmlns","http://www.w3.org/2000/svg","width","21.813","height","23.453","viewBox","0 0 179.2 192.7",2,"margin-right","8px"],["fill","#ffa726","d","M89.4 0 0 32l13.5 118.4 75.9 42.3 76-42.3L179.2 32 89.4 0z"],["fill","#fb8c00","d","M89.4 0v192.7l76-42.3L179.2 32 89.4 0z"],["fill","#ffe0b2","d","m102.9 146.3-63.3-30.5 36.3-22.4 63.7 30.6-36.7 22.3z"],["fill","#fff3e0","d","M102.9 122.8 39.6 92.2l36.3-22.3 63.7 30.6-36.7 22.3z"],["fill","#fff","d","M102.9 99.3 39.6 68.7l36.3-22.4 63.7 30.6-36.7 22.4z"],["target","_blank","rel","noopener","href","https://blog.angular.io/",1,"card"],["d","M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"],["target","_blank","rel","noopener","href","https://angular.io/devtools/",1,"card"],["xmlns","http://www.w3.org/2000/svg","enable-background","new 0 0 24 24","height","24px","viewBox","0 0 24 24","width","24px","fill","#000000",1,"material-icons"],["fill","none","height","24","width","24"],["d","M14.73,13.31C15.52,12.24,16,10.93,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5C3,13.09,5.91,16,9.5,16 c1.43,0,2.74-0.48,3.81-1.27L19.59,21L21,19.59L14.73,13.31z M9.5,14C7.01,14,5,11.99,5,9.5S7.01,5,9.5,5S14,7.01,14,9.5 S11.99,14,9.5,14z"],["points","10.29,8.44 9.5,6 8.71,8.44 6.25,8.44 8.26,10.03 7.49,12.5 9.5,10.97 11.51,12.5 10.74,10.03 12.75,8.44"],["type","hidden"],["selection",""],["tabindex","0",1,"card","card-small",3,"click"],["d","M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"],[1,"terminal",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],["title","Find a Local Meetup","href","https://www.meetup.com/find/?keywords=angular","target","_blank","rel","noopener",1,"circle-link"],["xmlns","http://www.w3.org/2000/svg","width","24.607","height","23.447","viewBox","0 0 24.607 23.447"],["id","logo--mSwarm","d","M21.221,14.95A4.393,4.393,0,0,1,17.6,19.281a4.452,4.452,0,0,1-.8.069c-.09,0-.125.035-.154.117a2.939,2.939,0,0,1-2.506,2.091,2.868,2.868,0,0,1-2.248-.624.168.168,0,0,0-.245-.005,3.926,3.926,0,0,1-2.589.741,4.015,4.015,0,0,1-3.7-3.347,2.7,2.7,0,0,1-.043-.38c0-.106-.042-.146-.143-.166a3.524,3.524,0,0,1-1.516-.69A3.623,3.623,0,0,1,2.23,14.557a3.66,3.66,0,0,1,1.077-3.085.138.138,0,0,0,.026-.2,3.348,3.348,0,0,1-.451-1.821,3.46,3.46,0,0,1,2.749-3.28.44.44,0,0,0,.355-.281,5.072,5.072,0,0,1,3.863-3,5.028,5.028,0,0,1,3.555.666.31.31,0,0,0,.271.03A4.5,4.5,0,0,1,18.3,4.7a4.4,4.4,0,0,1,1.334,2.751,3.658,3.658,0,0,1,.022.706.131.131,0,0,0,.1.157,2.432,2.432,0,0,1,1.574,1.645,2.464,2.464,0,0,1-.7,2.616c-.065.064-.051.1-.014.166A4.321,4.321,0,0,1,21.221,14.95ZM13.4,14.607a2.09,2.09,0,0,0,1.409,1.982,4.7,4.7,0,0,0,1.275.221,1.807,1.807,0,0,0,.9-.151.542.542,0,0,0,.321-.545.558.558,0,0,0-.359-.534,1.2,1.2,0,0,0-.254-.078c-.262-.047-.526-.086-.787-.138a.674.674,0,0,1-.617-.75,3.394,3.394,0,0,1,.218-1.109c.217-.658.509-1.286.79-1.918a15.609,15.609,0,0,0,.745-1.86,1.95,1.95,0,0,0,.06-1.073,1.286,1.286,0,0,0-1.051-1.033,1.977,1.977,0,0,0-1.521.2.339.339,0,0,1-.446-.042c-.1-.092-.2-.189-.307-.284a1.214,1.214,0,0,0-1.643-.061,7.563,7.563,0,0,1-.614.512A.588.588,0,0,1,10.883,8c-.215-.115-.437-.215-.659-.316a2.153,2.153,0,0,0-.695-.248A2.091,2.091,0,0,0,7.541,8.562a9.915,9.915,0,0,0-.405.986c-.559,1.545-1.015,3.123-1.487,4.7a1.528,1.528,0,0,0,.634,1.777,1.755,1.755,0,0,0,1.5.211,1.35,1.35,0,0,0,.824-.858c.543-1.281,1.032-2.584,1.55-3.875.142-.355.28-.712.432-1.064a.548.548,0,0,1,.851-.24.622.622,0,0,1,.185.539,2.161,2.161,0,0,1-.181.621c-.337.852-.68,1.7-1.018,2.552a2.564,2.564,0,0,0-.173.528.624.624,0,0,0,.333.71,1.073,1.073,0,0,0,.814.034,1.22,1.22,0,0,0,.657-.655q.758-1.488,1.511-2.978.35-.687.709-1.37a1.073,1.073,0,0,1,.357-.434.43.43,0,0,1,.463-.016.373.373,0,0,1,.153.387.7.7,0,0,1-.057.236c-.065.157-.127.316-.2.469-.42.883-.846,1.763-1.262,2.648A2.463,2.463,0,0,0,13.4,14.607Zm5.888,6.508a1.09,1.09,0,0,0-2.179.006,1.09,1.09,0,0,0,2.179-.006ZM1.028,12.139a1.038,1.038,0,1,0,.01-2.075,1.038,1.038,0,0,0-.01,2.075ZM13.782.528a1.027,1.027,0,1,0-.011,2.055A1.027,1.027,0,0,0,13.782.528ZM22.21,6.95a.882.882,0,0,0-1.763.011A.882.882,0,0,0,22.21,6.95ZM4.153,4.439a.785.785,0,1,0,.787-.78A.766.766,0,0,0,4.153,4.439Zm8.221,18.22a.676.676,0,1,0-.677.666A.671.671,0,0,0,12.374,22.658ZM22.872,12.2a.674.674,0,0,0-.665.665.656.656,0,0,0,.655.643.634.634,0,0,0,.655-.644A.654.654,0,0,0,22.872,12.2ZM7.171-.123A.546.546,0,0,0,6.613.43a.553.553,0,1,0,1.106,0A.539.539,0,0,0,7.171-.123ZM24.119,9.234a.507.507,0,0,0-.493.488.494.494,0,0,0,.494.494.48.48,0,0,0,.487-.483A.491.491,0,0,0,24.119,9.234Zm-19.454,9.7a.5.5,0,0,0-.488-.488.491.491,0,0,0-.487.5.483.483,0,0,0,.491.479A.49.49,0,0,0,4.665,18.936Z","transform","translate(0 0.123)","fill","#f64060"],["title","Join the Conversation on Discord","href","https://discord.gg/angular","target","_blank","rel","noopener",1,"circle-link"],["xmlns","http://www.w3.org/2000/svg","width","26","height","26","viewBox","0 0 245 240"],["d","M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zM140.9 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z"],["d","M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3-18.5 12.8 11.9 12.1 11.2 21.5 19V40.6c0-11.4-9.2-20.6-20.5-20.6zm-38.6 130.6s-3.6-4.3-6.6-8.1c13.1-3.7 18.1-11.9 18.1-11.9-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.5-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.7-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.3-1.8-1-2.8-1.7-2.8-1.7s4.8 8 17.5 11.8c-3 3.8-6.7 8.3-6.7 8.3-22.1-.7-30.5-15.2-30.5-15.2 0-32.2 14.4-58.3 14.4-58.3 14.4-10.8 28.1-10.5 28.1-10.5l1 1.2c-18 5.2-26.3 13.1-26.3 13.1s2.2-1.2 5.9-2.9c10.7-4.7 19.2-6 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.6 0 0-7.9-7.5-24.9-12.7l1.4-1.6s13.7-.3 28.1 10.5c0 0 14.4 26.1 14.4 58.3 0 0-8.5 14.5-30.6 15.2z"],["href","https://github.com/angular/angular","target","_blank","rel","noopener"],[1,"github-star-badge"],["d","M0 0h24v24H0z","fill","none"],["d","M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z","fill","#1976d2"],["id","clouds","xmlns","http://www.w3.org/2000/svg","width","2611.084","height","485.677","viewBox","0 0 2611.084 485.677"],["id","Path_39","data-name","Path 39","d","M2379.709,863.793c10-93-77-171-168-149-52-114-225-105-264,15-75,3-140,59-152,133-30,2.83-66.725,9.829-93.5,26.25-26.771-16.421-63.5-23.42-93.5-26.25-12-74-77-130-152-133-39-120-212-129-264-15-54.084-13.075-106.753,9.173-138.488,48.9-31.734-39.726-84.4-61.974-138.487-48.9-52-114-225-105-264,15a162.027,162.027,0,0,0-103.147,43.044c-30.633-45.365-87.1-72.091-145.206-58.044-52-114-225-105-264,15-75,3-140,59-152,133-53,5-127,23-130,83-2,42,35,72,70,86,49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33,61.112,8.015,113.854-5.72,150.492-29.764a165.62,165.62,0,0,0,110.861-3.236c47,94,178,113,251,33,31.385,4.116,60.563,2.495,86.487-3.311,25.924,5.806,55.1,7.427,86.488,3.311,73,80,204,61,251-33a165.625,165.625,0,0,0,120,0c51,13,108,15,157-5a147.188,147.188,0,0,0,33.5-18.694,147.217,147.217,0,0,0,33.5,18.694c49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33C2446.709,1093.793,2554.709,922.793,2379.709,863.793Z","transform","translate(142.69 -634.312)","fill","#eee"]],template:function(n,r){if(1&n){const i=function B1(){return T()}();M(0,"div",0),he(1,"img",1),M(2,"span"),ge(3,"Welcome"),V(),he(4,"div",2),M(5,"a",3),Me(),M(6,"svg",4),he(7,"rect",5)(8,"path",6),V()(),ke(),M(9,"a",7),Me(),M(10,"svg",8),he(11,"path",9)(12,"path",10),V()()(),ke(),M(13,"div",11)(14,"div",12),Me(),M(15,"svg",13)(16,"title"),ge(17,"Rocket Ship"),V(),M(18,"g",14),he(19,"circle",15),M(20,"g",16),he(21,"path",17)(22,"path",18),V()()(),ke(),M(23,"span"),ge(24),V(),Me(),M(25,"svg",19)(26,"title"),ge(27,"Rocket Ship Smoke"),V(),he(28,"path",20),V()(),ke(),M(29,"h2"),ge(30,"Resources"),V(),M(31,"p"),ge(32,"Here are some links to help you get started:"),V(),M(33,"div",21)(34,"a",22),Me(),M(35,"svg",23),he(36,"path",24),V(),ke(),M(37,"span"),ge(38,"Learn Angular"),V(),Me(),M(39,"svg",23),he(40,"path",25),V()(),ke(),M(41,"a",26),Me(),M(42,"svg",23),he(43,"path",27),V(),ke(),M(44,"span"),ge(45,"CLI Documentation"),V(),Me(),M(46,"svg",23),he(47,"path",25),V()(),ke(),M(48,"a",28),Me(),M(49,"svg",29),he(50,"path",30)(51,"path",31)(52,"path",32)(53,"path",33)(54,"path",34),V(),ke(),M(55,"span"),ge(56,"Angular Material"),V(),Me(),M(57,"svg",23),he(58,"path",25),V()(),ke(),M(59,"a",35),Me(),M(60,"svg",23),he(61,"path",36),V(),ke(),M(62,"span"),ge(63,"Angular Blog"),V(),Me(),M(64,"svg",23),he(65,"path",25),V()(),ke(),M(66,"a",37),Me(),M(67,"svg",38)(68,"g"),he(69,"rect",39),V(),M(70,"g")(71,"g"),he(72,"path",40)(73,"polygon",41),V()()(),ke(),M(74,"span"),ge(75,"Angular DevTools"),V(),Me(),M(76,"svg",23),he(77,"path",25),V()()(),ke(),M(78,"h2"),ge(79,"Next Steps"),V(),M(80,"p"),ge(81,"What do you want to do next with your app?"),V(),he(82,"input",42,43),M(84,"div",21)(85,"button",44),qr("click",function(){return as(i),us(Ti(83).value="component")}),Me(),M(86,"svg",23),he(87,"path",45),V(),ke(),M(88,"span"),ge(89,"New Component"),V()(),M(90,"button",44),qr("click",function(){return as(i),us(Ti(83).value="material")}),Me(),M(91,"svg",23),he(92,"path",45),V(),ke(),M(93,"span"),ge(94,"Angular Material"),V()(),M(95,"button",44),qr("click",function(){return as(i),us(Ti(83).value="pwa")}),Me(),M(96,"svg",23),he(97,"path",45),V(),ke(),M(98,"span"),ge(99,"Add PWA Support"),V()(),M(100,"button",44),qr("click",function(){return as(i),us(Ti(83).value="dependency")}),Me(),M(101,"svg",23),he(102,"path",45),V(),ke(),M(103,"span"),ge(104,"Add Dependency"),V()(),M(105,"button",44),qr("click",function(){return as(i),us(Ti(83).value="test")}),Me(),M(106,"svg",23),he(107,"path",45),V(),ke(),M(108,"span"),ge(109,"Run and Watch Tests"),V()(),M(110,"button",44),qr("click",function(){return as(i),us(Ti(83).value="build")}),Me(),M(111,"svg",23),he(112,"path",45),V(),ke(),M(113,"span"),ge(114,"Build for Production"),V()()(),M(115,"div",46),gs(116,BW,2,0,"pre",47),gs(117,jW,2,0,"pre",48),gs(118,GW,2,0,"pre",48),gs(119,HW,2,0,"pre",48),gs(120,zW,2,0,"pre",48),gs(121,qW,2,0,"pre",48),V(),M(122,"div",21)(123,"a",49),Me(),M(124,"svg",50)(125,"title"),ge(126,"Meetup Logo"),V(),he(127,"path",51),V()(),ke(),M(128,"a",52),Me(),M(129,"svg",53)(130,"title"),ge(131,"Discord Logo"),V(),he(132,"path",54)(133,"path",55),V()()(),ke(),M(134,"footer"),ge(135," Love Angular?\xa0 "),M(136,"a",56),ge(137," Give our repo a star. "),M(138,"div",57),Me(),M(139,"svg",23),he(140,"path",58)(141,"path",59),V(),ge(142," Star "),V()(),ke(),M(143,"a",56),Me(),M(144,"svg",23),he(145,"path",60)(146,"path",58),V()()(),M(147,"svg",61)(148,"title"),ge(149,"Gray Clouds Background"),V(),he(150,"path",62),V()(),ke(),he(151,"router-outlet")}if(2&n){const i=Ti(83);Ei(24),Vd("",r.title," app is running!"),Ei(91),bi("ngSwitch",i.value),Ei(2),bi("ngSwitchCase","material"),Ei(1),bi("ngSwitchCase","pwa"),Ei(1),bi("ngSwitchCase","dependency"),Ei(1),bi("ngSwitchCase","test"),Ei(1),bi("ngSwitchCase","build")}},dependencies:[hh,KR,QR,w_],styles:['[_nghost-%COMP%] {\n    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n    font-size: 14px;\n    color: #333;\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%] {\n    margin: 8px 0;\n  }\n\n  p[_ngcontent-%COMP%] {\n    margin: 0;\n  }\n\n  .spacer[_ngcontent-%COMP%] {\n    flex: 1;\n  }\n\n  .toolbar[_ngcontent-%COMP%] {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    height: 60px;\n    display: flex;\n    align-items: center;\n    background-color: #1976d2;\n    color: white;\n    font-weight: 600;\n  }\n\n  .toolbar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%] {\n    margin: 0 16px;\n  }\n\n  .toolbar[_ngcontent-%COMP%]   #twitter-logo[_ngcontent-%COMP%] {\n    height: 40px;\n    margin: 0 8px;\n  }\n\n  .toolbar[_ngcontent-%COMP%]   #youtube-logo[_ngcontent-%COMP%] {\n    height: 40px;\n    margin: 0 16px;\n  }\n\n  .toolbar[_ngcontent-%COMP%]   #twitter-logo[_ngcontent-%COMP%]:hover, .toolbar[_ngcontent-%COMP%]   #youtube-logo[_ngcontent-%COMP%]:hover {\n    opacity: 0.8;\n  }\n\n  .content[_ngcontent-%COMP%] {\n    display: flex;\n    margin: 82px auto 32px;\n    padding: 0 16px;\n    max-width: 960px;\n    flex-direction: column;\n    align-items: center;\n  }\n\n  svg.material-icons[_ngcontent-%COMP%] {\n    height: 24px;\n    width: auto;\n  }\n\n  svg.material-icons[_ngcontent-%COMP%]:not(:last-child) {\n    margin-right: 8px;\n  }\n\n  .card[_ngcontent-%COMP%]   svg.material-icons[_ngcontent-%COMP%]   path[_ngcontent-%COMP%] {\n    fill: #888;\n  }\n\n  .card-container[_ngcontent-%COMP%] {\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: center;\n    margin-top: 16px;\n  }\n\n  .card[_ngcontent-%COMP%] {\n    all: unset;\n    border-radius: 4px;\n    border: 1px solid #eee;\n    background-color: #fafafa;\n    height: 40px;\n    width: 200px;\n    margin: 0 8px 16px;\n    padding: 16px;\n    display: flex;\n    flex-direction: row;\n    justify-content: center;\n    align-items: center;\n    transition: all 0.2s ease-in-out;\n    line-height: 24px;\n  }\n\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(:last-child) {\n    margin-right: 0;\n  }\n\n  .card.card-small[_ngcontent-%COMP%] {\n    height: 16px;\n    width: 168px;\n  }\n\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card) {\n    cursor: pointer;\n  }\n\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card):hover {\n    transform: translateY(-3px);\n    box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);\n  }\n\n  .card-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]:not(.highlight-card):hover   .material-icons[_ngcontent-%COMP%]   path[_ngcontent-%COMP%] {\n    fill: rgb(105, 103, 103);\n  }\n\n  .card.highlight-card[_ngcontent-%COMP%] {\n    background-color: #1976d2;\n    color: white;\n    font-weight: 600;\n    border: none;\n    width: auto;\n    min-width: 30%;\n    position: relative;\n  }\n\n  .card.card.highlight-card[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\n    margin-left: 60px;\n  }\n\n  svg#rocket[_ngcontent-%COMP%] {\n    width: 80px;\n    position: absolute;\n    left: -10px;\n    top: -24px;\n  }\n\n  svg#rocket-smoke[_ngcontent-%COMP%] {\n    height: calc(100vh - 95px);\n    position: absolute;\n    top: 10px;\n    right: 180px;\n    z-index: -10;\n  }\n\n  a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:hover {\n    color: #1976d2;\n    text-decoration: none;\n  }\n\n  a[_ngcontent-%COMP%]:hover {\n    color: #125699;\n  }\n\n  .terminal[_ngcontent-%COMP%] {\n    position: relative;\n    width: 80%;\n    max-width: 600px;\n    border-radius: 6px;\n    padding-top: 45px;\n    margin-top: 8px;\n    overflow: hidden;\n    background-color: rgb(15, 15, 16);\n  }\n\n  .terminal[_ngcontent-%COMP%]::before {\n    content: "\\2022 \\2022 \\2022";\n    position: absolute;\n    top: 0;\n    left: 0;\n    height: 4px;\n    background: rgb(58, 58, 58);\n    color: #c2c3c4;\n    width: 100%;\n    font-size: 2rem;\n    line-height: 0;\n    padding: 14px 0;\n    text-indent: 4px;\n  }\n\n  .terminal[_ngcontent-%COMP%]   pre[_ngcontent-%COMP%] {\n    font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;\n    color: white;\n    padding: 0 1rem 1rem;\n    margin: 0;\n  }\n\n  .circle-link[_ngcontent-%COMP%] {\n    height: 40px;\n    width: 40px;\n    border-radius: 40px;\n    margin: 8px;\n    background-color: white;\n    border: 1px solid #eeeeee;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    cursor: pointer;\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n    transition: 1s ease-out;\n  }\n\n  .circle-link[_ngcontent-%COMP%]:hover {\n    transform: translateY(-0.25rem);\n    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);\n  }\n\n  footer[_ngcontent-%COMP%] {\n    margin-top: 8px;\n    display: flex;\n    align-items: center;\n    line-height: 20px;\n  }\n\n  footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n  }\n\n  .github-star-badge[_ngcontent-%COMP%] {\n    color: #24292e;\n    display: flex;\n    align-items: center;\n    font-size: 12px;\n    padding: 3px 10px;\n    border: 1px solid rgba(27,31,35,.2);\n    border-radius: 3px;\n    background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);\n    margin-left: 4px;\n    font-weight: 600;\n  }\n\n  .github-star-badge[_ngcontent-%COMP%]:hover {\n    background-image: linear-gradient(-180deg,#f0f3f6,#e6ebf1 90%);\n    border-color: rgba(27,31,35,.35);\n    background-position: -.5em;\n  }\n\n  .github-star-badge[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%] {\n    height: 16px;\n    width: 16px;\n    margin-right: 4px;\n  }\n\n  svg#clouds[_ngcontent-%COMP%] {\n    position: fixed;\n    bottom: -160px;\n    left: -230px;\n    z-index: -10;\n    width: 1920px;\n  }\n\n  \n  @media screen and (max-width: 767px) {\n    .card-container[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%]:not(.circle-link), .terminal[_ngcontent-%COMP%] {\n      width: 100%;\n    }\n\n    .card[_ngcontent-%COMP%]:not(.highlight-card) {\n      height: 16px;\n      margin: 8px 0;\n    }\n\n    .card.highlight-card[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\n      margin-left: 72px;\n    }\n\n    svg#rocket-smoke[_ngcontent-%COMP%] {\n      right: 120px;\n      transform: rotate(-5deg);\n    }\n  }\n\n  @media screen and (max-width: 575px) {\n    svg#rocket-smoke[_ngcontent-%COMP%] {\n      display: none;\n      visibility: hidden;\n    }\n  }']}),t})();function Lk(t,e,n,r,i,s,o){try{var a=t[s](o),u=a.value}catch(c){return void n(c)}a.done?e(u):Promise.resolve(u).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function o(u){Lk(s,r,i,o,a,"next",u)}function a(u){Lk(s,r,i,o,a,"throw",u)}o(void 0)})}}const Fk=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},O_={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,a=o?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0;let h=(15&a)<<2|c>>6,f=63&c;u||(f=64,o||(h=64)),r.push(n[s>>2],n[(3&s)<<4|a>>4],n[h],n[f])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Fk(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){const u=((7&i)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(1023&u))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0;++i;const c=i<t.length?n[t.charAt(i)]:64;++i;const d=i<t.length?n[t.charAt(i)]:64;if(++i,null==s||null==a||null==c||null==d)throw new XW;r.push(s<<2|a>>4),64!==c&&(r.push(a<<4&240|c>>2),64!==d&&r.push(c<<6&192|d))}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class XW extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const $h=function(t){return function(t){const e=Fk(t);return O_.encodeByteArray(e,!0)}(t).replace(/\./g,"")},Bh=function(t){try{return O_.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},jh=()=>{try{return function e9(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const t=process.env.__FIREBASE_DEFAULTS__;return t?JSON.parse(t):void 0})()||(()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Bh(t[1]);return e&&JSON.parse(e)})()}catch(t){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`)}},Vk=t=>{const e=(t=>{var e,n;return null===(n=null===(e=jh())||void 0===e?void 0:e.emulatorHosts)||void 0===n?void 0:n[t]})(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return"["===e[0]?[e.substring(1,n-1),r]:[e.substring(0,n),r]},s9=()=>{var t;return null===(t=jh())||void 0===t?void 0:t.config};class Gh{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(n):e(n,r))}}}function $k(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[$h(JSON.stringify({alg:"none",type:"JWT"})),$h(JSON.stringify(o)),""].join(".")}function kn(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function L_(){const t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}function Ds(){try{return"object"==typeof indexedDB}catch{return!1}}function dc(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e((null===(s=i.error)||void 0===s?void 0:s.message)||"")}}catch(n){e(n)}})}function F_(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}class zn extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,zn.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Tr.prototype.create)}}class Tr{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?function d9(t,e){return t.replace(h9,(n,r)=>{const i=e[r];return null!=i?String(i):`<${r}?>`})}(s,r):"Error";return new zn(i,`${this.serviceName}: ${o} (${i}).`,r)}}const h9=/\{\$([^}]+)}/g;function U_(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(jk(s)&&jk(o)){if(!U_(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function jk(t){return null!==t&&"object"==typeof t}function Gk(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}class p9{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(void 0===e&&void 0===n&&void 0===r)throw new Error("Missing Observer.");i=function g9(t,e){if("object"!=typeof t||null===t)return!1;for(const n of e)if(n in t&&"function"==typeof t[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:n,complete:r},void 0===i.next&&(i.next=V_),void 0===i.error&&(i.error=V_),void 0===i.complete&&(i.complete=V_);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){void 0===this.observers||void 0===this.observers[e]||(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function V_(){}const m9=1e3,y9=2,_9=144e5,v9=.5;function B_(t,e=m9,n=y9){const r=e*Math.pow(n,t),i=Math.round(v9*r*(Math.random()-.5)*2);return Math.min(_9,r+i)}function Cs(t){return t&&t._delegate?t._delegate:t}class Rt{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const Ss="[DEFAULT]";class I9{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new Gh;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e?.identifier),i=null!==(n=e?.optional)&&void 0!==n&&n;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function T9(t){return"EAGER"===t.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:Ss})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Ss){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){var e=this;return I(function*(){const n=Array.from(e.instances.values());yield Promise.all([...n.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...n.filter(r=>"_delete"in r).map(r=>r._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(e=Ss){return this.instances.has(e)}getOptions(e=Ss){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(s)&&o.resolve(i);return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=null!==(r=this.onInitCallbacks.get(i))&&void 0!==r?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(t=e,t===Ss?void 0:t),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}var t;return r||null}normalizeInstanceIdentifier(e=Ss){return this.component?this.component.multipleInstances?e:Ss:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class b9{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new I9(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}const j_=[];var me=(()=>{return(t=me||(me={}))[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",me;var t})();const Hk={debug:me.DEBUG,verbose:me.VERBOSE,info:me.INFO,warn:me.WARN,error:me.ERROR,silent:me.SILENT},D9=me.INFO,C9={[me.DEBUG]:"log",[me.VERBOSE]:"log",[me.INFO]:"info",[me.WARN]:"warn",[me.ERROR]:"error"},S9=(t,e,...n)=>{if(e<t.logLevel)return;const r=(new Date).toISOString(),i=C9[e];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);console[i](`[${r}]  ${t.name}:`,...n)};class ha{constructor(e){this.name=e,this._logLevel=D9,this._logHandler=S9,this._userLogHandler=null,j_.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in me))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?Hk[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,me.DEBUG,...e),this._logHandler(this,me.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,me.VERBOSE,...e),this._logHandler(this,me.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,me.INFO,...e),this._logHandler(this,me.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,me.WARN,...e),this._logHandler(this,me.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,me.ERROR,...e),this._logHandler(this,me.ERROR,...e)}}const A9=(t,e)=>e.some(n=>t instanceof n);let zk,qk;const Wk=new WeakMap,G_=new WeakMap,Kk=new WeakMap,H_=new WeakMap,z_=new WeakMap;let q_={get(t,e,n){if(t instanceof IDBTransaction){if("done"===e)return G_.get(t);if("objectStoreNames"===e)return t.objectStoreNames||Kk.get(t);if("store"===e)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Jr(t[e])},set:(t,e,n)=>(t[e]=n,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function O9(t){return"function"==typeof t?function P9(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function R9(){return qk||(qk=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(t)?function(...e){return t.apply(W_(this),e),Jr(Wk.get(this))}:function(...e){return Jr(t.apply(W_(this),e))}:function(e,...n){const r=t.call(W_(this),e,...n);return Kk.set(r,e.sort?e.sort():[e]),Jr(r)}}(t):(t instanceof IDBTransaction&&function k9(t){if(G_.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});G_.set(t,e)}(t),A9(t,function x9(){return zk||(zk=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(t,q_):t)}function Jr(t){if(t instanceof IDBRequest)return function M9(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Jr(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Wk.set(n,t)}).catch(()=>{}),z_.set(e,t),e}(t);if(H_.has(t))return H_.get(t);const e=O9(t);return e!==t&&(H_.set(t,e),z_.set(e,t)),e}const W_=t=>z_.get(t);function zh(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Jr(o);return r&&o.addEventListener("upgradeneeded",u=>{r(Jr(o.result),u.oldVersion,u.newVersion,Jr(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",()=>i())}).catch(()=>{}),a}function K_(t,{blocked:e}={}){const n=indexedDB.deleteDatabase(t);return e&&n.addEventListener("blocked",()=>e()),Jr(n).then(()=>{})}const L9=["get","getKey","getAll","getAllKeys","count"],F9=["put","add","delete","clear"],Q_=new Map;function Qk(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(Q_.get(e))return Q_.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=F9.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!L9.includes(n))return;const s=function(){var o=I(function*(a,...u){const c=this.transaction(a,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(u.shift())),(yield Promise.all([l[n](...u),i&&c.done]))[0]});return function(u){return o.apply(this,arguments)}}();return Q_.set(e,s),s}!function N9(t){q_=t(q_)}(t=>({...t,get:(e,n,r)=>Qk(e,n)||t.get(e,n,r),has:(e,n)=>!!Qk(e,n)||t.has(e,n)}));class U9{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(function V9(t){return"VERSION"===t.getComponent()?.type}(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}return null}).filter(n=>n).join(" ")}}const Y_="@firebase/app",As=new ha("@firebase/app"),qh="[DEFAULT]",dK={[Y_]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},xs=new Map,Wh=new Map;function hK(t,e){try{t.container.addComponent(e)}catch(n){As.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function jt(t){const e=t.name;if(Wh.has(e))return As.debug(`There were multiple attempts to register component ${e}.`),!1;Wh.set(e,t);for(const n of xs.values())hK(n,t);return!0}function hc(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}const ei=new Tr("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class pK{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Rt("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ei.create("app-deleted",{appName:this._name})}}const fc="9.18.0";function Xk(t,e={}){let n=t;"object"!=typeof e&&(e={name:e});const r=Object.assign({name:qh,automaticDataCollectionEnabled:!1},e),i=r.name;if("string"!=typeof i||!i)throw ei.create("bad-app-name",{appName:String(i)});if(n||(n=s9()),!n)throw ei.create("no-options");const s=xs.get(i);if(s){if(U_(n,s.options)&&U_(r,s.config))return s;throw ei.create("duplicate-app",{appName:i})}const o=new b9(i);for(const u of Wh.values())o.addComponent(u);const a=new pK(n,r,o);return xs.set(i,a),a}function X_(t=qh){const e=xs.get(t);if(!e&&t===qh)return Xk();if(!e)throw ei.create("no-app",{appName:t});return e}function Zk(){return Array.from(xs.values())}function Le(t,e,n){var r;let i=null!==(r=dK[t])&&void 0!==r?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];return s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),void As.warn(a.join(" "))}jt(new Rt(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}const gK="firebase-heartbeat-database",mK=1,pc="firebase-heartbeat-store";let J_=null;function Jk(){return J_||(J_=zh(gK,mK,{upgrade:(t,e)=>{0===e&&t.createObjectStore(pc)}}).catch(t=>{throw ei.create("idb-open",{originalErrorMessage:t.message})})),J_}function ev(){return(ev=I(function*(t){try{return(yield Jk()).transaction(pc).objectStore(pc).get(tN(t))}catch(e){if(e instanceof zn)As.warn(e.message);else{const n=ei.create("idb-get",{originalErrorMessage:e?.message});As.warn(n.message)}}})).apply(this,arguments)}function eN(t,e){return tv.apply(this,arguments)}function tv(){return(tv=I(function*(t,e){try{const r=(yield Jk()).transaction(pc,"readwrite");return yield r.objectStore(pc).put(e,tN(t)),r.done}catch(n){if(n instanceof zn)As.warn(n.message);else{const r=ei.create("idb-set",{originalErrorMessage:n?.message});As.warn(r.message)}}})).apply(this,arguments)}function tN(t){return`${t.name}!${t.options.appId}`}class wK{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new EK(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){var e=this;return I(function*(){const r=e.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=nN();if(null===e._heartbeatsCache&&(e._heartbeatsCache=yield e._heartbeatsCachePromise),e._heartbeatsCache.lastSentHeartbeatDate!==i&&!e._heartbeatsCache.heartbeats.some(s=>s.date===i))return e._heartbeatsCache.heartbeats.push({date:i,agent:r}),e._heartbeatsCache.heartbeats=e._heartbeatsCache.heartbeats.filter(s=>{const o=new Date(s.date).valueOf();return Date.now()-o<=2592e6}),e._storage.overwrite(e._heartbeatsCache)})()}getHeartbeatsHeader(){var e=this;return I(function*(){if(null===e._heartbeatsCache&&(yield e._heartbeatsCachePromise),null===e._heartbeatsCache||0===e._heartbeatsCache.heartbeats.length)return"";const n=nN(),{heartbeatsToSend:r,unsentEntries:i}=function IK(t,e=1024){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),rN(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),rN(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(e._heartbeatsCache.heartbeats),s=$h(JSON.stringify({version:2,heartbeats:r}));return e._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(e._heartbeatsCache.heartbeats=i,yield e._storage.overwrite(e._heartbeatsCache)):(e._heartbeatsCache.heartbeats=[],e._storage.overwrite(e._heartbeatsCache)),s})()}}function nN(){return(new Date).toISOString().substring(0,10)}class EK{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return I(function*(){return!!Ds()&&dc().then(()=>!0).catch(()=>!1)})()}read(){var e=this;return I(function*(){return(yield e._canUseIndexedDBPromise)&&(yield function yK(t){return ev.apply(this,arguments)}(e.app))||{heartbeats:[]}})()}overwrite(e){var n=this;return I(function*(){var r;if(yield n._canUseIndexedDBPromise){const s=yield n.read();return eN(n.app,{lastSentHeartbeatDate:null!==(r=e.lastSentHeartbeatDate)&&void 0!==r?r:s.lastSentHeartbeatDate,heartbeats:e.heartbeats})}})()}add(e){var n=this;return I(function*(){var r;if(yield n._canUseIndexedDBPromise){const s=yield n.read();return eN(n.app,{lastSentHeartbeatDate:null!==(r=e.lastSentHeartbeatDate)&&void 0!==r?r:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...e.heartbeats]})}})()}}function rN(t){return $h(JSON.stringify({version:2,heartbeats:t})).length}!function TK(t){jt(new Rt("platform-logger",e=>new U9(e),"PRIVATE")),jt(new Rt("heartbeat",e=>new wK(e),"PRIVATE")),Le(Y_,"0.9.5",t),Le(Y_,"0.9.5","esm2017"),Le("fire-js","")}(""),Le("firebase","9.18.0","app");const iN="@firebase/installations",nv="0.6.4",sN=1e4,oN=`w:${nv}`,aN="FIS_v2",CK="https://firebaseinstallations.googleapis.com/v1",SK=36e5,ti=new Tr("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 uN(t){return t instanceof zn&&t.code.includes("request-failed")}function rv({projectId:t}){return`${CK}/projects/${t}/installations`}function cN(t){return{token:t.token,requestStatus:2,expiresIn:MK(t.expiresIn),creationTime:Date.now()}}function iv(t,e){return sv.apply(this,arguments)}function sv(){return(sv=I(function*(t,e){const r=(yield e.json()).error;return ti.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})})).apply(this,arguments)}function lN({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function ov(t){return av.apply(this,arguments)}function av(){return(av=I(function*(t){const e=yield t();return e.status>=500&&e.status<600?t():e})).apply(this,arguments)}function MK(t){return Number(t.replace("s","000"))}function uv(){return(uv=I(function*({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const r=rv(t),i=lN(t),s=e.getImmediate({optional:!0});if(s){const c=yield s.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const a={method:"POST",headers:i,body:JSON.stringify({fid:n,authVersion:aN,appId:t.appId,sdkVersion:oN})},u=yield ov(()=>fetch(r,a));if(u.ok){const c=yield u.json();return{fid:c.fid||n,registrationStatus:2,refreshToken:c.refreshToken,authToken:cN(c.authToken)}}throw yield iv("Create Installation",u)})).apply(this,arguments)}function hN(t){return new Promise(e=>{setTimeout(e,t)})}const OK=/^[cdef][\w-]{21}$/,cv="";function LK(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const n=function FK(t){return function PK(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}(t).substr(0,22)}(t);return OK.test(n)?n:cv}catch{return cv}}function fa(t){return`${t.appName}!${t.appId}`}const pa=new Map;function fN(t,e){const n=fa(t);pN(n,e),function $K(t,e){const n=function gN(){return!Rs&&"BroadcastChannel"in self&&(Rs=new BroadcastChannel("[Firebase] FID Change"),Rs.onmessage=t=>{pN(t.data.key,t.data.fid)}),Rs}();n&&n.postMessage({key:t,fid:e}),function mN(){0===pa.size&&Rs&&(Rs.close(),Rs=null)}()}(n,e)}function pN(t,e){const n=pa.get(t);if(n)for(const r of n)r(e)}let Rs=null;const BK="firebase-installations-database",jK=1,Ms="firebase-installations-store";let lv=null;function dv(){return lv||(lv=zh(BK,jK,{upgrade:(t,e)=>{0===e&&t.createObjectStore(Ms)}})),lv}function Kh(t,e){return hv.apply(this,arguments)}function hv(){return(hv=I(function*(t,e){const n=fa(t),i=(yield dv()).transaction(Ms,"readwrite"),s=i.objectStore(Ms),o=yield s.get(n);return yield s.put(e,n),yield i.done,(!o||o.fid!==e.fid)&&fN(t,e.fid),e})).apply(this,arguments)}function fv(t){return pv.apply(this,arguments)}function pv(){return(pv=I(function*(t){const e=fa(t),r=(yield dv()).transaction(Ms,"readwrite");yield r.objectStore(Ms).delete(e),yield r.done})).apply(this,arguments)}function gc(t,e){return gv.apply(this,arguments)}function gv(){return(gv=I(function*(t,e){const n=fa(t),i=(yield dv()).transaction(Ms,"readwrite"),s=i.objectStore(Ms),o=yield s.get(n),a=e(o);return void 0===a?yield s.delete(n):yield s.put(a,n),yield i.done,a&&(!o||o.fid!==a.fid)&&fN(t,a.fid),a})).apply(this,arguments)}function mv(t){return yv.apply(this,arguments)}function yv(){return yv=I(function*(t){let e;const n=yield gc(t.appConfig,r=>{const i=function GK(t){return _N(t||{fid:LK(),registrationStatus:0})}(r),s=function HK(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(ti.create("app-offline"))};const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=function zK(t,e){return _v.apply(this,arguments)}(t,n);return{installationEntry:n,registrationPromise:r}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:qK(t)}:{installationEntry:e}}(t,i);return e=s.registrationPromise,s.installationEntry});return n.fid===cv?{installationEntry:yield e}:{installationEntry:n,registrationPromise:e}}),yv.apply(this,arguments)}function _v(){return _v=I(function*(t,e){try{const n=yield function NK(t,e){return uv.apply(this,arguments)}(t,e);return Kh(t.appConfig,n)}catch(n){throw uN(n)&&409===n.customData.serverCode?yield fv(t.appConfig):yield Kh(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}),_v.apply(this,arguments)}function qK(t){return vv.apply(this,arguments)}function vv(){return(vv=I(function*(t){let e=yield yN(t.appConfig);for(;1===e.registrationStatus;)yield hN(100),e=yield yN(t.appConfig);if(0===e.registrationStatus){const{installationEntry:n,registrationPromise:r}=yield mv(t);return r||n}return e})).apply(this,arguments)}function yN(t){return gc(t,e=>{if(!e)throw ti.create("installation-not-found");return _N(e)})}function _N(t){return function WK(t){return 1===t.registrationStatus&&t.registrationTime+sN<Date.now()}(t)?{fid:t.fid,registrationStatus:0}:t}function wv(){return(wv=I(function*({appConfig:t,heartbeatServiceProvider:e},n){const r=function QK(t,{fid:e}){return`${rv(t)}/${e}/authTokens:generate`}(t,n),i=function dN(t,{refreshToken:e}){const n=lN(t);return n.append("Authorization",function kK(t){return`${aN} ${t}`}(e)),n}(t,n),s=e.getImmediate({optional:!0});if(s){const c=yield s.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const a={method:"POST",headers:i,body:JSON.stringify({installation:{sdkVersion:oN,appId:t.appId}})},u=yield ov(()=>fetch(r,a));if(u.ok)return cN(yield u.json());throw yield iv("Generate Auth Token",u)})).apply(this,arguments)}function Iv(t){return Ev.apply(this,arguments)}function Ev(){return Ev=I(function*(t,e=!1){let n;const r=yield gc(t.appConfig,s=>{if(!wN(s))throw ti.create("not-registered");const o=s.authToken;if(!e&&function ZK(t){return 2===t.requestStatus&&!function JK(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+SK}(t)}(o))return s;if(1===o.requestStatus)return n=function YK(t,e){return Tv.apply(this,arguments)}(t,e),s;{if(!navigator.onLine)throw ti.create("app-offline");const a=function eQ(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}(s);return n=function XK(t,e){return bv.apply(this,arguments)}(t,a),a}});return n?yield n:r.authToken}),Ev.apply(this,arguments)}function Tv(){return(Tv=I(function*(t,e){let n=yield vN(t.appConfig);for(;1===n.authToken.requestStatus;)yield hN(100),n=yield vN(t.appConfig);const r=n.authToken;return 0===r.requestStatus?Iv(t,e):r})).apply(this,arguments)}function vN(t){return gc(t,e=>{if(!wN(e))throw ti.create("not-registered");return function tQ(t){return 1===t.requestStatus&&t.requestTime+sN<Date.now()}(e.authToken)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}function bv(){return bv=I(function*(t,e){try{const n=yield function KK(t,e){return wv.apply(this,arguments)}(t,e),r=Object.assign(Object.assign({},e),{authToken:n});return yield Kh(t.appConfig,r),n}catch(n){if(!uN(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const r=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});yield Kh(t.appConfig,r)}else yield fv(t.appConfig);throw n}}),bv.apply(this,arguments)}function wN(t){return void 0!==t&&2===t.registrationStatus}function Dv(){return(Dv=I(function*(t){const e=t,{installationEntry:n,registrationPromise:r}=yield mv(e);return r?r.catch(console.error):Iv(e).catch(console.error),n.fid})).apply(this,arguments)}function Cv(){return Cv=I(function*(t,e=!1){const n=t;return yield function iQ(t){return Sv.apply(this,arguments)}(n),(yield Iv(n,e)).token}),Cv.apply(this,arguments)}function Sv(){return(Sv=I(function*(t){const{registrationPromise:e}=yield mv(t);e&&(yield e)})).apply(this,arguments)}function Rv(t){return ti.create("missing-app-config-values",{valueName:t})}const IN="installations",cQ=t=>{const e=t.getProvider("app").getImmediate(),n=function aQ(t){if(!t||!t.options)throw Rv("App Configuration");if(!t.name)throw Rv("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw Rv(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e);return{app:e,appConfig:n,heartbeatServiceProvider:hc(e,"heartbeat"),_delete:()=>Promise.resolve()}},lQ=t=>{const n=hc(t.getProvider("app").getImmediate(),IN).getImmediate();return{getId:()=>function nQ(t){return Dv.apply(this,arguments)}(n),getToken:i=>function rQ(t){return Cv.apply(this,arguments)}(n,i)}};(function dQ(){jt(new Rt(IN,cQ,"PUBLIC")),jt(new Rt("installations-internal",lQ,"PRIVATE"))})(),Le(iN,nv),Le(iN,nv,"esm2017");const Mv="@firebase/remote-config",pn=new Tr("remoteconfig","Remote Config",{"registration-window":"Undefined window object. This SDK only supports usage in a browser environment.","registration-project-id":"Undefined project identifier. Check Firebase app initialization.","registration-api-key":"Undefined API key. Check Firebase app initialization.","registration-app-id":"Undefined app identifier. Check Firebase app initialization.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}.","fetch-client-network":"Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-timeout":'The config fetch request timed out.  Configure timeout using "fetchTimeoutMillis" SDK setting.',"fetch-throttle":'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',"fetch-client-parse":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","indexed-db-unavailable":"Indexed DB is not supported by current browser"});class EQ{constructor(e,n,r,i){this.client=e,this.storage=n,this.storageCache=r,this.logger=i}isCachedDataFresh(e,n){if(!n)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;const r=Date.now()-n,i=r<=e;return this.logger.debug(`Config fetch cache check. Cache age millis: ${r}. Cache max age millis (minimumFetchIntervalMillis setting): ${e}. Is cache hit: ${i}.`),i}fetch(e){var n=this;return I(function*(){const[r,i]=yield Promise.all([n.storage.getLastSuccessfulFetchTimestampMillis(),n.storage.getLastSuccessfulFetchResponse()]);if(i&&n.isCachedDataFresh(e.cacheMaxAgeMillis,r))return i;e.eTag=i&&i.eTag;const s=yield n.client.fetch(e),o=[n.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];return 200===s.status&&o.push(n.storage.setLastSuccessfulFetchResponse(s)),yield Promise.all(o),s})()}}function TQ(t=navigator){return t.languages&&t.languages[0]||t.language}class bQ{constructor(e,n,r,i,s,o){this.firebaseInstallations=e,this.sdkVersion=n,this.namespace=r,this.projectId=i,this.apiKey=s,this.appId=o}fetch(e){var n=this;return I(function*(){const[r,i]=yield Promise.all([n.firebaseInstallations.getId(),n.firebaseInstallations.getToken()]),o=`${window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com"}/v1/projects/${n.projectId}/namespaces/${n.namespace}:fetch?key=${n.apiKey}`,a={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":e.eTag||"*"},u={sdk_version:n.sdkVersion,app_instance_id:r,app_instance_id_token:i,app_id:n.appId,language_code:TQ()},c={method:"POST",headers:a,body:JSON.stringify(u)},l=fetch(o,c),d=new Promise((v,E)=>{e.signal.addEventListener(()=>{const y=new Error("The operation was aborted.");y.name="AbortError",E(y)})});let h;try{yield Promise.race([l,d]),h=yield l}catch(v){let E="fetch-client-network";throw"AbortError"===v?.name&&(E="fetch-timeout"),pn.create(E,{originalErrorMessage:v?.message})}let f=h.status;const p=h.headers.get("ETag")||void 0;let g,m;if(200===h.status){let v;try{v=yield h.json()}catch(E){throw pn.create("fetch-client-parse",{originalErrorMessage:E?.message})}g=v.entries,m=v.state}if("INSTANCE_STATE_UNSPECIFIED"===m?f=500:"NO_CHANGE"===m?f=304:("NO_TEMPLATE"===m||"EMPTY_CONFIG"===m)&&(g={}),304!==f&&200!==f)throw pn.create("fetch-status",{httpStatus:f});return{status:f,eTag:p,config:g}})()}}class SQ{constructor(e,n){this.client=e,this.storage=n}fetch(e){var n=this;return I(function*(){const r=(yield n.storage.getThrottleMetadata())||{backoffCount:0,throttleEndTimeMillis:Date.now()};return n.attemptFetch(e,r)})()}attemptFetch(e,{throttleEndTimeMillis:n,backoffCount:r}){var i=this;return I(function*(){yield function DQ(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),s=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(s),r(pn.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}(e.signal,n);try{const s=yield i.client.fetch(e);return yield i.storage.deleteThrottleMetadata(),s}catch(s){if(!function CQ(t){if(!(t instanceof zn&&t.customData))return!1;const e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(s))throw s;const o={throttleEndTimeMillis:Date.now()+B_(r),backoffCount:r+1};return yield i.storage.setThrottleMetadata(o),i.attemptFetch(e,o)}})()}}class RQ{constructor(e,n,r,i,s){this.app=e,this._client=n,this._storageCache=r,this._storage=i,this._logger=s,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}get fetchTimeMillis(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}get lastFetchStatus(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"}}function Yh(t,e){const n=t.target.error||void 0;return pn.create(e,{originalErrorMessage:n&&n?.message})}const ks="app_namespace_store";class PQ{constructor(e,n,r,i=function NQ(){return new Promise((t,e)=>{try{const n=indexedDB.open("firebase_remote_config",1);n.onerror=r=>{e(Yh(r,"storage-open"))},n.onsuccess=r=>{t(r.target.result)},n.onupgradeneeded=r=>{0===r.oldVersion&&r.target.result.createObjectStore(ks,{keyPath:"compositeKey"})}}catch(n){e(pn.create("storage-open",{originalErrorMessage:n?.message}))}})}()){this.appId=e,this.appName=n,this.namespace=r,this.openDbPromise=i}getLastFetchStatus(){return this.get("last_fetch_status")}setLastFetchStatus(e){return this.set("last_fetch_status",e)}getLastSuccessfulFetchTimestampMillis(){return this.get("last_successful_fetch_timestamp_millis")}setLastSuccessfulFetchTimestampMillis(e){return this.set("last_successful_fetch_timestamp_millis",e)}getLastSuccessfulFetchResponse(){return this.get("last_successful_fetch_response")}setLastSuccessfulFetchResponse(e){return this.set("last_successful_fetch_response",e)}getActiveConfig(){return this.get("active_config")}setActiveConfig(e){return this.set("active_config",e)}getActiveConfigEtag(){return this.get("active_config_etag")}setActiveConfigEtag(e){return this.set("active_config_etag",e)}getThrottleMetadata(){return this.get("throttle_metadata")}setThrottleMetadata(e){return this.set("throttle_metadata",e)}deleteThrottleMetadata(){return this.delete("throttle_metadata")}get(e){var n=this;return I(function*(){const r=yield n.openDbPromise;return new Promise((i,s)=>{const a=r.transaction([ks],"readonly").objectStore(ks),u=n.createCompositeKey(e);try{const c=a.get(u);c.onerror=l=>{s(Yh(l,"storage-get"))},c.onsuccess=l=>{const d=l.target.result;i(d?d.value:void 0)}}catch(c){s(pn.create("storage-get",{originalErrorMessage:c?.message}))}})})()}set(e,n){var r=this;return I(function*(){const i=yield r.openDbPromise;return new Promise((s,o)=>{const u=i.transaction([ks],"readwrite").objectStore(ks),c=r.createCompositeKey(e);try{const l=u.put({compositeKey:c,value:n});l.onerror=d=>{o(Yh(d,"storage-set"))},l.onsuccess=()=>{s()}}catch(l){o(pn.create("storage-set",{originalErrorMessage:l?.message}))}})})()}delete(e){var n=this;return I(function*(){const r=yield n.openDbPromise;return new Promise((i,s)=>{const a=r.transaction([ks],"readwrite").objectStore(ks),u=n.createCompositeKey(e);try{const c=a.delete(u);c.onerror=l=>{s(Yh(l,"storage-delete"))},c.onsuccess=()=>{i()}}catch(c){s(pn.create("storage-delete",{originalErrorMessage:c?.message}))}})})()}createCompositeKey(e){return[this.appId,this.appName,this.namespace,e].join()}}class OQ{constructor(e){this.storage=e}getLastFetchStatus(){return this.lastFetchStatus}getLastSuccessfulFetchTimestampMillis(){return this.lastSuccessfulFetchTimestampMillis}getActiveConfig(){return this.activeConfig}loadFromStorage(){var e=this;return I(function*(){const n=e.storage.getLastFetchStatus(),r=e.storage.getLastSuccessfulFetchTimestampMillis(),i=e.storage.getActiveConfig(),s=yield n;s&&(e.lastFetchStatus=s);const o=yield r;o&&(e.lastSuccessfulFetchTimestampMillis=o);const a=yield i;a&&(e.activeConfig=a)})()}setLastFetchStatus(e){return this.lastFetchStatus=e,this.storage.setLastFetchStatus(e)}setLastSuccessfulFetchTimestampMillis(e){return this.lastSuccessfulFetchTimestampMillis=e,this.storage.setLastSuccessfulFetchTimestampMillis(e)}setActiveConfig(e){return this.activeConfig=e,this.storage.setActiveConfig(e)}}function FQ(){return Lv.apply(this,arguments)}function Lv(){return(Lv=I(function*(){if(!Ds())return!1;try{return yield dc()}catch{return!1}})).apply(this,arguments)}!function LQ(){jt(new Rt("remote-config",function t(e,{instanceIdentifier:n}){const r=e.getProvider("app").getImmediate(),i=e.getProvider("installations-internal").getImmediate();if(typeof window>"u")throw pn.create("registration-window");if(!Ds())throw pn.create("indexed-db-unavailable");const{projectId:s,apiKey:o,appId:a}=r.options;if(!s)throw pn.create("registration-project-id");if(!o)throw pn.create("registration-api-key");if(!a)throw pn.create("registration-app-id");const u=new PQ(a,r.name,n=n||"firebase"),c=new OQ(u),l=new ha(Mv);l.logLevel=me.ERROR;const d=new bQ(i,fc,n,s,o,a),h=new SQ(d,u),f=new EQ(h,u,c,l),p=new RQ(r,f,c,u,l);return function vQ(t){const e=Cs(t);e._initializePromise||(e._initializePromise=e._storageCache.loadFromStorage().then(()=>{e._isInitializationComplete=!0}))}(p),p},"PUBLIC").setMultipleInstances(!0)),Le(Mv,"0.4.4"),Le(Mv,"0.4.4","esm2017")}();const UQ="/firebase-messaging-sw.js",VQ="/firebase-cloud-messaging-push-scope",DN="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",$Q="https://fcmregistrations.googleapis.com/v1",CN="google.c.a.c_id",BQ="google.c.a.c_l",jQ="google.c.a.ts",GQ="google.c.a.e";var ga=(()=>{return(t=ga||(ga={})).PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked",ga;var t})();function ni(t){const e=new Uint8Array(t);return btoa(String.fromCharCode(...e)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function HQ(t){const n=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),i=new Uint8Array(r.length);for(let s=0;s<r.length;++s)i[s]=r.charCodeAt(s);return i}const Fv="fcm_token_details_db",zQ=5,SN="fcm_token_object_Store";function Uv(){return Uv=I(function*(t){if("databases"in indexedDB&&!(yield indexedDB.databases()).map(s=>s.name).includes(Fv))return null;let e=null;return(yield zh(Fv,zQ,{upgrade:(r=I(function*(i,s,o,a){var u;if(s<2||!i.objectStoreNames.contains(SN))return;const c=a.objectStore(SN),l=yield c.index("fcmSenderId").get(t);if(yield c.clear(),l)if(2===s){const d=l;if(!d.auth||!d.p256dh||!d.endpoint)return;e={token:d.fcmToken,createTime:null!==(u=d.createTime)&&void 0!==u?u:Date.now(),subscriptionOptions:{auth:d.auth,p256dh:d.p256dh,endpoint:d.endpoint,swScope:d.swScope,vapidKey:"string"==typeof d.vapidKey?d.vapidKey:ni(d.vapidKey)}}}else if(3===s){const d=l;e={token:d.fcmToken,createTime:d.createTime,subscriptionOptions:{auth:ni(d.auth),p256dh:ni(d.p256dh),endpoint:d.endpoint,swScope:d.swScope,vapidKey:ni(d.vapidKey)}}}else if(4===s){const d=l;e={token:d.fcmToken,createTime:d.createTime,subscriptionOptions:{auth:ni(d.auth),p256dh:ni(d.p256dh),endpoint:d.endpoint,swScope:d.swScope,vapidKey:ni(d.vapidKey)}}}}),function(s,o,a,u){return r.apply(this,arguments)})})).close(),yield K_(Fv),yield K_("fcm_vapid_details_db"),yield K_("undefined"),function WQ(t){if(!t||!t.subscriptionOptions)return!1;const{subscriptionOptions:e}=t;return"number"==typeof t.createTime&&t.createTime>0&&"string"==typeof t.token&&t.token.length>0&&"string"==typeof e.auth&&e.auth.length>0&&"string"==typeof e.p256dh&&e.p256dh.length>0&&"string"==typeof e.endpoint&&e.endpoint.length>0&&"string"==typeof e.swScope&&e.swScope.length>0&&"string"==typeof e.vapidKey&&e.vapidKey.length>0}(e)?e:null;var r}),Uv.apply(this,arguments)}const KQ="firebase-messaging-database",QQ=1,Ns="firebase-messaging-store";let Vv=null;function $v(){return Vv||(Vv=zh(KQ,QQ,{upgrade:(t,e)=>{0===e&&t.createObjectStore(Ns)}})),Vv}function AN(t){return Bv.apply(this,arguments)}function Bv(){return Bv=I(function*(t){const e=zv(t),r=yield(yield $v()).transaction(Ns).objectStore(Ns).get(e);if(r)return r;{const i=yield function qQ(t){return Uv.apply(this,arguments)}(t.appConfig.senderId);if(i)return yield jv(t,i),i}}),Bv.apply(this,arguments)}function jv(t,e){return Gv.apply(this,arguments)}function Gv(){return(Gv=I(function*(t,e){const n=zv(t),i=(yield $v()).transaction(Ns,"readwrite");return yield i.objectStore(Ns).put(e,n),yield i.done,e})).apply(this,arguments)}function Hv(){return(Hv=I(function*(t){const e=zv(t),r=(yield $v()).transaction(Ns,"readwrite");yield r.objectStore(Ns).delete(e),yield r.done})).apply(this,arguments)}function zv({appConfig:t}){return t.appId}const Mt=new Tr("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});function ZQ(t,e){return qv.apply(this,arguments)}function qv(){return(qv=I(function*(t,e){const n=yield Yv(t),r=RN(e),i={method:"POST",headers:n,body:JSON.stringify(r)};let s;try{s=yield(yield fetch(Qv(t.appConfig),i)).json()}catch(o){throw Mt.create("token-subscribe-failed",{errorInfo:o?.toString()})}if(s.error)throw Mt.create("token-subscribe-failed",{errorInfo:s.error.message});if(!s.token)throw Mt.create("token-subscribe-no-token");return s.token})).apply(this,arguments)}function Wv(){return(Wv=I(function*(t,e){const n=yield Yv(t),r=RN(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)};let s;try{s=yield(yield fetch(`${Qv(t.appConfig)}/${e.token}`,i)).json()}catch(o){throw Mt.create("token-update-failed",{errorInfo:o?.toString()})}if(s.error)throw Mt.create("token-update-failed",{errorInfo:s.error.message});if(!s.token)throw Mt.create("token-update-no-token");return s.token})).apply(this,arguments)}function xN(t,e){return Kv.apply(this,arguments)}function Kv(){return(Kv=I(function*(t,e){const r={method:"DELETE",headers:yield Yv(t)};try{const s=yield(yield fetch(`${Qv(t.appConfig)}/${e}`,r)).json();if(s.error)throw Mt.create("token-unsubscribe-failed",{errorInfo:s.error.message})}catch(i){throw Mt.create("token-unsubscribe-failed",{errorInfo:i?.toString()})}})).apply(this,arguments)}function Qv({projectId:t}){return`${$Q}/projects/${t}/registrations`}function Yv(t){return Xv.apply(this,arguments)}function Xv(){return(Xv=I(function*({appConfig:t,installations:e}){const n=yield e.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})})).apply(this,arguments)}function RN({p256dh:t,auth:e,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:e,p256dh:t}};return r!==DN&&(i.web.applicationPubKey=r),i}const eY=6048e5;function Zv(){return Zv=I(function*(t){const e=yield function rY(t,e){return nw.apply(this,arguments)}(t.swRegistration,t.vapidKey),n={vapidKey:t.vapidKey,swScope:t.swRegistration.scope,endpoint:e.endpoint,auth:ni(e.getKey("auth")),p256dh:ni(e.getKey("p256dh"))},r=yield AN(t.firebaseDependencies);if(r){if(function iY(t,e){return e.vapidKey===t.vapidKey&&e.endpoint===t.endpoint&&e.auth===t.auth&&e.p256dh===t.p256dh}(r.subscriptionOptions,n))return Date.now()>=r.createTime+eY?function nY(t,e){return ew.apply(this,arguments)}(t,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{yield xN(t.firebaseDependencies,r.token)}catch(i){console.warn(i)}return kN(t.firebaseDependencies,n)}return kN(t.firebaseDependencies,n)}),Zv.apply(this,arguments)}function Jv(){return Jv=I(function*(t){const e=yield AN(t.firebaseDependencies);e&&(yield xN(t.firebaseDependencies,e.token),yield function YQ(t){return Hv.apply(this,arguments)}(t.firebaseDependencies));const n=yield t.swRegistration.pushManager.getSubscription();return!n||n.unsubscribe()}),Jv.apply(this,arguments)}function ew(){return ew=I(function*(t,e){try{const n=yield function JQ(t,e){return Wv.apply(this,arguments)}(t.firebaseDependencies,e),r=Object.assign(Object.assign({},e),{token:n,createTime:Date.now()});return yield jv(t.firebaseDependencies,r),n}catch(n){throw yield function MN(t){return Jv.apply(this,arguments)}(t),n}}),ew.apply(this,arguments)}function kN(t,e){return tw.apply(this,arguments)}function tw(){return(tw=I(function*(t,e){const r={token:yield ZQ(t,e),createTime:Date.now(),subscriptionOptions:e};return yield jv(t,r),r.token})).apply(this,arguments)}function nw(){return(nw=I(function*(t,e){return(yield t.pushManager.getSubscription())||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:HQ(e)})})).apply(this,arguments)}function NN(t){const e={from:t.from,collapseKey:t.collapse_key,messageId:t.fcmMessageId};return function sY(t,e){if(!e.notification)return;t.notification={};const n=e.notification.title;n&&(t.notification.title=n);const r=e.notification.body;r&&(t.notification.body=r);const i=e.notification.image;i&&(t.notification.image=i);const s=e.notification.icon;s&&(t.notification.icon=s)}(e,t),function oY(t,e){e.data&&(t.data=e.data)}(e,t),function aY(t,e){var n,r,i,s,o;if(!(e.fcmOptions||null!==(n=e.notification)&&void 0!==n&&n.click_action))return;t.fcmOptions={};const a=null!==(i=null===(r=e.fcmOptions)||void 0===r?void 0:r.link)&&void 0!==i?i:null===(s=e.notification)||void 0===s?void 0:s.click_action;a&&(t.fcmOptions.link=a);const u=null===(o=e.fcmOptions)||void 0===o?void 0:o.analytics_label;u&&(t.fcmOptions.analyticsLabel=u)}(e,t),e}function PN(t,e){const n=[];for(let r=0;r<t.length;r++)n.push(t.charAt(r)),r<e.length&&n.push(e.charAt(r));return n.join("")}function rw(t){return Mt.create("missing-app-config-values",{valueName:t})}PN("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),PN("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");class lY{constructor(e,n,r){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const i=function cY(t){if(!t||!t.options)throw rw("App Configuration Object");if(!t.name)throw rw("App Name");const e=["projectId","apiKey","appId","messagingSenderId"],{options:n}=t;for(const r of e)if(!n[r])throw rw(r);return{appName:t.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:i,installations:n,analyticsProvider:r}}_delete(){return Promise.resolve()}}function ON(t){return iw.apply(this,arguments)}function iw(){return(iw=I(function*(t){try{t.swRegistration=yield navigator.serviceWorker.register(UQ,{scope:VQ}),t.swRegistration.update().catch(()=>{})}catch(e){throw Mt.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}})).apply(this,arguments)}function sw(){return(sw=I(function*(t,e){if(!e&&!t.swRegistration&&(yield ON(t)),e||!t.swRegistration){if(!(e instanceof ServiceWorkerRegistration))throw Mt.create("invalid-sw-registration");t.swRegistration=e}})).apply(this,arguments)}function ow(){return(ow=I(function*(t,e){e?t.vapidKey=e:t.vapidKey||(t.vapidKey=DN)})).apply(this,arguments)}function aw(){return aw=I(function*(t,e){if(!navigator)throw Mt.create("only-available-in-window");if("default"===Notification.permission&&(yield Notification.requestPermission()),"granted"!==Notification.permission)throw Mt.create("permission-blocked");return yield function hY(t,e){return ow.apply(this,arguments)}(t,e?.vapidKey),yield function dY(t,e){return sw.apply(this,arguments)}(t,e?.serviceWorkerRegistration),function tY(t){return Zv.apply(this,arguments)}(t)}),aw.apply(this,arguments)}function uw(){return(uw=I(function*(t,e,n){const r=function pY(t){switch(t){case ga.NOTIFICATION_CLICKED:return"notification_open";case ga.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e);(yield t.firebaseDependencies.analyticsProvider.get()).logEvent(r,{message_id:n[CN],message_name:n[BQ],message_time:n[jQ],message_device_time:Math.floor(Date.now()/1e3)})})).apply(this,arguments)}function cw(){return cw=I(function*(t,e){const n=e.data;if(!n.isFirebaseMessaging)return;t.onMessageHandler&&n.messageType===ga.PUSH_RECEIVED&&("function"==typeof t.onMessageHandler?t.onMessageHandler(NN(n)):t.onMessageHandler.next(NN(n)));const r=n.data;(function uY(t){return"object"==typeof t&&!!t&&CN in t})(r)&&"1"===r[GQ]&&(yield function fY(t,e,n){return uw.apply(this,arguments)}(t,n.messageType,r))}),cw.apply(this,arguments)}const FN="@firebase/messaging",mY=t=>{const e=new lY(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),t.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",n=>function gY(t,e){return cw.apply(this,arguments)}(e,n)),e},yY=t=>{const e=t.getProvider("messaging").getImmediate();return{getToken:r=>function LN(t,e){return aw.apply(this,arguments)}(e,r)}};function VN(){return lw.apply(this,arguments)}function lw(){return(lw=I(function*(){try{yield dc()}catch{return!1}return typeof window<"u"&&Ds()&&F_()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")})).apply(this,arguments)}!function _Y(){jt(new Rt("messaging",mY,"PUBLIC")),jt(new Rt("messaging-internal",yY,"PRIVATE")),Le(FN,"0.12.4"),Le(FN,"0.12.4","esm2017")}();const Xh="analytics",IY="firebase_id",EY="origin",TY=6e4,bY="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",$N="https://www.googletagmanager.com/gtag/js",kt=new ha("@firebase/analytics");function BN(t){return Promise.all(t.map(e=>e.catch(n=>n)))}function fw(){return(fw=I(function*(t,e,n,r,i,s){const o=r[i];try{if(o)yield e[o];else{const u=(yield BN(n)).find(c=>c.measurementId===i);u&&(yield e[u.appId])}}catch(a){kt.error(a)}t("config",i,s)})).apply(this,arguments)}function pw(){return(pw=I(function*(t,e,n,r,i){try{let s=[];if(i&&i.send_to){let o=i.send_to;Array.isArray(o)||(o=[o]);const a=yield BN(n);for(const u of o){const c=a.find(d=>d.measurementId===u),l=c&&e[c.appId];if(!l){s=[];break}s.push(l)}}0===s.length&&(s=Object.values(e)),yield Promise.all(s),t("event",r,i||{})}catch(s){kt.error(s)}})).apply(this,arguments)}const Nn=new Tr("analytics","Analytics",{"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-intialized 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.'}),NY=30,jN=new class OY{constructor(e={},n=1e3){this.throttleMetadata=e,this.intervalMillis=n}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,n){this.throttleMetadata[e]=n}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function LY(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}function gw(){return(gw=I(function*(t){var e;const{appId:n,apiKey:r}=t,i={method:"GET",headers:LY(r)},s=bY.replace("{app-id}",n),o=yield fetch(s,i);if(200!==o.status&&304!==o.status){let a="";try{const u=yield o.json();null!==(e=u.error)&&void 0!==e&&e.message&&(a=u.error.message)}catch{}throw Nn.create("config-fetch-failed",{httpStatus:o.status,responseMessage:a})}return o.json()})).apply(this,arguments)}function mw(){return(mw=I(function*(t,e=jN,n){const{appId:r,apiKey:i,measurementId:s}=t.options;if(!r)throw Nn.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw Nn.create("no-api-key")}const o=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new BY;return setTimeout(I(function*(){a.abort()}),void 0!==n?n:TY),GN({appId:r,apiKey:i,measurementId:s},o,a,e)})).apply(this,arguments)}function GN(t,e,n){return yw.apply(this,arguments)}function yw(){return yw=I(function*(t,{throttleEndTimeMillis:e,backoffCount:n},r,i=jN){var s;const{appId:o,measurementId:a}=t;try{yield function VY(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),s=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(s),r(Nn.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}(r,e)}catch(u){if(a)return kt.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${u?.message}]`),{appId:o,measurementId:a};throw u}try{const u=yield function FY(t){return gw.apply(this,arguments)}(t);return i.deleteThrottleMetadata(o),u}catch(u){const c=u;if(!function $Y(t){if(!(t instanceof zn&&t.customData))return!1;const e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(c)){if(i.deleteThrottleMetadata(o),a)return kt.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${c?.message}]`),{appId:o,measurementId:a};throw u}const l=503===Number(null===(s=c?.customData)||void 0===s?void 0:s.httpStatus)?B_(n,i.intervalMillis,NY):B_(n,i.intervalMillis),d={throttleEndTimeMillis:Date.now()+l,backoffCount:n+1};return i.setThrottleMetadata(o,d),kt.debug(`Calling attemptFetch again in ${l} millis`),GN(t,d,r,i)}}),yw.apply(this,arguments)}class BY{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}let _w,bw;function vw(){return(vw=I(function*(t,e,n,r,i){if(i&&i.global)t("event",n,r);else{const s=yield e;t("event",n,Object.assign(Object.assign({},r),{send_to:s}))}})).apply(this,arguments)}function Dw(){return(Dw=I(function*(){if(!Ds())return kt.warn(Nn.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{yield dc()}catch(t){return kt.warn(Nn.create("indexeddb-unavailable",{errorInfo:t?.toString()}).message),!1}return!0})).apply(this,arguments)}function Cw(){return Cw=I(function*(t,e,n,r,i,s,o){var a;const u=function UY(t){return mw.apply(this,arguments)}(t);u.then(f=>{n[f.measurementId]=f.appId,t.options.measurementId&&f.measurementId!==t.options.measurementId&&kt.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${f.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(f=>kt.error(f)),e.push(u);const c=function WY(){return Dw.apply(this,arguments)}().then(f=>{if(f)return r.getId()}),[l,d]=yield Promise.all([u,c]);(function MY(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes($N)&&n.src.includes(t))return n;return null})(s)||function DY(t,e){const n=document.createElement("script");n.src=`${$N}?l=${t}&id=${e}`,n.async=!0,document.head.appendChild(n)}(s,l.measurementId),bw&&(i("consent","default",bw),function HN(t){bw=t}(void 0)),i("js",new Date);const h=null!==(a=o?.config)&&void 0!==a?a:{};return h[EY]="firebase",h.update=!0,null!=d&&(h[IY]=d),i("config",l.measurementId,h),_w&&(i("set",_w),function zN(t){_w=t}(void 0)),l.measurementId}),Cw.apply(this,arguments)}class QY{constructor(e){this.app=e}_delete(){return delete ri[this.app.options.appId],Promise.resolve()}}let ri={},qN=[];const WN={};let QN,ii,Zh="dataLayer",KN="gtag",Sw=!1;function XY(t,e,n){!function YY(){const t=[];if(L_()&&t.push("This is a browser extension environment."),F_()||t.push("Cookies are not available."),t.length>0){const e=t.map((r,i)=>`(${i+1}) ${r}`).join(" "),n=Nn.create("invalid-analytics-context",{errorInfo:e});kt.warn(n.message)}}();const r=t.options.appId;if(!r)throw Nn.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw Nn.create("no-api-key");kt.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 ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=ri[r])throw Nn.create("already-exists",{id:r});if(!Sw){!function CY(t){let e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(Zh);const{wrappedGtag:s,gtagCore:o}=function RY(t,e,n,r,i){let s=function(...o){window[r].push(arguments)};return window[i]&&"function"==typeof window[i]&&(s=window[i]),window[i]=function xY(t,e,n,r){function s(){return s=I(function*(o,a,u){try{"event"===o?yield function AY(t,e,n,r,i){return pw.apply(this,arguments)}(t,e,n,a,u):"config"===o?yield function SY(t,e,n,r,i,s){return fw.apply(this,arguments)}(t,e,n,r,a,u):"consent"===o?t("consent","update",u):t("set",a)}catch(c){kt.error(c)}}),s.apply(this,arguments)}return function i(o,a,u){return s.apply(this,arguments)}}(s,t,e,n),{gtagCore:s,wrappedGtag:window[i]}}(ri,qN,WN,Zh,KN);ii=s,QN=o,Sw=!0}return ri[r]=function KY(t,e,n,r,i,s,o){return Cw.apply(this,arguments)}(t,qN,WN,e,QN,Zh,n),new QY(t)}function JY(){return Aw.apply(this,arguments)}function Aw(){return(Aw=I(function*(){if(L_()||!F_()||!Ds())return!1;try{return yield dc()}catch{return!1}})).apply(this,arguments)}const YN="@firebase/analytics";!function tX(){jt(new Rt(Xh,(e,{options:n})=>XY(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),n),"PUBLIC")),jt(new Rt("analytics-internal",function t(e){try{const n=e.getProvider(Xh).getImmediate();return{logEvent:(r,i,s)=>function eX(t,e,n,r){t=Cs(t),function jY(t,e,n,r,i){return vw.apply(this,arguments)}(ii,ri[t.app.options.appId],e,n,r).catch(i=>kt.error(i))}(n,r,i,s)}}catch(n){throw Nn.create("interop-component-reg-failed",{reason:n})}},"PRIVATE")),Le(YN,"0.9.4"),Le(YN,"0.9.4","esm2017")}();class nX extends In{constructor(e,n){super()}schedule(e,n=0){return this}}const Jh={setInterval(t,e,...n){const{delegate:r}=Jh;return r?.setInterval?r.setInterval(t,e,...n):setInterval(t,e,...n)},clearInterval(t){const{delegate:e}=Jh;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};class ZN extends nX{constructor(e,n){super(e,n),this.scheduler=e,this.work=n,this.pending=!1}schedule(e,n=0){var r;if(this.closed)return this;this.state=e;const i=this.id,s=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(s,i,n)),this.pending=!0,this.delay=n,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(s,this.id,n),this}requestAsyncId(e,n,r=0){return Jh.setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,n,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return n;null!=n&&Jh.clearInterval(n)}execute(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,n){let i,r=!1;try{this.work(e)}catch(s){r=!0,i=s||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){const{id:e,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,go(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,super.unsubscribe()}}}const JN={now:()=>(JN.delegate||Date).now(),delegate:void 0};class mc{constructor(e,n=mc.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,r){return new this.schedulerActionCtor(this,e).schedule(r,n)}}mc.now=JN.now;class eP extends mc{constructor(e,n=mc.now){super(e,n),this.actions=[],this._active=!1}flush(e){const{actions:n}=this;if(this._active)return void n.push(e);let r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=n.shift());if(this._active=!1,r){for(;e=n.shift();)e.unsubscribe();throw r}}}const sX=new class iX extends eP{}(class rX extends ZN{constructor(e,n){super(e,n),this.scheduler=e,this.work=n}schedule(e,n=0){return n>0?super.schedule(e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)}execute(e,n){return n>0||this.closed?super.execute(e,n):this._execute(e,n)}requestAsyncId(e,n,r=0){return null!=r&&r>0||null==r&&this.delay>0?super.requestAsyncId(e,n,r):(e.flush(this),0)}}),oX=new eP(ZN),ef=new Su("7.5.0"),xw="__angularfire_symbol__analyticsIsSupportedValue",Rw="__angularfire_symbol__analyticsIsSupported",Mw="__angularfire_symbol__remoteConfigIsSupportedValue",kw="__angularfire_symbol__remoteConfigIsSupported",Nw="__angularfire_symbol__messagingIsSupportedValue",Pw="__angularfire_symbol__messagingIsSupported";function tf(t,e,n){if(e){if(1===e.length)return e[0];const s=e.filter(o=>o.app===n);if(1===s.length)return s[0]}return n.container.getProvider(t).getImmediate({optional:!0})}globalThis[Rw]||(globalThis[Rw]=JY().then(t=>globalThis[xw]=t).catch(()=>globalThis[xw]=!1)),globalThis[Pw]||(globalThis[Pw]=VN().then(t=>globalThis[Nw]=t).catch(()=>globalThis[Nw]=!1)),globalThis[kw]||(globalThis[kw]=FQ().then(t=>globalThis[Mw]=t).catch(()=>globalThis[Mw]=!1));const nf=(t,e)=>{const n=e?[e]:Zk(),r=[];return n.forEach(i=>{i.container.getProvider(t).instances.forEach(o=>{r.includes(o)||r.push(o)})}),r};function ma(){}class tP{constructor(e,n=sX){this.zone=e,this.delegate=n}now(){return this.delegate.now()}schedule(e,n,r){const i=this.zone;return this.delegate.schedule(function(o){i.runGuarded(()=>{e.apply(this,[o])})},n,r)}}class aX{constructor(e){this.zone=e,this.task=null}call(e,n){const r=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",ma,{},ma,ma)),n.pipe(At({next:r,complete:r,error:r})).subscribe(e).add(r)}unscheduleTask(){setTimeout(()=>{null!=this.task&&"scheduled"===this.task.state&&(this.task.invoke(),this.task=null)},10)}}let Lw=(()=>{class t{constructor(n){this.ngZone=n,this.outsideAngular=n.runOutsideAngular(()=>new tP(Zone.current)),this.insideAngular=n.run(()=>new tP(Zone.current,oX)),globalThis.\u0275AngularFireScheduler||(globalThis.\u0275AngularFireScheduler=this)}}return t.\u0275fac=function(n){return new(n||t)(B(Ne))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Ps(){const t=globalThis.\u0275AngularFireScheduler;if(!t)throw new Error("Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).");return t}function Os(t){return Ps().ngZone.run(()=>t())}function cX(t){return Ps(),function lX(t){return function(n){return(n=n.lift(new aX(t.ngZone))).pipe(jl(t.outsideAngular),Bl(t.insideAngular))}}(Ps())(t)}const dX=(t,e)=>function(){const r=arguments;return e&&setTimeout(()=>{"scheduled"===e.state&&e.invoke()},10),Os(()=>t.apply(void 0,r))},Fw=(t,e)=>function(){let n;const r=arguments;for(let s=0;s<arguments.length;s++)"function"==typeof r[s]&&(e&&(n||(n=Os(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",ma,{},ma,ma)))),r[s]=dX(r[s],n));const i=function uX(t){return Ps().ngZone.runOutsideAngular(()=>t())}(()=>t.apply(this,r));if(!e){if(i instanceof Qe){const s=Ps();return i.pipe(jl(s.outsideAngular),Bl(s.insideAngular))}return Os(()=>i)}return i instanceof Qe?i.pipe(cX):i instanceof Promise?Os(()=>new Promise((s,o)=>i.then(a=>Os(()=>s(a)),a=>Os(()=>o(a))))):"function"==typeof i&&n?function(){return setTimeout(()=>{n&&"scheduled"===n.state&&n.invoke()},10),i.apply(this,arguments)}:Os(()=>i)};class Ls{constructor(e){return e}}class Uw{constructor(){return Zk()}}const Vw=new j("angularfire2._apps"),fX={provide:Ls,useFactory:function hX(t){return t&&1===t.length?t[0]:new Ls(X_())},deps:[[new lt,Vw]]},pX={provide:Uw,deps:[[new lt,Vw]]};function gX(t){return(e,n)=>{const r=e.runOutsideAngular(()=>t(n));return new Ls(r)}}let mX=(()=>{class t{constructor(n){Le("angularfire",ef.full,"core"),Le("angularfire",ef.full,"app"),Le("angular",HS.full,n.toString())}}return t.\u0275fac=function(n){return new(n||t)(B(Yd))},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({providers:[fX,pX]}),t})();function yX(t,...e){return{ngModule:mX,providers:[{provide:Vw,useFactory:gX(t),multi:!0,deps:[Ne,An,Lw,...e]}]}}const _X=Fw(Xk,!0),vX_firebase={projectId:"takima-ar-eee39",appId:"1:1096091676412:web:cb8da7edff6a187f893179",storageBucket:"takima-ar-eee39.appspot.com",locationId:"europe-west",apiKey:"AIzaSyDHKUL_jDBBhUKkqQMqugtlZZ3PLRPUTD8",authDomain:"takima-ar-eee39.firebaseapp.com",messagingSenderId:"1096091676412",measurementId:"G-N6074QGX49"};const wX=function nP(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}},rP=new Tr("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),iP=new ha("@firebase/auth");function rf(t,...e){iP.logLevel<=me.ERROR&&iP.error(`Auth (${fc}): ${t}`,...e)}function gn(t,...e){throw $w(t,...e)}function br(t,...e){return $w(t,...e)}function $w(t,...e){if("string"!=typeof t){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return rP.create(t,...e)}function S(t,e,...n){if(!t)throw $w(e,...n)}function Dr(t){const e="INTERNAL ASSERTION FAILED: "+t;throw rf(e),new Error(e)}function Pi(t,e){t||Dr(e)}const oP=new Map;function si(t){Pi(t instanceof Function,"Expected a class definition");let e=oP.get(t);return e?(Pi(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,oP.set(t,e),e)}function aP(){var t;return typeof self<"u"&&(null===(t=self.location)||void 0===t?void 0:t.protocol)||null}class _c{constructor(e,n){this.shortDelay=e,this.longDelay=n,Pi(n>e,"Short delay should be less than long delay!"),this.isMobile=function a9(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(kn())}()||function c9(){return"object"==typeof navigator&&"ReactNative"===navigator.product}()}get(){return function TX(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(function Bw(){return"http:"===aP()||"https:"===aP()}()||L_()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}class uP{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:void Dr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:typeof self<"u"&&"Headers"in self?self.Headers:void Dr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:typeof self<"u"&&"Response"in self?self.Response:void Dr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const DX={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error"},CX=new _c(3e4,6e4);function vt(t,e,n,r){return Gw.apply(this,arguments)}function Gw(){return(Gw=I(function*(t,e,n,r,i={}){return cP(t,i,I(function*(){let s={},o={};r&&("GET"===e?o=r:s={body:JSON.stringify(r)});const a=Gk(Object.assign({key:t.config.apiKey},o)).slice(1),u=yield t._getAdditionalHeaders();return u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode),uP.fetch()(lP(t,t.config.apiHost,n,a),Object.assign({method:e,headers:u,referrerPolicy:"no-referrer"},s))}))})).apply(this,arguments)}function cP(t,e,n){return Hw.apply(this,arguments)}function Hw(){return(Hw=I(function*(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},DX),e);try{const i=new SX(t),s=yield Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=yield s.json();if("needConfirmation"in o)throw vc(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const a=s.ok?o.errorMessage:o.error.message,[u,c]=a.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===u)throw vc(t,"credential-already-in-use",o);if("EMAIL_EXISTS"===u)throw vc(t,"email-already-in-use",o);if("USER_DISABLED"===u)throw vc(t,"user-disabled",o);const l=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw function sP(t,e,n){const r=Object.assign(Object.assign({},wX()),{[e]:n});return new Tr("auth","Firebase",r).create(e,{appName:t.name})}(t,l,c);gn(t,l)}}catch(i){if(i instanceof zn)throw i;gn(t,"internal-error",{message:String(i)})}})).apply(this,arguments)}function lP(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?function jw(t,e){Pi(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}(t.config,i):`${t.config.apiScheme}://${i}`}class SX{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(br(this.auth,"network-request-failed")),CX.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function vc(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=br(t,e,r);return i.customData._tokenResponse=n,i}function qw(){return(qw=I(function*(t,e){return vt(t,"POST","/v1/accounts:delete",e)})).apply(this,arguments)}function Kw(){return(Kw=I(function*(t,e){return vt(t,"POST","/v1/accounts:lookup",e)})).apply(this,arguments)}function wc(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function Qw(){return(Qw=I(function*(t,e=!1){const n=Cs(t),r=yield n.getIdToken(e),i=sf(r);S(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s="object"==typeof i.firebase?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:wc(Yw(i.auth_time)),issuedAtTime:wc(Yw(i.iat)),expirationTime:wc(Yw(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})).apply(this,arguments)}function Yw(t){return 1e3*Number(t)}function sf(t){const[e,n,r]=t.split(".");if(void 0===e||void 0===n||void 0===r)return rf("JWT malformed, contained fewer than 3 sections"),null;try{const i=Bh(n);return i?JSON.parse(i):(rf("Failed to decode base64 JWT payload"),null)}catch(i){return rf("Caught error parsing JWT payload as JSON",i?.toString()),null}}function ai(t,e){return Xw.apply(this,arguments)}function Xw(){return(Xw=I(function*(t,e,n=!1){if(n)return e;try{return yield e}catch(r){throw r instanceof zn&&function NX({code:t}){return"auth/user-disabled"===t||"auth/user-token-expired"===t}(r)&&t.auth.currentUser===t&&(yield t.auth.signOut()),r}})).apply(this,arguments)}class PX{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),r}{this.errorBackoff=3e4;const i=(null!==(n=this.user.stsTokenManager.expirationTime)&&void 0!==n?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){var n=this;if(!this.isRunning)return;const r=this.getInterval(e);this.timerId=setTimeout(I(function*(){yield n.iteration()}),r)}iteration(){var e=this;return I(function*(){try{yield e.user.getIdToken(!0)}catch(n){return void("auth/network-request-failed"===n?.code&&e.schedule(!0))}e.schedule()})()}}class dP{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=wc(this.lastLoginAt),this.creationTime=wc(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function Ic(t){return Zw.apply(this,arguments)}function Zw(){return Zw=I(function*(t){var e;const n=t.auth,r=yield t.getIdToken(),i=yield ai(t,function RX(t,e){return Kw.apply(this,arguments)}(n,{idToken:r}));S(i?.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=null!==(e=s.providerUserInfo)&&void 0!==e&&e.length?function FX(t){return t.map(e=>{var{providerId:n}=e,r=TD(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}(s.providerUserInfo):[],a=function LX(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}(t.providerData,o),l=!!t.isAnonymous&&!(t.email&&s.passwordHash||a?.length),d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new dP(s.createdAt,s.lastLoginAt),isAnonymous:l};Object.assign(t,d)}),Zw.apply(this,arguments)}function Jw(){return(Jw=I(function*(t){const e=Cs(t);yield Ic(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})).apply(this,arguments)}function e0(){return(e0=I(function*(t,e){const n=yield cP(t,{},I(function*(){const r=Gk({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=lP(t,i,"/v1/token",`key=${s}`),a=yield t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",uP.fetch()(o,{method:"POST",headers:a,body:r})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})).apply(this,arguments)}class Ec{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){S(e.idToken,"internal-error"),S(typeof e.idToken<"u","internal-error"),S(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):function kX(t){const e=sf(t);return S(e,"internal-error"),S(typeof e.exp<"u","internal-error"),S(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}getToken(e,n=!1){var r=this;return I(function*(){return S(!r.accessToken||r.refreshToken,e,"user-token-expired"),n||!r.accessToken||r.isExpired?r.refreshToken?(yield r.refresh(e,r.refreshToken),r.accessToken):null:r.accessToken})()}clearRefreshToken(){this.refreshToken=null}refresh(e,n){var r=this;return I(function*(){const{accessToken:i,refreshToken:s,expiresIn:o}=yield function UX(t,e){return e0.apply(this,arguments)}(e,n);r.updateTokensAndExpiration(i,s,Number(o))})()}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Ec;return r&&(S("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),i&&(S("string"==typeof i,"internal-error",{appName:e}),o.accessToken=i),s&&(S("number"==typeof s,"internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Ec,this.toJSON())}_performRefresh(){return Dr("not implemented")}}function Oi(t,e){S("string"==typeof t||typeof t>"u","internal-error",{appName:e})}class Fs{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=TD(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new PX(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new dP(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(e){var n=this;return I(function*(){const r=yield ai(n,n.stsTokenManager.getToken(n.auth,e));return S(r,n.auth,"internal-error"),n.accessToken!==r&&(n.accessToken=r,yield n.auth._persistUserIfCurrent(n),n.auth._notifyListenersIfCurrent(n)),r})()}getIdTokenResult(e){return function MX(t){return Qw.apply(this,arguments)}(this,e)}reload(){return function OX(t){return Jw.apply(this,arguments)}(this)}_assign(e){this!==e&&(S(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Fs(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){S(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,n=!1){var r=this;return I(function*(){let i=!1;e.idToken&&e.idToken!==r.stsTokenManager.accessToken&&(r.stsTokenManager.updateFromServerResponse(e),i=!0),n&&(yield Ic(r)),yield r.auth._persistUserIfCurrent(r),i&&r.auth._notifyListenersIfCurrent(r)})()}delete(){var e=this;return I(function*(){const n=yield e.getIdToken();return yield ai(e,function AX(t,e){return qw.apply(this,arguments)}(e.auth,{idToken:n})),e.stsTokenManager.clearRefreshToken(),e.auth.signOut()})()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,a,u,c,l;const d=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,f=null!==(s=n.phoneNumber)&&void 0!==s?s:void 0,p=null!==(o=n.photoURL)&&void 0!==o?o:void 0,g=null!==(a=n.tenantId)&&void 0!==a?a:void 0,m=null!==(u=n._redirectEventId)&&void 0!==u?u:void 0,v=null!==(c=n.createdAt)&&void 0!==c?c:void 0,E=null!==(l=n.lastLoginAt)&&void 0!==l?l:void 0,{uid:y,emailVerified:C,isAnonymous:O,providerData:L,stsTokenManager:Ve}=n;S(y&&Ve,e,"internal-error");const Wt=Ec.fromJSON(this.name,Ve);S("string"==typeof y,e,"internal-error"),Oi(d,e.name),Oi(h,e.name),S("boolean"==typeof C,e,"internal-error"),S("boolean"==typeof O,e,"internal-error"),Oi(f,e.name),Oi(p,e.name),Oi(g,e.name),Oi(m,e.name),Oi(v,e.name),Oi(E,e.name);const po=new Fs({uid:y,auth:e,email:h,emailVerified:C,displayName:d,isAnonymous:O,photoURL:p,phoneNumber:f,tenantId:g,stsTokenManager:Wt,createdAt:v,lastLoginAt:E});return L&&Array.isArray(L)&&(po.providerData=L.map($oe=>Object.assign({},$oe))),m&&(po._redirectEventId=m),po}static _fromIdTokenResponse(e,n,r=!1){return I(function*(){const i=new Ec;i.updateFromServerResponse(n);const s=new Fs({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return yield Ic(s),s})()}}const hP=(()=>{class t{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return I(function*(){return!0})()}_set(n,r){var i=this;return I(function*(){i.storage[n]=r})()}_get(n){var r=this;return I(function*(){const i=r.storage[n];return void 0===i?null:i})()}_remove(n){var r=this;return I(function*(){delete r.storage[n]})()}_addListener(n,r){}_removeListener(n,r){}}return t.type="NONE",t})();function af(t,e,n){return`firebase:${t}:${e}:${n}`}class _a{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=af(this.userKey,i.apiKey,s),this.fullPersistenceKey=af("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){var e=this;return I(function*(){const n=yield e.persistence._get(e.fullUserKey);return n?Fs._fromJSON(e.auth,n):null})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){var n=this;return I(function*(){if(n.persistence===e)return;const r=yield n.getCurrentUser();return yield n.removeCurrentUser(),n.persistence=e,r?n.setCurrentUser(r):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,n,r="authUser"){return I(function*(){if(!n.length)return new _a(si(hP),e,r);const i=(yield Promise.all(n.map(function(){var c=I(function*(l){if(yield l._isAvailable())return l});return function(l){return c.apply(this,arguments)}}()))).filter(c=>c);let s=i[0]||si(hP);const o=af(r,e.config.apiKey,e.name);let a=null;for(const c of n)try{const l=yield c._get(o);if(l){const d=Fs._fromJSON(e,l);c!==s&&(a=d),s=c;break}}catch{}const u=i.filter(c=>c._shouldAllowMigration);return s._shouldAllowMigration&&u.length?(s=u[0],a&&(yield s._set(o,a.toJSON())),yield Promise.all(n.map(function(){var c=I(function*(l){if(l!==s)try{yield l._remove(o)}catch{}});return function(l){return c.apply(this,arguments)}}())),new _a(s,e,r)):new _a(s,e,r)})()}}function fP(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(function mP(t=kn()){return/iemobile/i.test(t)}(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(function pP(t=kn()){return/firefox\//i.test(t)}(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(function _P(t=kn()){return/blackberry/i.test(t)}(e))return"Blackberry";if(function vP(t=kn()){return/webos/i.test(t)}(e))return"Webos";if(function t0(t=kn()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}(e))return"Safari";if((e.includes("chrome/")||function gP(t=kn()){return/crios\//i.test(t)}(e))&&!e.includes("edge/"))return"Chrome";if(function yP(t=kn()){return/android/i.test(t)}(e))return"Android";{const r=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===r?.length)return r[1]}return"Other"}function wP(t,e=[]){let n;switch(t){case"Browser":n=fP(kn());break;case"Worker":n=`${fP(kn())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${fc}/${r}`}class BX{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((o,a)=>{try{o(e(s))}catch(u){a(u)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(e){var n=this;return I(function*(){if(n.auth.currentUser===e)return;const r=[];try{for(const i of n.queue)yield i(e),i.onAbort&&r.push(i.onAbort)}catch(i){r.reverse();for(const s of r)try{s()}catch{}throw n.auth._errorFactory.create("login-blocked",{originalMessage:i?.message})}})()}}class jX{constructor(e,n,r){this.app=e,this.heartbeatServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new IP(this),this.idTokenSubscription=new IP(this),this.beforeStateQueue=new BX(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=rP,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,n){var r=this;return n&&(this._popupRedirectResolver=si(n)),this._initializationPromise=this.queue(I(function*(){var i,s;if(!r._deleted&&(r.persistenceManager=yield _a.create(r,e),!r._deleted)){if(null!==(i=r._popupRedirectResolver)&&void 0!==i&&i._shouldInitProactively)try{yield r._popupRedirectResolver._initialize(r)}catch{}yield r.initializeCurrentUser(n),r.lastNotifiedUid=(null===(s=r.currentUser)||void 0===s?void 0:s.uid)||null,!r._deleted&&(r._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var e=this;return I(function*(){if(e._deleted)return;const n=yield e.assertedPersistence.getCurrentUser();if(e.currentUser||n){if(e.currentUser&&n&&e.currentUser.uid===n.uid)return e._currentUser._assign(n),void(yield e.currentUser.getIdToken());yield e._updateCurrentUser(n,!0)}})()}initializeCurrentUser(e){var n=this;return I(function*(){var r;const i=yield n.assertedPersistence.getCurrentUser();let s=i,o=!1;if(e&&n.config.authDomain){yield n.getOrInitRedirectPersistenceManager();const a=null===(r=n.redirectUser)||void 0===r?void 0:r._redirectEventId,u=s?._redirectEventId,c=yield n.tryRedirectSignIn(e);(!a||a===u)&&c?.user&&(s=c.user,o=!0)}if(!s)return n.directlySetCurrentUser(null);if(!s._redirectEventId){if(o)try{yield n.beforeStateQueue.runMiddleware(s)}catch(a){s=i,n._popupRedirectResolver._overrideRedirectResult(n,()=>Promise.reject(a))}return s?n.reloadAndSetCurrentUserOrClear(s):n.directlySetCurrentUser(null)}return S(n._popupRedirectResolver,n,"argument-error"),yield n.getOrInitRedirectPersistenceManager(),n.redirectUser&&n.redirectUser._redirectEventId===s._redirectEventId?n.directlySetCurrentUser(s):n.reloadAndSetCurrentUserOrClear(s)})()}tryRedirectSignIn(e){var n=this;return I(function*(){let r=null;try{r=yield n._popupRedirectResolver._completeRedirectFn(n,e,!0)}catch{yield n._setRedirectUser(null)}return r})()}reloadAndSetCurrentUserOrClear(e){var n=this;return I(function*(){try{yield Ic(e)}catch(r){if("auth/network-request-failed"!==r?.code)return n.directlySetCurrentUser(null)}return n.directlySetCurrentUser(e)})()}useDeviceLanguage(){this.languageCode=function bX(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}()}_delete(){var e=this;return I(function*(){e._deleted=!0})()}updateCurrentUser(e){var n=this;return I(function*(){const r=e?Cs(e):null;return r&&S(r.auth.config.apiKey===n.config.apiKey,n,"invalid-user-token"),n._updateCurrentUser(r&&r._clone(n))})()}_updateCurrentUser(e,n=!1){var r=this;return I(function*(){if(!r._deleted)return e&&S(r.tenantId===e.tenantId,r,"tenant-id-mismatch"),n||(yield r.beforeStateQueue.runMiddleware(e)),r.queue(I(function*(){yield r.directlySetCurrentUser(e),r.notifyAuthListeners()}))})()}signOut(){var e=this;return I(function*(){return yield e.beforeStateQueue.runMiddleware(null),(e.redirectPersistenceManager||e._popupRedirectResolver)&&(yield e._setRedirectUser(null)),e._updateCurrentUser(null,!0)})()}setPersistence(e){var n=this;return this.queue(I(function*(){yield n.assertedPersistence.setPersistence(si(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Tr("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}_setRedirectUser(e,n){var r=this;return I(function*(){const i=yield r.getOrInitRedirectPersistenceManager(n);return null===e?i.removeCurrentUser():i.setCurrentUser(e)})()}getOrInitRedirectPersistenceManager(e){var n=this;return I(function*(){if(!n.redirectPersistenceManager){const r=e&&si(e)||n._popupRedirectResolver;S(r,n,"argument-error"),n.redirectPersistenceManager=yield _a.create(n,[si(r._redirectPersistence)],"redirectUser"),n.redirectUser=yield n.redirectPersistenceManager.getCurrentUser()}return n.redirectPersistenceManager})()}_redirectUserForId(e){var n=this;return I(function*(){var r,i;return n._isInitialized&&(yield n.queue(I(function*(){}))),(null===(r=n._currentUser)||void 0===r?void 0:r._redirectEventId)===e?n._currentUser:(null===(i=n.redirectUser)||void 0===i?void 0:i._redirectEventId)===e?n.redirectUser:null})()}_persistUserIfCurrent(e){var n=this;return I(function*(){if(e===n.currentUser)return n.queue(I(function*(){return n.directlySetCurrentUser(e)}))})()}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=null!==(n=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==n?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s="function"==typeof n?n:n.next.bind(n),o=this._isInitialized?Promise.resolve():this._initializationPromise;return S(o,this,"internal-error"),o.then(()=>s(this.currentUser)),"function"==typeof n?e.addObserver(n,r,i):e.addObserver(n)}directlySetCurrentUser(e){var n=this;return I(function*(){n.currentUser&&n.currentUser!==e&&n._currentUser._stopProactiveRefresh(),e&&n.isProactiveRefreshEnabled&&e._startProactiveRefresh(),n.currentUser=e,e?yield n.assertedPersistence.setCurrentUser(e):yield n.assertedPersistence.removeCurrentUser()})()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return S(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=wP(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var e=this;return I(function*(){var n;const r={"X-Client-Version":e.clientVersion};e.app.options.appId&&(r["X-Firebase-gmpid"]=e.app.options.appId);const i=yield null===(n=e.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===n?void 0:n.getHeartbeatsHeader();return i&&(r["X-Firebase-Client"]=i),r})()}}class IP{constructor(e){this.auth=e,this.observer=null,this.addObserver=function f9(t,e){const n=new p9(t,e);return n.subscribe.bind(n)}(n=>this.observer=n)}get next(){return S(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}(function $P(t){return`__${t}${Math.floor(1e6*Math.random())}`})("rcb"),new _c(3e4,6e4),new _c(2e3,1e4),new _c(3e4,6e4),new _c(5e3,15e3);var ZP="@firebase/auth";class PJ{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}getToken(e){var n=this;return I(function*(){return n.assertAuthConfigured(),yield n.auth._initializationPromise,n.auth.currentUser?{accessToken:yield n.auth.currentUser.getIdToken(e)}:null})()}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){S(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}jh(),function LJ(t){jt(new Rt("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),{apiKey:s,authDomain:o}=r.options;return((a,u)=>{S(s&&!s.includes(":"),"invalid-api-key",{appName:a.name}),S(!o?.includes(":"),"argument-error",{appName:a.name});const c={apiKey:s,authDomain:o,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:wP(t)},l=new jX(a,u,c);return function EX(t,e){const n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(si);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}(l,n),l})(r,i)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),jt(new Rt("auth-internal",e=>{const n=function mn(t){return Cs(t)}(e.getProvider("auth").getImmediate());return new PJ(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Le(ZP,"0.21.5",function OJ(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(t)),Le(ZP,"0.21.5","esm2017")}("Browser");class FI{constructor(){return nf("auth")}}const VI=new Map,nO={activated:!1,tokenObservers:[]},GJ={initialized:!1,enabled:!1};function Nt(t){return VI.get(t)||Object.assign({},nO)}function vf(){return GJ}const $I="https://content-firebaseappcheck.googleapis.com/v1",WJ="exchangeDebugToken",rO={OFFSET_DURATION:3e5,RETRIAL_MIN_WAIT:3e4,RETRIAL_MAX_WAIT:96e4};class QJ{constructor(e,n,r,i,s){if(this.operation=e,this.retryPolicy=n,this.getWaitDuration=r,this.lowerBound=i,this.upperBound=s,this.pending=null,this.nextErrorWaitInterval=i,i>s)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(e){var n=this;return I(function*(){n.stop();try{n.pending=new Gh,yield function YJ(t){return new Promise(e=>{setTimeout(e,t)})}(n.getNextRun(e)),n.pending.resolve(),yield n.pending.promise,n.pending=new Gh,yield n.operation(),n.pending.resolve(),yield n.pending.promise,n.process(!0).catch(()=>{})}catch(r){n.retryPolicy(r)?n.process(!1).catch(()=>{}):n.stop()}})()}getNextRun(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{const n=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),n}}}const tn=new Tr("appCheck","AppCheck",{"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"});function GI(){return GI=I(function*({url:t,body:e},n){const r={"Content-Type":"application/json"},i=n.getImmediate({optional:!0});if(i){const d=yield i.getHeartbeatsHeader();d&&(r["X-Firebase-Client"]=d)}const s={method:"POST",body:JSON.stringify(e),headers:r};let o,a;try{o=yield fetch(t,s)}catch(d){throw tn.create("fetch-network-error",{originalErrorMessage:d?.message})}if(200!==o.status)throw tn.create("fetch-status-error",{httpStatus:o.status});try{a=yield o.json()}catch(d){throw tn.create("fetch-parse-error",{originalErrorMessage:d?.message})}const u=a.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw tn.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${a.ttl}`});const c=1e3*Number(u[1]),l=Date.now();return{token:a.token,expireTimeMillis:l+c,issuedAtTimeMillis:l}}),GI.apply(this,arguments)}const tee="firebase-app-check-database",nee=1,Sc="firebase-app-check-store";let Ef=null;function HI(){return HI=I(function*(t,e){const r=(yield function oO(){return Ef||(Ef=new Promise((t,e)=>{try{const n=indexedDB.open(tee,nee);n.onsuccess=r=>{t(r.target.result)},n.onerror=r=>{var i;e(tn.create("storage-open",{originalErrorMessage:null===(i=r.target.error)||void 0===i?void 0:i.message}))},n.onupgradeneeded=r=>{0===r.oldVersion&&r.target.result.createObjectStore(Sc,{keyPath:"compositeKey"})}}catch(n){e(tn.create("storage-open",{originalErrorMessage:n?.message}))}}),Ef)}()).transaction(Sc,"readwrite"),s=r.objectStore(Sc).put({compositeKey:t,value:e});return new Promise((o,a)=>{s.onsuccess=u=>{o()},r.onerror=u=>{var c;a(tn.create("storage-set",{originalErrorMessage:null===(c=u.target.error)||void 0===c?void 0:c.message}))}})}),HI.apply(this,arguments)}const Ac=new ha("@firebase/app-check");function WI(t,e){return Ds()?function iee(t,e){return function aO(t,e){return HI.apply(this,arguments)}(function cO(t){return`${t.options.appId}-${t.name}`}(t),e)}(t,e).catch(n=>{Ac.warn(`Failed to write token to IndexedDB. Error: ${n}`)}):Promise.resolve()}function QI(){return QI=I(function*(){const t=vf();if(t.enabled&&t.token)return t.token.promise;throw Error("\n            Can't get debug token in production mode.\n        ")}),QI.apply(this,arguments)}const lee={error:"UNKNOWN_ERROR"};function dee(t){return O_.encodeString(JSON.stringify(t),!1)}function Tf(t){return YI.apply(this,arguments)}function YI(){return YI=I(function*(t,e=!1){const n=t.app;!function iO(t){if(!Nt(t).activated)throw tn.create("use-before-activation",{appName:t.name})}(n);const r=Nt(n);let s,i=r.token;if(i&&!va(i)&&(r.token=void 0,i=void 0),!i){const u=yield r.cachedTokenPromise;u&&(va(u)?i=u:yield WI(n,void 0))}if(!e&&i&&va(i))return{token:i.token};let a,o=!1;if(function lO(){return vf().enabled}()){r.exchangeTokenPromise||(r.exchangeTokenPromise=function jI(t,e){return GI.apply(this,arguments)}(function eee(t,e){const{projectId:n,appId:r,apiKey:i}=t.options;return{url:`${$I}/projects/${n}/apps/${r}:${WJ}?key=${i}`,body:{debug_token:e}}}(n,yield function dO(){return QI.apply(this,arguments)}()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),o=!0);const u=yield r.exchangeTokenPromise;return yield WI(n,u),r.token=u,{token:u.token}}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),o=!0),i=yield Nt(n).exchangeTokenPromise}catch(u){"appCheck/throttled"===u.code?Ac.warn(u.message):Ac.error(u),s=u}return i?s?a=va(i)?{token:i.token,internalError:s}:pO(s):(a={token:i.token},r.token=i,yield WI(n,i)):a=pO(s),o&&function fO(t,e){const n=Nt(t).tokenObservers;for(const r of n)try{"EXTERNAL"===r.type&&null!=e.error?r.error(e.error):r.next(e)}catch{}}(n,a),a}),YI.apply(this,arguments)}function ZI(t,e){const n=Nt(t),r=n.tokenObservers.filter(i=>i.next!==e);0===r.length&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),n.tokenObservers=r}function hO(t){const{app:e}=t,n=Nt(e);let r=n.tokenRefresher;r||(r=function hee(t){const{app:e}=t;return new QJ(I(function*(){let r;if(r=Nt(e).token?yield Tf(t,!0):yield Tf(t),r.error)throw r.error;if(r.internalError)throw r.internalError}),()=>!0,()=>{const n=Nt(e);if(n.token){let r=n.token.issuedAtTimeMillis+.5*(n.token.expireTimeMillis-n.token.issuedAtTimeMillis)+3e5;return r=Math.min(r,n.token.expireTimeMillis-3e5),Math.max(0,r-Date.now())}return 0},rO.RETRIAL_MIN_WAIT,rO.RETRIAL_MAX_WAIT)}(t),n.tokenRefresher=r),!r.isRunning()&&n.isTokenAutoRefreshEnabled&&r.start()}function va(t){return t.expireTimeMillis-Date.now()>0}function pO(t){return{token:dee(lee),error:t}}class fee{constructor(e,n){this.app=e,this.heartbeatServiceProvider=n}_delete(){const{tokenObservers:e}=Nt(this.app);for(const n of e)ZI(this.app,n.next);return Promise.resolve()}}const EO="app-check-internal";!function See(){jt(new Rt("app-check",t=>function pee(t,e){return new fee(t,e)}(t.getProvider("app").getImmediate(),t.getProvider("heartbeat")),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,n)=>{t.getProvider(EO).initialize()})),jt(new Rt(EO,t=>function gee(t){return{getToken:e=>Tf(t,e),addTokenListener:e=>function XI(t,e,n,r){const{app:i}=t,s=Nt(i);if(s.tokenObservers=[...s.tokenObservers,{next:n,error:r,type:e}],s.token&&va(s.token)){const a=s.token;Promise.resolve().then(()=>{n({token:a.token}),hO(t)}).catch(()=>{})}s.cachedTokenPromise.then(()=>hO(t))}(t,"INTERNAL",e),removeTokenListener:e=>ZI(t.app,e)}}(t.getProvider("app-check").getImmediate()),"PUBLIC").setInstantiationMode("EXPLICIT")),Le("@firebase/app-check","0.6.4")}();class nE{constructor(){return nf("app-check")}}typeof window<"u"&&window;var F,kee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ci={},iE=iE||{},Y=kee||self;function Df(){}function Cf(t){var e=typeof t;return"array"==(e="object"!=e?e:t?Array.isArray(t)?"array":e:"null")||"object"==e&&"number"==typeof t.length}function xc(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var sE="closure_uid_"+(1e9*Math.random()>>>0),Pee=0;function Oee(t,e,n){return t.call.apply(t.bind,arguments)}function Lee(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,r),t.apply(e,i)}}return function(){return t.apply(e,arguments)}}function Gt(t,e,n){return(Gt=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Oee:Lee).apply(null,arguments)}function Sf(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(this,r)}}function Pt(t,e){function n(){}n.prototype=e.prototype,t.X=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Wb=function(r,i,s){for(var o=Array(arguments.length-2),a=2;a<arguments.length;a++)o[a-2]=arguments[a];return e.prototype[i].apply(r,o)}}function Li(){this.s=this.s,this.o=this.o}Li.prototype.s=!1,Li.prototype.na=function(){!this.s&&(this.s=!0,this.M(),0)&&function Nee(t){Object.prototype.hasOwnProperty.call(t,sE)&&t[sE]||(t[sE]=++Pee)}(this)},Li.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const bO=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"==typeof t)return"string"!=typeof e||1!=e.length?-1:t.indexOf(e,0);for(let n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1};function oE(t){const e=t.length;if(0<e){const n=Array(e);for(let r=0;r<e;r++)n[r]=t[r];return n}return[]}function DO(t,e){for(let n=1;n<arguments.length;n++){const r=arguments[n];if(Cf(r)){const i=t.length||0,s=r.length||0;t.length=i+s;for(let o=0;o<s;o++)t[i+o]=r[o]}else t.push(r)}}function Ht(t,e){this.type=t,this.g=this.target=e,this.defaultPrevented=!1}Ht.prototype.h=function(){this.defaultPrevented=!0};var Uee=function(){if(!Y.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{Y.addEventListener("test",Df,e),Y.removeEventListener("test",Df,e)}catch{}return t}();function Af(t){return/^[\s\xa0]*$/.test(t)}var CO=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function aE(t,e){return t<e?-1:t>e?1:0}function xf(){var t=Y.navigator;return t&&(t=t.userAgent)?t:""}function Cr(t){return-1!=xf().indexOf(t)}function uE(t){return uE[" "](t),t}uE[" "]=Df;var Rf,$ee=Cr("Opera"),wa=Cr("Trident")||Cr("MSIE"),SO=Cr("Edge"),cE=SO||wa,AO=Cr("Gecko")&&!(-1!=xf().toLowerCase().indexOf("webkit")&&!Cr("Edge"))&&!(Cr("Trident")||Cr("MSIE"))&&!Cr("Edge"),Bee=-1!=xf().toLowerCase().indexOf("webkit")&&!Cr("Edge");function xO(){var t=Y.document;return t?t.documentMode:void 0}e:{var lE="",dE=function(){var t=xf();return AO?/rv:([^\);]+)(\)|;)/.exec(t):SO?/Edge\/([\d\.]+)/.exec(t):wa?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Bee?/WebKit\/(\S+)/.exec(t):$ee?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(dE&&(lE=dE?dE[1]:""),wa){var hE=xO();if(null!=hE&&hE>parseFloat(lE)){Rf=String(hE);break e}}Rf=lE}var jee={};var Hee=Y.document&&wa&&(xO()||parseInt(Rf,10))||void 0;function Rc(t,e){if(Ht.call(this,t?t.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(AO){e:{try{uE(e.nodeName);var i=!0;break e}catch{}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:zee[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&Rc.X.h.call(this)}}Pt(Rc,Ht);var zee={2:"touch",3:"pen",4:"mouse"};Rc.prototype.h=function(){Rc.X.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var Mc="closure_listenable_"+(1e6*Math.random()|0),qee=0;function Wee(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ha=i,this.key=++qee,this.ba=this.ea=!1}function Mf(t){t.ba=!0,t.listener=null,t.proxy=null,t.src=null,t.ha=null}function pE(t,e,n){for(const r in t)e.call(n,t[r],r,t)}function MO(t){const e={};for(const n in t)e[n]=t[n];return e}const kO="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function NO(t,e){let n,r;for(let i=1;i<arguments.length;i++){for(n in r=arguments[i],r)t[n]=r[n];for(let s=0;s<kO.length;s++)n=kO[s],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function kf(t){this.src=t,this.g={},this.h=0}function gE(t,e){var n=e.type;if(n in t.g){var s,r=t.g[n],i=bO(r,e);(s=0<=i)&&Array.prototype.splice.call(r,i,1),s&&(Mf(e),0==t.g[n].length&&(delete t.g[n],t.h--))}}function mE(t,e,n,r){for(var i=0;i<t.length;++i){var s=t[i];if(!s.ba&&s.listener==e&&s.capture==!!n&&s.ha==r)return i}return-1}kf.prototype.add=function(t,e,n,r,i){var s=t.toString();(t=this.g[s])||(t=this.g[s]=[],this.h++);var o=mE(t,e,r,i);return-1<o?(e=t[o],n||(e.ea=!1)):((e=new Wee(e,this.src,s,!!r,i)).ea=n,t.push(e)),e};var yE="closure_lm_"+(1e6*Math.random()|0),_E={};function PO(t,e,n,r,i){if(r&&r.once)return LO(t,e,n,r,i);if(Array.isArray(e)){for(var s=0;s<e.length;s++)PO(t,e[s],n,r,i);return null}return n=EE(n),t&&t[Mc]?t.N(e,n,xc(r)?!!r.capture:!!r,i):OO(t,e,n,!1,r,i)}function OO(t,e,n,r,i,s){if(!e)throw Error("Invalid event type");var o=xc(i)?!!i.capture:!!i,a=wE(t);if(a||(t[yE]=a=new kf(t)),(n=a.add(e,n,r,o,s)).proxy)return n;if(r=function Kee(){const e=Qee;return function t(n){return e.call(t.src,t.listener,n)}}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)Uee||(i=o),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(UO(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function LO(t,e,n,r,i){if(Array.isArray(e)){for(var s=0;s<e.length;s++)LO(t,e[s],n,r,i);return null}return n=EE(n),t&&t[Mc]?t.O(e,n,xc(r)?!!r.capture:!!r,i):OO(t,e,n,!0,r,i)}function FO(t,e,n,r,i){if(Array.isArray(e))for(var s=0;s<e.length;s++)FO(t,e[s],n,r,i);else r=xc(r)?!!r.capture:!!r,n=EE(n),t&&t[Mc]?(t=t.i,(e=String(e).toString())in t.g&&-1<(n=mE(s=t.g[e],n,r,i))&&(Mf(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete t.g[e],t.h--))):t&&(t=wE(t))&&(e=t.g[e.toString()],t=-1,e&&(t=mE(e,n,r,i)),(n=-1<t?e[t]:null)&&vE(n))}function vE(t){if("number"!=typeof t&&t&&!t.ba){var e=t.src;if(e&&e[Mc])gE(e.i,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(UO(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=wE(e))?(gE(n,t),0==n.h&&(n.src=null,e[yE]=null)):Mf(t)}}}function UO(t){return t in _E?_E[t]:_E[t]="on"+t}function Qee(t,e){if(t.ba)t=!0;else{e=new Rc(e,this);var n=t.listener,r=t.ha||t.src;t.ea&&vE(t),t=n.call(r,e)}return t}function wE(t){return(t=t[yE])instanceof kf?t:null}var IE="__closure_events_fn_"+(1e9*Math.random()>>>0);function EE(t){return"function"==typeof t?t:(t[IE]||(t[IE]=function(e){return t.handleEvent(e)}),t[IE])}function wt(){Li.call(this),this.i=new kf(this),this.P=this,this.I=null}function Ot(t,e){var n,r=t.I;if(r)for(n=[];r;r=r.I)n.push(r);if(t=t.P,r=e.type||e,"string"==typeof e)e=new Ht(e,t);else if(e instanceof Ht)e.target=e.target||t;else{var i=e;NO(e=new Ht(r,t),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=Nf(o,r,!0,e)&&i}if(i=Nf(o=e.g=t,r,!0,e)&&i,i=Nf(o,r,!1,e)&&i,n)for(s=0;s<n.length;s++)i=Nf(o=e.g=n[s],r,!1,e)&&i}function Nf(t,e,n,r){if(!(e=t.i.g[String(e)]))return!0;e=e.concat();for(var i=!0,s=0;s<e.length;++s){var o=e[s];if(o&&!o.ba&&o.capture==n){var a=o.listener,u=o.ha||o.src;o.ea&&gE(t.i,o),i=!1!==a.call(u,r)&&i}}return i&&!r.defaultPrevented}Pt(wt,Li),wt.prototype[Mc]=!0,wt.prototype.removeEventListener=function(t,e,n,r){FO(this,t,e,n,r)},wt.prototype.M=function(){if(wt.X.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Mf(n[r]);delete t.g[e],t.h--}}this.I=null},wt.prototype.N=function(t,e,n,r){return this.i.add(String(t),e,!1,n,r)},wt.prototype.O=function(t,e,n,r){return this.i.add(String(t),e,!0,n,r)};var TE=Y.JSON.stringify;function Yee(){var t=BO;let e=null;return t.g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),e}var bE,VO=new class{constructor(t,e){this.i=t,this.j=e,this.h=0,this.g=null}get(){let t;return 0<this.h?(this.h--,t=this.g,this.g=t.next,t.next=null):t=this.i(),t}}(()=>new Zee,t=>t.reset());class Zee{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function Jee(t){Y.setTimeout(()=>{throw t},0)}function $O(t,e){bE||function ete(){var t=Y.Promise.resolve(void 0);bE=function(){t.then(tte)}}(),DE||(bE(),DE=!0),BO.add(t,e)}var DE=!1,BO=new class Xee{constructor(){this.h=this.g=null}add(e,n){const r=VO.get();r.set(e,n),this.h?this.h.next=r:this.g=r,this.h=r}};function tte(){for(var t;t=Yee();){try{t.h.call(t.g)}catch(n){Jee(n)}var e=VO;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}DE=!1}function Pf(t,e){wt.call(this),this.h=t||1,this.g=e||Y,this.j=Gt(this.lb,this),this.l=Date.now()}function CE(t){t.ca=!1,t.R&&(t.g.clearTimeout(t.R),t.R=null)}function SE(t,e,n){if("function"==typeof t)n&&(t=Gt(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=Gt(t.handleEvent,t)}return 2147483647<Number(e)?-1:Y.setTimeout(t,e||0)}function jO(t){t.g=SE(()=>{t.g=null,t.i&&(t.i=!1,jO(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}Pt(Pf,wt),(F=Pf.prototype).ca=!1,F.R=null,F.lb=function(){if(this.ca){var t=Date.now()-this.l;0<t&&t<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-t):(this.R&&(this.g.clearTimeout(this.R),this.R=null),Ot(this,"tick"),this.ca&&(CE(this),this.start()))}},F.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},F.M=function(){Pf.X.M.call(this),CE(this),delete this.g};class nte extends Li{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:jO(this)}M(){super.M(),this.g&&(Y.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function kc(t){Li.call(this),this.h=t,this.g={}}Pt(kc,Li);var GO=[];function HO(t,e,n,r){Array.isArray(n)||(n&&(GO[0]=n.toString()),n=GO);for(var i=0;i<n.length;i++){var s=PO(e,n[i],r||t.handleEvent,!1,t.h||t);if(!s)break;t.g[s.key]=s}}function zO(t){pE(t.g,function(e,n){this.g.hasOwnProperty(n)&&vE(e)},t),t.g={}}function Of(){this.g=!0}function Ia(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+function ote(t,e){if(!t.g)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}return TE(n)}catch{return e}}(t,n)+(r?" "+r:"")})}kc.prototype.M=function(){kc.X.M.call(this),zO(this)},kc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Of.prototype.Aa=function(){this.g=!1},Of.prototype.info=function(){};var Bs={},qO=null;function Lf(){return qO=qO||new wt}function WO(t){Ht.call(this,Bs.Pa,t)}function Nc(t){const e=Lf();Ot(e,new WO(e))}function KO(t,e){Ht.call(this,Bs.STAT_EVENT,t),this.stat=e}function nn(t){const e=Lf();Ot(e,new KO(e,t))}function QO(t,e){Ht.call(this,Bs.Qa,t),this.size=e}function Pc(t,e){if("function"!=typeof t)throw Error("Fn must not be null and must be a function");return Y.setTimeout(function(){t()},e)}Bs.Pa="serverreachability",Pt(WO,Ht),Bs.STAT_EVENT="statevent",Pt(KO,Ht),Bs.Qa="timingevent",Pt(QO,Ht);var Ff={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},YO={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function AE(){}function ZO(){}AE.prototype.h=null;var ME,Oc={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function xE(){Ht.call(this,"d")}function RE(){Ht.call(this,"c")}function Uf(){}function Lc(t,e,n,r){this.l=t,this.j=e,this.m=n,this.U=r||1,this.S=new kc(this),this.O=ate,this.T=new Pf(t=cE?125:void 0),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new JO}function JO(){this.i=null,this.g="",this.h=!1}Pt(xE,Ht),Pt(RE,Ht),Pt(Uf,AE),Uf.prototype.g=function(){return new XMLHttpRequest},Uf.prototype.i=function(){return{}},ME=new Uf;var ate=45e3,kE={},Vf={};function NE(t,e,n){t.K=1,t.v=Gf(li(e)),t.s=n,t.P=!0,eL(t,null)}function eL(t,e){t.F=Date.now(),Fc(t),t.A=li(t.v);var n=t.A,r=t.U;Array.isArray(r)||(r=[String(r)]),lL(n.i,"t",r),t.C=0,n=t.l.H,t.h=new JO,t.g=PL(t.l,n?e:null,!t.s),0<t.N&&(t.L=new nte(Gt(t.La,t,t.g),t.N)),HO(t.S,t.g,"readystatechange",t.ib),e=t.H?MO(t.H):{},t.s?(t.u||(t.u="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.g.da(t.A,t.u,t.s,e)):(t.u="GET",t.g.da(t.A,t.u,null,e)),Nc(),function rte(t,e,n,r,i,s){t.info(function(){if(t.g)if(s)for(var o="",a=s.split("&"),u=0;u<a.length;u++){var c=a[u].split("=");if(1<c.length){var l=c[0];c=c[1];var d=l.split("_");o=2<=d.length&&"type"==d[1]?o+(l+"=")+c+"&":o+(l+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+o})}(t.j,t.u,t.A,t.m,t.U,t.s)}function tL(t){return!!t.g&&"GET"==t.u&&2!=t.K&&t.l.Da}function nL(t,e,n){let i,r=!0;for(;!t.I&&t.C<n.length;){if(i=ute(t,n),i==Vf){4==e&&(t.o=4,nn(14),r=!1),Ia(t.j,t.m,null,"[Incomplete Response]");break}if(i==kE){t.o=4,nn(15),Ia(t.j,t.m,n,"[Invalid Chunk]"),r=!1;break}Ia(t.j,t.m,i,null),PE(t,i)}tL(t)&&i!=Vf&&i!=kE&&(t.h.g="",t.C=0),4!=e||0!=n.length||t.h.h||(t.o=1,nn(16),r=!1),t.i=t.i&&r,r?0<n.length&&!t.$&&(t.$=!0,(e=t.l).g==t&&e.$&&!e.K&&(e.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),jE(e),e.K=!0,nn(11))):(Ia(t.j,t.m,n,"[Invalid Chunked Response]"),js(t),Uc(t))}function ute(t,e){var n=t.C,r=e.indexOf("\n",n);return-1==r?Vf:(n=Number(e.substring(n,r)),isNaN(n)?kE:(r+=1)+n>e.length?Vf:(e=e.substr(r,n),t.C=r+n,e))}function Fc(t){t.V=Date.now()+t.O,rL(t,t.O)}function rL(t,e){if(null!=t.B)throw Error("WatchDog timer not null");t.B=Pc(Gt(t.gb,t),e)}function $f(t){t.B&&(Y.clearTimeout(t.B),t.B=null)}function Uc(t){0==t.l.G||t.I||RL(t.l,t)}function js(t){$f(t);var e=t.L;e&&"function"==typeof e.na&&e.na(),t.L=null,CE(t.T),zO(t.S),t.g&&(e=t.g,t.g=null,e.abort(),e.na())}function PE(t,e){try{var n=t.l;if(0!=n.G&&(n.g==t||OE(n.h,t)))if(!t.J&&OE(n.h,t)&&3==n.G){try{var r=n.Fa.g.parse(e)}catch{r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<t.F))break e;Qf(n),Wf(n)}BE(n),nn(18)}}else n.Ba=i[1],0<n.Ba-n.T&&37500>i[2]&&n.L&&0==n.A&&!n.v&&(n.v=Pc(Gt(n.cb,n),6e3));if(1>=fL(n.h)&&n.ja){try{n.ja()}catch{}n.ja=void 0}}else Hs(n,11)}else if((t.J||n.g==t)&&Qf(n),!Af(e))for(i=n.Fa.g.parse(e),e=0;e<i.length;e++){let c=i[e];if(n.T=c[0],c=c[1],2==n.G)if("c"==c[0]){n.I=c[1],n.ka=c[2];const l=c[3];null!=l&&(n.ma=l,n.j.info("VER="+n.ma));const d=c[4];null!=d&&(n.Ca=d,n.j.info("SVER="+n.Ca));const h=c[5];null!=h&&"number"==typeof h&&0<h&&(n.J=r=1.5*h,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;const f=t.g;if(f){const p=f.g?f.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(p){var s=r.h;s.g||-1==p.indexOf("spdy")&&-1==p.indexOf("quic")&&-1==p.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(LE(s,s.h),s.h=null))}if(r.D){const g=f.g?f.g.getResponseHeader("X-HTTP-Session-Id"):null;g&&(r.za=g,Fe(r.F,r.D,g))}}n.G=3,n.l&&n.l.xa(),n.$&&(n.P=Date.now()-t.F,n.j.info("Handshake RTT: "+n.P+"ms"));var o=t;if((r=n).sa=NL(r,r.H?r.ka:null,r.V),o.J){pL(r.h,o);var a=o,u=r.J;u&&a.setTimeout(u),a.B&&($f(a),Fc(a)),r.g=o}else AL(r);0<n.i.length&&Kf(n)}else"stop"!=c[0]&&"close"!=c[0]||Hs(n,7);else 3==n.G&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?Hs(n,7):$E(n):"noop"!=c[0]&&n.l&&n.l.wa(c),n.A=0)}Nc()}catch{}}function iL(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(Cf(t)||"string"==typeof t)Array.prototype.forEach.call(t,e,void 0);else for(var n=function lte(t){if(t.oa&&"function"==typeof t.oa)return t.oa();if(!t.W||"function"!=typeof t.W){if(typeof Map<"u"&&t instanceof Map)return Array.from(t.keys());if(!(typeof Set<"u"&&t instanceof Set)){if(Cf(t)||"string"==typeof t){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}e=[],n=0;for(const r in t)e[n++]=r;return e}}}(t),r=function cte(t){if(t.W&&"function"==typeof t.W)return t.W();if(typeof Map<"u"&&t instanceof Map||typeof Set<"u"&&t instanceof Set)return Array.from(t.values());if("string"==typeof t)return t.split("");if(Cf(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t),i=r.length,s=0;s<i;s++)e.call(void 0,r[s],n&&n[s],t)}(F=Lc.prototype).setTimeout=function(t){this.O=t},F.ib=function(t){t=t.target;const e=this.L;e&&3==di(t)?e.l():this.La(t)},F.La=function(t){try{if(t==this.g)e:{const l=di(this.g);var e=this.g.Ea();if(this.g.aa(),!(3>l)&&(3!=l||cE||this.g&&(this.h.h||this.g.fa()||EL(this.g)))){this.I||4!=l||7==e||Nc(),$f(this);var n=this.g.aa();this.Y=n;t:if(tL(this)){var r=EL(this.g);t="";var i=r.length,s=4==di(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){js(this),Uc(this);var o="";break t}this.h.i=new Y.TextDecoder}for(e=0;e<i;e++)this.h.h=!0,t+=this.h.i.decode(r[e],{stream:s&&e==i-1});r.splice(0,i),this.h.g+=t,this.C=0,o=this.h.g}else o=this.g.fa();if(this.i=200==n,function ite(t,e,n,r,i,s,o){t.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+s+" "+o})}(this.j,this.u,this.A,this.m,this.U,l,n),this.i){if(this.Z&&!this.J){t:{if(this.g){var a,u=this.g;if((a=u.g?u.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Af(a)){var c=a;break t}}c=null}if(!(n=c)){this.i=!1,this.o=3,nn(12),js(this),Uc(this);break e}Ia(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,PE(this,n)}this.P?(nL(this,l,o),cE&&this.i&&3==l&&(HO(this.S,this.T,"tick",this.hb),this.T.start())):(Ia(this.j,this.m,o,null),PE(this,o)),4==l&&js(this),this.i&&!this.I&&(4==l?RL(this.l,this):(this.i=!1,Fc(this)))}else 400==n&&0<o.indexOf("Unknown SID")?(this.o=3,nn(12)):(this.o=0,nn(13)),js(this),Uc(this)}}}catch{}},F.hb=function(){if(this.g){var t=di(this.g),e=this.g.fa();this.C<e.length&&($f(this),nL(this,t,e),this.i&&4!=t&&Fc(this))}},F.cancel=function(){this.I=!0,js(this)},F.gb=function(){this.B=null;const t=Date.now();0<=t-this.V?(function ste(t,e){t.info(function(){return"TIMEOUT: "+e})}(this.j,this.A),2!=this.K&&(Nc(),nn(17)),js(this),this.o=2,Uc(this)):rL(this,this.V-t)};var sL=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Gs(t,e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,t instanceof Gs){this.h=void 0!==e?e:t.h,Bf(this,t.j),this.s=t.s,this.g=t.g,jf(this,t.m),this.l=t.l,e=t.i;var n=new Bc;n.i=e.i,e.g&&(n.g=new Map(e.g),n.h=e.h),oL(this,n),this.o=t.o}else t&&(n=String(t).match(sL))?(this.h=!!e,Bf(this,n[1]||"",!0),this.s=Vc(n[2]||""),this.g=Vc(n[3]||"",!0),jf(this,n[4]),this.l=Vc(n[5]||"",!0),oL(this,n[6]||"",!0),this.o=Vc(n[7]||"")):(this.h=!!e,this.i=new Bc(null,this.h))}function li(t){return new Gs(t)}function Bf(t,e,n){t.j=n?Vc(e,!0):e,t.j&&(t.j=t.j.replace(/:$/,""))}function jf(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.m=e}else t.m=null}function oL(t,e,n){e instanceof Bc?(t.i=e,function yte(t,e){e&&!t.j&&(Fi(t),t.i=null,t.g.forEach(function(n,r){var i=r.toLowerCase();r!=i&&(uL(this,r),lL(this,i,n))},t)),t.j=e}(t.i,t.h)):(n||(e=$c(e,gte)),t.i=new Bc(e,t.h))}function Fe(t,e,n){t.i.set(e,n)}function Gf(t){return Fe(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Vc(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function $c(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,hte),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function hte(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Gs.prototype.toString=function(){var t=[],e=this.j;e&&t.push($c(e,aL,!0),":");var n=this.g;return(n||"file"==e)&&(t.push("//"),(e=this.s)&&t.push($c(e,aL,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&t.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&t.push("/"),t.push($c(n,"/"==n.charAt(0)?pte:fte,!0))),(n=this.i.toString())&&t.push("?",n),(n=this.o)&&t.push("#",$c(n,mte)),t.join("")};var aL=/[#\/\?@]/g,fte=/[#\?:]/g,pte=/[#\?]/g,gte=/[#\?@]/g,mte=/#/g;function Bc(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function Fi(t){t.g||(t.g=new Map,t.h=0,t.i&&function dte(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var s=t[n].substring(0,r);i=t[n].substring(r+1)}else s=t[n];e(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function uL(t,e){Fi(t),e=Ea(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function cL(t,e){return Fi(t),e=Ea(t,e),t.g.has(e)}function lL(t,e,n){uL(t,e),0<n.length&&(t.i=null,t.g.set(Ea(t,e),oE(n)),t.h+=n.length)}function Ea(t,e){return e=String(e),t.j&&(e=e.toLowerCase()),e}function dL(t){this.l=t||vte,t=Y.PerformanceNavigationTiming?0<(t=Y.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):!!(Y.g&&Y.g.Ga&&Y.g.Ga()&&Y.g.Ga().$b),this.j=t?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}(F=Bc.prototype).add=function(t,e){Fi(this),this.i=null,t=Ea(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this},F.forEach=function(t,e){Fi(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)},F.oa=function(){Fi(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r<e.length;r++){const i=t[r];for(let s=0;s<i.length;s++)n.push(e[r])}return n},F.W=function(t){Fi(this);let e=[];if("string"==typeof t)cL(this,t)&&(e=e.concat(this.g.get(Ea(this,t))));else{t=Array.from(this.g.values());for(let n=0;n<t.length;n++)e=e.concat(t[n])}return e},F.set=function(t,e){return Fi(this),this.i=null,cL(this,t=Ea(this,t))&&(this.h-=this.g.get(t).length),this.g.set(t,[e]),this.h+=1,this},F.get=function(t,e){return t&&0<(t=this.W(t)).length?String(t[0]):e},F.toString=function(){if(this.i)return this.i;if(!this.g)return"";const t=[],e=Array.from(this.g.keys());for(var n=0;n<e.length;n++){var r=e[n];const s=encodeURIComponent(String(r)),o=this.W(r);for(r=0;r<o.length;r++){var i=s;""!==o[r]&&(i+="="+encodeURIComponent(String(o[r]))),t.push(i)}}return this.i=t.join("&")};var vte=10;function hL(t){return!!t.h||!!t.g&&t.g.size>=t.j}function fL(t){return t.h?1:t.g?t.g.size:0}function OE(t,e){return t.h?t.h==e:!!t.g&&t.g.has(e)}function LE(t,e){t.g?t.g.add(e):t.h=e}function pL(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}function gL(t){if(null!=t.h)return t.i.concat(t.h.D);if(null!=t.g&&0!==t.g.size){let e=t.i;for(const n of t.g.values())e=e.concat(n.D);return e}return oE(t.i)}function FE(){}function wte(){this.g=new FE}function Ite(t,e,n){const r=n||"";try{iL(t,function(i,s){let o=i;xc(i)&&(o=TE(i)),e.push(r+s+"="+encodeURIComponent(o))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function Hf(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function jc(t){this.l=t.ac||null,this.j=t.jb||!1}function zf(t,e){wt.call(this),this.D=t,this.u=e,this.m=void 0,this.readyState=UE,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}dL.prototype.cancel=function(){if(this.i=gL(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const t of this.g.values())t.cancel();this.g.clear()}},FE.prototype.stringify=function(t){return Y.JSON.stringify(t,void 0)},FE.prototype.parse=function(t){return Y.JSON.parse(t,void 0)},Pt(jc,AE),jc.prototype.g=function(){return new zf(this.l,this.j)},jc.prototype.i=function(t){return function(){return t}}({}),Pt(zf,wt);var UE=0;function mL(t){t.j.read().then(t.Ta.bind(t)).catch(t.ga.bind(t))}function Gc(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Hc(t)}function Hc(t){t.onreadystatechange&&t.onreadystatechange.call(t)}(F=zf.prototype).open=function(t,e){if(this.readyState!=UE)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Hc(this)},F.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.D||Y).fetch(new Request(this.B,e)).then(this.Wa.bind(this),this.ga.bind(this))},F.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Gc(this)),this.readyState=UE},F.Wa=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Hc(this)),this.g&&(this.readyState=3,Hc(this),this.g)))if("arraybuffer"===this.responseType)t.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if(typeof Y.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;mL(this)}else t.text().then(this.Va.bind(this),this.ga.bind(this))},F.Ta=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?Gc(this):Hc(this),3==this.readyState&&mL(this)}},F.Va=function(t){this.g&&(this.response=this.responseText=t,Gc(this))},F.Ua=function(t){this.g&&(this.response=t,Gc(this))},F.ga=function(){this.g&&Gc(this)},F.setRequestHeader=function(t,e){this.v.append(t,e)},F.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""},F.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)t.push((n=n.value)[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(zf.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(t){this.m=t?"include":"same-origin"}});var Tte=Y.JSON.parse;function qe(t){wt.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=yL,this.K=this.L=!1}Pt(qe,wt);var yL="",bte=/^https?$/i,Dte=["POST","PUT"];function _L(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,vL(t),qf(t)}function vL(t){t.D||(t.D=!0,Ot(t,"complete"),Ot(t,"error"))}function wL(t){if(t.h&&typeof iE<"u"&&(!t.C[1]||4!=di(t)||2!=t.aa()))if(t.v&&4==di(t))SE(t.Ha,0,t);else if(Ot(t,"readystatechange"),4==di(t)){t.h=!1;try{const a=t.aa();e:switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var n;if(!(n=e)){var r;if(r=0===a){var i=String(t.H).match(sL)[1]||null;if(!i&&Y.self&&Y.self.location){var s=Y.self.location.protocol;i=s.substr(0,s.length-1)}r=!bte.test(i?i.toLowerCase():"")}n=r}if(n)Ot(t,"complete"),Ot(t,"success");else{t.m=6;try{var o=2<di(t)?t.g.statusText:""}catch{o=""}t.j=o+" ["+t.aa()+"]",vL(t)}}finally{qf(t)}}}function qf(t,e){if(t.g){IL(t);const n=t.g,r=t.C[0]?Df:null;t.g=null,t.C=null,e||Ot(t,"ready");try{n.onreadystatechange=r}catch{}}}function IL(t){t.g&&t.K&&(t.g.ontimeout=null),t.A&&(Y.clearTimeout(t.A),t.A=null)}function di(t){return t.g?t.g.readyState:0}function EL(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.J){case yL:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch{return null}}function TL(t){let e="";return pE(t,function(n,r){e+=r,e+=":",e+=n,e+="\r\n"}),e}function VE(t,e,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=TL(n),"string"==typeof t?null!=n&&encodeURIComponent(String(n)):Fe(t,e,n))}function zc(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function bL(t){this.Ca=0,this.i=[],this.j=new Of,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.ab=this.U=0,this.Za=zc("failFast",!1,t),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Xa=zc("baseRetryDelayMs",5e3,t),this.bb=zc("retryDelaySeedMs",1e4,t),this.$a=zc("forwardChannelMaxRetries",2,t),this.ta=zc("forwardChannelRequestTimeoutMs",2e4,t),this.ra=t&&t.xmlHttpFactory||void 0,this.Da=t&&t.Zb||!1,this.J=void 0,this.H=t&&t.supportsCrossDomainXhr||!1,this.I="",this.h=new dL(t&&t.concurrentRequestLimit),this.Fa=new wte,this.O=t&&t.fastHandshake||!1,this.N=t&&t.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Ya=t&&t.Xb||!1,t&&t.Aa&&this.j.Aa(),t&&t.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&t&&t.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}function $E(t){if(DL(t),3==t.G){var e=t.U++,n=li(t.F);Fe(n,"SID",t.I),Fe(n,"RID",e),Fe(n,"TYPE","terminate"),qc(t,n),(e=new Lc(t,t.j,e,void 0)).K=2,e.v=Gf(li(n)),n=!1,Y.navigator&&Y.navigator.sendBeacon&&(n=Y.navigator.sendBeacon(e.v.toString(),"")),!n&&Y.Image&&((new Image).src=e.v,n=!0),n||(e.g=PL(e.l,null),e.g.da(e.v)),e.F=Date.now(),Fc(e)}kL(t)}function Wf(t){t.g&&(jE(t),t.g.cancel(),t.g=null)}function DL(t){Wf(t),t.u&&(Y.clearTimeout(t.u),t.u=null),Qf(t),t.h.cancel(),t.m&&("number"==typeof t.m&&Y.clearTimeout(t.m),t.m=null)}function Kf(t){hL(t.h)||t.m||(t.m=!0,$O(t.Ja,t),t.C=0)}function CL(t,e){var n;n=e?e.m:t.U++;const r=li(t.F);Fe(r,"SID",t.I),Fe(r,"RID",n),Fe(r,"AID",t.T),qc(t,r),t.o&&t.s&&VE(r,t.o,t.s),n=new Lc(t,t.j,n,t.C+1),null===t.o&&(n.H=t.s),e&&(t.i=e.D.concat(t.i)),e=SL(t,n,1e3),n.setTimeout(Math.round(.5*t.ta)+Math.round(.5*t.ta*Math.random())),LE(t.h,n),NE(n,r,e)}function qc(t,e){t.ia&&pE(t.ia,function(n,r){Fe(e,r,n)}),t.l&&iL({},function(n,r){Fe(e,r,n)})}function SL(t,e,n){n=Math.min(t.i.length,n);var r=t.l?Gt(t.l.Ra,t.l,t):null;e:{var i=t.i;let s=-1;for(;;){const o=["count="+n];-1==s?0<n?(s=i[0].h,o.push("ofs="+s)):s=0:o.push("ofs="+s);let a=!0;for(let u=0;u<n;u++){let c=i[u].h;const l=i[u].g;if(c-=s,0>c)s=Math.max(0,i[u].h-100),a=!1;else try{Ite(l,o,"req"+c+"_")}catch{r&&r(l)}}if(a){r=o.join("&");break e}}}return t=t.i.splice(0,n),e.D=t,r}function AL(t){t.g||t.u||(t.Z=1,$O(t.Ia,t),t.A=0)}function BE(t){return!(t.g||t.u||3<=t.A||(t.Z++,t.u=Pc(Gt(t.Ia,t),ML(t,t.A)),t.A++,0))}function jE(t){null!=t.B&&(Y.clearTimeout(t.B),t.B=null)}function xL(t){t.g=new Lc(t,t.j,"rpc",t.Z),null===t.o&&(t.g.H=t.s),t.g.N=0;var e=li(t.sa);Fe(e,"RID","rpc"),Fe(e,"SID",t.I),Fe(e,"CI",t.L?"0":"1"),Fe(e,"AID",t.T),Fe(e,"TYPE","xmlhttp"),qc(t,e),t.o&&t.s&&VE(e,t.o,t.s),t.J&&t.g.setTimeout(t.J);var n=t.g;t=t.ka,n.K=1,n.v=Gf(li(e)),n.s=null,n.P=!0,eL(n,t)}function Qf(t){null!=t.v&&(Y.clearTimeout(t.v),t.v=null)}function RL(t,e){var n=null;if(t.g==e){Qf(t),jE(t),t.g=null;var r=2}else{if(!OE(t.h,e))return;n=e.D,pL(t.h,e),r=1}if(0!=t.G)if(t.pa=e.Y,e.i)if(1==r){n=e.s?e.s.length:0,e=Date.now()-e.F;var i=t.C;Ot(r=Lf(),new QO(r,n)),Kf(t)}else AL(t);else if(3==(i=e.o)||0==i&&0<t.pa||!(1==r&&function Ste(t,e){return!(fL(t.h)>=t.h.j-(t.m?1:0)||(t.m?(t.i=e.D.concat(t.i),0):1==t.G||2==t.G||t.C>=(t.Za?0:t.$a)||(t.m=Pc(Gt(t.Ja,t,e),ML(t,t.C)),t.C++,0)))}(t,e)||2==r&&BE(t)))switch(n&&0<n.length&&(e=t.h,e.i=e.i.concat(n)),i){case 1:Hs(t,5);break;case 4:Hs(t,10);break;case 3:Hs(t,6);break;default:Hs(t,2)}}function ML(t,e){let n=t.Xa+Math.floor(Math.random()*t.bb);return t.l||(n*=2),n*e}function Hs(t,e){if(t.j.info("Error code "+e),2==e){var n=null;t.l&&(n=null);var r=Gt(t.kb,t);n||(n=new Gs("//www.google.com/images/cleardot.gif"),Y.location&&"http"==Y.location.protocol||Bf(n,"https"),Gf(n)),function Ete(t,e){const n=new Of;if(Y.Image){const r=new Image;r.onload=Sf(Hf,n,r,"TestLoadImage: loaded",!0,e),r.onerror=Sf(Hf,n,r,"TestLoadImage: error",!1,e),r.onabort=Sf(Hf,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=Sf(Hf,n,r,"TestLoadImage: timeout",!1,e),Y.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}(n.toString(),r)}else nn(2);t.G=0,t.l&&t.l.va(e),kL(t),DL(t)}function kL(t){if(t.G=0,t.la=[],t.l){const e=gL(t.h);(0!=e.length||0!=t.i.length)&&(DO(t.la,e),DO(t.la,t.i),t.h.i.length=0,oE(t.i),t.i.length=0),t.l.ua()}}function NL(t,e,n){var r=n instanceof Gs?li(n):new Gs(n,void 0);if(""!=r.g)e&&(r.g=e+"."+r.g),jf(r,r.m);else{var i=Y.location;r=i.protocol,e=e?e+"."+i.hostname:i.hostname,i=+i.port;var s=new Gs(null,void 0);r&&Bf(s,r),e&&(s.g=e),i&&jf(s,i),n&&(s.l=n),r=s}return e=t.za,(n=t.D)&&e&&Fe(r,n,e),Fe(r,"VER",t.ma),qc(t,r),r}function PL(t,e,n){if(e&&!t.H)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new qe(n&&t.Da&&!t.ra?new jc({jb:!0}):t.ra)).Ka(t.H),e}function OL(){}function Yf(){if(wa&&!(10<=Number(Hee)))throw Error("Environmental error: no available transport.")}function Pn(t,e){wt.call(this),this.g=new bL(e),this.l=t,this.h=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.g.s=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.ya&&(t?t["X-WebChannel-Client-Profile"]=e.ya:t={"X-WebChannel-Client-Profile":e.ya}),this.g.S=t,(t=e&&e.Yb)&&!Af(t)&&(this.g.o=t),this.A=e&&e.supportsCrossDomainXhr||!1,this.v=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!Af(e)&&(this.g.D=e,null!==(t=this.h)&&e in t&&e in(t=this.h)&&delete t[e]),this.j=new Ta(this)}function LL(t){xE.call(this);var e=t.__sm__;if(e){e:{for(const n in e){t=n;break e}t=void 0}(this.i=t)&&(t=this.i,e=null!==e&&t in e?e[t]:void 0),this.data=e}else this.data=t}function FL(){RE.call(this),this.status=1}function Ta(t){this.g=t}(F=qe.prototype).Ka=function(t){this.L=t},F.da=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+t);e=e?e.toUpperCase():"GET",this.H=t,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():ME.g(),this.C=function XO(t){return t.h||(t.h=t.i())}(this.u?this.u:ME),this.g.onreadystatechange=Gt(this.Ha,this);try{this.F=!0,this.g.open(e,String(t),!0),this.F=!1}catch(s){return void _L(this,s)}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else{if("function"!=typeof r.keys||"function"!=typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));for(const s of r.keys())n.set(s,r.get(s))}r=Array.from(n.keys()).find(s=>"content-type"==s.toLowerCase()),i=Y.FormData&&t instanceof Y.FormData,!(0<=bO(Dte,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[s,o]of n)this.g.setRequestHeader(s,o);this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{IL(this),0<this.B&&((this.K=function Cte(t){return wa&&function Gee(){return function Vee(t){var e=jee;return Object.prototype.hasOwnProperty.call(e,9)?e[9]:e[9]=t(9)}(function(){let t=0;const e=CO(String(Rf)).split("."),n=CO("9").split("."),r=Math.max(e.length,n.length);for(let o=0;0==t&&o<r;o++){var i=e[o]||"",s=n[o]||"";do{if(i=/(\d*)(\D*)(.*)/.exec(i)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==i[0].length&&0==s[0].length)break;t=aE(0==i[1].length?0:parseInt(i[1],10),0==s[1].length?0:parseInt(s[1],10))||aE(0==i[2].length,0==s[2].length)||aE(i[2],s[2]),i=i[3],s=s[3]}while(0==t)}return 0<=t})}()&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Gt(this.qa,this)):this.A=SE(this.qa,this.B,this)),this.v=!0,this.g.send(t),this.v=!1}catch(s){_L(this,s)}},F.qa=function(){typeof iE<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Ot(this,"timeout"),this.abort(8))},F.abort=function(t){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=t||7,Ot(this,"complete"),Ot(this,"abort"),qf(this))},F.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),qf(this,!0)),qe.X.M.call(this)},F.Ha=function(){this.s||(this.F||this.v||this.l?wL(this):this.fb())},F.fb=function(){wL(this)},F.aa=function(){try{return 2<di(this)?this.g.status:-1}catch{return-1}},F.fa=function(){try{return this.g?this.g.responseText:""}catch{return""}},F.Sa=function(t){if(this.g){var e=this.g.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),Tte(e)}},F.Ea=function(){return this.m},F.Oa=function(){return"string"==typeof this.j?this.j:String(this.j)},(F=bL.prototype).ma=8,F.G=1,F.Ja=function(t){if(this.m)if(this.m=null,1==this.G){if(!t){this.U=Math.floor(1e5*Math.random()),t=this.U++;const i=new Lc(this,this.j,t,void 0);let s=this.s;if(this.S&&(s?(s=MO(s),NO(s,this.S)):s=this.S),null!==this.o||this.N||(i.H=s,s=null),this.O)e:{for(var e=0,n=0;n<this.i.length;n++){var r=this.i[n];if(void 0===(r="__data__"in r.g&&"string"==typeof(r=r.g.__data__)?r.length:void 0))break;if(4096<(e+=r)){e=n;break e}if(4096===e||n===this.i.length-1){e=n+1;break e}}e=1e3}else e=1e3;e=SL(this,i,e),Fe(n=li(this.F),"RID",t),Fe(n,"CVER",22),this.D&&Fe(n,"X-HTTP-Session-Id",this.D),qc(this,n),s&&(this.N?e="headers="+encodeURIComponent(String(TL(s)))+"&"+e:this.o&&VE(n,this.o,s)),LE(this.h,i),this.Ya&&Fe(n,"TYPE","init"),this.O?(Fe(n,"$req",e),Fe(n,"SID","null"),i.Z=!0,NE(i,n,null)):NE(i,n,e),this.G=2}}else 3==this.G&&(t?CL(this,t):0==this.i.length||hL(this.h)||CL(this))},F.Ia=function(){if(this.u=null,xL(this),this.$&&!(this.K||null==this.g||0>=this.P)){var t=2*this.P;this.j.info("BP detection timer enabled: "+t),this.B=Pc(Gt(this.eb,this),t)}},F.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,nn(10),Wf(this),xL(this))},F.cb=function(){null!=this.v&&(this.v=null,Wf(this),BE(this),nn(19))},F.kb=function(t){t?(this.j.info("Successfully pinged google.com"),nn(2)):(this.j.info("Failed to ping google.com"),nn(1))},(F=OL.prototype).xa=function(){},F.wa=function(){},F.va=function(){},F.ua=function(){},F.Ra=function(){},Yf.prototype.g=function(t,e){return new Pn(t,e)},Pt(Pn,wt),Pn.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var t=this.g,e=this.l,n=this.h||void 0;nn(0),t.V=e,t.ia=n||{},t.L=t.Y,t.F=NL(t,null,t.V),Kf(t)},Pn.prototype.close=function(){$E(this.g)},Pn.prototype.u=function(t){var e=this.g;if("string"==typeof t){var n={};n.__data__=t,t=n}else this.v&&((n={}).__data__=TE(t),t=n);e.i.push(new class{constructor(t,e){this.h=t,this.g=e}}(e.ab++,t)),3==e.G&&Kf(e)},Pn.prototype.M=function(){this.g.l=null,delete this.j,$E(this.g),delete this.g,Pn.X.M.call(this)},Pt(LL,xE),Pt(FL,RE),Pt(Ta,OL),Ta.prototype.xa=function(){Ot(this.g,"a")},Ta.prototype.wa=function(t){Ot(this.g,new LL(t))},Ta.prototype.va=function(t){Ot(this.g,new FL)},Ta.prototype.ua=function(){Ot(this.g,"b")},Yf.prototype.createWebChannel=Yf.prototype.g,Pn.prototype.send=Pn.prototype.u,Pn.prototype.open=Pn.prototype.m,Pn.prototype.close=Pn.prototype.close,Ff.NO_ERROR=0,Ff.TIMEOUT=8,Ff.HTTP_ERROR=6,YO.COMPLETE="complete",ZO.EventType=Oc,Oc.OPEN="a",Oc.CLOSE="b",Oc.ERROR="c",Oc.MESSAGE="d",wt.prototype.listen=wt.prototype.N,qe.prototype.listenOnce=qe.prototype.O,qe.prototype.getLastError=qe.prototype.Oa,qe.prototype.getLastErrorCode=qe.prototype.Ea,qe.prototype.getStatus=qe.prototype.aa,qe.prototype.getResponseJson=qe.prototype.Sa,qe.prototype.getResponseText=qe.prototype.fa,qe.prototype.send=qe.prototype.da,qe.prototype.setWithCredentials=qe.prototype.Ka,ci.createWebChannelTransport=function(){return new Yf},ci.getStatEventTarget=function(){return Lf()},ci.ErrorCode=Ff,ci.EventType=YO,ci.Event=Bs,ci.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},ci.FetchXmlHttpFactory=jc,ci.WebChannel=ZO,ci.XhrIo=qe;const UL="@firebase/firestore";class It{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}It.UNAUTHENTICATED=new It(null),It.GOOGLE_CREDENTIALS=new It("google-credentials-uid"),It.FIRST_PARTY=new It("first-party-uid"),It.MOCK_USER=new It("mock-user");let Wc="9.18.0";const Ui=new ha("@firebase/firestore");function D(t,...e){if(Ui.logLevel<=me.DEBUG){const n=e.map(HE);Ui.debug(`Firestore (${Wc}): ${t}`,...n)}}function Je(t,...e){if(Ui.logLevel<=me.ERROR){const n=e.map(HE);Ui.error(`Firestore (${Wc}): ${t}`,...n)}}function HE(t){if("string"==typeof t)return t;try{return JSON.stringify(t)}catch{return t}}function P(t="Unexpected state"){const e=`FIRESTORE (${Wc}) INTERNAL ASSERTION FAILED: `+t;throw Je(e),new Error(e)}function U(t,e){t||P()}const w={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class b extends zn{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class gt{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}class VL{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Ate{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(It.UNAUTHENTICATED))}shutdown(){}}class xte{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class Rte{constructor(e){this.t=e,this.currentUser=It.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){var r=this;let i=this.i;const s=c=>this.i!==i?(i=this.i,n(c)):Promise.resolve();let o=new gt;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new gt,e.enqueueRetryable(()=>s(this.currentUser))};const a=()=>{const c=o;e.enqueueRetryable(I(function*(){yield c.promise,yield s(r.currentUser)}))},u=c=>{D("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),a()};this.t.onInit(c=>u(c)),setTimeout(()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?u(c):(D("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new gt)}},0),a()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(D("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(U("string"==typeof r.accessToken),new VL(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return U(null===e||"string"==typeof e),new It(e)}}class Mte{constructor(e,n,r,i){this.h=e,this.l=n,this.m=r,this.g=i,this.type="FirstParty",this.user=It.FIRST_PARTY,this.p=new Map}I(){return this.g?this.g():(U(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class kte{constructor(e,n,r,i){this.h=e,this.l=n,this.m=r,this.g=i}getToken(){return Promise.resolve(new Mte(this.h,this.l,this.m,this.g))}start(e,n){e.enqueueRetryable(()=>n(It.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class $L{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Nte{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,n){const r=s=>{null!=s.error&&D("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.A;return this.A=s.token,D("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{D("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.T.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.T.getImmediate({optional:!0});s?i(s):D("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(U("string"==typeof n.token),this.A=n.token,new $L(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Pte(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}class BL{static R(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=Pte(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%e.length))}return r}}function X(t,e){return t<e?-1:t>e?1:0}class Xf{constructor(e,n,r){void 0===n?n=0:n>e.length&&P(),void 0===r?r=e.length-n:r>e.length-n&&P(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return 0===Xf.comparator(this,e)}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Xf?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return this.construct(this.segments,this.offset+(e=void 0===e?1:e),this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=e.get(i),o=n.get(i);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class fe extends Xf{construct(e,n,r){return new fe(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new b(w.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new fe(n)}static emptyPath(){return new fe([])}}class A{constructor(e){this.path=e}static fromPath(e){return new A(fe.fromString(e))}static fromName(e){return new A(fe.fromString(e).popFirst(5))}static empty(){return new A(fe.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===fe.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,n){return fe.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new A(new fe(e.slice()))}}function $i(t){return"IndexedDbTransactionError"===t.name}class Hte{constructor(e,n,r,i,s,o,a,u){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.useFetchStreams=u}}class Ws{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new Ws("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof Ws&&e.projectId===this.projectId&&e.database===this.database}}class zte extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class mt{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(r){try{return atob(r)}catch(i){throw i instanceof DOMException?new zte("Invalid base64 string: "+i):i}}(e);return new mt(n)}static fromUint8Array(e){const n=function(r){let i="";for(let s=0;s<r.length;++s)i+=String.fromCharCode(r[s]);return i}(e);return new mt(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return X(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}function We(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}mt.EMPTY_BYTE_STRING=new mt("");class Ke{constructor(e,n){this.comparator=e,this.root=n||Lt.EMPTY}insert(e,n){return new Ke(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Lt.BLACK,null,null))}remove(e){return new Ke(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Lt.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(0===i)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new rp(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new rp(this.root,e,this.comparator,!1)}getReverseIterator(){return new rp(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new rp(this.root,e,this.comparator,!0)}}class rp{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(0===s){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Lt{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Lt.RED,this.left=i??Lt.EMPTY,this.right=s??Lt.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Lt(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):0===s?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Lt.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return Lt.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Lt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Lt.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw P();const e=this.left.check();if(e!==this.right.check())throw P();return e+(this.isRed()?0:1)}}Lt.EMPTY=null,Lt.RED=!0,Lt.BLACK=!1,Lt.EMPTY=new class{constructor(){this.size=0}get key(){throw P()}get value(){throw P()}get color(){throw P()}get left(){throw P()}get right(){throw P()}copy(t,e,n,r,i){return this}insert(t,e,n){return new Lt(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Te{constructor(e){this.comparator=e,this.data=new Ke(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=void 0!==n?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new dF(this.data.getIterator())}getIteratorFrom(e){return new dF(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof Te)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(0!==this.comparator(i,s))return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new Te(this.comparator);return n.data=e,n}}class dF{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}var ot,pe;(pe=ot||(ot={}))[pe.OK=0]="OK",pe[pe.CANCELLED=1]="CANCELLED",pe[pe.UNKNOWN=2]="UNKNOWN",pe[pe.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",pe[pe.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",pe[pe.NOT_FOUND=5]="NOT_FOUND",pe[pe.ALREADY_EXISTS=6]="ALREADY_EXISTS",pe[pe.PERMISSION_DENIED=7]="PERMISSION_DENIED",pe[pe.UNAUTHENTICATED=16]="UNAUTHENTICATED",pe[pe.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",pe[pe.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",pe[pe.ABORTED=10]="ABORTED",pe[pe.OUT_OF_RANGE=11]="OUT_OF_RANGE",pe[pe.UNIMPLEMENTED=12]="UNIMPLEMENTED",pe[pe.INTERNAL=13]="INTERNAL",pe[pe.UNAVAILABLE=14]="UNAVAILABLE",pe[pe.DATA_LOSS=15]="DATA_LOSS",new Ke(A.comparator),new Ke(A.comparator),new Ke(A.comparator),new Te(A.comparator),new Te(X);class so{constructor(){}ae(e,n){this.he(e,n),n.le()}he(e,n){if("nullValue"in e)this.fe(n,5);else if("booleanValue"in e)this.fe(n,10),n.de(e.booleanValue?1:0);else if("integerValue"in e)this.fe(n,15),n.de(We(e.integerValue));else if("doubleValue"in e){const r=We(e.doubleValue);isNaN(r)?this.fe(n,13):(this.fe(n,15),function Zc(t){return 0===t&&1/t==-1/0}(r)?n.de(0):n.de(r))}else if("timestampValue"in e){const r=e.timestampValue;this.fe(n,20),"string"==typeof r?n._e(r):(n._e(`${r.seconds||""}`),n.de(r.nanos||0))}else if("stringValue"in e)this.we(e.stringValue,n),this.me(n);else if("bytesValue"in e)this.fe(n,30),n.ge(function Qs(t){return"string"==typeof t?mt.fromBase64String(t):mt.fromUint8Array(t)}(e.bytesValue)),this.me(n);else if("referenceValue"in e)this.ye(e.referenceValue,n);else if("geoPointValue"in e){const r=e.geoPointValue;this.fe(n,45),n.de(r.latitude||0),n.de(r.longitude||0)}else"mapValue"in e?function eF(t){return"__max__"===(((t.mapValue||{}).fields||{}).__type__||{}).stringValue}(e)?this.fe(n,Number.MAX_SAFE_INTEGER):(this.pe(e.mapValue,n),this.me(n)):"arrayValue"in e?(this.Ie(e.arrayValue,n),this.me(n)):P()}we(e,n){this.fe(n,25),this.Te(e,n)}Te(e,n){n._e(e)}pe(e,n){const r=e.fields||{};this.fe(n,55);for(const i of Object.keys(r))this.we(i,n),this.he(r[i],n)}Ie(e,n){const r=e.values||[];this.fe(n,50);for(const i of r)this.he(i,n)}ye(e,n){this.fe(n,37),A.fromName(e).path.forEach(r=>{this.fe(n,60),this.Te(r,n)})}fe(e,n){e.de(n)}me(e){e.de(2)}}so.Ee=new so,new Uint8Array(0);class vn{constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}static withCacheSize(e){return new vn(e,vn.DEFAULT_COLLECTION_PERCENTILE,vn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}function Cp(){return typeof document<"u"?document:null}vn.DEFAULT_COLLECTION_PERCENTILE=10,vn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,vn.DEFAULT=new vn(41943040,vn.DEFAULT_COLLECTION_PERCENTILE,vn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),vn.DISABLED=new vn(-1,0,0);class LT{constructor(e,n,r=1e3,i=1.5,s=6e4){this.Ys=e,this.timerId=n,this.po=r,this.Io=i,this.To=s,this.Eo=0,this.Ao=null,this.Ro=Date.now(),this.reset()}reset(){this.Eo=0}Po(){this.Eo=this.To}vo(e){this.cancel();const n=Math.floor(this.Eo+this.bo()),r=Math.max(0,Date.now()-this.Ro),i=Math.max(0,n-r);i>0&&D("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Eo} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Ao=this.Ys.enqueueAfterDelay(this.timerId,i,()=>(this.Ro=Date.now(),e())),this.Eo*=this.Io,this.Eo<this.po&&(this.Eo=this.po),this.Eo>this.To&&(this.Eo=this.To)}Vo(){null!==this.Ao&&(this.Ao.skipDelay(),this.Ao=null)}cancel(){null!==this.Ao&&(this.Ao.cancel(),this.Ao=null)}bo(){return(Math.random()-.5)*this.Eo}}class tb{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new gt,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new tb(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new b(w.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}class Eie{constructor(e,n,r,i){var s=this;this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=It.UNAUTHENTICATED,this.clientId=BL.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,function(){var o=I(function*(a){D("FirestoreClient","Received user=",a.uid),yield s.authCredentialListener(a),s.user=a});return function(a){return o.apply(this,arguments)}}()),this.appCheckCredentials.start(r,o=>(D("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}getConfiguration(){var e=this;return I(function*(){return{asyncQueue:e.asyncQueue,databaseInfo:e.databaseInfo,clientId:e.clientId,authCredentials:e.authCredentials,appCheckCredentials:e.appCheckCredentials,initialUser:e.user,maxConcurrentLimboResolutions:100}})()}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new b(w.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var e=this;this.asyncQueue.enterRestrictedMode();const n=new gt;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(I(function*(){try{e.onlineComponents&&(yield e.onlineComponents.terminate()),e.offlineComponents&&(yield e.offlineComponents.terminate()),e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),n.resolve()}catch(r){const i=function Ga(t,e){if(Je("AsyncQueue",`${e}: ${t}`),$i(t))return new b(w.UNAVAILABLE,`${e}: ${t}`);throw t}(r,"Failed to shutdown persistence");n.reject(i)}})),n.promise}}const yU=new Map;function ce(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new b(w.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=function kp(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";{const e=(n=t).constructor?n.constructor.name:null;return e?`a custom ${e} object`:"an object"}}var n;return"function"==typeof t?"a function":P()}(t);throw new b(w.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}class IU{constructor(e){var n;if(void 0===e.host){if(void 0!==e.ssl)throw new b(w.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(n=e.ssl)||void 0===n||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new b(w.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,function Rie(t,e,n,r){if(!0===e&&!0===r)throw new b(w.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Cl{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new IU({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new b(w.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new b(w.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new IU(e),void 0!==e.credentials&&(this._authCredentials=function(n){if(!n)return new Ate;switch(n.type){case"gapi":return new kte(n.client,n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new b(w.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const n=yU.get(e);n&&(D("ComponentProvider","Removing Datastore"),yU.delete(e),n.terminate())}(this),Promise.resolve()}}class Nie{constructor(){this.qc=Promise.resolve(),this.Uc=[],this.Kc=!1,this.Gc=[],this.Qc=null,this.jc=!1,this.zc=!1,this.Wc=[],this.ko=new LT(this,"async_queue_retry"),this.Hc=()=>{const n=Cp();n&&D("AsyncQueue","Visibility state changed to "+n.visibilityState),this.ko.Vo()};const e=Cp();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Hc)}get isShuttingDown(){return this.Kc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Jc(),this.Yc(e)}enterRestrictedMode(e){if(!this.Kc){this.Kc=!0,this.zc=e||!1;const n=Cp();n&&"function"==typeof n.removeEventListener&&n.removeEventListener("visibilitychange",this.Hc)}}enqueue(e){if(this.Jc(),this.Kc)return new Promise(()=>{});const n=new gt;return this.Yc(()=>this.Kc&&this.zc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Uc.push(e),this.Zc()))}Zc(){var e=this;return I(function*(){if(0!==e.Uc.length){try{yield e.Uc[0](),e.Uc.shift(),e.ko.reset()}catch(n){if(!$i(n))throw n;D("AsyncQueue","Operation failed with retryable error: "+n)}e.Uc.length>0&&e.ko.vo(()=>e.Zc())}})()}Yc(e){const n=this.qc.then(()=>(this.jc=!0,e().catch(r=>{throw this.Qc=r,this.jc=!1,Je("INTERNAL UNHANDLED ERROR: ",function(s){let o=s.message||"";return s.stack&&(o=s.stack.includes(s.message)?s.stack:s.message+"\n"+s.stack),o}(r)),r}).then(r=>(this.jc=!1,r))));return this.qc=n,n}enqueueAfterDelay(e,n,r){this.Jc(),this.Wc.indexOf(e)>-1&&(n=0);const i=tb.createAndSchedule(this,e,n,r,s=>this.Xc(s));return this.Gc.push(i),i}Jc(){this.Qc&&P()}verifyOperationInProgress(){}ta(){var e=this;return I(function*(){let n;do{n=e.qc,yield n}while(n!==e.qc)})()}ea(e){for(const n of this.Gc)if(n.timerId===e)return!0;return!1}na(e){return this.ta().then(()=>{this.Gc.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.Gc)if(n.skipDelay(),"all"!==e&&n.timerId===e)break;return this.ta()})}sa(e){this.Wc.push(e)}Xc(e){const n=this.Gc.indexOf(e);this.Gc.splice(n,1)}}class Oe extends Cl{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new Nie,this._persistenceKey=i?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||function TU(t){var e;const n=t._freezeSettings(),r=(s=(null===(e=t._app)||void 0===e?void 0:e.options.appId)||"",new Hte(t._databaseId,s,t._persistenceKey,(a=n).host,a.ssl,a.experimentalForceLongPolling,a.experimentalAutoDetectLongPolling,a.useFetchStreams));var s,a;t._firestoreClient=new Eie(t._authCredentials,t._appCheckCredentials,t._queue,r)}(this),this._firestoreClient.terminate()}}function Oie(t,e){const r="string"==typeof t?t:e||"(default)",i=hc("object"==typeof t?t:X_(),"firestore").getImmediate({identifier:r});if(!i._initialized){const s=Vk("firestore");s&&function Mie(t,e,n,r={}){var i;const s=(t=ce(t,Cl))._getSettings();if("firestore.googleapis.com"!==s.host&&s.host!==e&&function Kc(t,...e){if(Ui.logLevel<=me.WARN){const n=e.map(HE);Ui.warn(`Firestore (${Wc}): ${t}`,...n)}}("Host has been set in both settings() and useEmulator(), emulator host will be used"),t._setSettings(Object.assign(Object.assign({},s),{host:`${e}:${n}`,ssl:!1})),r.mockUserToken){let o,a;if("string"==typeof r.mockUserToken)o=r.mockUserToken,a=It.MOCK_USER;else{o=$k(r.mockUserToken,null===(i=t._app)||void 0===i?void 0:i.options.projectId);const u=r.mockUserToken.sub||r.mockUserToken.user_id;if(!u)throw new b(w.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");a=new It(u)}t._authCredentials=new xte(new VL(o,a))}}(i,...s)}return i}!function(t,e=!0){Wc=fc,jt(new Rt("firestore",(n,{instanceIdentifier:r,options:i})=>{const s=n.getProvider("app").getImmediate(),o=new Oe(new Rte(n.getProvider("auth-internal")),new Nte(n.getProvider("app-check-internal")),function(a,u){if(!Object.prototype.hasOwnProperty.apply(a.options,["projectId"]))throw new b(w.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ws(a.options.projectId,u)}(s,r),s);return i=Object.assign({useFetchStreams:e},i),o._setSettings(i),o},"PUBLIC").setMultipleInstances(!0)),Le(UL,"3.9.0",t),Le(UL,"3.9.0","esm2017")}();class Xb{constructor(e){return e}}const HU="firestore",Zb=new j("angularfire2.firestore-instances");function tse(t){return(e,n)=>{const r=e.runOutsideAngular(()=>t(n));return new Xb(r)}}const nse={provide:class Jie{constructor(){return nf(HU)}},deps:[[new lt,Zb]]},rse={provide:Xb,useFactory:function ese(t,e){const n=tf(HU,t,e);return n&&new Xb(n)},deps:[[new lt,Zb],Ls]};let ise=(()=>{class t{constructor(){Le("angularfire",ef.full,"fst")}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({providers:[rse,nse]}),t})();function sse(t,...e){return{ngModule:ise,providers:[{provide:Zb,useFactory:tse(t),multi:!0,deps:[Ne,An,Lw,Uw,[new lt,FI],[new lt,nE],...e]}]}}const ose=Fw(Oie,!0),zU="firebasestorage.googleapis.com",qU="storageBucket";class Ge extends zn{constructor(e,n,r=0){super(Jb(e),`Firebase Storage: ${n} (${Jb(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,Ge.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Jb(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.message=this.customData.serverResponse?`${this._baseMessage}\n${this.customData.serverResponse}`:this._baseMessage}}var Ae=(()=>(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"}(Ae||(Ae={})),Ae))();function Jb(t){return"storage/"+t}function tD(t){return new Ge(Ae.INVALID_ARGUMENT,t)}function YU(){return new Ge(Ae.APP_DELETED,"The Firebase app was deleted.")}class on{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return 0===this.path.length}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 r;try{r=on.makeFromUrl(e,n)}catch{return new on(e,"")}if(""===r.path)return r;throw function mse(t){return new Ge(Ae.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}(e)}static makeFromUrl(e,n){let r=null;const i="([A-Za-z0-9.\\-_]+)",a=new RegExp("^gs://"+i+"(/(.*))?$","i");function c(C){C.path_=decodeURIComponent(C.path)}const d=n.replace(/[.]/g,"\\."),y=[{regex:a,indices:{bucket:1,path:3},postModify:function s(C){"/"===C.path.charAt(C.path.length-1)&&(C.path_=C.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${d}/v[A-Za-z0-9_]+/b/${i}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:c},{regex:new RegExp(`^https?://${n===zU?"(?:storage.googleapis.com|storage.cloud.google.com)":n}/${i}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:c}];for(let C=0;C<y.length;C++){const O=y[C],L=O.regex.exec(e);if(L){let Wt=L[O.indices.path];Wt||(Wt=""),r=new on(L[O.indices.bucket],Wt),O.postModify(r);break}}if(null==r)throw function gse(t){return new Ge(Ae.INVALID_URL,"Invalid URL '"+t+"'.")}(e);return r}}class Ese{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function rD(t,e,n,r){if(r<e)throw tD(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw tD(`Invalid value for '${t}'. Expected ${n} or less.`)}var Ji=(()=>(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(Ji||(Ji={})),Ji))();class Ase{constructor(e,n,r,i,s,o,a,u,c,l,d,h=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=u,this.timeout_=c,this.progressCallback_=l,this.connectionFactory_=d,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((f,p)=>{this.resolve_=f,this.reject_=p,this.start_()})}start_(){const n=(r,i)=>{const s=this.resolve_,o=this.reject_,a=i.connection;if(i.wasSuccessCode)try{const u=this.callback_(a,a.getResponse());!function Dse(t){return void 0!==t}(u)?s():s(u)}catch(u){o(u)}else if(null!==a){const u=function eD(){return new Ge(Ae.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}();u.serverResponse=a.getErrorText(),o(this.errorCallback_?this.errorCallback_(a,u):u)}else o(i.canceled?this.appDelete_?YU():function KU(){return new Ge(Ae.CANCELED,"User canceled the upload/download.")}():function WU(){return new Ge(Ae.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}())};this.canceled_?n(0,new Gp(!1,null,!0)):this.backoffId_=function Tse(t,e,n){let r=1,i=null,s=null,o=!1,a=0;function u(){return 2===a}let c=!1;function l(...m){c||(c=!0,e.apply(null,m))}function d(m){i=setTimeout(()=>{i=null,t(f,u())},m)}function h(){s&&clearTimeout(s)}function f(m,...v){if(c)return void h();if(m)return h(),void l.call(null,m,...v);if(u()||o)return h(),void l.call(null,m,...v);let y;r<64&&(r*=2),1===a?(a=2,y=0):y=1e3*(r+Math.random()),d(y)}let p=!1;function g(m){p||(p=!0,h(),!c&&(null!==i?(m||(a=2),clearTimeout(i),d(0)):m||(a=1)))}return d(0),s=setTimeout(()=>{o=!0,g(!0)},n),g}((r,i)=>{if(i)return void r(!1,new Gp(!1,null,!0));const s=this.connectionFactory_();this.pendingConnection_=s;const o=a=>{null!==this.progressCallback_&&this.progressCallback_(a.loaded,a.lengthComputable?a.total:-1)};null!==this.progressCallback_&&s.addUploadProgressListener(o),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&s.removeUploadProgressListener(o),this.pendingConnection_=null;const a=s.getErrorCode()===Ji.NO_ERROR,u=s.getStatus();if(!a||function JU(t,e){const n=t>=500&&t<600,i=-1!==[408,429].indexOf(t),s=-1!==e.indexOf(t);return n||i||s}(u,this.additionalRetryCodes_)&&this.retry){const l=s.getErrorCode()===Ji.ABORT;return void r(!1,new Gp(!1,null,l))}const c=-1!==this.successCodes_.indexOf(u);r(!0,new Gp(c,s))})},n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&function bse(t){t(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class Gp{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}class fo{constructor(e,n){this._service=e,this._location=n instanceof on?n:on.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new fo(e,n)}get root(){const e=new on(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return function iV(t){const e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}(this._location.path)}get storage(){return this._service}get parent(){const e=function jse(t){if(0===t.length)return null;const e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this._location.path);if(null===e)return null;const n=new on(this._location.bucket,e);return new fo(this._service,n)}_throwIfRoot(e){if(""===this._location.path)throw function Ise(t){return new Ge(Ae.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').")}(e)}}function vV(t,e){const n=e?.[qU];return null==n?null:on.makeFromBucketSpec(n,t)}class lD{constructor(e,n,r,i,s){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._bucket=null,this._host=zU,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?on.makeFromBucketSpec(i,this._host):vV(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._bucket=null!=this._url?on.makeFromBucketSpec(this._url,e):vV(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){rD("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){rD("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}_getAuthToken(){var e=this;return I(function*(){if(e._overrideAuthToken)return e._overrideAuthToken;const n=e._authProvider.getImmediate({optional:!0});if(n){const r=yield n.getToken();if(null!==r)return r.accessToken}return null})()}_getAppCheckToken(){var e=this;return I(function*(){const n=e._appCheckProvider.getImmediate({optional:!0});return n?(yield n.getToken()).token:null})()}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new fo(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new Ese(YU());{const o=function Nse(t,e,n,r,i,s,o=!0){const a=function ZU(t){const e=encodeURIComponent;let n="?";for(const r in t)t.hasOwnProperty(r)&&(n=n+(e(r)+"=")+e(t[r])+"&");return n=n.slice(0,-1),n}(t.urlParams),u=t.url+a,c=Object.assign({},t.headers);return function Mse(t,e){e&&(t["X-Firebase-GMPID"]=e)}(c,e),function xse(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(c,n),function Rse(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}(c,s),function kse(t,e){null!==e&&(t["X-Firebase-AppCheck"]=e)}(c,r),new Ase(u,t.method,c,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}(e,this._appId,r,i,n,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}makeRequestWithTokens(e,n){var r=this;return I(function*(){const[i,s]=yield Promise.all([r._getAuthToken(),r._getAppCheckToken()]);return r._makeRequest(e,n,i,s).getPromise()})()}}const wV="@firebase/storage",EV="storage";function Soe(t=X_(),e){const r=hc(t=Cs(t),EV).getImmediate({identifier:e}),i=Vk("storage");return i&&function Aoe(t,e,n,r={}){!function Coe(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken="string"==typeof i?i:$k(i,t.app.options.projectId))}(t,e,n,r)}(r,...i),r}function xoe(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new lD(n,r,i,e,fc)}!function Roe(){jt(new Rt(EV,xoe,"PUBLIC").setMultipleInstances(!0)),Le(wV,"0.11.2",""),Le(wV,"0.11.2","esm2017")}();class dD{constructor(e){return e}}const TV="storage",hD=new j("angularfire2.storage-instances");function Noe(t){return(e,n)=>{const r=e.runOutsideAngular(()=>t(n));return new dD(r)}}const Poe={provide:class Moe{constructor(){return nf(TV)}},deps:[[new lt,hD]]},Ooe={provide:dD,useFactory:function koe(t,e){const n=tf(TV,t,e);return n&&new dD(n)},deps:[[new lt,hD],Ls]};let Loe=(()=>{class t{constructor(){Le("angularfire",ef.full,"gcs")}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=hr({type:t}),t.\u0275inj=Kn({providers:[Ooe,Poe]}),t})();function Foe(t,...e){return{ngModule:Loe,providers:[{provide:hD,useFactory:Noe(t),multi:!0,deps:[Ne,An,Lw,Uw,[new lt,FI],[new lt,nE],...e]}]}}const Uoe=Fw(Soe,!0);let Voe=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=hr({type:t,bootstrap:[WW]}),t.\u0275inj=Kn({imports:[Wz,$W,yX(()=>_X(vX_firebase)),sse(()=>ose()),Foe(()=>Uoe())]}),t})();qz().bootstrapModule(Voe).catch(t=>console.error(t))}},De=>{De(De.s=19)}]);
\ No newline at end of file
diff --git a/takima-AR/dist/takima-ar/polyfills.cf832c4a72c09765.js b/takima-AR/dist/takima-ar/polyfills.cf832c4a72c09765.js
deleted file mode 100644
index 3ab5a30803a2029bf3e317c1e7cc03b5d24081b9..0000000000000000000000000000000000000000
--- a/takima-AR/dist/takima-ar/polyfills.cf832c4a72c09765.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunktakima_AR=self.webpackChunktakima_AR||[]).push([[429],{583:()=>{!function(t){const n=t.performance;function i(L){n&&n.mark&&n.mark(L)}function o(L,T){n&&n.measure&&n.measure(L,T)}i("Zone");const c=t.__Zone_symbol_prefix||"__zone_symbol__";function a(L){return c+L}const m=!0===t[a("forceDuplicateZoneCheck")];if(t.Zone){if(m||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let d=(()=>{class L{constructor(e,r){this._parent=e,this._name=r?r.name||"unnamed":"<root>",this._properties=r&&r.properties||{},this._zoneDelegate=new v(this,this._parent&&this._parent._zoneDelegate,r)}static assertZonePatched(){if(t.Promise!==oe.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=L.current;for(;e.parent;)e=e.parent;return e}static get current(){return U.zone}static get currentTask(){return re}static __load_patch(e,r,k=!1){if(oe.hasOwnProperty(e)){if(!k&&m)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const C="Zone:"+e;i(C),oe[e]=r(t,L,z),o(C,C)}}get parent(){return this._parent}get name(){return this._name}get(e){const r=this.getZoneWith(e);if(r)return r._properties[e]}getZoneWith(e){let r=this;for(;r;){if(r._properties.hasOwnProperty(e))return r;r=r._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,r){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const k=this._zoneDelegate.intercept(this,e,r),C=this;return function(){return C.runGuarded(k,this,arguments,r)}}run(e,r,k,C){U={parent:U,zone:this};try{return this._zoneDelegate.invoke(this,e,r,k,C)}finally{U=U.parent}}runGuarded(e,r=null,k,C){U={parent:U,zone:this};try{try{return this._zoneDelegate.invoke(this,e,r,k,C)}catch($){if(this._zoneDelegate.handleError(this,$))throw $}}finally{U=U.parent}}runTask(e,r,k){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||J).name+"; Execution: "+this.name+")");if(e.state===x&&(e.type===Q||e.type===w))return;const C=e.state!=E;C&&e._transitionTo(E,A),e.runCount++;const $=re;re=e,U={parent:U,zone:this};try{e.type==w&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,r,k)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{e.state!==x&&e.state!==h&&(e.type==Q||e.data&&e.data.isPeriodic?C&&e._transitionTo(A,E):(e.runCount=0,this._updateTaskCount(e,-1),C&&e._transitionTo(x,E,x))),U=U.parent,re=$}}scheduleTask(e){if(e.zone&&e.zone!==this){let k=this;for(;k;){if(k===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);k=k.parent}}e._transitionTo(X,x);const r=[];e._zoneDelegates=r,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(k){throw e._transitionTo(h,X,x),this._zoneDelegate.handleError(this,k),k}return e._zoneDelegates===r&&this._updateTaskCount(e,1),e.state==X&&e._transitionTo(A,X),e}scheduleMicroTask(e,r,k,C){return this.scheduleTask(new p(I,e,r,k,C,void 0))}scheduleMacroTask(e,r,k,C,$){return this.scheduleTask(new p(w,e,r,k,C,$))}scheduleEventTask(e,r,k,C,$){return this.scheduleTask(new p(Q,e,r,k,C,$))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||J).name+"; Execution: "+this.name+")");if(e.state===A||e.state===E){e._transitionTo(G,A,E);try{this._zoneDelegate.cancelTask(this,e)}catch(r){throw e._transitionTo(h,G),this._zoneDelegate.handleError(this,r),r}return this._updateTaskCount(e,-1),e._transitionTo(x,G),e.runCount=0,e}}_updateTaskCount(e,r){const k=e._zoneDelegates;-1==r&&(e._zoneDelegates=null);for(let C=0;C<k.length;C++)k[C]._updateTaskCount(e.type,r)}}return L.__symbol__=a,L})();const P={name:"",onHasTask:(L,T,e,r)=>L.hasTask(e,r),onScheduleTask:(L,T,e,r)=>L.scheduleTask(e,r),onInvokeTask:(L,T,e,r,k,C)=>L.invokeTask(e,r,k,C),onCancelTask:(L,T,e,r)=>L.cancelTask(e,r)};class v{constructor(T,e,r){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=T,this._parentDelegate=e,this._forkZS=r&&(r&&r.onFork?r:e._forkZS),this._forkDlgt=r&&(r.onFork?e:e._forkDlgt),this._forkCurrZone=r&&(r.onFork?this.zone:e._forkCurrZone),this._interceptZS=r&&(r.onIntercept?r:e._interceptZS),this._interceptDlgt=r&&(r.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=r&&(r.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=r&&(r.onInvoke?r:e._invokeZS),this._invokeDlgt=r&&(r.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=r&&(r.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=r&&(r.onHandleError?r:e._handleErrorZS),this._handleErrorDlgt=r&&(r.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=r&&(r.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=r&&(r.onScheduleTask?r:e._scheduleTaskZS),this._scheduleTaskDlgt=r&&(r.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=r&&(r.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=r&&(r.onInvokeTask?r:e._invokeTaskZS),this._invokeTaskDlgt=r&&(r.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=r&&(r.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=r&&(r.onCancelTask?r:e._cancelTaskZS),this._cancelTaskDlgt=r&&(r.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=r&&(r.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const k=r&&r.onHasTask;(k||e&&e._hasTaskZS)&&(this._hasTaskZS=k?r:P,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=T,r.onScheduleTask||(this._scheduleTaskZS=P,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),r.onInvokeTask||(this._invokeTaskZS=P,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),r.onCancelTask||(this._cancelTaskZS=P,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(T,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,T,e):new d(T,e)}intercept(T,e,r){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,T,e,r):e}invoke(T,e,r,k,C){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,T,e,r,k,C):e.apply(r,k)}handleError(T,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,T,e)}scheduleTask(T,e){let r=e;if(this._scheduleTaskZS)this._hasTaskZS&&r._zoneDelegates.push(this._hasTaskDlgtOwner),r=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,T,e),r||(r=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=I)throw new Error("Task is missing scheduleFn.");R(e)}return r}invokeTask(T,e,r,k){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,T,e,r,k):e.callback.apply(r,k)}cancelTask(T,e){let r;if(this._cancelTaskZS)r=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,T,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");r=e.cancelFn(e)}return r}hasTask(T,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,T,e)}catch(r){this.handleError(T,r)}}_updateTaskCount(T,e){const r=this._taskCounts,k=r[T],C=r[T]=k+e;if(C<0)throw new Error("More tasks executed then were scheduled.");0!=k&&0!=C||this.hasTask(this.zone,{microTask:r.microTask>0,macroTask:r.macroTask>0,eventTask:r.eventTask>0,change:T})}}class p{constructor(T,e,r,k,C,$){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=T,this.source=e,this.data=k,this.scheduleFn=C,this.cancelFn=$,!r)throw new Error("callback is not defined");this.callback=r;const l=this;this.invoke=T===Q&&k&&k.useG?p.invokeTask:function(){return p.invokeTask.call(t,l,this,arguments)}}static invokeTask(T,e,r){T||(T=this),ee++;try{return T.runCount++,T.zone.runTask(T,e,r)}finally{1==ee&&_(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(x,X)}_transitionTo(T,e,r){if(this._state!==e&&this._state!==r)throw new Error(`${this.type} '${this.source}': can not transition to '${T}', expecting state '${e}'${r?" or '"+r+"'":""}, was '${this._state}'.`);this._state=T,T==x&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const M=a("setTimeout"),Z=a("Promise"),N=a("then");let K,B=[],H=!1;function q(L){if(K||t[Z]&&(K=t[Z].resolve(0)),K){let T=K[N];T||(T=K.then),T.call(K,L)}else t[M](L,0)}function R(L){0===ee&&0===B.length&&q(_),L&&B.push(L)}function _(){if(!H){for(H=!0;B.length;){const L=B;B=[];for(let T=0;T<L.length;T++){const e=L[T];try{e.zone.runTask(e,null,null)}catch(r){z.onUnhandledError(r)}}}z.microtaskDrainDone(),H=!1}}const J={name:"NO ZONE"},x="notScheduled",X="scheduling",A="scheduled",E="running",G="canceling",h="unknown",I="microTask",w="macroTask",Q="eventTask",oe={},z={symbol:a,currentZoneFrame:()=>U,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:R,showUncaughtError:()=>!d[a("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:q};let U={parent:null,zone:new d(null,null)},re=null,ee=0;function W(){}o("Zone","Zone"),t.Zone=d}(typeof window<"u"&&window||typeof self<"u"&&self||global);const ue=Object.getOwnPropertyDescriptor,me=Object.defineProperty,ve=Object.getPrototypeOf,Se=Object.create,it=Array.prototype.slice,De="addEventListener",Oe="removeEventListener",Ze=Zone.__symbol__(De),Ne=Zone.__symbol__(Oe),ie="true",ce="false",pe=Zone.__symbol__("");function Ie(t,n){return Zone.current.wrap(t,n)}function Le(t,n,i,o,c){return Zone.current.scheduleMacroTask(t,n,i,o,c)}const j=Zone.__symbol__,be=typeof window<"u",_e=be?window:void 0,Y=be&&_e||"object"==typeof self&&self||global,ct="removeAttribute";function Me(t,n){for(let i=t.length-1;i>=0;i--)"function"==typeof t[i]&&(t[i]=Ie(t[i],n+"_"+i));return t}function Ve(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const Fe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Pe=!("nw"in Y)&&typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process),Ae=!Pe&&!Fe&&!(!be||!_e.HTMLElement),Be=typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process)&&!Fe&&!(!be||!_e.HTMLElement),we={},Ue=function(t){if(!(t=t||Y.event))return;let n=we[t.type];n||(n=we[t.type]=j("ON_PROPERTY"+t.type));const i=this||t.target||Y,o=i[n];let c;return Ae&&i===_e&&"error"===t.type?(c=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===c&&t.preventDefault()):(c=o&&o.apply(this,arguments),null!=c&&!c&&t.preventDefault()),c};function We(t,n,i){let o=ue(t,n);if(!o&&i&&ue(i,n)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const c=j("on"+n+"patched");if(t.hasOwnProperty(c)&&t[c])return;delete o.writable,delete o.value;const a=o.get,m=o.set,d=n.slice(2);let P=we[d];P||(P=we[d]=j("ON_PROPERTY"+d)),o.set=function(v){let p=this;!p&&t===Y&&(p=Y),p&&("function"==typeof p[P]&&p.removeEventListener(d,Ue),m&&m.call(p,null),p[P]=v,"function"==typeof v&&p.addEventListener(d,Ue,!1))},o.get=function(){let v=this;if(!v&&t===Y&&(v=Y),!v)return null;const p=v[P];if(p)return p;if(a){let M=a.call(this);if(M)return o.set.call(this,M),"function"==typeof v[ct]&&v.removeAttribute(n),M}return null},me(t,n,o),t[c]=!0}function qe(t,n,i){if(n)for(let o=0;o<n.length;o++)We(t,"on"+n[o],i);else{const o=[];for(const c in t)"on"==c.slice(0,2)&&o.push(c);for(let c=0;c<o.length;c++)We(t,o[c],i)}}const ne=j("originalInstance");function ge(t){const n=Y[t];if(!n)return;Y[j(t)]=n,Y[t]=function(){const c=Me(arguments,t);switch(c.length){case 0:this[ne]=new n;break;case 1:this[ne]=new n(c[0]);break;case 2:this[ne]=new n(c[0],c[1]);break;case 3:this[ne]=new n(c[0],c[1],c[2]);break;case 4:this[ne]=new n(c[0],c[1],c[2],c[3]);break;default:throw new Error("Arg list too long.")}},le(Y[t],n);const i=new n(function(){});let o;for(o in i)"XMLHttpRequest"===t&&"responseBlob"===o||function(c){"function"==typeof i[c]?Y[t].prototype[c]=function(){return this[ne][c].apply(this[ne],arguments)}:me(Y[t].prototype,c,{set:function(a){"function"==typeof a?(this[ne][c]=Ie(a,t+"."+c),le(this[ne][c],a)):this[ne][c]=a},get:function(){return this[ne][c]}})}(o);for(o in n)"prototype"!==o&&n.hasOwnProperty(o)&&(Y[t][o]=n[o])}function ae(t,n,i){let o=t;for(;o&&!o.hasOwnProperty(n);)o=ve(o);!o&&t[n]&&(o=t);const c=j(n);let a=null;if(o&&(!(a=o[c])||!o.hasOwnProperty(c))&&(a=o[c]=o[n],Ve(o&&ue(o,n)))){const d=i(a,c,n);o[n]=function(){return d(this,arguments)},le(o[n],a)}return a}function lt(t,n,i){let o=null;function c(a){const m=a.data;return m.args[m.cbIdx]=function(){a.invoke.apply(this,arguments)},o.apply(m.target,m.args),a}o=ae(t,n,a=>function(m,d){const P=i(m,d);return P.cbIdx>=0&&"function"==typeof d[P.cbIdx]?Le(P.name,d[P.cbIdx],P,c):a.apply(m,d)})}function le(t,n){t[j("OriginalDelegate")]=n}let Xe=!1,je=!1;function ft(){if(Xe)return je;Xe=!0;try{const t=_e.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(je=!0)}catch{}return je}Zone.__load_patch("ZoneAwarePromise",(t,n,i)=>{const o=Object.getOwnPropertyDescriptor,c=Object.defineProperty,m=i.symbol,d=[],P=!0===t[m("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],v=m("Promise"),p=m("then"),M="__creationTrace__";i.onUnhandledError=l=>{if(i.showUncaughtError()){const u=l&&l.rejection;u?console.error("Unhandled Promise rejection:",u instanceof Error?u.message:u,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",u,u instanceof Error?u.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;d.length;){const l=d.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(u){N(u)}}};const Z=m("unhandledPromiseRejectionHandler");function N(l){i.onUnhandledError(l);try{const u=n[Z];"function"==typeof u&&u.call(this,l)}catch{}}function B(l){return l&&l.then}function H(l){return l}function K(l){return e.reject(l)}const q=m("state"),R=m("value"),_=m("finally"),J=m("parentPromiseValue"),x=m("parentPromiseState"),X="Promise.then",A=null,E=!0,G=!1,h=0;function I(l,u){return s=>{try{z(l,u,s)}catch(f){z(l,!1,f)}}}const w=function(){let l=!1;return function(s){return function(){l||(l=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",oe=m("currentTaskTrace");function z(l,u,s){const f=w();if(l===s)throw new TypeError(Q);if(l[q]===A){let g=null;try{("object"==typeof s||"function"==typeof s)&&(g=s&&s.then)}catch(b){return f(()=>{z(l,!1,b)})(),l}if(u!==G&&s instanceof e&&s.hasOwnProperty(q)&&s.hasOwnProperty(R)&&s[q]!==A)re(s),z(l,s[q],s[R]);else if(u!==G&&"function"==typeof g)try{g.call(s,f(I(l,u)),f(I(l,!1)))}catch(b){f(()=>{z(l,!1,b)})()}else{l[q]=u;const b=l[R];if(l[R]=s,l[_]===_&&u===E&&(l[q]=l[x],l[R]=l[J]),u===G&&s instanceof Error){const y=n.currentTask&&n.currentTask.data&&n.currentTask.data[M];y&&c(s,oe,{configurable:!0,enumerable:!1,writable:!0,value:y})}for(let y=0;y<b.length;)ee(l,b[y++],b[y++],b[y++],b[y++]);if(0==b.length&&u==G){l[q]=h;let y=s;try{throw new Error("Uncaught (in promise): "+function a(l){return l&&l.toString===Object.prototype.toString?(l.constructor&&l.constructor.name||"")+": "+JSON.stringify(l):l?l.toString():Object.prototype.toString.call(l)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(S){y=S}P&&(y.throwOriginal=!0),y.rejection=s,y.promise=l,y.zone=n.current,y.task=n.currentTask,d.push(y),i.scheduleMicroTask()}}}return l}const U=m("rejectionHandledHandler");function re(l){if(l[q]===h){try{const u=n[U];u&&"function"==typeof u&&u.call(this,{rejection:l[R],promise:l})}catch{}l[q]=G;for(let u=0;u<d.length;u++)l===d[u].promise&&d.splice(u,1)}}function ee(l,u,s,f,g){re(l);const b=l[q],y=b?"function"==typeof f?f:H:"function"==typeof g?g:K;u.scheduleMicroTask(X,()=>{try{const S=l[R],D=!!s&&_===s[_];D&&(s[J]=S,s[x]=b);const O=u.run(y,void 0,D&&y!==K&&y!==H?[]:[S]);z(s,!0,O)}catch(S){z(s,!1,S)}},s)}const L=function(){},T=t.AggregateError;class e{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(u){return z(new this(null),E,u)}static reject(u){return z(new this(null),G,u)}static any(u){if(!u||"function"!=typeof u[Symbol.iterator])return Promise.reject(new T([],"All promises were rejected"));const s=[];let f=0;try{for(let y of u)f++,s.push(e.resolve(y))}catch{return Promise.reject(new T([],"All promises were rejected"))}if(0===f)return Promise.reject(new T([],"All promises were rejected"));let g=!1;const b=[];return new e((y,S)=>{for(let D=0;D<s.length;D++)s[D].then(O=>{g||(g=!0,y(O))},O=>{b.push(O),f--,0===f&&(g=!0,S(new T(b,"All promises were rejected")))})})}static race(u){let s,f,g=new this((S,D)=>{s=S,f=D});function b(S){s(S)}function y(S){f(S)}for(let S of u)B(S)||(S=this.resolve(S)),S.then(b,y);return g}static all(u){return e.allWithCallback(u)}static allSettled(u){return(this&&this.prototype instanceof e?this:e).allWithCallback(u,{thenCallback:f=>({status:"fulfilled",value:f}),errorCallback:f=>({status:"rejected",reason:f})})}static allWithCallback(u,s){let f,g,b=new this((O,V)=>{f=O,g=V}),y=2,S=0;const D=[];for(let O of u){B(O)||(O=this.resolve(O));const V=S;try{O.then(F=>{D[V]=s?s.thenCallback(F):F,y--,0===y&&f(D)},F=>{s?(D[V]=s.errorCallback(F),y--,0===y&&f(D)):g(F)})}catch(F){g(F)}y++,S++}return y-=2,0===y&&f(D),b}constructor(u){const s=this;if(!(s instanceof e))throw new Error("Must be an instanceof Promise.");s[q]=A,s[R]=[];try{const f=w();u&&u(f(I(s,E)),f(I(s,G)))}catch(f){z(s,!1,f)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return e}then(u,s){var f;let g=null===(f=this.constructor)||void 0===f?void 0:f[Symbol.species];(!g||"function"!=typeof g)&&(g=this.constructor||e);const b=new g(L),y=n.current;return this[q]==A?this[R].push(y,b,u,s):ee(this,y,b,u,s),b}catch(u){return this.then(null,u)}finally(u){var s;let f=null===(s=this.constructor)||void 0===s?void 0:s[Symbol.species];(!f||"function"!=typeof f)&&(f=e);const g=new f(L);g[_]=_;const b=n.current;return this[q]==A?this[R].push(b,g,u,u):ee(this,b,g,u,u),g}}e.resolve=e.resolve,e.reject=e.reject,e.race=e.race,e.all=e.all;const r=t[v]=t.Promise;t.Promise=e;const k=m("thenPatched");function C(l){const u=l.prototype,s=o(u,"then");if(s&&(!1===s.writable||!s.configurable))return;const f=u.then;u[p]=f,l.prototype.then=function(g,b){return new e((S,D)=>{f.call(this,S,D)}).then(g,b)},l[k]=!0}return i.patchThen=C,r&&(C(r),ae(t,"fetch",l=>function $(l){return function(u,s){let f=l.apply(u,s);if(f instanceof e)return f;let g=f.constructor;return g[k]||C(g),f}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=d,e}),Zone.__load_patch("toString",t=>{const n=Function.prototype.toString,i=j("OriginalDelegate"),o=j("Promise"),c=j("Error"),a=function(){if("function"==typeof this){const v=this[i];if(v)return"function"==typeof v?n.call(v):Object.prototype.toString.call(v);if(this===Promise){const p=t[o];if(p)return n.call(p)}if(this===Error){const p=t[c];if(p)return n.call(p)}}return n.call(this)};a[i]=n,Function.prototype.toString=a;const m=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":m.call(this)}});let Ee=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){Ee=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{Ee=!1}const ht={useG:!0},te={},ze={},Ye=new RegExp("^"+pe+"(\\w+)(true|false)$"),$e=j("propagationStopped");function Je(t,n){const i=(n?n(t):t)+ce,o=(n?n(t):t)+ie,c=pe+i,a=pe+o;te[t]={},te[t][ce]=c,te[t][ie]=a}function dt(t,n,i,o){const c=o&&o.add||De,a=o&&o.rm||Oe,m=o&&o.listeners||"eventListeners",d=o&&o.rmAll||"removeAllListeners",P=j(c),v="."+c+":",p="prependListener",M="."+p+":",Z=function(R,_,J){if(R.isRemoved)return;const x=R.callback;let X;"object"==typeof x&&x.handleEvent&&(R.callback=E=>x.handleEvent(E),R.originalDelegate=x);try{R.invoke(R,_,[J])}catch(E){X=E}const A=R.options;return A&&"object"==typeof A&&A.once&&_[a].call(_,J.type,R.originalDelegate?R.originalDelegate:R.callback,A),X};function N(R,_,J){if(!(_=_||t.event))return;const x=R||_.target||t,X=x[te[_.type][J?ie:ce]];if(X){const A=[];if(1===X.length){const E=Z(X[0],x,_);E&&A.push(E)}else{const E=X.slice();for(let G=0;G<E.length&&(!_||!0!==_[$e]);G++){const h=Z(E[G],x,_);h&&A.push(h)}}if(1===A.length)throw A[0];for(let E=0;E<A.length;E++){const G=A[E];n.nativeScheduleMicroTask(()=>{throw G})}}}const B=function(R){return N(this,R,!1)},H=function(R){return N(this,R,!0)};function K(R,_){if(!R)return!1;let J=!0;_&&void 0!==_.useG&&(J=_.useG);const x=_&&_.vh;let X=!0;_&&void 0!==_.chkDup&&(X=_.chkDup);let A=!1;_&&void 0!==_.rt&&(A=_.rt);let E=R;for(;E&&!E.hasOwnProperty(c);)E=ve(E);if(!E&&R[c]&&(E=R),!E||E[P])return!1;const G=_&&_.eventNameToString,h={},I=E[P]=E[c],w=E[j(a)]=E[a],Q=E[j(m)]=E[m],oe=E[j(d)]=E[d];let z;_&&_.prepend&&(z=E[j(_.prepend)]=E[_.prepend]);const e=J?function(s){if(!h.isExisting)return I.call(h.target,h.eventName,h.capture?H:B,h.options)}:function(s){return I.call(h.target,h.eventName,s.invoke,h.options)},r=J?function(s){if(!s.isRemoved){const f=te[s.eventName];let g;f&&(g=f[s.capture?ie:ce]);const b=g&&s.target[g];if(b)for(let y=0;y<b.length;y++)if(b[y]===s){b.splice(y,1),s.isRemoved=!0,0===b.length&&(s.allRemoved=!0,s.target[g]=null);break}}if(s.allRemoved)return w.call(s.target,s.eventName,s.capture?H:B,s.options)}:function(s){return w.call(s.target,s.eventName,s.invoke,s.options)},C=_&&_.diff?_.diff:function(s,f){const g=typeof f;return"function"===g&&s.callback===f||"object"===g&&s.originalDelegate===f},$=Zone[j("UNPATCHED_EVENTS")],l=t[j("PASSIVE_EVENTS")],u=function(s,f,g,b,y=!1,S=!1){return function(){const D=this||t;let O=arguments[0];_&&_.transferEventName&&(O=_.transferEventName(O));let V=arguments[1];if(!V)return s.apply(this,arguments);if(Pe&&"uncaughtException"===O)return s.apply(this,arguments);let F=!1;if("function"!=typeof V){if(!V.handleEvent)return s.apply(this,arguments);F=!0}if(x&&!x(s,V,D,arguments))return;const fe=Ee&&!!l&&-1!==l.indexOf(O),se=function U(s,f){return!Ee&&"object"==typeof s&&s?!!s.capture:Ee&&f?"boolean"==typeof s?{capture:s,passive:!0}:s?"object"==typeof s&&!1!==s.passive?Object.assign(Object.assign({},s),{passive:!0}):s:{passive:!0}:s}(arguments[2],fe);if($)for(let de=0;de<$.length;de++)if(O===$[de])return fe?s.call(D,O,V,se):s.apply(this,arguments);const xe=!!se&&("boolean"==typeof se||se.capture),tt=!(!se||"object"!=typeof se)&&se.once,gt=Zone.current;let Ge=te[O];Ge||(Je(O,G),Ge=te[O]);const nt=Ge[xe?ie:ce];let Ce,ye=D[nt],rt=!1;if(ye){if(rt=!0,X)for(let de=0;de<ye.length;de++)if(C(ye[de],V))return}else ye=D[nt]=[];const ot=D.constructor.name,st=ze[ot];st&&(Ce=st[O]),Ce||(Ce=ot+f+(G?G(O):O)),h.options=se,tt&&(h.options.once=!1),h.target=D,h.capture=xe,h.eventName=O,h.isExisting=rt;const ke=J?ht:void 0;ke&&(ke.taskData=h);const he=gt.scheduleEventTask(Ce,V,ke,g,b);return h.target=null,ke&&(ke.taskData=null),tt&&(se.once=!0),!Ee&&"boolean"==typeof he.options||(he.options=se),he.target=D,he.capture=xe,he.eventName=O,F&&(he.originalDelegate=V),S?ye.unshift(he):ye.push(he),y?D:void 0}};return E[c]=u(I,v,e,r,A),z&&(E[p]=u(z,M,function(s){return z.call(h.target,h.eventName,s.invoke,h.options)},r,A,!0)),E[a]=function(){const s=this||t;let f=arguments[0];_&&_.transferEventName&&(f=_.transferEventName(f));const g=arguments[2],b=!!g&&("boolean"==typeof g||g.capture),y=arguments[1];if(!y)return w.apply(this,arguments);if(x&&!x(w,y,s,arguments))return;const S=te[f];let D;S&&(D=S[b?ie:ce]);const O=D&&s[D];if(O)for(let V=0;V<O.length;V++){const F=O[V];if(C(F,y))return O.splice(V,1),F.isRemoved=!0,0===O.length&&(F.allRemoved=!0,s[D]=null,"string"==typeof f)&&(s[pe+"ON_PROPERTY"+f]=null),F.zone.cancelTask(F),A?s:void 0}return w.apply(this,arguments)},E[m]=function(){const s=this||t;let f=arguments[0];_&&_.transferEventName&&(f=_.transferEventName(f));const g=[],b=Ke(s,G?G(f):f);for(let y=0;y<b.length;y++){const S=b[y];g.push(S.originalDelegate?S.originalDelegate:S.callback)}return g},E[d]=function(){const s=this||t;let f=arguments[0];if(f){_&&_.transferEventName&&(f=_.transferEventName(f));const g=te[f];if(g){const S=s[g[ce]],D=s[g[ie]];if(S){const O=S.slice();for(let V=0;V<O.length;V++){const F=O[V];this[a].call(this,f,F.originalDelegate?F.originalDelegate:F.callback,F.options)}}if(D){const O=D.slice();for(let V=0;V<O.length;V++){const F=O[V];this[a].call(this,f,F.originalDelegate?F.originalDelegate:F.callback,F.options)}}}}else{const g=Object.keys(s);for(let b=0;b<g.length;b++){const S=Ye.exec(g[b]);let D=S&&S[1];D&&"removeListener"!==D&&this[d].call(this,D)}this[d].call(this,"removeListener")}if(A)return this},le(E[c],I),le(E[a],w),oe&&le(E[d],oe),Q&&le(E[m],Q),!0}let q=[];for(let R=0;R<i.length;R++)q[R]=K(i[R],o);return q}function Ke(t,n){if(!n){const a=[];for(let m in t){const d=Ye.exec(m);let P=d&&d[1];if(P&&(!n||P===n)){const v=t[m];if(v)for(let p=0;p<v.length;p++)a.push(v[p])}}return a}let i=te[n];i||(Je(n),i=te[n]);const o=t[i[ce]],c=t[i[ie]];return o?c?o.concat(c):o.slice():c?c.slice():[]}function _t(t,n){const i=t.Event;i&&i.prototype&&n.patchMethod(i.prototype,"stopImmediatePropagation",o=>function(c,a){c[$e]=!0,o&&o.apply(c,a)})}function Et(t,n,i,o,c){const a=Zone.__symbol__(o);if(n[a])return;const m=n[a]=n[o];n[o]=function(d,P,v){return P&&P.prototype&&c.forEach(function(p){const M=`${i}.${o}::`+p,Z=P.prototype;try{if(Z.hasOwnProperty(p)){const N=t.ObjectGetOwnPropertyDescriptor(Z,p);N&&N.value?(N.value=t.wrapWithCurrentZone(N.value,M),t._redefineProperty(P.prototype,p,N)):Z[p]&&(Z[p]=t.wrapWithCurrentZone(Z[p],M))}else Z[p]&&(Z[p]=t.wrapWithCurrentZone(Z[p],M))}catch{}}),m.call(n,d,P,v)},t.attachOriginToPatched(n[o],m)}function Qe(t,n,i){if(!i||0===i.length)return n;const o=i.filter(a=>a.target===t);if(!o||0===o.length)return n;const c=o[0].ignoreProperties;return n.filter(a=>-1===c.indexOf(a))}function et(t,n,i,o){t&&qe(t,Qe(t,n,i),o)}function He(t){return Object.getOwnPropertyNames(t).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}Zone.__load_patch("util",(t,n,i)=>{const o=He(t);i.patchOnProperties=qe,i.patchMethod=ae,i.bindArguments=Me,i.patchMacroTask=lt;const c=n.__symbol__("BLACK_LISTED_EVENTS"),a=n.__symbol__("UNPATCHED_EVENTS");t[a]&&(t[c]=t[a]),t[c]&&(n[c]=n[a]=t[c]),i.patchEventPrototype=_t,i.patchEventTarget=dt,i.isIEOrEdge=ft,i.ObjectDefineProperty=me,i.ObjectGetOwnPropertyDescriptor=ue,i.ObjectCreate=Se,i.ArraySlice=it,i.patchClass=ge,i.wrapWithCurrentZone=Ie,i.filterProperties=Qe,i.attachOriginToPatched=le,i._redefineProperty=Object.defineProperty,i.patchCallbacks=Et,i.getGlobalObjects=()=>({globalSources:ze,zoneSymbolEventNames:te,eventNames:o,isBrowser:Ae,isMix:Be,isNode:Pe,TRUE_STR:ie,FALSE_STR:ce,ZONE_SYMBOL_PREFIX:pe,ADD_EVENT_LISTENER_STR:De,REMOVE_EVENT_LISTENER_STR:Oe})});const Re=j("zoneTask");function Te(t,n,i,o){let c=null,a=null;i+=o;const m={};function d(v){const p=v.data;return p.args[0]=function(){return v.invoke.apply(this,arguments)},p.handleId=c.apply(t,p.args),v}function P(v){return a.call(t,v.data.handleId)}c=ae(t,n+=o,v=>function(p,M){if("function"==typeof M[0]){const Z={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?M[1]||0:void 0,args:M},N=M[0];M[0]=function(){try{return N.apply(this,arguments)}finally{Z.isPeriodic||("number"==typeof Z.handleId?delete m[Z.handleId]:Z.handleId&&(Z.handleId[Re]=null))}};const B=Le(n,M[0],Z,d,P);if(!B)return B;const H=B.data.handleId;return"number"==typeof H?m[H]=B:H&&(H[Re]=B),H&&H.ref&&H.unref&&"function"==typeof H.ref&&"function"==typeof H.unref&&(B.ref=H.ref.bind(H),B.unref=H.unref.bind(H)),"number"==typeof H||H?H:B}return v.apply(t,M)}),a=ae(t,i,v=>function(p,M){const Z=M[0];let N;"number"==typeof Z?N=m[Z]:(N=Z&&Z[Re],N||(N=Z)),N&&"string"==typeof N.type?"notScheduled"!==N.state&&(N.cancelFn&&N.data.isPeriodic||0===N.runCount)&&("number"==typeof Z?delete m[Z]:Z&&(Z[Re]=null),N.zone.cancelTask(N)):v.apply(t,M)})}Zone.__load_patch("legacy",t=>{const n=t[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(t,n,i)=>{i.patchMethod(t,"queueMicrotask",o=>function(c,a){n.current.scheduleMicroTask("queueMicrotask",a[0])})}),Zone.__load_patch("timers",t=>{const n="set",i="clear";Te(t,n,i,"Timeout"),Te(t,n,i,"Interval"),Te(t,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Te(t,"request","cancel","AnimationFrame"),Te(t,"mozRequest","mozCancel","AnimationFrame"),Te(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,n)=>{const i=["alert","prompt","confirm"];for(let o=0;o<i.length;o++)ae(t,i[o],(a,m,d)=>function(P,v){return n.current.run(a,t,v,d)})}),Zone.__load_patch("EventTarget",(t,n,i)=>{(function pt(t,n){n.patchEventPrototype(t,n)})(t,i),function mt(t,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:o,TRUE_STR:c,FALSE_STR:a,ZONE_SYMBOL_PREFIX:m}=n.getGlobalObjects();for(let P=0;P<i.length;P++){const v=i[P],Z=m+(v+a),N=m+(v+c);o[v]={},o[v][a]=Z,o[v][c]=N}const d=t.EventTarget;d&&d.prototype&&n.patchEventTarget(t,n,[d&&d.prototype])}(t,i);const o=t.XMLHttpRequestEventTarget;o&&o.prototype&&i.patchEventTarget(t,i,[o.prototype])}),Zone.__load_patch("MutationObserver",(t,n,i)=>{ge("MutationObserver"),ge("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,n,i)=>{ge("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,n,i)=>{ge("FileReader")}),Zone.__load_patch("on_property",(t,n,i)=>{!function Tt(t,n){if(Pe&&!Be||Zone[t.symbol("patchEvents")])return;const i=n.__Zone_ignore_on_properties;let o=[];if(Ae){const c=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const a=function ut(){try{const t=_e.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:c,ignoreProperties:["error"]}]:[];et(c,He(c),i&&i.concat(a),ve(c))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c<o.length;c++){const a=n[o[c]];a&&a.prototype&&et(a.prototype,He(a.prototype),i)}}(i,t)}),Zone.__load_patch("customElements",(t,n,i)=>{!function yt(t,n){const{isBrowser:i,isMix:o}=n.getGlobalObjects();(i||o)&&t.customElements&&"customElements"in t&&n.patchCallbacks(n,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,i)}),Zone.__load_patch("XHR",(t,n)=>{!function P(v){const p=v.XMLHttpRequest;if(!p)return;const M=p.prototype;let N=M[Ze],B=M[Ne];if(!N){const h=v.XMLHttpRequestEventTarget;if(h){const I=h.prototype;N=I[Ze],B=I[Ne]}}const H="readystatechange",K="scheduled";function q(h){const I=h.data,w=I.target;w[a]=!1,w[d]=!1;const Q=w[c];N||(N=w[Ze],B=w[Ne]),Q&&B.call(w,H,Q);const oe=w[c]=()=>{if(w.readyState===w.DONE)if(!I.aborted&&w[a]&&h.state===K){const U=w[n.__symbol__("loadfalse")];if(0!==w.status&&U&&U.length>0){const re=h.invoke;h.invoke=function(){const ee=w[n.__symbol__("loadfalse")];for(let W=0;W<ee.length;W++)ee[W]===h&&ee.splice(W,1);!I.aborted&&h.state===K&&re.call(h)},U.push(h)}else h.invoke()}else!I.aborted&&!1===w[a]&&(w[d]=!0)};return N.call(w,H,oe),w[i]||(w[i]=h),E.apply(w,I.args),w[a]=!0,h}function R(){}function _(h){const I=h.data;return I.aborted=!0,G.apply(I.target,I.args)}const J=ae(M,"open",()=>function(h,I){return h[o]=0==I[2],h[m]=I[1],J.apply(h,I)}),X=j("fetchTaskAborting"),A=j("fetchTaskScheduling"),E=ae(M,"send",()=>function(h,I){if(!0===n.current[A]||h[o])return E.apply(h,I);{const w={target:h,url:h[m],isPeriodic:!1,args:I,aborted:!1},Q=Le("XMLHttpRequest.send",R,w,q,_);h&&!0===h[d]&&!w.aborted&&Q.state===K&&Q.invoke()}}),G=ae(M,"abort",()=>function(h,I){const w=function Z(h){return h[i]}(h);if(w&&"string"==typeof w.type){if(null==w.cancelFn||w.data&&w.data.aborted)return;w.zone.cancelTask(w)}else if(!0===n.current[X])return G.apply(h,I)})}(t);const i=j("xhrTask"),o=j("xhrSync"),c=j("xhrListener"),a=j("xhrScheduled"),m=j("xhrURL"),d=j("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function at(t,n){const i=t.constructor.name;for(let o=0;o<n.length;o++){const c=n[o],a=t[c];if(a){if(!Ve(ue(t,c)))continue;t[c]=(d=>{const P=function(){return d.apply(this,Me(arguments,i+"."+c))};return le(P,d),P})(a)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,n)=>{function i(o){return function(c){Ke(t,o).forEach(m=>{const d=t.PromiseRejectionEvent;if(d){const P=new d(o,{promise:c.promise,reason:c.rejection});m.invoke(P)}})}}t.PromiseRejectionEvent&&(n[j("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[j("rejectionHandledHandler")]=i("rejectionhandled"))})}},ue=>{ue(ue.s=583)}]);
\ No newline at end of file
diff --git a/takima-AR/dist/takima-ar/runtime.baa2baa42427523d.js b/takima-AR/dist/takima-ar/runtime.baa2baa42427523d.js
deleted file mode 100644
index 6c2c6ac56dc8a89791fee2ed135a47ff3564d1e4..0000000000000000000000000000000000000000
--- a/takima-AR/dist/takima-ar/runtime.baa2baa42427523d.js
+++ /dev/null
@@ -1 +0,0 @@
-(()=>{"use strict";var e,v={},_={};function n(e){var l=_[e];if(void 0!==l)return l.exports;var r=_[e]={exports:{}};return v[e](r,r.exports,n),r.exports}n.m=v,e=[],n.O=(l,r,u,f)=>{if(!r){var t=1/0;for(a=0;a<e.length;a++){for(var[r,u,f]=e[a],c=!0,o=0;o<r.length;o++)(!1&f||t>=f)&&Object.keys(n.O).every(k=>n.O[k](r[o]))?r.splice(o--,1):(c=!1,f<t&&(t=f));if(c){e.splice(a--,1);var s=u();void 0!==s&&(l=s)}}return l}f=f||0;for(var a=e.length;a>0&&e[a-1][2]>f;a--)e[a]=e[a-1];e[a]=[r,u,f]},n.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),(()=>{var e={666:0};n.O.j=u=>0===e[u];var l=(u,f)=>{var o,s,[a,t,c]=f,i=0;if(a.some(h=>0!==e[h])){for(o in t)n.o(t,o)&&(n.m[o]=t[o]);if(c)var d=c(n)}for(u&&u(f);i<a.length;i++)n.o(e,s=a[i])&&e[s]&&e[s][0](),e[s]=0;return n.O(d)},r=self.webpackChunktakima_AR=self.webpackChunktakima_AR||[];r.forEach(l.bind(null,0)),r.push=l.bind(null,r.push.bind(r))})()})();
\ No newline at end of file
diff --git a/takima-AR/dist/takima-ar/styles.ef46db3751d8e999.css b/takima-AR/dist/takima-ar/styles.ef46db3751d8e999.css
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/takima-AR/firebase.json b/takima-AR/firebase.json
deleted file mode 100644
index e206cc04373f7d4e81d954e59008d61ebea986f4..0000000000000000000000000000000000000000
--- a/takima-AR/firebase.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-  "hosting": [
-    {
-      "target": "takima-AR",
-      "public": "dist/takima-ar",
-      "ignore": [
-        "**/.*"
-      ],
-      "headers": [
-        {
-          "source": "*.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].+(css|js)",
-          "headers": [
-            {
-              "key": "Cache-Control",
-              "value": "public,max-age=31536000,immutable"
-            }
-          ]
-        },
-        {
-          "source": "/@(ngsw-worker.js|ngsw.json)",
-          "headers": [
-            {
-              "key": "Cache-Control",
-              "value": "no-cache"
-            }
-          ]
-        }
-      ],
-      "rewrites": [
-        {
-          "source": "**",
-          "destination": "/index.html"
-        }
-      ]
-    },
-    {
-      "target": "takima-AR",
-      "public": "dist/takima-ar",
-      "ignore": [
-        "**/.*"
-      ],
-      "headers": [
-        {
-          "source": "*.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].+(css|js)",
-          "headers": [
-            {
-              "key": "Cache-Control",
-              "value": "public,max-age=31536000,immutable"
-            }
-          ]
-        },
-        {
-          "source": "/@(ngsw-worker.js|ngsw.json)",
-          "headers": [
-            {
-              "key": "Cache-Control",
-              "value": "no-cache"
-            }
-          ]
-        }
-      ],
-      "rewrites": [
-        {
-          "source": "**",
-          "destination": "/index.html"
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file