From d0a417cd92d3a027eda4f04ceaf03ca043c2432d Mon Sep 17 00:00:00 2001 From: Parikshit Singh Date: Sat, 4 Feb 2023 02:21:03 +0530 Subject: [PATCH] publish var --- deploy-ninjas-transforms.sh | 15 ++ package-lock.json | 213 +++++++++++++++++- package.json | 5 +- .../00c19f3786ce422783224ccf8aaca279.json | 1 + .../00d3dfb14c3f4740a07f6b713a0a3819.json | 1 + .../0204512cc8eb988bc2f4e73923e92812.json | 1 + .../03f0484c2b9119358a6e27226633a2b2.json | 1 + .../046335548f6023cd9749d66f1661bc0a.json | 1 + .../050ce072b8702bbd00a70943ed2ffb77.json | 1 + .../06faddf29999cfa453a10c7e78f6cd14.json | 1 + .../084c2fe604acd7c9340a50773e7f77ab.json | 1 + .../08926cb9acb0de6516dda5a84f02f124.json | 1 + .../0aa71b6806fb166876ab4b7028743e8c.json | 1 + .../0b7fc1d20321fb194f914ae3673b0bd2.json | 1 + .../0ca4c1ed2b725aa09bbf45c86cea0763.json | 1 + .../0d1ac1a22f49dc45a3e88be0df00ccee.json | 1 + .../0d7e1344abd479f9de66ebd70f7b3a35.json | 1 + .../140422a4afde9b1e5c307e18ab960c3a.json | 1 + .../167fbfef621ba23780f1b864d5479435.json | 1 + .../16bd7c93c1ed60f485e1fed5f9f3d147.json | 1 + .../16e5aa3c2850138abf8cb3ccde0582f9.json | 1 + .../17c29e4f06d0aa134328048158bbdb09.json | 1 + .../17e16d263190819e91b8e078d66da874.json | 1 + .../1807b7f4ac8e191334b90f938cc7ce48.json | 1 + .../183f2e90aa4812c3bd4cf53ef255119f.json | 1 + .../18f969597a1ade62b17b32dd90da2b5e.json | 1 + .../1912a14889d7784ec82dcfd267c92a54.json | 1 + .../1ad96508222b9a62470bdb0ad2c1a62c.json | 1 + .../1d2c02b265c8bb44a08a97434470446b.json | 1 + .../1e1f393778e0915e09291656b18f5c30.json | 1 + .../1f72d1744ca9a04afc9c62ea1e420d07.json | 1 + .../20424c22facdb55359f25b5575a9f3c1.json | 1 + .../2063a393d6906a4433314673b44e4f65.json | 1 + .../2137aef0553d761d5c9312143cc49721.json | 1 + .../22da9b190a5404007d5940afe03224cc.json | 1 + .../24835b8d95462ef90d18cbb03a3a3429.json | 1 + .../24a2c677f15707d8646bc6c81d448414.json | 1 + .../24eb7430ad0e277f9262cc4033728e7d.json | 1 + .../253a5a7bfb49e046e162d3f6f920194e.json | 1 + .../26001c7b5cdd8042951fa096cf477433.json | 1 + .../2711cc7dd314ed5751ef9e74c17b8a34.json | 1 + .../2769942040e89da8758eecf5ebdf9aeb.json | 1 + .../2769ce8b014772f1fa1d4e986bc616d2.json | 1 + .../29ca18998fa3d9c5a25d1072ec0ba38f.json | 1 + .../2c8d32cba96aef6cf5c82a2bcf79cf74.json | 1 + .../2ccd570689c0ad32980ee3eec00c4e8d.json | 1 + .../2e04957c7d1f1e8f5511b87f14380fd1.json | 1 + .../32014686b1b30945e2d1ef9f2ed5b093.json | 1 + .../345da0d756cc6f1d111fa49286311aba.json | 1 + .../378fba443ac31af91032cff025fa4b7e.json | 1 + .../3add95ff099d6c4484c4bdc10d18e930.json | 1 + .../3cc39b1c189202246342d1e8c9ac7b64.json | 1 + .../3cdc7588d40fcc584d8fb36e1cd0bc82.json | 1 + .../3ced6c0880b709d87ea9d9a66e38ee06.json | 1 + .../3e22e1a3858a5eab39ac1b7a95b7a87d.json | 1 + .../40e8b423297a5fac262223d1c84ee156.json | 1 + .../43674622740442782f46241a9f975f53.json | 1 + .../459a178f38574c8ea20af916a8da4bdb.json | 1 + .../45b06fbe6b13a4909912dd3fa13262df.json | 1 + .../476b09d806bf8c90138b3f24acc63c20.json | 1 + .../4a308ff96c852601a869e49b005f32bd.json | 1 + .../4b0f4fa158b1513dee5c385e9ccd1a43.json | 1 + .../4c3b487099f843d5a2357b82db89f1aa.json | 1 + .../4c8da5ee98fb12d9ce593703fdcef57e.json | 1 + .../4db1d3d5ccc35dfab9300b0a41fd1954.json | 1 + .../4fb5e53f3ba67a8b77289ed203935298.json | 1 + .../4feeeb63b92ee617664a19630ff8d0af.json | 1 + .../5372b53db40b16a5d08c6a5f25662a74.json | 1 + .../5438ad60987adf7e4e7e2db7ab91e2ad.json | 1 + .../54b49c40c0b5a31d0ccfe64f6f06dae0.json | 1 + .../5642e9f7decaaa021fabbf2ea8359b86.json | 1 + .../5796667c3bccb2febf8ad0dcfdf223f4.json | 1 + .../583e786e04c05a24dbef3e1b7af7980b.json | 1 + .../58db42cfc20a05ab687a7042e8ec53a1.json | 1 + .../5dc932127d582a182d5a593e88167fe4.json | 1 + .../6122f203c12ba3d7849199fac7fc2c58.json | 1 + .../61d847d17cb174614eb8e3b13ed4d949.json | 1 + .../64f6da7e1c6bbb7f19205c6582e743b1.json | 1 + .../65c46b9aa944b1eaa9d7f857d8883003.json | 1 + .../6603479f767d543c6bedc5e3959d41d3.json | 1 + .../66394664cd25f2f03dc82bc7a9b1e736.json | 1 + .../66f5f7b310bd3603d490e206a38b8ff0.json | 1 + .../6755a670167cdbba4b4b67b6ad534148.json | 1 + .../69979374b62909381b6ac4c09feb326a.json | 1 + .../6a70e3f17fe0ab99350c065e18de2456.json | 1 + .../6aa8383c2771cc544110d497d35233dc.json | 1 + .../6e93bbd268a1c811a8187422f22bca92.json | 1 + .../6f6d4ea9c361750b9acd65114421a280.json | 1 + .../6fcb51d73b15a43c5634ffb9806445f1.json | 1 + .../71288340375cb91133009a5351c00d2a.json | 1 + .../73cdcd3a133dfe623eb15e72128dbf09.json | 1 + .../761baac26a2617b98393b682ba77cf78.json | 1 + .../774a19c41c07cd61b83fef2187a909af.json | 1 + .../79fb4bee61f127b18ed920fabf74c28c.json | 1 + .../7a014d5d69022df649f6e8ac08968577.json | 1 + .../7b23081431135157c9b70229cc250113.json | 1 + .../7bfa51a1967edb6204d231a876a9a43d.json | 1 + .../7c13db48b9e00fce2e592187ac876117.json | 1 + .../7c4a7c1437dd924de138a9110e119d57.json | 1 + .../7dc0dc24f6673f80e0a042bc9a270f03.json | 1 + .../7dfb73ea435dfb57de89a2865bcef68f.json | 1 + .../7f74c3d9bf97dbab3f8e9d1aebfb75f0.json | 1 + .../7fc1d0fbb66b6001871b40cfe1a410ef.json | 1 + .../7fcfb08c0756bab4fa3c26ec8136bd86.json | 1 + .../81d775b8c8ac88c3bd9285b3a663ceaf.json | 1 + .../8386663c8b9f9214d12a33c87df040ab.json | 1 + .../83d136039641a6ff6d3abf666f1564c9.json | 1 + .../8418b1c36d8ecf5c018975e31ffc9c04.json | 1 + .../87db23cdc6225c59ea59d0a783e2d8a5.json | 1 + .../87ecc72bdf5fba1425bc23b212bb9d36.json | 1 + .../885058833d0108ebb89b8f4a55c8af0f.json | 1 + .../88a287514ddf9e3935baf0a6c596f5df.json | 1 + .../88aa317c53ebe901e6232831052e014f.json | 1 + .../898cec42bef8511ac5346858cb8db72d.json | 1 + .../8aee31b80e2f30ad250e5a241a13f536.json | 1 + .../8b6cd01bbd78dfbcd58759ab8e37a080.json | 1 + .../8b7867548365eabceae88a81aa05b695.json | 1 + .../8bc0833600437b8c5303e45a3268b465.json | 1 + .../8bfe179e26df42b8b1c643555e4a9bf3.json | 1 + .../8ceb49ff3f08b863fb73da3a4db7c19f.json | 1 + .../8d0f9ebdc2f8ae378c9533308ac8a382.json | 1 + .../8dfba9b9ad5463638dda6c179f8dc72e.json | 1 + .../8f0e90360b95dc3e4b4d57ce1e446b43.json | 1 + .../9043ecd181a9de449131d75346ce9909.json | 1 + .../91a3b06fcb9b04160f75457533f2c404.json | 1 + .../927c2a46a0eba9dea8680582e86cced6.json | 1 + .../93a726669f2a4816bac519063203973c.json | 1 + .../93d46a6d83b968df803f47fde0518184.json | 1 + .../9428b4856cdf16c7c8e993640fd11753.json | 1 + .../942df1687779359b7008f2a319cdc16d.json | 1 + .../95a2b3d433dea6135520ee1b76979b03.json | 1 + .../95eef3098e9f0ae18ad2d5dc23a5b529.json | 1 + .../95f087733d2560d233289af2f13167b3.json | 1 + .../968d5b09b93a5201b76152875a8b68bc.json | 1 + .../971828b0e0f1a492118dc5d16471fce8.json | 1 + .../98b4bf61bca340631acb9d3195ea961b.json | 1 + .../9931283f62ff647972e3f17883e1109d.json | 1 + .../9a0dc13953e413d13261c5ef69737f69.json | 1 + .../9c8ad9752ae45c8370cbf4a2970c739b.json | 1 + .../9e504088de93f3ba1021f841cc4f0dd7.json | 1 + .../9f8f10c9d67b0cef668a36b4c807453c.json | 1 + .../a1d7b6bad2e02173442163262ed32c53.json | 1 + .../a24700edd8e05acf6cf1a3403a4fa138.json | 1 + .../a3cc107e3f595f180ac5eced449cf35e.json | 1 + .../a4b30e203598850f3158489f8b7aeb96.json | 1 + .../a4f98f1450874da6c466cfb908ef3bc5.json | 1 + .../a89fa5f15689afef57a66976e255bd83.json | 1 + .../a8f28ff117c9f4dfd22a5a4ececfd7e9.json | 1 + .../ab7da2310e268e3cbc95e4c864e42075.json | 1 + .../ac75101d43092a2c95e60c5ee6ffa371.json | 1 + .../ad4e8955ba7910a871046b552b3f7d8a.json | 1 + .../aeaaa4bbfc86138005a2c493614c1329.json | 1 + .../b2dc0e76259e5a7a204450bb355dae7a.json | 1 + .../b5575971e9eeca88df08d5e5ed5137ad.json | 1 + .../b5b512ef6b8694653c4c97211268125c.json | 1 + .../b81a6c106c3f253d91972ccd41dce06d.json | 1 + .../b91ed0276cceb0f8c50593aef96727ef.json | 1 + .../b96a8c94119ca3d4f6b5fa5983144999.json | 1 + .../ba2e89bf784bf2701bf1f0906db8288d.json | 1 + .../ba9384c4b1d88ffbb79aae2b0979bde3.json | 1 + .../bb96ad54071545dde13b5bd5a3926208.json | 1 + .../bdc9d6dafd8a935429c2710642224724.json | 1 + .../bdf3b6231f07c3b750de2abd0b7d221b.json | 1 + .../be047522990d17ba39bd83e1eaa69e72.json | 1 + .../bec40b78625775a20d4b986b847b3608.json | 1 + .../c3460ff7cd68af2961af050443b869b9.json | 1 + .../c371851ab17bc4e58090797bf6cb5639.json | 1 + .../c58839ee40f4539ef674229db9bb7df5.json | 1 + .../c9c55fd1689e35c05bcf2d9ed272b2e9.json | 1 + .../caae68d83f71d64e6c22d29623cfbba4.json | 1 + .../ccc382b39a19ccc21a2444c17d7cb014.json | 1 + .../cda75a948951fbb6bc51bf1f800f9787.json | 1 + .../d16a1bde777804440e578e2ca753552c.json | 1 + .../d2819b138eaecce7fb4ea7679446a688.json | 1 + .../d2bc6f5d452b8e8a5400b2047f10d293.json | 1 + .../d3ed7272b6d71c305025131c03bccd81.json | 1 + .../d4662dd1240bc2fdb71f8a0a672bdc20.json | 1 + .../d5cbad2786673a591355f8a561dc7a6a.json | 1 + .../d6ea32fb0570d5f2d299e0b28028d75c.json | 1 + .../db54b3bb68266b35a1e382b745d90769.json | 1 + .../dcd9cc529854f8ca2c8b5a1bb92fb2a8.json | 1 + .../dd75ca26c069d42537ca20b9b78ac9be.json | 1 + .../df3ab3fb401d9577e9e6f2f9870de6c5.json | 1 + .../e11bf634a6496782e05608794d94bfd5.json | 1 + .../e307eb33ec2e17e3c5d510eb2fc3a37d.json | 1 + .../e34778d21e33ae2fecd58abb1969faa2.json | 1 + .../e417217d49504cf214be2d8573a051bf.json | 1 + .../e4b2751953e79329cdeb4975b3137d91.json | 1 + .../e68fd1a5de0453e3863a98ff77df4ee5.json | 1 + .../e73774dd5f3ee3016af1a83acc92000c.json | 1 + .../e77976b15d1d8088749db930cb2914f1.json | 1 + .../e868f001c40cca80dda4220a451f834a.json | 1 + .../e8caafa508afb99ad748229a9e81f116.json | 1 + .../e8df9256f00d90eba680419151cc2b27.json | 1 + .../ec50cebacf37dd8bedce1f70bd970f3d.json | 1 + .../ecc0a86339a8f6f907ed6deaa66bd08c.json | 1 + .../edf05fb2b0d8398be423bb38eda37012.json | 1 + .../ee514dd28de798e3e5debd301e46c5a9.json | 1 + .../ee90fff547947bd2fbeb86215f12124c.json | 1 + .../eff6c1be83e7f8f54a834c06c260705d.json | 1 + .../f07db5f0ac43abd0db0e14f48b9fd4b4.json | 1 + .../f133e2be93bfa07e957ae1ea7994de01.json | 1 + .../f1f7c484ec98ff3708d3e0cb27dda0df.json | 1 + .../f1fa7e4452cf11ca51fd4b64ea950650.json | 1 + .../f4d6d543048d2af94730d5008c61d14d.json | 1 + .../f6838cea97833eb24c6a7ebca6f6200e.json | 1 + .../f693ee308c98e880451d7428497024c4.json | 1 + .../f7709257db0dcc13535737d32c62fdeb.json | 1 + .../f81e9063b1a618d4abfa2e186ec07c7c.json | 1 + .../f86cf5ab421f2f8560a9e4f1cc2d6734.json | 1 + .../f9e97284eea17d510585eb3cd9279348.json | 1 + .../f9f66e356b260401e2adda0a8a340113.json | 1 + .../fc63062c228cf70d6f29111873ee69f7.json | 1 + .../fc6b764d17349b6e94ef6882afd5f499.json | 1 + .../fc7dfb2439f20ecec8e0b6456ac8b2f5.json | 1 + .../fe220fe667e471311047d17c96beabd9.json | 1 + .../fee03bbf4483f48c75e6637a05c6448e.json | 1 + projects/ninjas-transforms/package.json | 18 +- 218 files changed, 453 insertions(+), 12 deletions(-) create mode 100644 deploy-ninjas-transforms.sh create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/00c19f3786ce422783224ccf8aaca279.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/00d3dfb14c3f4740a07f6b713a0a3819.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0204512cc8eb988bc2f4e73923e92812.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/03f0484c2b9119358a6e27226633a2b2.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/046335548f6023cd9749d66f1661bc0a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/050ce072b8702bbd00a70943ed2ffb77.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/06faddf29999cfa453a10c7e78f6cd14.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/084c2fe604acd7c9340a50773e7f77ab.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/08926cb9acb0de6516dda5a84f02f124.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0aa71b6806fb166876ab4b7028743e8c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0b7fc1d20321fb194f914ae3673b0bd2.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0ca4c1ed2b725aa09bbf45c86cea0763.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d1ac1a22f49dc45a3e88be0df00ccee.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d7e1344abd479f9de66ebd70f7b3a35.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/140422a4afde9b1e5c307e18ab960c3a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/167fbfef621ba23780f1b864d5479435.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/16bd7c93c1ed60f485e1fed5f9f3d147.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/16e5aa3c2850138abf8cb3ccde0582f9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/17c29e4f06d0aa134328048158bbdb09.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/17e16d263190819e91b8e078d66da874.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1807b7f4ac8e191334b90f938cc7ce48.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/183f2e90aa4812c3bd4cf53ef255119f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/18f969597a1ade62b17b32dd90da2b5e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1912a14889d7784ec82dcfd267c92a54.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1ad96508222b9a62470bdb0ad2c1a62c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1d2c02b265c8bb44a08a97434470446b.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1e1f393778e0915e09291656b18f5c30.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/1f72d1744ca9a04afc9c62ea1e420d07.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/20424c22facdb55359f25b5575a9f3c1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2063a393d6906a4433314673b44e4f65.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2137aef0553d761d5c9312143cc49721.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/22da9b190a5404007d5940afe03224cc.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/24835b8d95462ef90d18cbb03a3a3429.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/24a2c677f15707d8646bc6c81d448414.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/24eb7430ad0e277f9262cc4033728e7d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/253a5a7bfb49e046e162d3f6f920194e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/26001c7b5cdd8042951fa096cf477433.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2711cc7dd314ed5751ef9e74c17b8a34.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769942040e89da8758eecf5ebdf9aeb.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769ce8b014772f1fa1d4e986bc616d2.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/29ca18998fa3d9c5a25d1072ec0ba38f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2c8d32cba96aef6cf5c82a2bcf79cf74.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2ccd570689c0ad32980ee3eec00c4e8d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/2e04957c7d1f1e8f5511b87f14380fd1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/32014686b1b30945e2d1ef9f2ed5b093.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/345da0d756cc6f1d111fa49286311aba.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/378fba443ac31af91032cff025fa4b7e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/3add95ff099d6c4484c4bdc10d18e930.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/3cc39b1c189202246342d1e8c9ac7b64.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/3cdc7588d40fcc584d8fb36e1cd0bc82.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/3ced6c0880b709d87ea9d9a66e38ee06.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/3e22e1a3858a5eab39ac1b7a95b7a87d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/40e8b423297a5fac262223d1c84ee156.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/43674622740442782f46241a9f975f53.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/459a178f38574c8ea20af916a8da4bdb.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/45b06fbe6b13a4909912dd3fa13262df.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/476b09d806bf8c90138b3f24acc63c20.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4a308ff96c852601a869e49b005f32bd.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4b0f4fa158b1513dee5c385e9ccd1a43.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4c3b487099f843d5a2357b82db89f1aa.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4c8da5ee98fb12d9ce593703fdcef57e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4db1d3d5ccc35dfab9300b0a41fd1954.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4fb5e53f3ba67a8b77289ed203935298.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/4feeeb63b92ee617664a19630ff8d0af.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/5372b53db40b16a5d08c6a5f25662a74.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/5438ad60987adf7e4e7e2db7ab91e2ad.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/54b49c40c0b5a31d0ccfe64f6f06dae0.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/5642e9f7decaaa021fabbf2ea8359b86.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/5796667c3bccb2febf8ad0dcfdf223f4.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/583e786e04c05a24dbef3e1b7af7980b.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/58db42cfc20a05ab687a7042e8ec53a1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/5dc932127d582a182d5a593e88167fe4.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6122f203c12ba3d7849199fac7fc2c58.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/61d847d17cb174614eb8e3b13ed4d949.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/64f6da7e1c6bbb7f19205c6582e743b1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/65c46b9aa944b1eaa9d7f857d8883003.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6603479f767d543c6bedc5e3959d41d3.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/66394664cd25f2f03dc82bc7a9b1e736.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/66f5f7b310bd3603d490e206a38b8ff0.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6755a670167cdbba4b4b67b6ad534148.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/69979374b62909381b6ac4c09feb326a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6a70e3f17fe0ab99350c065e18de2456.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6aa8383c2771cc544110d497d35233dc.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6e93bbd268a1c811a8187422f22bca92.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6f6d4ea9c361750b9acd65114421a280.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/6fcb51d73b15a43c5634ffb9806445f1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/71288340375cb91133009a5351c00d2a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/73cdcd3a133dfe623eb15e72128dbf09.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/761baac26a2617b98393b682ba77cf78.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/774a19c41c07cd61b83fef2187a909af.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/79fb4bee61f127b18ed920fabf74c28c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7a014d5d69022df649f6e8ac08968577.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7b23081431135157c9b70229cc250113.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7bfa51a1967edb6204d231a876a9a43d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7c13db48b9e00fce2e592187ac876117.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7c4a7c1437dd924de138a9110e119d57.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7dc0dc24f6673f80e0a042bc9a270f03.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7dfb73ea435dfb57de89a2865bcef68f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7f74c3d9bf97dbab3f8e9d1aebfb75f0.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7fc1d0fbb66b6001871b40cfe1a410ef.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/7fcfb08c0756bab4fa3c26ec8136bd86.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/81d775b8c8ac88c3bd9285b3a663ceaf.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8386663c8b9f9214d12a33c87df040ab.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/83d136039641a6ff6d3abf666f1564c9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8418b1c36d8ecf5c018975e31ffc9c04.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/87db23cdc6225c59ea59d0a783e2d8a5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/87ecc72bdf5fba1425bc23b212bb9d36.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/885058833d0108ebb89b8f4a55c8af0f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/88a287514ddf9e3935baf0a6c596f5df.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/88aa317c53ebe901e6232831052e014f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/898cec42bef8511ac5346858cb8db72d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8aee31b80e2f30ad250e5a241a13f536.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8b6cd01bbd78dfbcd58759ab8e37a080.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8b7867548365eabceae88a81aa05b695.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8bc0833600437b8c5303e45a3268b465.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8bfe179e26df42b8b1c643555e4a9bf3.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8ceb49ff3f08b863fb73da3a4db7c19f.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8d0f9ebdc2f8ae378c9533308ac8a382.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8dfba9b9ad5463638dda6c179f8dc72e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/8f0e90360b95dc3e4b4d57ce1e446b43.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9043ecd181a9de449131d75346ce9909.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/91a3b06fcb9b04160f75457533f2c404.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/927c2a46a0eba9dea8680582e86cced6.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/93a726669f2a4816bac519063203973c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/93d46a6d83b968df803f47fde0518184.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9428b4856cdf16c7c8e993640fd11753.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/942df1687779359b7008f2a319cdc16d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/95a2b3d433dea6135520ee1b76979b03.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/95eef3098e9f0ae18ad2d5dc23a5b529.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/95f087733d2560d233289af2f13167b3.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/968d5b09b93a5201b76152875a8b68bc.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/971828b0e0f1a492118dc5d16471fce8.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/98b4bf61bca340631acb9d3195ea961b.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9931283f62ff647972e3f17883e1109d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9a0dc13953e413d13261c5ef69737f69.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9c8ad9752ae45c8370cbf4a2970c739b.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9e504088de93f3ba1021f841cc4f0dd7.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/9f8f10c9d67b0cef668a36b4c807453c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a1d7b6bad2e02173442163262ed32c53.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a24700edd8e05acf6cf1a3403a4fa138.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a3cc107e3f595f180ac5eced449cf35e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a4b30e203598850f3158489f8b7aeb96.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a4f98f1450874da6c466cfb908ef3bc5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a89fa5f15689afef57a66976e255bd83.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/a8f28ff117c9f4dfd22a5a4ececfd7e9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ab7da2310e268e3cbc95e4c864e42075.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ac75101d43092a2c95e60c5ee6ffa371.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ad4e8955ba7910a871046b552b3f7d8a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/aeaaa4bbfc86138005a2c493614c1329.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b2dc0e76259e5a7a204450bb355dae7a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b5575971e9eeca88df08d5e5ed5137ad.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b5b512ef6b8694653c4c97211268125c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b81a6c106c3f253d91972ccd41dce06d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b91ed0276cceb0f8c50593aef96727ef.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/b96a8c94119ca3d4f6b5fa5983144999.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ba2e89bf784bf2701bf1f0906db8288d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ba9384c4b1d88ffbb79aae2b0979bde3.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/bb96ad54071545dde13b5bd5a3926208.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/bdc9d6dafd8a935429c2710642224724.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/bdf3b6231f07c3b750de2abd0b7d221b.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/be047522990d17ba39bd83e1eaa69e72.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/bec40b78625775a20d4b986b847b3608.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/c3460ff7cd68af2961af050443b869b9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/c371851ab17bc4e58090797bf6cb5639.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/c58839ee40f4539ef674229db9bb7df5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/c9c55fd1689e35c05bcf2d9ed272b2e9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/caae68d83f71d64e6c22d29623cfbba4.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ccc382b39a19ccc21a2444c17d7cb014.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/cda75a948951fbb6bc51bf1f800f9787.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d16a1bde777804440e578e2ca753552c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d2819b138eaecce7fb4ea7679446a688.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d2bc6f5d452b8e8a5400b2047f10d293.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d3ed7272b6d71c305025131c03bccd81.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d4662dd1240bc2fdb71f8a0a672bdc20.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d5cbad2786673a591355f8a561dc7a6a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/d6ea32fb0570d5f2d299e0b28028d75c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/db54b3bb68266b35a1e382b745d90769.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/dcd9cc529854f8ca2c8b5a1bb92fb2a8.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/dd75ca26c069d42537ca20b9b78ac9be.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/df3ab3fb401d9577e9e6f2f9870de6c5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e11bf634a6496782e05608794d94bfd5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e307eb33ec2e17e3c5d510eb2fc3a37d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e34778d21e33ae2fecd58abb1969faa2.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e417217d49504cf214be2d8573a051bf.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e4b2751953e79329cdeb4975b3137d91.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e68fd1a5de0453e3863a98ff77df4ee5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e73774dd5f3ee3016af1a83acc92000c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e77976b15d1d8088749db930cb2914f1.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e868f001c40cca80dda4220a451f834a.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e8caafa508afb99ad748229a9e81f116.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/e8df9256f00d90eba680419151cc2b27.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ec50cebacf37dd8bedce1f70bd970f3d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ecc0a86339a8f6f907ed6deaa66bd08c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/edf05fb2b0d8398be423bb38eda37012.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ee514dd28de798e3e5debd301e46c5a9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/ee90fff547947bd2fbeb86215f12124c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/eff6c1be83e7f8f54a834c06c260705d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f07db5f0ac43abd0db0e14f48b9fd4b4.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f133e2be93bfa07e957ae1ea7994de01.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f1f7c484ec98ff3708d3e0cb27dda0df.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f1fa7e4452cf11ca51fd4b64ea950650.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f4d6d543048d2af94730d5008c61d14d.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f6838cea97833eb24c6a7ebca6f6200e.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f693ee308c98e880451d7428497024c4.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f7709257db0dcc13535737d32c62fdeb.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f81e9063b1a618d4abfa2e186ec07c7c.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f86cf5ab421f2f8560a9e4f1cc2d6734.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f9e97284eea17d510585eb3cd9279348.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/f9f66e356b260401e2adda0a8a340113.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/fc63062c228cf70d6f29111873ee69f7.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/fc6b764d17349b6e94ef6882afd5f499.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/fc7dfb2439f20ecec8e0b6456ac8b2f5.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/fe220fe667e471311047d17c96beabd9.json create mode 100644 projects/ninjas-transforms/node_modules/.cache/babel-webpack/fee03bbf4483f48c75e6637a05c6448e.json diff --git a/deploy-ninjas-transforms.sh b/deploy-ninjas-transforms.sh new file mode 100644 index 0000000..6b225e8 --- /dev/null +++ b/deploy-ninjas-transforms.sh @@ -0,0 +1,15 @@ +#!/bin/bash + + +# shellcheck disable=SC2164 +cd projects/ninjas-transforms + +version-select + +# Build project ninjas-transforms +ng build ninjas-transforms + +cd ../../dist/ninjas-transforms +npm publish + +cd ../.. diff --git a/package-lock.json b/package-lock.json index feb223d..38a6c12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,8 @@ "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "ng-packagr": "^12.1.1", - "typescript": "~4.3.5" + "typescript": "~4.3.5", + "version-select": "^1.0.13" } }, "node_modules/@ampproject/remapping": { @@ -4044,6 +4045,24 @@ "node": ">=8" } }, + "node_modules/cli-select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cli-select/-/cli-select-1.1.2.tgz", + "integrity": "sha512-PSvWb8G0PPmBNDcz/uM2LkZN3Nn5JmhUl465tTfynQAXjKzFpmHbxStM6X/+awKp5DJuAaHMzzMPefT0suGm1w==", + "dev": true, + "dependencies": { + "ansi-escapes": "^3.2.0" + } + }, + "node_modules/cli-select/node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/cli-spinners": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", @@ -4151,6 +4170,15 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -6618,6 +6646,12 @@ "node": ">= 0.6" } }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "dev": true + }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -14953,6 +14987,91 @@ "node": ">= 0.8" } }, + "node_modules/version-select": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/version-select/-/version-select-1.0.13.tgz", + "integrity": "sha512-w547+jzWIa057b5yBGGGSH8upj2cHYXdjGc3ppFN6/OGfZItN5PpTV6zaOd76IUCxzYkD29/Yay9AibQga8akQ==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "cli-select": "^1.1.2", + "colors": "^1.4.0", + "fs": "^0.0.1-security" + }, + "bin": { + "version-select": "cli.js" + } + }, + "node_modules/version-select/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/version-select/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/version-select/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/version-select/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/version-select/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/version-select/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", @@ -19126,6 +19245,23 @@ "restore-cursor": "^3.1.0" } }, + "cli-select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cli-select/-/cli-select-1.1.2.tgz", + "integrity": "sha512-PSvWb8G0PPmBNDcz/uM2LkZN3Nn5JmhUl465tTfynQAXjKzFpmHbxStM6X/+awKp5DJuAaHMzzMPefT0suGm1w==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + } + } + }, "cli-spinners": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", @@ -19209,6 +19345,12 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -21066,6 +21208,12 @@ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "dev": true + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -27340,6 +27488,69 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, + "version-select": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/version-select/-/version-select-1.0.13.tgz", + "integrity": "sha512-w547+jzWIa057b5yBGGGSH8upj2cHYXdjGc3ppFN6/OGfZItN5PpTV6zaOd76IUCxzYkD29/Yay9AibQga8akQ==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "cli-select": "^1.1.2", + "colors": "^1.4.0", + "fs": "^0.0.1-security" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", diff --git a/package.json b/package.json index d0a77ff..2e7490f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "watch": "ng build --watch --configuration development", "test": "ng test" }, - "private": true, + "private": false, "dependencies": { "@angular/animations": "~12.2.0", "@angular/common": "~12.2.0", @@ -36,6 +36,7 @@ "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "ng-packagr": "^12.1.1", - "typescript": "~4.3.5" + "typescript": "~4.3.5", + "version-select": "^1.0.13" } } diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00c19f3786ce422783224ccf8aaca279.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00c19f3786ce422783224ccf8aaca279.json new file mode 100644 index 0000000..684846d --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00c19f3786ce422783224ccf8aaca279.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let config;\n\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n config = configOrBufferSize;\n } else {\n config = {\n bufferSize: configOrBufferSize,\n windowTime,\n refCount: false,\n scheduler\n };\n }\n\n return source => source.lift(shareReplayOperator(config));\n}\n\nfunction shareReplayOperator({\n bufferSize = Number.POSITIVE_INFINITY,\n windowTime = Number.POSITIVE_INFINITY,\n refCount: useRefCount,\n scheduler\n}) {\n let subject;\n let refCount = 0;\n let subscription;\n let hasError = false;\n let isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n let innerSub;\n\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n innerSub = subject.subscribe(this);\n subscription = source.subscribe({\n next(value) {\n subject.next(value);\n },\n\n error(err) {\n hasError = true;\n subject.error(err);\n },\n\n complete() {\n isComplete = true;\n subscription = undefined;\n subject.complete();\n }\n\n });\n\n if (isComplete) {\n subscription = undefined;\n }\n } else {\n innerSub = subject.subscribe(this);\n }\n\n this.add(() => {\n refCount--;\n innerSub.unsubscribe();\n innerSub = undefined;\n\n if (subscription && !isComplete && useRefCount && refCount === 0) {\n subscription.unsubscribe();\n subscription = undefined;\n subject = undefined;\n }\n });\n };\n} //# sourceMappingURL=shareReplay.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00d3dfb14c3f4740a07f6b713a0a3819.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00d3dfb14c3f4740a07f6b713a0a3819.json new file mode 100644 index 0000000..0b492b8 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/00d3dfb14c3f4740a07f6b713a0a3819.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { CombineLatestOperator } from '../observable/combineLatest';\nexport function combineAll(project) {\n return source => source.lift(new CombineLatestOperator(project));\n} //# sourceMappingURL=combineAll.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0204512cc8eb988bc2f4e73923e92812.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0204512cc8eb988bc2f4e73923e92812.json new file mode 100644 index 0000000..48e5b4c --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0204512cc8eb988bc2f4e73923e92812.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...array) {\n return source => concat(source, of(...array));\n} //# sourceMappingURL=endWith.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/03f0484c2b9119358a6e27226633a2b2.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/03f0484c2b9119358a6e27226633a2b2.json new file mode 100644 index 0000000..6ba55ae --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/03f0484c2b9119358a6e27226633a2b2.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { map } from './map';\nexport function timestamp(scheduler = async) {\n return map(value => new Timestamp(value, scheduler.now()));\n}\nexport class Timestamp {\n constructor(value, timestamp) {\n this.value = value;\n this.timestamp = timestamp;\n }\n\n} //# sourceMappingURL=timestamp.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/046335548f6023cd9749d66f1661bc0a.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/046335548f6023cd9749d66f1661bc0a.json new file mode 100644 index 0000000..d1ad845 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/046335548f6023cd9749d66f1661bc0a.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nexport function publish(selector) {\n return selector ? multicast(() => new Subject(), selector) : multicast(new Subject());\n} //# sourceMappingURL=publish.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/050ce072b8702bbd00a70943ed2ffb77.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/050ce072b8702bbd00a70943ed2ffb77.json new file mode 100644 index 0000000..13d5f9d --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/050ce072b8702bbd00a70943ed2ffb77.json @@ -0,0 +1 @@ +{"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\n schedule(state, delay = 0) {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n\n execute(state, delay) {\n return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n }\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\n return scheduler.flush(this);\n }\n\n} //# sourceMappingURL=QueueAction.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/06faddf29999cfa453a10c7e78f6cd14.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/06faddf29999cfa453a10c7e78f6cd14.json new file mode 100644 index 0000000..48dc0fe --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/06faddf29999cfa453a10c7e78f6cd14.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Action } from './Action';\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\n schedule(state, delay = 0) {\n if (this.closed) {\n return this;\n }\n\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n\n requestAsyncId(scheduler, id, delay = 0) {\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n recycleAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n\n clearInterval(id);\n return undefined;\n }\n\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n\n const error = this._execute(state, delay);\n\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\n _execute(state, delay) {\n let errored = false;\n let errorValue = undefined;\n\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n _unsubscribe() {\n const id = this.id;\n const scheduler = this.scheduler;\n const actions = scheduler.actions;\n const index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n\n if (index !== -1) {\n actions.splice(index, 1);\n }\n\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null;\n }\n\n} //# sourceMappingURL=AsyncAction.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/084c2fe604acd7c9340a50773e7f77ab.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/084c2fe604acd7c9340a50773e7f77ab.json new file mode 100644 index 0000000..a764802 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/084c2fe604acd7c9340a50773e7f77ab.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { map } from './map';\nexport function pluck(...properties) {\n const length = properties.length;\n\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n\n return source => map(plucker(properties, length))(source);\n}\n\nfunction plucker(props, length) {\n const mapper = x => {\n let currentProp = x;\n\n for (let i = 0; i < length; i++) {\n const p = currentProp != null ? currentProp[props[i]] : undefined;\n\n if (p !== void 0) {\n currentProp = p;\n } else {\n return undefined;\n }\n }\n\n return currentProp;\n };\n\n return mapper;\n} //# sourceMappingURL=pluck.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/08926cb9acb0de6516dda5a84f02f124.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/08926cb9acb0de6516dda5a84f02f124.json new file mode 100644 index 0000000..8357be4 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/08926cb9acb0de6516dda5a84f02f124.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n return new Observable(subscriber => {\n let input;\n\n try {\n input = observableFactory();\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n const source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n} //# sourceMappingURL=defer.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0aa71b6806fb166876ab4b7028743e8c.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0aa71b6806fb166876ab4b7028743e8c.json new file mode 100644 index 0000000..ed9180c --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0aa71b6806fb166876ab4b7028743e8c.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\n\nclass WindowOperator {\n constructor(windowBoundaries) {\n this.windowBoundaries = windowBoundaries;\n }\n\n call(subscriber, source) {\n const windowSubscriber = new WindowSubscriber(subscriber);\n const sourceSubscription = source.subscribe(windowSubscriber);\n\n if (!sourceSubscription.closed) {\n windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n }\n\n return sourceSubscription;\n }\n\n}\n\nclass WindowSubscriber extends SimpleOuterSubscriber {\n constructor(destination) {\n super(destination);\n this.window = new Subject();\n destination.next(this.window);\n }\n\n notifyNext() {\n this.openWindow();\n }\n\n notifyError(error) {\n this._error(error);\n }\n\n notifyComplete() {\n this._complete();\n }\n\n _next(value) {\n this.window.next(value);\n }\n\n _error(err) {\n this.window.error(err);\n this.destination.error(err);\n }\n\n _complete() {\n this.window.complete();\n this.destination.complete();\n }\n\n _unsubscribe() {\n this.window = null;\n }\n\n openWindow() {\n const prevWindow = this.window;\n\n if (prevWindow) {\n prevWindow.complete();\n }\n\n const destination = this.destination;\n const newWindow = this.window = new Subject();\n destination.next(newWindow);\n }\n\n} //# sourceMappingURL=window.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0b7fc1d20321fb194f914ae3673b0bd2.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0b7fc1d20321fb194f914ae3673b0bd2.json new file mode 100644 index 0000000..b704488 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0b7fc1d20321fb194f914ae3673b0bd2.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport const defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n return source => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));\n}\n\nclass ThrottleOperator {\n constructor(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n\n call(subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n }\n\n}\n\nclass ThrottleSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector, _leading, _trailing) {\n super(destination);\n this.destination = destination;\n this.durationSelector = durationSelector;\n this._leading = _leading;\n this._trailing = _trailing;\n this._hasValue = false;\n }\n\n _next(value) {\n this._hasValue = true;\n this._sendValue = value;\n\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n } else {\n this.throttle(value);\n }\n }\n }\n\n send() {\n const {\n _hasValue,\n _sendValue\n } = this;\n\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n\n this._hasValue = false;\n this._sendValue = undefined;\n }\n\n throttle(value) {\n const duration = this.tryDurationSelector(value);\n\n if (!!duration) {\n this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n }\n }\n\n tryDurationSelector(value) {\n try {\n return this.durationSelector(value);\n } catch (err) {\n this.destination.error(err);\n return null;\n }\n }\n\n throttlingDone() {\n const {\n _throttled,\n _trailing\n } = this;\n\n if (_throttled) {\n _throttled.unsubscribe();\n }\n\n this._throttled = undefined;\n\n if (_trailing) {\n this.send();\n }\n }\n\n notifyNext() {\n this.throttlingDone();\n }\n\n notifyComplete() {\n this.throttlingDone();\n }\n\n} //# sourceMappingURL=throttle.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0ca4c1ed2b725aa09bbf45c86cea0763.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0ca4c1ed2b725aa09bbf45c86cea0763.json new file mode 100644 index 0000000..978f5b7 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0ca4c1ed2b725aa09bbf45c86cea0763.json @@ -0,0 +1 @@ +{"ast":null,"code":"export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\nexport const $$iterator = iterator; //# sourceMappingURL=iterator.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d1ac1a22f49dc45a3e88be0df00ccee.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d1ac1a22f49dc45a3e88be0df00ccee.json new file mode 100644 index 0000000..3d4e4a7 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d1ac1a22f49dc45a3e88be0df00ccee.json @@ -0,0 +1 @@ +{"ast":null,"code":"'use strict';\n/**\n * @license Angular v14.2.0-next.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\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\n(function (global) {\n const performance = global['performance'];\n\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n\n mark('Zone'); // 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\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n\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\n let Zone = /*#__PURE__*/(() => {\n class Zone {\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate = new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\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\n static get root() {\n let zone = Zone.current;\n\n while (zone.parent) {\n zone = zone.parent;\n }\n\n return zone;\n }\n\n static get current() {\n return _currentZoneFrame.zone;\n }\n\n static get currentTask() {\n return _currentTask;\n } // tslint:disable-next-line:require-internal-with-underscore\n\n\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\n get parent() {\n return this._parent;\n }\n\n get name() {\n return this._name;\n }\n\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone) return zone._properties[key];\n }\n\n getZoneWith(key) {\n let current = this;\n\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n\n current = current._parent;\n }\n\n return null;\n }\n\n fork(zoneSpec) {\n if (!zoneSpec) throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = {\n parent: _currentZoneFrame,\n zone: this\n };\n\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n } finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = {\n parent: _currentZoneFrame,\n zone: this\n };\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\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 } // 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\n\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\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\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\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\n this._updateTaskCount(task, -1);\n\n reEntryGuard && task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\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\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\n newZone = newZone.parent;\n }\n }\n\n task._transitionTo(scheduling, notScheduled);\n\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n\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); // TODO: @JiaLiPassion, should we check the result from handleError?\n\n\n this._zoneDelegate.handleError(this, err);\n\n throw err;\n }\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\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n\n return task;\n }\n\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\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\n task._transitionTo(canceling, scheduled, running);\n\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\n this._zoneDelegate.handleError(this, err);\n\n throw err;\n }\n\n this._updateTaskCount(task, -1);\n\n task._transitionTo(notScheduled, canceling);\n\n task.runCount = 0;\n return task;\n }\n\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n\n if (count == -1) {\n task._zoneDelegates = null;\n }\n\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\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\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\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\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\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\n intercept(targetZone, callback, source) {\n return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : callback;\n }\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\n handleError(targetZone, error) {\n return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : true;\n }\n\n scheduleTask(targetZone, task) {\n let returnTask = task;\n\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n } // clang-format off\n\n\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); // clang-format on\n\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\n return returnTask;\n }\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\n cancelTask(targetZone, task) {\n let value;\n\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\n value = task.cancelFn(task);\n }\n\n return value;\n }\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 } // tslint:disable-next-line:require-internal-with-underscore\n\n\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\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 }\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; // tslint:disable-next-line:require-internal-with-underscore\n\n this._zoneDelegates = null; // tslint:disable-next-line:require-internal-with-underscore\n\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\n if (!callback) {\n throw new Error('callback is not defined');\n }\n\n this.callback = callback;\n const self = this; // TODO: @JiaLiPassion options should have interface\n\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\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n\n _numberOfNestedTaskFrames++;\n\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n } finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n\n _numberOfNestedTaskFrames--;\n }\n }\n\n get zone() {\n return this._zone;\n }\n\n get state() {\n return this._state;\n }\n\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n } // tslint:disable-next-line:require-internal-with-underscore\n\n\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n\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\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 } // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n\n\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\n\n const symbolSetTimeout = __symbol__('setTimeout');\n\n const symbolPromise = __symbol__('Promise');\n\n const symbolThen = __symbol__('then');\n\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n } else {\n global[symbolSetTimeout](func, 0);\n }\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\n task && _microTaskQueue.push(task);\n }\n\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n\n try {\n task.zone.runTask(task, null, null);\n } catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n\n _api.microtaskDrainDone();\n\n _isDrainingMicrotaskQueue = false;\n }\n } //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\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\n function noop() {}\n\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\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/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// \n// issue #989, to reduce bundle size, use short name\n\n/** Object.getOwnPropertyDescriptor */\n\n\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\n\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\n\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\n\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\n\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\n\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\n\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\n\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\n\n\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\n\n\nconst TRUE_STR = 'true';\n/** false string const */\n\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\n\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\n\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\n\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\n\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\n\nconst _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\n\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\n\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\n return args;\n}\n\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n\n prototype[name] = (delegate => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\n\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n\n if (propertyDesc.writable === false) {\n return false;\n }\n\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\n\nconst isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope; // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\n\nconst isNode = !('nw' in _global) && typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]';\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); // 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.\n\nconst isMix = typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]' && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\n\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\n if (!event) {\n return;\n }\n\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n\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\n if (result === true) {\n event.preventDefault();\n }\n } else {\n result = listener && listener.apply(this, arguments);\n\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n\n return result;\n};\n\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n\n if (prototypeDesc) {\n desc = {\n enumerable: true,\n configurable: true\n };\n }\n } // if the descriptor not exists or is not configurable\n // just return\n\n\n if (!desc || !desc.configurable) {\n return;\n }\n\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\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\n\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set; // slice(2) cuz 'onclick' -> 'click', etc\n\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\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\n if (!target && obj === _global) {\n target = _global;\n }\n\n if (!target) {\n return;\n }\n\n const previousValue = target[eventNameSymbol];\n\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n } // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n\n\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n }; // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n\n\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\n if (!target && obj === _global) {\n target = _global;\n }\n\n if (!target) {\n return null;\n }\n\n const listener = target[eventNameSymbol];\n\n if (listener) {\n return listener;\n } else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \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\n if (value) {\n desc.set.call(this, value);\n\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n\n return value;\n }\n }\n\n return null;\n };\n\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\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\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\n\nconst originalInstanceKey = zoneSymbol('originalInstance'); // wrap some native API on `window`\n\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass) return; // keep original class in global\n\n _global[zoneSymbol(className)] = OriginalClass;\n\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n\n default:\n throw new Error('Arg list too long.');\n }\n }; // attach original delegate to patched function\n\n\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () {});\n let prop;\n\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob') continue;\n\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); // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n\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\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\n\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\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\n const delegateName = zoneSymbol(name);\n let delegate = null;\n\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name]; // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n\n attachOriginToPatched(proto[name], delegate);\n }\n }\n\n return delegate;\n} // TODO: @JiaLiPassion, support cancel task later if necessary\n\n\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n\n function scheduleTask(task) {\n const data = task.data;\n\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n\n setNative.apply(data.target, data.args);\n return task;\n }\n\n setNative = patchMethod(obj, funcName, delegate => function (self, args) {\n const meta = metaCreator(self, args);\n\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}\n\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\n\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\n\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n } catch (error) {}\n\n return false;\n}\n\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n\n isDetectedIEOrEdge = true;\n\n try {\n const ua = internalWindow.navigator.userAgent;\n\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n } catch (error) {}\n\n return ieOrEdge;\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\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n\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\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n\n const symbolPromise = __symbol__('Promise');\n\n const symbolThen = __symbol__('then');\n\n const creationTrace = '__creationTrace__';\n\n api.onUnhandledError = e => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n\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\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n\n throw uncaughtPromiseError;\n });\n } catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n } catch (err) {}\n }\n\n function isThenable(value) {\n return value && value.then;\n }\n\n function forwardResolution(value) {\n return value;\n }\n\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n\n const symbolState = __symbol__('state');\n\n const symbolValue = __symbol__('value');\n\n const symbolFinally = __symbol__('finally');\n\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n\n function makeResolver(promise, state) {\n return v => {\n try {\n resolvePromise(promise, state, v);\n } catch (err) {\n resolvePromise(promise, false, err);\n } // Do not return value or you will break the Promise spec.\n\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\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n\n const TYPE_ERROR = 'Promise resolved with itself';\n\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); // Promise Resolution\n\n\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n\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 } // if (value instanceof ZoneAwarePromise) {\n\n\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\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 } // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n\n\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\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\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n\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\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n } // Resolving an already resolved promise is a noop.\n\n\n return promise;\n }\n\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n\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\n if (handler && typeof handler === 'function') {\n handler.call(this, {\n rejection: promise[symbolValue],\n promise: promise\n });\n }\n } catch (err) {}\n\n promise[symbolState] = REJECTED;\n\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\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\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 } // should not pass value to finally callback\n\n\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\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n\n const noop = function () {};\n\n const AggregateError = global.AggregateError;\n\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n\n static resolve(value) {\n return resolvePromise(new this(null), RESOLVED, value);\n }\n\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\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\n const promises = [];\n let count = 0;\n\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\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\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\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\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\n function onResolve(value) {\n resolve(value);\n }\n\n function onReject(error) {\n reject(error);\n }\n\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n\n value.then(onResolve, onReject);\n }\n\n return promise;\n }\n\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\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\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 }); // Start at 2 to prevent prematurely resolving if .then is called immediately.\n\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n\n const curValueIndex = valueIndex;\n\n try {\n value.then(value => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n\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\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n } catch (thenErr) {\n reject(thenErr);\n }\n\n unresolvedCount++;\n valueIndex++;\n } // Make the unresolvedCount zero-based again.\n\n\n unresolvedCount -= 2;\n\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n\n return promise;\n }\n\n constructor(executor) {\n const promise = this;\n\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n\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\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n\n then(onFulfilled, onRejected) {\n var _a; // 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\n\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n\n const chainPromise = new C(noop);\n const zone = Zone.current;\n\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n } else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n\n return chainPromise;\n }\n\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n\n finally(onFinally) {\n var _a; // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n\n\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n } else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n\n return chainPromise;\n }\n\n } // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n\n\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\n const symbolThenPatched = __symbol__('thenPatched');\n\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n\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\n const originalThen = proto.then; // Keep a reference to the original method.\n\n proto[symbolThen] = originalThen;\n\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\n Ctor[symbolThenPatched] = true;\n }\n\n api.patchThen = patchThen;\n\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n\n let ctor = resultPromise.constructor;\n\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n\n return resultPromise;\n };\n }\n\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n } // This is not part of public API, but it is useful for tests, so we expose it.\n\n\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\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\n\n\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\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n\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\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n\n return originalFunctionToString.call(this);\n };\n\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString; // patch Object.prototype.toString to let them look like native\n\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n\n return originalObjectToString.call(this);\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\n\nlet passiveSupported = false;\n\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\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\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n} // an identifier to tell ZoneTask do not create a new invoke closure\n\n\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');\n\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}\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\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\n const delegate = task.callback;\n\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = event => delegate.handleEvent(event);\n\n task.originalDelegate = delegate;\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\n\n let error;\n\n try {\n task.invoke(task, target, [event]);\n } catch (err) {\n error = err;\n }\n\n const options = task.options;\n\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\n return error;\n };\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\n if (!event) {\n return;\n } // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n\n\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n\n if (tasks) {\n const errors = []; // 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\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\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n } // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n\n\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 } // global shared zoneAwareCallback to handle all event callback with capture = false\n\n\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n }; // global shared zoneAwareCallback to handle all event callback with capture = true\n\n\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n\n let useGlobalCallback = true;\n\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n\n let returnTarget = false;\n\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n\n let proto = obj;\n\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\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\n if (!proto) {\n return false;\n }\n\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n\n const eventNameToString = patchOptions && patchOptions.eventNameToString; // 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\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\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\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\n if (!passiveSupported || !passive) {\n return options;\n }\n\n if (typeof options === 'boolean') {\n return {\n capture: options,\n passive: true\n };\n }\n\n if (!options) {\n return {\n passive: true\n };\n }\n\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), {\n passive: true\n });\n }\n\n return options;\n }\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\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\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\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n\n const existingTasks = symbolEventName && task.target[symbolEventName];\n\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n\n if (existingTask === task) {\n existingTasks.splice(i, 1); // set isRemoved to data for faster invokeTask check\n\n task.isRemoved = true;\n\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\n break;\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\n\n if (!task.allRemoved) {\n return;\n }\n\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n\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\n const compare = patchOptions && patchOptions.diff ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n\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\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n\n let delegate = arguments[1];\n\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\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\n\n let isHandleEvent = false;\n\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n\n isHandleEvent = true;\n }\n\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n\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\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\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n\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\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n\n if (targetSource) {\n source = targetSource[eventName];\n }\n\n if (!source) {\n source = constructorName + addSource + (eventNameToString ? eventNameToString(eventName) : eventName);\n } // do not create a new object as task.data to pass those things\n // just use the global shared one\n\n\n taskData.options = options;\n\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\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; // keep taskData into data to allow onScheduleEventTask to access the task information\n\n if (data) {\n data.taskData = taskData;\n }\n\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n\n taskData.target = null; // need to clear up taskData because it is a global object\n\n if (data) {\n data.taskData = null;\n } // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n\n\n if (once) {\n options.once = true;\n }\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\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n\n if (!prepend) {\n existingTasks.push(task);\n } else {\n existingTasks.unshift(task);\n }\n\n if (returnTarget) {\n return target;\n }\n };\n };\n\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n\n if (validateHandler && !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n\n const existingTasks = symbolEventName && target[symbolEventName];\n\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1); // set isRemoved to data for faster invokeTask check\n\n existingTask.isRemoved = true;\n\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; // 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\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n\n existingTask.zone.cancelTask(existingTask);\n\n if (returnTarget) {\n return target;\n }\n\n return;\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\n\n return nativeRemoveEventListener.apply(this, arguments);\n };\n\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n\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\n return listeners;\n };\n\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n\n if (!eventName) {\n const keys = Object.keys(target);\n\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]; // 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\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n } // remove removeListener listener finally\n\n\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n } else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n\n const symbolEventNames = zoneSymbolEventNames[eventName];\n\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\n if (tasks) {\n const removeTasks = tasks.slice();\n\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 if (captureTasks) {\n const removeTasks = captureTasks.slice();\n\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\n if (returnTarget) {\n return this;\n }\n }; // for native toString patch\n\n\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n\n return true;\n }\n\n let results = [];\n\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n\n return results;\n}\n\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n\n return foundTasks;\n }\n\n let symbolEventName = zoneSymbolEventNames[eventName];\n\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n } else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : captureFalseTasks.slice();\n }\n}\n\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', delegate => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true; // 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\n delegate && delegate.apply(self, args);\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 */\n\n\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n\n if (target[symbol]) {\n return;\n }\n\n const nativeDelegate = target[symbol] = target[method];\n\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; // 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\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n\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) {// 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\n return nativeDelegate.call(target, name, opts, options);\n };\n\n api.attachOriginToPatched(target[method], nativeDelegate);\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\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n\n const tip = ignoreProperties.filter(ip => ip.target === target);\n\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\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\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 */\n\n\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target).filter(name => name.startsWith('on') && name.length > 2).map(name => name.substring(2));\n}\n\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n\n const ignoreProperties = _global['__Zone_ignore_on_properties']; // for browsers that we can patch the descriptor: Chrome & Firefox\n\n let patchTargets = [];\n\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 }] : []; // 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\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n\n patchTargets = patchTargets.concat(['XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest', 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket']);\n\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 * @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\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; // 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\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\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\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\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 * @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\nconst taskSymbol = zoneSymbol('zoneTask');\n\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n\n function scheduleTask(task) {\n const data = task.data;\n\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\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\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\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n\n if (!task) {\n return task;\n } // Node.js must additionally support the ref and unref functions.\n\n\n const handle = task.data.handleId;\n\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 } // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n\n\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\n if (typeof handle === 'number' || handle) {\n return handle;\n }\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\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n } else {\n // nodejs env.\n task = id && id[taskSymbol]; // other environments.\n\n if (!task) {\n task = id;\n }\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 } // Do not cancel already canceled functions\n\n\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 * @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\nfunction patchCustomElements(_global, api) {\n const {\n isBrowser,\n isMix\n } = api.getGlobalObjects();\n\n if (!isBrowser && !isMix || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n\n const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\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\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n\n const {\n eventNames,\n zoneSymbolEventNames,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX\n } = api.getGlobalObjects(); // predefine all __zone_symbol__ + eventName + true/false string\n\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\n const EVENT_TARGET = _global['EventTarget'];\n\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\n\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\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\nZone.__load_patch('legacy', global => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n\n if (legacyPatch) {\n legacyPatch();\n }\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});\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});\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});\n\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n\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});\n\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api); // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\n\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\n\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\n\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\n\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\n\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\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\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n\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\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n\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; // remove existing event listener\n\n const listener = target[XHR_LISTENER];\n\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\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\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n\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\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\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\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n\n function placeholderCallback() {}\n\n function clearTask(task) {\n const data = task.data; // 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\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\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\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\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\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\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 } // 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});\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});\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\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\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] = findPromiseRejectionHandler('rejectionhandled');\n }\n});","map":null,"metadata":{},"sourceType":"script"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d7e1344abd479f9de66ebd70f7b3a35.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d7e1344abd479f9de66ebd70f7b3a35.json new file mode 100644 index 0000000..b35c0b3 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/0d7e1344abd479f9de66ebd70f7b3a35.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function exhaust() {\n return source => source.lift(new SwitchFirstOperator());\n}\n\nclass SwitchFirstOperator {\n call(subscriber, source) {\n return source.subscribe(new SwitchFirstSubscriber(subscriber));\n }\n\n}\n\nclass SwitchFirstSubscriber extends SimpleOuterSubscriber {\n constructor(destination) {\n super(destination);\n this.hasCompleted = false;\n this.hasSubscription = false;\n }\n\n _next(value) {\n if (!this.hasSubscription) {\n this.hasSubscription = true;\n this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));\n }\n }\n\n _complete() {\n this.hasCompleted = true;\n\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n }\n\n notifyComplete() {\n this.hasSubscription = false;\n\n if (this.hasCompleted) {\n this.destination.complete();\n }\n }\n\n} //# sourceMappingURL=exhaust.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/140422a4afde9b1e5c307e18ab960c3a.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/140422a4afde9b1e5c307e18ab960c3a.json new file mode 100644 index 0000000..8ee502c --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/140422a4afde9b1e5c307e18ab960c3a.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { ZipOperator } from '../observable/zip';\nexport function zipAll(project) {\n return source => source.lift(new ZipOperator(project));\n} //# sourceMappingURL=zipAll.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/167fbfef621ba23780f1b864d5479435.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/167fbfef621ba23780f1b864d5479435.json new file mode 100644 index 0000000..ecb8afe --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/167fbfef621ba23780f1b864d5479435.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { from } from './from';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n return new Observable(subscriber => {\n let resource;\n\n try {\n resource = resourceFactory();\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n let result;\n\n try {\n result = observableFactory(resource);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n const source = result ? from(result) : EMPTY;\n const subscription = source.subscribe(subscriber);\n return () => {\n subscription.unsubscribe();\n\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n} //# sourceMappingURL=using.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16bd7c93c1ed60f485e1fed5f9f3d147.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16bd7c93c1ed60f485e1fed5f9f3d147.json new file mode 100644 index 0000000..9b1a57a --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16bd7c93c1ed60f485e1fed5f9f3d147.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { isArray } from '../util/isArray';\nimport { race as raceStatic } from '../observable/race';\nexport function race(...observables) {\n return function raceOperatorFunction(source) {\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n\n return source.lift.call(raceStatic(source, ...observables));\n };\n} //# sourceMappingURL=race.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16e5aa3c2850138abf8cb3ccde0582f9.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16e5aa3c2850138abf8cb3ccde0582f9.json new file mode 100644 index 0000000..e36ab60 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/16e5aa3c2850138abf8cb3ccde0582f9.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nexport function single(predicate) {\n return source => source.lift(new SingleOperator(predicate, source));\n}\n\nclass SingleOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n\n call(subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n }\n\n}\n\nclass SingleSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.seenValue = false;\n this.index = 0;\n }\n\n applySingleValue(value) {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n } else {\n this.seenValue = true;\n this.singleValue = value;\n }\n }\n\n _next(value) {\n const index = this.index++;\n\n if (this.predicate) {\n this.tryNext(value, index);\n } else {\n this.applySingleValue(value);\n }\n }\n\n tryNext(value, index) {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n\n _complete() {\n const destination = this.destination;\n\n if (this.index > 0) {\n destination.next(this.seenValue ? this.singleValue : undefined);\n destination.complete();\n } else {\n destination.error(new EmptyError());\n }\n }\n\n} //# sourceMappingURL=single.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17c29e4f06d0aa134328048158bbdb09.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17c29e4f06d0aa134328048158bbdb09.json new file mode 100644 index 0000000..c314945 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17c29e4f06d0aa134328048158bbdb09.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty();\n } else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\n\nclass TakeLastOperator {\n constructor(total) {\n this.total = total;\n\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError();\n }\n }\n\n call(subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n }\n\n}\n\nclass TakeLastSubscriber extends Subscriber {\n constructor(destination, total) {\n super(destination);\n this.total = total;\n this.ring = new Array();\n this.count = 0;\n }\n\n _next(value) {\n const ring = this.ring;\n const total = this.total;\n const count = this.count++;\n\n if (ring.length < total) {\n ring.push(value);\n } else {\n const index = count % total;\n ring[index] = value;\n }\n }\n\n _complete() {\n const destination = this.destination;\n let count = this.count;\n\n if (count > 0) {\n const total = this.count >= this.total ? this.total : this.count;\n const ring = this.ring;\n\n for (let i = 0; i < total; i++) {\n const idx = count++ % total;\n destination.next(ring[idx]);\n }\n }\n\n destination.complete();\n }\n\n} //# sourceMappingURL=takeLast.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17e16d263190819e91b8e078d66da874.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17e16d263190819e91b8e078d66da874.json new file mode 100644 index 0000000..f2dc69d --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/17e16d263190819e91b8e078d66da874.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {\n let resultSelector;\n let initialState;\n\n if (arguments.length == 1) {\n const options = initialStateOrOptions;\n initialState = options.initialState;\n condition = options.condition;\n iterate = options.iterate;\n resultSelector = options.resultSelector || identity;\n scheduler = options.scheduler;\n } else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {\n initialState = initialStateOrOptions;\n resultSelector = identity;\n scheduler = resultSelectorOrObservable;\n } else {\n initialState = initialStateOrOptions;\n resultSelector = resultSelectorOrObservable;\n }\n\n return new Observable(subscriber => {\n let state = initialState;\n\n if (scheduler) {\n return scheduler.schedule(dispatch, 0, {\n subscriber,\n iterate,\n condition,\n resultSelector,\n state\n });\n }\n\n do {\n if (condition) {\n let conditionResult;\n\n try {\n conditionResult = condition(state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n if (!conditionResult) {\n subscriber.complete();\n break;\n }\n }\n\n let value;\n\n try {\n value = resultSelector(state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n subscriber.next(value);\n\n if (subscriber.closed) {\n break;\n }\n\n try {\n state = iterate(state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n } while (true);\n\n return undefined;\n });\n}\n\nfunction dispatch(state) {\n const {\n subscriber,\n condition\n } = state;\n\n if (subscriber.closed) {\n return undefined;\n }\n\n if (state.needIterate) {\n try {\n state.state = state.iterate(state.state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n } else {\n state.needIterate = true;\n }\n\n if (condition) {\n let conditionResult;\n\n try {\n conditionResult = condition(state.state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n if (!conditionResult) {\n subscriber.complete();\n return undefined;\n }\n\n if (subscriber.closed) {\n return undefined;\n }\n }\n\n let value;\n\n try {\n value = state.resultSelector(state.state);\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n if (subscriber.closed) {\n return undefined;\n }\n\n subscriber.next(value);\n\n if (subscriber.closed) {\n return undefined;\n }\n\n return this.schedule(state);\n} //# sourceMappingURL=generate.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1807b7f4ac8e191334b90f938cc7ce48.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1807b7f4ac8e191334b90f938cc7ce48.json new file mode 100644 index 0000000..a42cc5d --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1807b7f4ac8e191334b90f938cc7ce48.json @@ -0,0 +1 @@ +{"ast":null,"code":"/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * IE11 requires the following for NgClass support on SVG elements\n */\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n */\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n * (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js'; // Included with Angular CLI.\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/183f2e90aa4812c3bd4cf53ef255119f.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/183f2e90aa4812c3bd4cf53ef255119f.json new file mode 100644 index 0000000..02a2672 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/183f2e90aa4812c3bd4cf53ef255119f.json @@ -0,0 +1 @@ +{"ast":null,"code":"const ObjectUnsubscribedErrorImpl = (() => {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n\n ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\n\nexport const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; //# sourceMappingURL=ObjectUnsubscribedError.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/18f969597a1ade62b17b32dd90da2b5e.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/18f969597a1ade62b17b32dd90da2b5e.json new file mode 100644 index 0000000..2bfcf62 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/18f969597a1ade62b17b32dd90da2b5e.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin(...sources) {\n if (sources.length === 1) {\n const first = sources[0];\n\n if (isArray(first)) {\n return forkJoinInternal(first, null);\n }\n\n if (isObject(first) && Object.getPrototypeOf(first) === Object.prototype) {\n const keys = Object.keys(first);\n return forkJoinInternal(keys.map(key => first[key]), keys);\n }\n }\n\n if (typeof sources[sources.length - 1] === 'function') {\n const resultSelector = sources.pop();\n sources = sources.length === 1 && isArray(sources[0]) ? sources[0] : sources;\n return forkJoinInternal(sources, null).pipe(map(args => resultSelector(...args)));\n }\n\n return forkJoinInternal(sources, null);\n}\n\nfunction forkJoinInternal(sources, keys) {\n return new Observable(subscriber => {\n const len = sources.length;\n\n if (len === 0) {\n subscriber.complete();\n return;\n }\n\n const values = new Array(len);\n let completed = 0;\n let emitted = 0;\n\n for (let i = 0; i < len; i++) {\n const source = from(sources[i]);\n let hasValue = false;\n subscriber.add(source.subscribe({\n next: value => {\n if (!hasValue) {\n hasValue = true;\n emitted++;\n }\n\n values[i] = value;\n },\n error: err => subscriber.error(err),\n complete: () => {\n completed++;\n\n if (completed === len || !hasValue) {\n if (emitted === len) {\n subscriber.next(keys ? keys.reduce((result, key, i) => (result[key] = values[i], result), {}) : values);\n }\n\n subscriber.complete();\n }\n }\n }));\n }\n });\n} //# sourceMappingURL=forkJoin.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1912a14889d7784ec82dcfd267c92a54.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1912a14889d7784ec82dcfd267c92a54.json new file mode 100644 index 0000000..2438289 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1912a14889d7784ec82dcfd267c92a54.json @@ -0,0 +1 @@ +{"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} //# sourceMappingURL=never.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1ad96508222b9a62470bdb0ad2c1a62c.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1ad96508222b9a62470bdb0ad2c1a62c.json new file mode 100644 index 0000000..5d28fa5 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1ad96508222b9a62470bdb0ad2c1a62c.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = async) {\n return audit(() => timer(duration, scheduler));\n} //# sourceMappingURL=auditTime.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1d2c02b265c8bb44a08a97434470446b.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1d2c02b265c8bb44a08a97434470446b.json new file mode 100644 index 0000000..f7c9c36 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1d2c02b265c8bb44a08a97434470446b.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler = async) {\n const absoluteDelay = isDate(delay);\n const delayFor = absoluteDelay ? +delay - scheduler.now() : Math.abs(delay);\n return source => source.lift(new DelayOperator(delayFor, scheduler));\n}\n\nclass DelayOperator {\n constructor(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n\n call(subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n }\n\n}\n\nclass DelaySubscriber extends Subscriber {\n constructor(destination, delay, scheduler) {\n super(destination);\n this.delay = delay;\n this.scheduler = scheduler;\n this.queue = [];\n this.active = false;\n this.errored = false;\n }\n\n static dispatch(state) {\n const source = state.source;\n const queue = source.queue;\n const scheduler = state.scheduler;\n const destination = state.destination;\n\n while (queue.length > 0 && queue[0].time - scheduler.now() <= 0) {\n queue.shift().notification.observe(destination);\n }\n\n if (queue.length > 0) {\n const delay = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay);\n } else {\n this.unsubscribe();\n source.active = false;\n }\n }\n\n _schedule(scheduler) {\n this.active = true;\n const destination = this.destination;\n destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this,\n destination: this.destination,\n scheduler: scheduler\n }));\n }\n\n scheduleNotification(notification) {\n if (this.errored === true) {\n return;\n }\n\n const scheduler = this.scheduler;\n const message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n\n if (this.active === false) {\n this._schedule(scheduler);\n }\n }\n\n _next(value) {\n this.scheduleNotification(Notification.createNext(value));\n }\n\n _error(err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n }\n\n _complete() {\n this.scheduleNotification(Notification.createComplete());\n this.unsubscribe();\n }\n\n}\n\nclass DelayMessage {\n constructor(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n\n} //# sourceMappingURL=delay.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1e1f393778e0915e09291656b18f5c30.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1e1f393778e0915e09291656b18f5c30.json new file mode 100644 index 0000000..5696c54 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1e1f393778e0915e09291656b18f5c30.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function skipWhile(predicate) {\n return source => source.lift(new SkipWhileOperator(predicate));\n}\n\nclass SkipWhileOperator {\n constructor(predicate) {\n this.predicate = predicate;\n }\n\n call(subscriber, source) {\n return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n }\n\n}\n\nclass SkipWhileSubscriber extends Subscriber {\n constructor(destination, predicate) {\n super(destination);\n this.predicate = predicate;\n this.skipping = true;\n this.index = 0;\n }\n\n _next(value) {\n const destination = this.destination;\n\n if (this.skipping) {\n this.tryCallPredicate(value);\n }\n\n if (!this.skipping) {\n destination.next(value);\n }\n }\n\n tryCallPredicate(value) {\n try {\n const result = this.predicate(value, this.index++);\n this.skipping = Boolean(result);\n } catch (err) {\n this.destination.error(err);\n }\n }\n\n} //# sourceMappingURL=skipWhile.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1f72d1744ca9a04afc9c62ea1e420d07.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1f72d1744ca9a04afc9c62ea1e420d07.json new file mode 100644 index 0000000..c8b573a --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/1f72d1744ca9a04afc9c62ea1e420d07.json @@ -0,0 +1 @@ +{"ast":null,"code":"export function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n} //# sourceMappingURL=isDate.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/20424c22facdb55359f25b5575a9f3c1.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/20424c22facdb55359f25b5575a9f3c1.json new file mode 100644 index 0000000..2856be5 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/20424c22facdb55359f25b5575a9f3c1.json @@ -0,0 +1 @@ +{"ast":null,"code":"const UnsubscriptionErrorImpl = (() => {\n function UnsubscriptionErrorImpl(errors) {\n Error.call(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 return this;\n }\n\n UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);\n return UnsubscriptionErrorImpl;\n})();\n\nexport const UnsubscriptionError = UnsubscriptionErrorImpl; //# sourceMappingURL=UnsubscriptionError.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2063a393d6906a4433314673b44e4f65.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2063a393d6906a4433314673b44e4f65.json new file mode 100644 index 0000000..6651eb3 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2063a393d6906a4433314673b44e4f65.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { hostReportError } from './hostReportError';\nexport const subscribeToPromise = promise => subscriber => {\n promise.then(value => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, err => subscriber.error(err)).then(null, hostReportError);\n return subscriber;\n}; //# sourceMappingURL=subscribeToPromise.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2137aef0553d761d5c9312143cc49721.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2137aef0553d761d5c9312143cc49721.json new file mode 100644 index 0000000..8d32bef --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2137aef0553d761d5c9312143cc49721.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\n\nconst toString = (() => Object.prototype.toString)();\n\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n }\n\n return new Observable(subscriber => {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n } else {\n subscriber.next(e);\n }\n }\n\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\n\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n let unsubscribe;\n\n if (isEventTarget(sourceObj)) {\n const source = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n\n unsubscribe = () => source.removeEventListener(eventName, handler, options);\n } else if (isJQueryStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.on(eventName, handler);\n\n unsubscribe = () => source.off(eventName, handler);\n } else if (isNodeStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.addListener(eventName, handler);\n\n unsubscribe = () => source.removeListener(eventName, handler);\n } else if (sourceObj && sourceObj.length) {\n for (let i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n } else {\n throw new TypeError('Invalid event target');\n }\n\n subscriber.add(unsubscribe);\n}\n\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\n\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\n\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n} //# sourceMappingURL=fromEvent.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/22da9b190a5404007d5940afe03224cc.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/22da9b190a5404007d5940afe03224cc.json new file mode 100644 index 0000000..0a8113e --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/22da9b190a5404007d5940afe03224cc.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function timeoutWith(due, withObservable, scheduler = async) {\n return source => {\n let absoluteTimeout = isDate(due);\n let waitFor = absoluteTimeout ? +due - scheduler.now() : Math.abs(due);\n return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n };\n}\n\nclass TimeoutWithOperator {\n constructor(waitFor, absoluteTimeout, withObservable, scheduler) {\n this.waitFor = waitFor;\n this.absoluteTimeout = absoluteTimeout;\n this.withObservable = withObservable;\n this.scheduler = scheduler;\n }\n\n call(subscriber, source) {\n return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n }\n\n}\n\nclass TimeoutWithSubscriber extends SimpleOuterSubscriber {\n constructor(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n super(destination);\n this.absoluteTimeout = absoluteTimeout;\n this.waitFor = waitFor;\n this.withObservable = withObservable;\n this.scheduler = scheduler;\n this.scheduleTimeout();\n }\n\n static dispatchTimeout(subscriber) {\n const {\n withObservable\n } = subscriber;\n\n subscriber._unsubscribeAndRecycle();\n\n subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber)));\n }\n\n scheduleTimeout() {\n const {\n action\n } = this;\n\n if (action) {\n this.action = action.schedule(this, this.waitFor);\n } else {\n this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));\n }\n }\n\n _next(value) {\n if (!this.absoluteTimeout) {\n this.scheduleTimeout();\n }\n\n super._next(value);\n }\n\n _unsubscribe() {\n this.action = undefined;\n this.scheduler = null;\n this.withObservable = null;\n }\n\n} //# sourceMappingURL=timeoutWith.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24835b8d95462ef90d18cbb03a3a3429.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24835b8d95462ef90d18cbb03a3a3429.json new file mode 100644 index 0000000..5e17226 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24835b8d95462ef90d18cbb03a3a3429.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function sampleTime(period, scheduler = async) {\n return source => source.lift(new SampleTimeOperator(period, scheduler));\n}\n\nclass SampleTimeOperator {\n constructor(period, scheduler) {\n this.period = period;\n this.scheduler = scheduler;\n }\n\n call(subscriber, source) {\n return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n }\n\n}\n\nclass SampleTimeSubscriber extends Subscriber {\n constructor(destination, period, scheduler) {\n super(destination);\n this.period = period;\n this.scheduler = scheduler;\n this.hasValue = false;\n this.add(scheduler.schedule(dispatchNotification, period, {\n subscriber: this,\n period\n }));\n }\n\n _next(value) {\n this.lastValue = value;\n this.hasValue = true;\n }\n\n notifyNext() {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.lastValue);\n }\n }\n\n}\n\nfunction dispatchNotification(state) {\n let {\n subscriber,\n period\n } = state;\n subscriber.notifyNext();\n this.schedule(state, period);\n} //# sourceMappingURL=sampleTime.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24a2c677f15707d8646bc6c81d448414.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24a2c677f15707d8646bc6c81d448414.json new file mode 100644 index 0000000..bc7185f --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24a2c677f15707d8646bc6c81d448414.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) {\n if (typeof resultSelector === 'function') {\n return source => source.pipe(mergeMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))), concurrent));\n } else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n\n return source => source.lift(new MergeMapOperator(project, concurrent));\n}\nexport class MergeMapOperator {\n constructor(project, concurrent = Number.POSITIVE_INFINITY) {\n this.project = project;\n this.concurrent = concurrent;\n }\n\n call(observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n }\n\n}\nexport class MergeMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) {\n super(destination);\n this.project = project;\n this.concurrent = concurrent;\n this.hasCompleted = false;\n this.buffer = [];\n this.active = 0;\n this.index = 0;\n }\n\n _next(value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n } else {\n this.buffer.push(value);\n }\n }\n\n _tryNext(value) {\n let result;\n const index = this.index++;\n\n try {\n result = this.project(value, index);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n\n this.active++;\n\n this._innerSub(result);\n }\n\n _innerSub(ish) {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(ish, innerSubscriber);\n\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n\n _complete() {\n this.hasCompleted = true;\n\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n\n this.unsubscribe();\n }\n\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n\n notifyComplete() {\n const buffer = this.buffer;\n this.active--;\n\n if (buffer.length > 0) {\n this._next(buffer.shift());\n } else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n }\n\n}\nexport const flatMap = mergeMap; //# sourceMappingURL=mergeMap.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24eb7430ad0e277f9262cc4033728e7d.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24eb7430ad0e277f9262cc4033728e7d.json new file mode 100644 index 0000000..4803a3f --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/24eb7430ad0e277f9262cc4033728e7d.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { concat as concatStatic } from '../observable/concat';\nexport function concat(...observables) {\n return source => source.lift.call(concatStatic(source, ...observables));\n} //# sourceMappingURL=concat.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/253a5a7bfb49e046e162d3f6f920194e.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/253a5a7bfb49e046e162d3f6f920194e.json new file mode 100644 index 0000000..dfdb5dd --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/253a5a7bfb49e046e162d3f6f920194e.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return source => new SubscriptionDelayObservable(source, subscriptionDelay).lift(new DelayWhenOperator(delayDurationSelector));\n }\n\n return source => source.lift(new DelayWhenOperator(delayDurationSelector));\n}\n\nclass DelayWhenOperator {\n constructor(delayDurationSelector) {\n this.delayDurationSelector = delayDurationSelector;\n }\n\n call(subscriber, source) {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n }\n\n}\n\nclass DelayWhenSubscriber extends OuterSubscriber {\n constructor(destination, delayDurationSelector) {\n super(destination);\n this.delayDurationSelector = delayDurationSelector;\n this.completed = false;\n this.delayNotifierSubscriptions = [];\n this.index = 0;\n }\n\n notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n this.destination.next(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n }\n\n notifyError(error, innerSub) {\n this._error(error);\n }\n\n notifyComplete(innerSub) {\n const value = this.removeSubscription(innerSub);\n\n if (value) {\n this.destination.next(value);\n }\n\n this.tryComplete();\n }\n\n _next(value) {\n const index = this.index++;\n\n try {\n const delayNotifier = this.delayDurationSelector(value, index);\n\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n\n _complete() {\n this.completed = true;\n this.tryComplete();\n this.unsubscribe();\n }\n\n removeSubscription(subscription) {\n subscription.unsubscribe();\n const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n\n if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n\n return subscription.outerValue;\n }\n\n tryDelay(delayNotifier, value) {\n const notifierSubscription = subscribeToResult(this, delayNotifier, value);\n\n if (notifierSubscription && !notifierSubscription.closed) {\n const destination = this.destination;\n destination.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n }\n\n tryComplete() {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n }\n\n}\n\nclass SubscriptionDelayObservable extends Observable {\n constructor(source, subscriptionDelay) {\n super();\n this.source = source;\n this.subscriptionDelay = subscriptionDelay;\n }\n\n _subscribe(subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n }\n\n}\n\nclass SubscriptionDelaySubscriber extends Subscriber {\n constructor(parent, source) {\n super();\n this.parent = parent;\n this.source = source;\n this.sourceSubscribed = false;\n }\n\n _next(unused) {\n this.subscribeToSource();\n }\n\n _error(err) {\n this.unsubscribe();\n this.parent.error(err);\n }\n\n _complete() {\n this.unsubscribe();\n this.subscribeToSource();\n }\n\n subscribeToSource() {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n }\n\n} //# sourceMappingURL=delayWhen.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/26001c7b5cdd8042951fa096cf477433.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/26001c7b5cdd8042951fa096cf477433.json new file mode 100644 index 0000000..20990a3 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/26001c7b5cdd8042951fa096cf477433.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function count(predicate) {\n return source => source.lift(new CountOperator(predicate, source));\n}\n\nclass CountOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n\n call(subscriber, source) {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n }\n\n}\n\nclass CountSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.count = 0;\n this.index = 0;\n }\n\n _next(value) {\n if (this.predicate) {\n this._tryPredicate(value);\n } else {\n this.count++;\n }\n }\n\n _tryPredicate(value) {\n let result;\n\n try {\n result = this.predicate(value, this.index++, this.source);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n\n if (result) {\n this.count++;\n }\n }\n\n _complete() {\n this.destination.next(this.count);\n this.destination.complete();\n }\n\n} //# sourceMappingURL=count.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2711cc7dd314ed5751ef9e74c17b8a34.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2711cc7dd314ed5751ef9e74c17b8a34.json new file mode 100644 index 0000000..a6ae9e2 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2711cc7dd314ed5751ef9e74c17b8a34.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable) {\n return input;\n }\n\n return new Observable(subscribeTo(input));\n } else {\n return scheduled(input, scheduler);\n }\n} //# sourceMappingURL=from.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769942040e89da8758eecf5ebdf9aeb.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769942040e89da8758eecf5ebdf9aeb.json new file mode 100644 index 0000000..2a6b5e3 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769942040e89da8758eecf5ebdf9aeb.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Number.POSITIVE_INFINITY) {\n return mergeMap(identity, concurrent);\n} //# sourceMappingURL=mergeAll.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769ce8b014772f1fa1d4e986bc616d2.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769ce8b014772f1fa1d4e986bc616d2.json new file mode 100644 index 0000000..334fc86 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2769ce8b014772f1fa1d4e986bc616d2.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { defaultThrottleConfig } from './throttle';\nexport function throttleTime(duration, scheduler = async, config = defaultThrottleConfig) {\n return source => source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing));\n}\n\nclass ThrottleTimeOperator {\n constructor(duration, scheduler, leading, trailing) {\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n }\n\n call(subscriber, source) {\n return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n }\n\n}\n\nclass ThrottleTimeSubscriber extends Subscriber {\n constructor(destination, duration, scheduler, leading, trailing) {\n super(destination);\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n this._hasTrailingValue = false;\n this._trailingValue = null;\n }\n\n _next(value) {\n if (this.throttled) {\n if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\n } else {\n this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, {\n subscriber: this\n }));\n\n if (this.leading) {\n this.destination.next(value);\n } else if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\n }\n }\n\n _complete() {\n if (this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this.destination.complete();\n } else {\n this.destination.complete();\n }\n }\n\n clearThrottle() {\n const throttled = this.throttled;\n\n if (throttled) {\n if (this.trailing && this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this._trailingValue = null;\n this._hasTrailingValue = false;\n }\n\n throttled.unsubscribe();\n this.remove(throttled);\n this.throttled = null;\n }\n }\n\n}\n\nfunction dispatchNext(arg) {\n const {\n subscriber\n } = arg;\n subscriber.clearThrottle();\n} //# sourceMappingURL=throttleTime.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/29ca18998fa3d9c5a25d1072ec0ba38f.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/29ca18998fa3d9c5a25d1072ec0ba38f.json new file mode 100644 index 0000000..ae4a692 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/29ca18998fa3d9c5a25d1072ec0ba38f.json @@ -0,0 +1 @@ +{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { Subject } from '../Subject';\nexport function windowCount(windowSize, startWindowEvery = 0) {\n return function windowCountOperatorFunction(source) {\n return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n };\n}\n\nclass WindowCountOperator {\n constructor(windowSize, startWindowEvery) {\n this.windowSize = windowSize;\n this.startWindowEvery = startWindowEvery;\n }\n\n call(subscriber, source) {\n return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n }\n\n}\n\nclass WindowCountSubscriber extends Subscriber {\n constructor(destination, windowSize, startWindowEvery) {\n super(destination);\n this.destination = destination;\n this.windowSize = windowSize;\n this.startWindowEvery = startWindowEvery;\n this.windows = [new Subject()];\n this.count = 0;\n destination.next(this.windows[0]);\n }\n\n _next(value) {\n const startWindowEvery = this.startWindowEvery > 0 ? this.startWindowEvery : this.windowSize;\n const destination = this.destination;\n const windowSize = this.windowSize;\n const windows = this.windows;\n const len = windows.length;\n\n for (let i = 0; i < len && !this.closed; i++) {\n windows[i].next(value);\n }\n\n const c = this.count - windowSize + 1;\n\n if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {\n windows.shift().complete();\n }\n\n if (++this.count % startWindowEvery === 0 && !this.closed) {\n const window = new Subject();\n windows.push(window);\n destination.next(window);\n }\n }\n\n _error(err) {\n const windows = this.windows;\n\n if (windows) {\n while (windows.length > 0 && !this.closed) {\n windows.shift().error(err);\n }\n }\n\n this.destination.error(err);\n }\n\n _complete() {\n const windows = this.windows;\n\n if (windows) {\n while (windows.length > 0 && !this.closed) {\n windows.shift().complete();\n }\n }\n\n this.destination.complete();\n }\n\n _unsubscribe() {\n this.count = 0;\n this.windows = null;\n }\n\n} //# sourceMappingURL=windowCount.js.map","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2c8d32cba96aef6cf5c82a2bcf79cf74.json b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2c8d32cba96aef6cf5c82a2bcf79cf74.json new file mode 100644 index 0000000..a517587 --- /dev/null +++ b/projects/ninjas-transforms/node_modules/.cache/babel-webpack/2c8d32cba96aef6cf5c82a2bcf79cf74.json @@ -0,0 +1 @@ +{"ast":null,"code":"/**\n * @license Angular v12.2.17\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\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\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\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 */\n\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}\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\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\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 */\n\n\nfunction concatStringsWithSpace(before, after) {\n return before == null || before === '' ? after === null ? '' : after : after == null || after === '' ? before : before + ' ' + after;\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\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 */\n\n\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n\n forwardRefFn.toString = function () {\n return stringify(this());\n };\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 */\n\n\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\n\n\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\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/**\n * Base URL for the error details page.\n *\n * Keep the files below in sync:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/render3/error_details_base_url.ts\n */\n\n\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\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\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n\n} // Contains a set of error messages that have details guides at angular.io.\n// Full list of available error guides can be found at https://angular.io/errors\n\n/* tslint:disable:no-toplevel-property-access */\n\n\nconst RUNTIME_ERRORS_WITH_GUIDES = /*#__PURE__*/new Set([\"100\"\n/* EXPRESSION_CHANGED_AFTER_CHECKED */\n, \"200\"\n/* CYCLIC_DI_DEPENDENCY */\n, \"201\"\n/* PROVIDER_NOT_FOUND */\n, \"300\"\n/* MULTIPLE_COMPONENTS_MATCH */\n, \"301\"\n/* EXPORT_NOT_FOUND */\n, \"302\"\n/* PIPE_NOT_FOUND */\n, \"910\"\n/* UNSAFE_IFRAME_ATTRS */\n]);\n/* tslint:enable:no-toplevel-property-access */\n\n/** Called to format a runtime error */\n\nfunction formatRuntimeError(code, message) {\n const fullCode = code ? `NG0${code}: ` : '';\n let errorMessage = `${fullCode}${message}`; // Some runtime errors are still thrown without `ngDevMode` (for example\n // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling\n // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.\n // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added\n // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check\n // from this code).\n\n if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;\n }\n\n return errorMessage;\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/**\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 */\n\n\nfunction renderStringify(value) {\n if (typeof value === 'string') return value;\n if (value == null) return ''; // 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\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 */\n\n\nfunction stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n/** Called when directives inject each other (creating a circular dependency) */\n\n\nfunction throwCyclicDependencyError(token, path) {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(\"200\"\n /* CYCLIC_DI_DEPENDENCY */\n , `Circular dependency in DI detected for ${token}${depPath}`);\n}\n\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n let ngModuleDetail = '';\n\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n ngModuleDetail = ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n }\n\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n/** Throws an error when a token is not found in DI. */\n\n\nfunction throwProviderNotFoundError(token, injectorName) {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(\"201\"\n /* PROVIDER_NOT_FOUND */\n , `No provider for ${stringifyForError(token)} found${injectorDetails}`);\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\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\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}\n\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\n\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\n\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\n\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\n\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\n\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\n\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\n\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\n\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\n\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\n\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\n\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\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}\n\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\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 * @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/**\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 */\n\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 */\n\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 */\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 */\n\n\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\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 */\n\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 */\n\n\nfunction getInheritedInjectableDef(type) {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n const typeName = getTypeName(type); // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n\n 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. */\n\n\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\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 */\n\n\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;\n}\n\nconst NG_PROV_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵprov: getClosureSafeProperty\n});\nconst NG_INJ_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵinj: getClosureSafeProperty\n}); // We need to keep these around so we can read off old defs if new defs are unavailable\n\nconst NG_INJECTABLE_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectableDef: getClosureSafeProperty\n});\nconst NG_INJECTOR_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectorDef: getClosureSafeProperty\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/**\n * Injection flags for DI.\n *\n * @publicApi\n */\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\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\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n return InjectFlags;\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\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;\n\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\n\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 */\n\n\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const injectableDef = getInjectableDef(token);\n\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n }\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 */\n\n\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\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/**\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 */\n\n\nfunction noSideEffects(fn) {\n return {\n toString: fn\n }.toString();\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/**\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 */\n\n\nvar ChangeDetectionStrategy = /*#__PURE__*/(() => {\n ChangeDetectionStrategy = ChangeDetectionStrategy || {};\n\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\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n return ChangeDetectionStrategy;\n})();\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus = /*#__PURE__*/(() => {\n ChangeDetectorStatus = ChangeDetectorStatus || {};\n\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n return ChangeDetectorStatus;\n})();\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default;\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/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\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 */\n\n\nvar ViewEncapsulation = /*#__PURE__*/(() => {\n ViewEncapsulation = ViewEncapsulation || {};\n\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Don't provide any template or style encapsulation.\n */\n\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and\n * creating a ShadowRoot for Component's Host Element.\n */\n\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n return ViewEncapsulation;\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 __globalThis = typeof globalThis !== 'undefined' && globalThis;\n\nconst __window = typeof window !== 'undefined' && window;\n\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;\n\nconst __global = typeof global !== 'undefined' && global; // 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.\n\n\nconst _global = __globalThis || __global || __window || __self;\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\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 }; // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n\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 */\n\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\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n\n return false;\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/**\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 */\n\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in\n\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\n /*#__PURE__*/\n Object.freeze(EMPTY_OBJ); // tslint:disable-next-line:no-toplevel-property-access\n\n /*#__PURE__*/\n Object.freeze(EMPTY_ARRAY);\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\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_LOC_ID_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵloc: 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.\n\nconst NG_ELEMENT_ID = /*#__PURE__*/getClosureSafeProperty({\n __NG_ELEMENT_ID__: getClosureSafeProperty\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\nlet _renderCompCount = 0;\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\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 */\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 type = componentDefinition.type;\n const declaredInputs = {};\n const def = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null,\n outputs: null,\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n // directly in the next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null\n };\n const directiveTypes = componentDefinition.directives;\n const feature = componentDefinition.features;\n const pipeTypes = componentDefinition.pipes;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach(fn => fn(def));\n def.directiveDefs = directiveTypes ? () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes).map(extractDirectiveDef) : null;\n def.pipeDefs = pipeTypes ? () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) : null;\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 */\n\n\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n const def = type.ɵcmp;\n\n def.directiveDefs = () => directives.map(extractDirectiveDef);\n\n def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nfunction extractDirectiveDef(type) {\n const def = getComponentDef(type) || getDirectiveDef(type);\n\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n }\n\n return def;\n}\n\nfunction extractPipeDef(type) {\n const def = getPipeDef(type);\n\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is not a 'PipeType'.`);\n }\n\n return def;\n}\n\nconst autoRegisterModuleById = {};\n/**\n * @codeGenApi\n */\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\n if (def.id != null) {\n autoRegisterModuleById[def.id] = def.type;\n }\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 */\n\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 */\n\n\nfunction invertObject(obj, secondary) {\n if (obj == null) return EMPTY_OBJ;\n const newLookup = {};\n\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName = obj[minifiedKey];\n let declaredName = publicName;\n\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n\n newLookup[publicName] = minifiedKey;\n\n if (secondary) {\n secondary[publicName] = declaredName;\n }\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 */\n\n\nconst ɵɵdefineDirective = ɵɵdefineComponent;\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 */\n\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\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 */\n\n\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\n\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\n\nfunction getPipeDef(type) {\n return type[NG_PIPE_DEF] || null;\n}\n\nfunction getNgModuleDef(type, throwNotFound) {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n\n return ngModuleDef;\n}\n\nfunction getNgLocaleIdDef(type) {\n return type[NG_LOC_ID_DEF] || null;\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// 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.\n\n\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 = 9;\nconst RENDERER_FACTORY = 10;\nconst RENDERER = 11;\nconst SANITIZER = 12;\nconst CHILD_HEAD = 13;\nconst CHILD_TAIL = 14; // FIXME(misko): Investigate if the three declarations aren't all same thing.\n\nconst DECLARATION_VIEW = 15;\nconst DECLARATION_COMPONENT_VIEW = 16;\nconst DECLARATION_LCONTAINER = 17;\nconst PREORDER_HOOK_FLAGS = 18;\nconst QUERIES = 19;\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 */\n\nconst HEADER_OFFSET = 20;\n/**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\n\nconst TViewTypeAsString = ['Root', 'Component', 'Embedded' // 2\n]; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nconst unusedValueExportToPlacateAjd = 1;\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/**\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 */\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/**\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 */\n\nconst HAS_TRANSPLANTED_VIEWS = 2; // 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.\n\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 */\n\nconst CONTAINER_HEADER_OFFSET = 10; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nconst unusedValueExportToPlacateAjd$1 = 1;\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/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\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 */\n\n\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 8\n /* hasContentQuery */\n ) !== 0;\n}\n\nfunction isComponentHost(tNode) {\n return (tNode.flags & 2\n /* isComponentHost */\n ) === 2\n /* isComponentHost */\n ;\n}\n\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1\n /* isDirectiveHost */\n ) === 1\n /* isDirectiveHost */\n ;\n}\n\nfunction isComponentDef(def) {\n return def.template !== null;\n}\n\nfunction isRootView(target) {\n return (target[FLAGS] & 512\n /* IsRoot */\n ) !== 0;\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// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\n\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\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}\n\nfunction assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\n\nfunction assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\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}\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}\n\nfunction assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\n\nfunction assertDataNext(lView, index, arr) {\n if (arr == null) arr = lView;\n assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\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 */\n\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}\n\nfunction assertIndexInDeclRange(lView, index) {\n const tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nfunction assertIndexInVarsRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n}\n\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\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 () must have projection slots defined.');\n}\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 */\n\n\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8\n /* PARENT */\n );\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\n /* PARENT */\n ], 'injectorIndex should point to parent injector');\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\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\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/**\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 */\n\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\n\n isFirstChange() {\n return this.firstChange;\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 */\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 */\n\n\nfunction ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n}\n\nfunction NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n\n return rememberChangeHistoryAndInvokeOnChangesHook;\n} // This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n\n\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 */\n\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n\n if (current) {\n const previous = simpleChangesStore.previous;\n\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\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\n\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\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 declaredName = this.declaredInputs[publicName];\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\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\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 */\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 */\n\n\nconst profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null\n /* both `null` and `undefined` */\n ) {\n profilerCallback(event, instance, hookOrListener);\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\n\nconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nconst MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\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/**\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 */\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 */\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 */\n\n\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\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\n\n return undefined;\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// TODO: cleanup once the code is merged in angular/angular\n\n\nvar RendererStyleFlags3 = /*#__PURE__*/(() => {\n RendererStyleFlags3 = RendererStyleFlags3 || {};\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n return RendererStyleFlags3;\n})();\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n return !!renderer.listen;\n}\n\nconst ɵ0 = (hostElement, rendererType) => {\n return getDocument();\n};\n\nconst domRendererFactory3 = {\n createRenderer: ɵ0\n}; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nconst unusedValueExportToPlacateAjd$2 = 1;\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/**\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/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n\n return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\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\n return null;\n}\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\n\nfunction unwrapLContainer(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` 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 (value[TYPE] === true) return value;\n value = value[HOST];\n }\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 */\n\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 */\n\n\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\n ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\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 */\n\n\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n\n return null;\n} // fixme(misko): The return Type should be `TNode|null`\n\n\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`. */\n\n\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\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 */\n\n\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4\n /* CreationMode */\n ) === 4\n /* CreationMode */\n ;\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 */\n\n\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128\n /* Attached */\n ) === 128\n /* Attached */\n ;\n}\n/** Returns a boolean for whether the view is attached to a container. */\n\n\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\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 */\n\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 */\n\n\nfunction updateTransplantedViewCount(lContainer, amount) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n let viewOrContainer = lContainer;\n let parent = lContainer[PARENT];\n\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}\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\nconst instructionState = {\n lFrame: /*#__PURE__*/createLFrame(null),\n bindingsEnabled: true,\n isInCheckNoChangesMode: false\n};\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\n\nfunction specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n}\n\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n}\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\n\n\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\n\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 */\n\n\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\n\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n\n while (currentTNode !== null && currentTNode.type === 64\n /* Placeholder */\n ) {\n currentTNode = currentTNode.parent;\n }\n\n return currentTNode;\n}\n\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\n\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\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}\n\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\n\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\n\nfunction setCurrentTNodeAsParent() {\n instructionState.lFrame.isParent = true;\n}\n\nfunction getContextLView() {\n return instructionState.lFrame.contextLView;\n}\n\nfunction isInCheckNoChangesMode() {\n // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n return instructionState.isInCheckNoChangesMode;\n}\n\nfunction setIsInCheckNoChangesMode(mode) {\n instructionState.isInCheckNoChangesMode = mode;\n} // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n\n\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n\n return index;\n}\n\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\n\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\n\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\n\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\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 */\n\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 */\n\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 */\n\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 */\n\n\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\n\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\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 */\n\n\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW]; // Return the declaration parent for embedded views\n\n if (tView.type === 2\n /* Embedded */\n ) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\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\n\n if (tView.type === 1\n /* Component */\n ) {\n return lView[T_HOST];\n } // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n\n\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 */\n\n\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break; // 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\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]; // 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\n if (parentTNode.type & (2\n /* Element */\n | 8\n /* ElementContainer */\n )) {\n break;\n }\n } else {\n break;\n }\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\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 */\n\n\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n\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\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 */\n\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}\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\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 */\n\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 */\n\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 */\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}\n\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\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\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 */\n\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 */\n\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 */\n\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 */\n\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 */\n\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 */\n\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 */\n\n\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nfunction getNamespace() {\n return instructionState.lFrame.currentNamespace;\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/**\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 */\n\n\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const {\n ngOnChanges,\n ngOnInit,\n ngDoCheck\n } = directiveDef.type.prototype;\n\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\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\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 */\n\n\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView); // 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\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\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\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/**\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 */\n\n\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3\n /* InitPhaseCompleted */\n , 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 */\n\n\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3\n /* InitPhaseCompleted */\n , 'Init pre-order hooks should not be called more than once');\n\n if ((lView[FLAGS] & 3\n /* InitPhaseStateMask */\n ) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode && assertNotEqual(initPhase, 3\n /* InitPhaseCompleted */\n , 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n\n if ((flags & 3\n /* InitPhaseStateMask */\n ) === initPhase) {\n flags &= 2047\n /* IndexWithinInitPhaseReset */\n ;\n flags += 1\n /* InitPhaseStateIncrementer */\n ;\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 */\n\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\n /* IndexOfTheNextPreOrderHookMaskMask */\n : 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\n let lastNodeIndexFound = 0;\n\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n\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\n /* NumberOfInitHooksCalledIncrementer */\n ;\n\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760\n /* NumberOfInitHooksCalledMask */\n ) + i + 2;\n }\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 */\n\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\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 11\n /* IndexWithinInitPhaseShift */\n ; // The init phase state must be always checked here as it may have been recursively updated.\n\n if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16\n /* NumberOfInitHooksCalledShift */\n && (currentView[FLAGS] & 3\n /* InitPhaseStateMask */\n ) === initPhase) {\n currentView[FLAGS] += 2048\n /* IndexWithinInitPhaseIncrementer */\n ;\n profiler(4\n /* LifecycleHookStart */\n , directive, hook);\n\n try {\n hook.call(directive);\n } finally {\n profiler(5\n /* LifecycleHookEnd */\n , directive, hook);\n }\n }\n } else {\n profiler(4\n /* LifecycleHookStart */\n , directive, hook);\n\n try {\n hook.call(directive);\n } finally {\n profiler(5\n /* LifecycleHookEnd */\n , directive, hook);\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 */\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 {\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 {\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/**\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 */\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\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\n}\n\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n} // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nconst unusedValueExportToPlacateAjd$3 = 1;\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\n\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n tNodeType & 1\n /* Text */\n && (text += '|Text');\n tNodeType & 2\n /* Element */\n && (text += '|Element');\n tNodeType & 4\n /* Container */\n && (text += '|Container');\n tNodeType & 8\n /* ElementContainer */\n && (text += '|ElementContainer');\n tNodeType & 16\n /* Projection */\n && (text += '|Projection');\n tNodeType & 32\n /* Icu */\n && (text += '|IcuContainer');\n tNodeType & 64\n /* Placeholder */\n && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n} // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nconst unusedValueExportToPlacateAjd$4 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n *
\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 */\n\nfunction hasClassInput(tNode) {\n return (tNode.flags & 16\n /* hasClassInput */\n ) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n *
\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 */\n\n\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 32\n /* hasStyleInput */\n ) !== 0;\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\nfunction assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n }\n}\n\nfunction assertPureTNodeType(type) {\n if (!(type === 2\n /* Element */\n || //\n type === 1\n /* Text */\n || //\n type === 4\n /* Container */\n || //\n type === 8\n /* ElementContainer */\n || //\n type === 32\n /* Icu */\n || //\n type === 16\n /* Projection */\n || //\n type === 64\n /* Placeholder */\n )) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\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 */\n\n\nfunction setUpAttributes(renderer, native, attrs) {\n const isProc = isProceduralRenderer(renderer);\n let i = 0;\n\n while (i < attrs.length) {\n const value = attrs[i];\n\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\n /* NamespaceURI */\n ) {\n break;\n } // we just landed on the marker value ... therefore\n // we should skip to the next entry\n\n\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ? renderer.setAttribute(native, attrName, attrVal, namespaceURI) : native.setAttributeNS(namespaceURI, attrName, attrVal);\n } else {\n // attrName is string;\n const attrName = value;\n const attrVal = attrs[++i]; // Standard attributes\n\n ngDevMode && ngDevMode.rendererSetAttribute++;\n\n if (isAnimationProp(attrName)) {\n if (isProc) {\n renderer.setProperty(native, attrName, attrVal);\n }\n } else {\n isProc ? renderer.setAttribute(native, attrName, attrVal) : native.setAttribute(attrName, attrVal);\n }\n\n i++;\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\n\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 */\n\n\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3\n /* Bindings */\n || marker === 4\n /* Template */\n || marker === 6\n /* I18n */\n ;\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\n /* AT_SIGN */\n ;\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 */\n\n\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {// 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\n /* ImplicitAttributes */\n ;\n\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0\n /* NamespaceURI */\n ) {// Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1\n /* ImplicitAttributes */\n || srcMarker === 2\n /* Styles */\n ) {\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\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 */\n\n\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0; // Assume that new markers will be inserted at the end.\n\n let markerInsertPosition = dst.length; // scan until correct type.\n\n if (marker === -1\n /* ImplicitAttributes */\n ) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n\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 } // search until you find place of insertion\n\n\n while (i < dst.length) {\n const item = dst[i];\n\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\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n } // Increment counter.\n\n\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n } // insert at location.\n\n\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n\n dst.splice(i++, 0, key1);\n\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n\n if (value !== null) {\n dst.splice(i++, 0, value);\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/// Parent Injector Utils ///////////////////////////////////////////////////////////////\n\n\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nfunction getParentInjectorIndex(parentLocation) {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767\n /* InjectorIndexMask */\n ;\n ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767\n /* InjectorIndexMask */\n ;\n}\n\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16\n /* ViewOffsetShift */\n ;\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 */\n\n\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView; // 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 // tags or inline views, where the parent injector might live many views\n // above the child injector.\n\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n\n return parentView;\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/**\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 */\n\n\nlet includeViewProviders = true;\n\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 */\n\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 */\n\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\n\nlet nextNgElementId = 0;\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 */\n\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id;\n\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 } // 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\n\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\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\n\n const bloomHash = id & BLOOM_MASK; // 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\n const mask = 1 << bloomHash; // 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\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 */\n\n\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n\n insertBloom(lView, null); // foundation for cumulative bloom\n\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex; // 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\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data; // 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\n for (let i = 0; i < 8\n /* BLOOM_SIZE */\n ; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + 8\n /* PARENT */\n ] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\nfunction getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 || // 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 || // 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\n /* PARENT */\n ] === 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 */\n\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 } // 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\n\n let declarationViewOffset = 0;\n let parentTNode = null;\n let lViewCursor = lView; // 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\n while (lViewCursor !== null) {\n // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n const tView = lViewCursor[TVIEW];\n const tViewType = tView.type;\n\n if (tViewType === 2\n /* Embedded */\n ) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n parentTNode = tView.declTNode;\n } else if (tViewType === 1\n /* Component */\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 parentTNode = lViewCursor[T_HOST];\n } else {\n ngDevMode && assertEqual(tView.type, 0\n /* Root */\n , 'Root type expected');\n parentTNode = null;\n }\n\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); // Every iteration of the loop requires that we go to the declared parent.\n\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return parentTNode.injectorIndex | declarationViewOffset << 16\n /* ViewOffsetShift */\n ;\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 */\n\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 * \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 */\n\n\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12\n /* AnyContainer */\n | 3\n /* AnyRNode */\n );\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\n const attrs = tNode.attrs;\n\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n\n while (i < attrsLength) {\n const value = attrs[i]; // If we hit a `Bindings` or `Template` marker then we are done.\n\n if (isNameOnlyAttributeMarker(value)) break; // Skip namespaced attributes\n\n if (value === 0\n /* NamespaceURI */\n ) {\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\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\n return null;\n}\n\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if (flags & InjectFlags.Optional) {\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 */\n\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\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR]; // 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\n const previousInjectImplementation = setInjectImplementation(undefined);\n\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\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 */\n\n\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n if (tNode !== null) {\n const bloomHash = bloomHashBitOrFactory(token); // 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\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\n try {\n const value = bloomHash(flags);\n\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; // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8\n /* PARENT */\n ];\n\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 } // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n\n\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex); // Check the current injector. If it matches, see if it contains token.\n\n const tView = lView[TVIEW];\n ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8\n /* TNODE */\n ], lView);\n\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\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n\n parentLocation = lView[injectorIndex + 8\n /* PARENT */\n ];\n\n if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8\n /* TNODE */\n ] === 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 }\n\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n\nconst NOT_FOUND = {};\n\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\n\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8\n /* TNODE */\n ]; // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n\n const canAccessViewProviders = previousTView == null ? // 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 : // 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\n /* AnyRNode */\n ) !== 0; // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n\n const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n\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 */\n\n\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575\n /* ProvidersStartIndexMask */\n ;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20\n /* CptViewProvidersCountShift */\n ;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible\n\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n\n if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart];\n\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\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 */\n\n\nfunction getNodeInjectable(lView, tView, index, tNode) {\n let value = lView[index];\n const tData = tView.data;\n\n if (isFactory(value)) {\n const factory = value;\n\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\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\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode); // 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\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\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 */\n\n\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n\n const tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; // Negative token IDs are used for special objects such as `Injector`\n\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode && assertEqual(tokenId, -1\n /* Injector */\n , 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\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; // 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\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n\n return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\n\n\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nclass NodeInjector {\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);\n }\n\n}\n/**\n * @codeGenApi\n */\n\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; // Go up the prototype until we hit `Object`.\n\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); // 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\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\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\n\n return t => new t();\n });\n}\n\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n\n return getFactoryDef(type);\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/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\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\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\n\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn) typeFn(cls, ...args); // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n\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\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n}\n\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const annotationInstance = new ParamDecoratorFactory(...args);\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n\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]; // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\n\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new PropDecoratorFactory(...args);\n\n function PropDecorator(target, name) {\n const constructor = target.constructor; // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n\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\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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\n\nfunction CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() {\n return makeParamDecorator('Attribute', attributeName => ({\n attributeName\n }));\n}\n\nfunction CREATE_ATTRIBUTE_DECORATOR__POST_R3__() {\n return makeParamDecorator('Attribute', attributeName => ({\n attributeName,\n __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName)\n }));\n}\n\nconst CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__;\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nconst Attribute = /*#__PURE__*/CREATE_ATTRIBUTE_DECORATOR_IMPL();\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/**\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('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`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\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 */\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\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = undefined;\n\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here'); // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n\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 toString() {\n return `InjectionToken ${this._desc}`;\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 */\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 */\n\n\nconst ANALYZE_FOR_ENTRY_COMPONENTS = /*#__PURE__*/new InjectionToken('AnalyzeForEntryComponents'); // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\n\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 */\n\nclass Query {}\n\nconst ɵ0$1 = (selector, data = {}) => Object.assign({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n}, data);\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\n\n\nconst ContentChildren = /*#__PURE__*/makePropDecorator('ContentChildren', ɵ0$1, Query);\n\nconst ɵ1 = (selector, data = {}) => Object.assign({\n selector,\n first: true,\n isViewQuery: false,\n descendants: true\n}, data);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\n\n\nconst ContentChild = /*#__PURE__*/makePropDecorator('ContentChild', ɵ1, Query);\n\nconst ɵ2 = (selector, data = {}) => Object.assign({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n}, data);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nconst ViewChildren = /*#__PURE__*/makePropDecorator('ViewChildren', ɵ2, Query);\n\nconst ɵ3 = (selector, data) => Object.assign({\n selector,\n first: true,\n isViewQuery: true,\n descendants: true\n}, data);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nconst ViewChild = /*#__PURE__*/makePropDecorator('ViewChild', ɵ3, Query);\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\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 ViewEncapsulation$1 = /*#__PURE__*/(() => {\n (function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\n return ViewEncapsulation$1;\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 getCompilerFacade(request) {\n const globalNg = _global['ng'];\n\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\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\n if (request.usage === 1\n /* PartialDeclaration */\n ) {\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\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 * @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/**\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 */\n\n\nconst Type = Function;\n\nfunction isType(v) {\n return typeof v === 'function';\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/**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\n\n\nfunction addAllToArray(items, arr) {\n for (let i = 0; i < items.length; i++) {\n arr.push(items[i]);\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 */\n\n\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n\n if (valueB !== valueA) {\n return false;\n }\n }\n\n return true;\n}\n/**\n * Flattens an array.\n */\n\n\nfunction flatten(list, dst) {\n if (dst === undefined) dst = list;\n\n for (let i = 0; i < list.length; i++) {\n let item = list[i];\n\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n\n flatten(item, dst);\n } else if (dst !== list) {\n dst.push(item);\n }\n }\n\n return dst;\n}\n\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\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}\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}\n\nfunction newArray(size, value) {\n const list = [];\n\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\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 */\n\n\nfunction arraySplice(array, index, count) {\n const length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\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 */\n\n\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\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 */\n\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\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\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\n\n\nfunction arrayInsertSorted(array, value) {\n let index = arrayIndexOfSorted(array, value);\n\n if (index < 0) {\n // if we did not find it insert it.\n index = ~index;\n arrayInsert(array, index, value);\n }\n\n return index;\n}\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n * - positive index if value found and removed.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\n\n\nfunction arrayRemoveSorted(array, value) {\n const index = arrayIndexOfSorted(array, value);\n\n if (index >= 0) {\n arraySplice(array, index, 1);\n }\n\n return index;\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 */\n\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 */\n\n\nfunction keyValueArraySet(keyValueArray, key, value) {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n\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\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 */\n\n\nfunction keyValueArrayGet(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\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 */\n\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 */\n\n\nfunction keyValueArrayDelete(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\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 */\n\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\n while (end !== start) {\n const middle = start + (end - start >> 1); // find the middle.\n\n const current = array[middle << shift];\n\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 * @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/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\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))) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\n\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. */\n\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 */\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 */\n\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\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 */\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}\n\nclass ReflectionCapabilities {\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n\n isReflectionEnabled() {\n return true;\n }\n\n factory(t) {\n return (...args) => new t(...args);\n }\n /** @internal */\n\n\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\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\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n\n return result;\n }\n\n _ownParameters(type, parentCtor) {\n const typeStr = type.toString(); // 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\n if (isDelegateCtor(typeStr)) {\n return null;\n } // Prefer the direct API.\n\n\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n } // API of tsickle for lowering decorators to properties on the class.\n\n\n const tsickleCtorParams = type.ctorParameters;\n\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 } // API for metadata created by invoking the decorators.\n\n\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n\n const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\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\n\n return newArray(type.length);\n }\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\n const parentCtor = getParentCtor(type);\n\n let parameters = this._ownParameters(type, parentCtor);\n\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n\n return parameters || [];\n }\n\n _ownAnnotations(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let annotations = typeOrFunc.annotations;\n\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n\n return annotations;\n } // API of tsickle for lowering decorators to properties on the class.\n\n\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n } // API for metadata created by invoking the decorators.\n\n\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n\n return null;\n }\n\n annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\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\n _ownPropMetadata(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let propMetadata = typeOrFunc.propMetadata;\n\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n\n return propMetadata;\n } // API of tsickle for lowering decorators to properties on the class.\n\n\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 } // API for metadata created by invoking the decorators.\n\n\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n\n return null;\n }\n\n propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach(propName => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(propName => {\n const decorators = [];\n\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n\n guards(type) {\n return {};\n }\n\n getter(name) {\n return new Function('o', 'return o.' + name + ';');\n }\n\n setter(name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n }\n\n method(name) {\n const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n return o.${name}.apply(o, args);`;\n return new Function('o', 'args', functionBody);\n } // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n\n\n importUri(type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n } // Runtime type\n\n\n return `./${stringify(type)}`;\n }\n\n resourceUri(type) {\n return `./${stringify(type)}`;\n }\n\n resolveIdentifier(name, moduleUrl, members, runtime) {\n return runtime;\n }\n\n resolveEnum(enumIdentifier, name) {\n return enumIdentifier[name];\n }\n\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\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}\n\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null; // Note: We always use `Object` as the null value\n // to simplify checking later on.\n\n return parentCtor || Object;\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\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 */\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';\nconst ɵ0$2 = getClosureSafeProperty;\nconst USE_VALUE = /*#__PURE__*/getClosureSafeProperty({\n provide: String,\n useValue: ɵ0$2\n});\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 */\n\nlet _currentInjector = undefined;\n\nfunction setCurrentInjector(injector) {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n if (_currentInjector === undefined) {\n throw new Error(`inject() must be called from an injection context`);\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}\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 * 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 */\n\n\nfunction ɵɵinvalidFactoryDep(index) {\n const msg = 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.` : 'invalid';\n throw new Error(msg);\n}\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to 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`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if injection is successful, `null` otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\n\n\nconst inject = ɵɵinject;\n\nfunction injectArgs(types) {\n const args = [];\n\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n\n let type = undefined;\n let flags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1\n /* Inject */\n ) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\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 */\n\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 */\n\n\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\n\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n const tokenPath = e[NG_TEMP_TOKEN_PATH];\n\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\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}\n\nfunction formatError(text, obj, injectorErrorName, source = null) {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n let context = stringify(obj);\n\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = [];\n\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\n context = `{${parts.join(', ')}}`;\n }\n\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\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\n\nconst ɵ0$3 = token => ({\n token\n});\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\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', ɵ0$3), -1\n/* Inject */\n);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\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\n/* Optional */\n);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\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\n/* Self */\n);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\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\n/* SkipSelf */\n);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\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\n/* Host */\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\nlet _reflect = null;\n\nfunction getReflect() {\n return _reflect = _reflect || new ReflectionCapabilities();\n}\n\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\n\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\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\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n\n const proto = Object.getPrototypeOf(param);\n\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 Error(`Attribute name must be defined.`);\n }\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\n return meta;\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/**\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 */\n\n\nfunction resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n const componentResolved = []; // Cache so that we don't fetch the same resource more than once.\n\n const urlMap = new Map();\n\n function cachedResourceResolve(url) {\n let promise = urlMap.get(url);\n\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component, type) => {\n const promises = [];\n\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(template => {\n component.template = template;\n }));\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\n promises.push(cachedResourceResolve(styleUrl).then(style => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n\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}\n\nlet componentResourceResolutionQueue = /*#__PURE__*/new Map(); // Track when existing ɵcmp for a Type is waiting on resources.\n\nconst componentDefPendingResolution = /*#__PURE__*/new Set();\n\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nfunction isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n}\n\nfunction componentNeedsResolution(component) {\n return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length);\n}\n\nfunction clearResolutionOfComponentResourcesQueue() {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nfunction restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nfunction isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\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/**\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 */\n\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]; // Unable to obtain a context.\n\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 * 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 */\n\n\nfunction getTemplateLocationDetails(lView) {\n var _a;\n\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = (_a = hostComponentDef === null || hostComponentDef === void 0 ? void 0 : hostComponentDef.type) === null || _a === void 0 ? void 0 : _a.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\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/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\n\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 /**\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\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n return RendererStyleFlags2;\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\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->||--!>|)/;\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: `\" 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. (`` 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 */\n\nfunction escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, text => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\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/**\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 */\n\n\nfunction getLContext(target) {\n let mpValue = readPatchedData(target);\n\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 (Array.isArray(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let directives = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n } else {\n nodeIndex = findViaNativeElement(lView, target);\n\n if (nodeIndex == -1) {\n return null;\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\n\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native); // only when the component has been discovered then update the monkey-patch\n\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n } // only when the directives have been discovered then update the monkey-patch\n\n\n if (directives && context.directives === undefined) {\n context.directives = directives;\n\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target;\n ngDevMode && assertDomNode(rElement); // 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\n let parent = rElement;\n\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n\n if (parentContext) {\n let lView;\n\n if (Array.isArray(parentContext)) {\n lView = parentContext;\n } else {\n lView = parentContext.lView;\n } // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n\n\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n\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\n return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\n\n\nfunction createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined\n };\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 */\n\n\nfunction getComponentViewByInstance(componentInstance) {\n let lView = readPatchedData(componentInstance);\n let view;\n\n if (Array.isArray(lView)) {\n const nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentLViewByIndex(nodeIndex, lView);\n const context = createLContext(lView, nodeIndex, view[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = lView;\n view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n }\n\n return view;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\n\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 */\n\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n target[MONKEY_PATCH_KEY_NAME] = data;\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 */\n\n\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n}\n\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n\n if (value) {\n return Array.isArray(value) ? value : value.lView;\n }\n\n return null;\n}\n\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\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 */\n\n\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW];\n\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n\n return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\n\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:
text
\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\n return tNode.parent && tNode.parent.next;\n }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\n\n\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n\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\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\n return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\n\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\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n\n tNode = traverseNextElement(tNode);\n }\n\n return -1;\n}\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\n\n\nfunction getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n const tNode = lView[TVIEW].data[nodeIndex];\n let directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0) return EMPTY_ARRAY;\n const directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & 2\n /* isComponentHost */\n ) directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n let directiveStartIndex = tNode.directiveStart;\n return tNode.flags & 2\n /* isComponentHost */\n ? lView[directiveStartIndex] : 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 */\n\n\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW].data[nodeIndex];\n\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n\n return result;\n }\n\n return null;\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\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\n\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 */\n\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 * @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// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nconst unusedValueExportToPlacateAjd$5 = 1;\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/**\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 */\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 */\n\n\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n\n while (lView && !(lView[FLAGS] & 512\n /* IsRoot */\n )) {\n lView = getLViewParent(lView);\n }\n\n ngDevMode && assertLView(lView);\n return lView;\n}\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\n\n\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'RootView 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 */\n\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 */\n\n\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n\n return viewOrContainer;\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\nconst unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\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; // 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\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\n const rNode = unwrapRNode(lNodeToHandle);\n ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n\n if (action === 0\n /* Create */\n && 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\n /* Insert */\n && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === 2\n /* Detach */\n ) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === 3\n /* Destroy */\n ) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\nfunction createTextNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return isProceduralRenderer(renderer) ? renderer.createText(value) : renderer.createTextNode(value);\n}\n\nfunction updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n}\n\nfunction createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++; // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n // method name.\n\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 */\n\n\nfunction createElementNode(renderer, name, namespace) {\n ngDevMode && ngDevMode.rendererCreateElement++;\n\n if (isProceduralRenderer(renderer)) {\n return renderer.createElement(name, namespace);\n } else {\n return namespace === null ? renderer.createElement(name) : renderer.createElementNS(namespace, name);\n }\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 */\n\n\nfunction removeViewFromContainer(tView, lView) {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2\n /* Detach */\n , 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 */\n\n\nfunction addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1\n /* Insert */\n , 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 */\n\n\nfunction renderDetachView(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2\n /* Detach */\n , 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 */\n\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\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n\n while (lViewOrLContainer) {\n let next = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer); // If container, traverse down to its first LView.\n\n const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\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\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\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 */\n\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\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\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\n lView[PARENT] = lContainer; // track views where declaration and insertion points are different\n\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n } // notify query that a new view has been added\n\n\n const lQueries = lView[QUERIES];\n\n if (lQueries !== null) {\n lQueries.insertView(tView);\n } // Sets the attached flag\n\n\n lView[FLAGS] |= 128\n /* Attached */\n ;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\n\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\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\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\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); // 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\n if (lView[FLAGS] & 1024\n /* RefreshTransplantedView */\n ) {\n lView[FLAGS] &= ~1024\n /* RefreshTransplantedView */\n ;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\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 */\n\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\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach); // notify query that a view has been removed\n\n const lQueries = removedLView[QUERIES];\n\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null; // Unsets the attached flag\n\n viewToDetach[FLAGS] &= ~128\n /* Attached */\n ;\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 */\n\n\nfunction destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256\n /* Destroyed */\n )) {\n const renderer = lView[RENDERER];\n\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, 3\n /* Destroy */\n , null, null);\n }\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 */\n\n\nfunction cleanUpView(tView, lView) {\n if (!(lView[FLAGS] & 256\n /* Destroyed */\n )) {\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] &= ~128\n /* 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\n lView[FLAGS] |= 256\n /* Destroyed */\n ;\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView); // For component views only, the local renderer is destroyed at clean up time.\n\n if (lView[TVIEW].type === 1\n /* Component */\n && isProceduralRenderer(lView[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container\n\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n } // For embedded views still attached to a container: remove query result from this view.\n\n\n const lQueries = lView[QUERIES];\n\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\n\n\nfunction processCleanups(tView, lView) {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]; // `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\n let lastLCleanupIndex = -1;\n\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\n const idxOrTargetGetter = tCleanup[i + 1];\n const target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]);\n const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n const useCaptureOrSubIdx = tCleanup[i + 3];\n\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n } else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();\n } else {\n // Subscription\n lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();\n }\n }\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\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\n lView[CLEANUP] = null;\n }\n}\n/** Calls onDestroy hooks for this view */\n\n\nfunction executeOnDestroys(tView, lView) {\n let destroyHooks;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i]]; // Only call the destroy hook if the context has been requested.\n\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1];\n\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\n /* LifecycleHookStart */\n , callContext, hook);\n\n try {\n hook.call(callContext);\n } finally {\n profiler(5\n /* LifecycleHookEnd */\n , callContext, hook);\n }\n }\n } else {\n profiler(4\n /* LifecycleHookStart */\n , context, toCall);\n\n try {\n toCall.call(context);\n } finally {\n profiler(5\n /* LifecycleHookEnd */\n , 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 * `delayed due to projection`\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 */\n\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 */\n\n\nfunction getClosestRElement(tView, tNode, lView) {\n let parentTNode = tNode; // 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\n while (parentTNode !== null && parentTNode.type & (8\n /* ElementContainer */\n | 32\n /* Icu */\n )) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n } // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n\n\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\n /* AnyRNode */\n | 4\n /* Container */\n );\n\n if (parentTNode.flags & 2\n /* isComponentHost */\n ) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const encapsulation = tView.data[parentTNode.directiveStart].encapsulation; // 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 // ( or ) have to be in place as elements are being inserted.\n\n if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView);\n }\n}\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\n\n\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode, isMove);\n } else {\n parent.insertBefore(child, beforeNode, isMove);\n }\n}\n\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n } else {\n parent.appendChild(child);\n }\n}\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. */\n\n\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n } else {\n parent.removeChild(child);\n }\n}\n/**\n * Returns a native parent of a given native node.\n */\n\n\nfunction nativeParentNode(renderer, node) {\n return isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode;\n}\n/**\n * Returns a native sibling of a given native node.\n */\n\n\nfunction nativeNextSibling(renderer, node) {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\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 */\n\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 */\n\n\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n if (parentTNode.type & (8\n /* ElementContainer */\n | 32\n /* Icu */\n )) {\n return getNativeByTNode(parentTNode, lView);\n }\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 */\n\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 */\n\nlet _processI18nInsertBefore;\n\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 */\n\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\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\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 */\n\n\nfunction getFirstNativeNode(lView, tNode) {\n if (tNode !== null) {\n ngDevMode && assertTNodeType(tNode, 3\n /* AnyRNode */\n | 12\n /* AnyContainer */\n | 32\n /* Icu */\n | 16\n /* Projection */\n );\n const tNodeType = tNode.type;\n\n if (tNodeType & 3\n /* AnyRNode */\n ) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & 4\n /* Container */\n ) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & 8\n /* ElementContainer */\n ) {\n const elIcuContainerChild = tNode.child;\n\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & 32\n /* Icu */\n ) {\n let nextRNode = icuContainerIterate(tNode, lView);\n let rNode = nextRNode(); // If the ICU container has no nodes, than we use the ICU anchor as the node.\n\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\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\n return null;\n}\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\n return null;\n}\n\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex];\n const firstTNodeOfView = lView[TVIEW].firstChild;\n\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\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 */\n\n\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n const nativeParent = nativeParentNode(renderer, rNode);\n\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 */\n\n\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertTNodeType(tNode, 3\n /* AnyRNode */\n | 12\n /* AnyContainer */\n | 16\n /* Projection */\n | 32\n /* Icu */\n );\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n\n if (isProjection) {\n if (action === 0\n /* Create */\n ) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 4\n /* isProjected */\n ;\n }\n }\n\n if ((tNode.flags & 64\n /* isDetached */\n ) !== 64\n /* isDetached */\n ) {\n if (tNodeType & 8\n /* ElementContainer */\n ) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & 32\n /* Icu */\n ) {\n const nextRNode = icuContainerIterate(tNode, lView);\n let rNode;\n\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & 16\n /* Projection */\n ) {\n applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n } else {\n ngDevMode && assertTNodeType(tNode, 3\n /* AnyRNode */\n | 4\n /* Container */\n );\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\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 */\n\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\n /* Create */\n , 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 */\n\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\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 */\n\n\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n\n const native = unwrapRNode(lContainer); // 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\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\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 */\n\n\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n const isProcedural = isProceduralRenderer(renderer);\n\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\n if (isProcedural) {\n renderer.removeClass(rNode, prop);\n } else {\n rNode.classList.remove(prop);\n }\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n\n if (isProcedural) {\n renderer.addClass(rNode, prop);\n } else {\n ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n rNode.classList.add(prop);\n }\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n\n if (value == null\n /** || value === undefined */\n ) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n\n if (isProcedural) {\n renderer.removeStyle(rNode, prop, flags);\n } else {\n rNode.style.removeProperty(prop);\n }\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\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\n ngDevMode && ngDevMode.rendererSetStyle++;\n\n if (isProcedural) {\n renderer.setStyle(rNode, prop, value, flags);\n } else {\n ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n rNode.style.setProperty(prop, value, isImportant ? 'important' : '');\n }\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 */\n\n\nfunction writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n } else {\n element.style.cssText = newValue;\n }\n\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 */\n\n\nfunction writeDirectClass(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n\n if (isProceduralRenderer(renderer)) {\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 } else {\n element.className = newValue;\n }\n\n ngDevMode && ngDevMode.rendererSetClassName++;\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/**\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 */\n\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 */\n\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n\n if (_global.trustedTypes) {\n try {\n policy = _global.trustedTypes.createPolicy('angular', {\n createHTML: s => s,\n createScript: s => s,\n createScriptURL: s => s\n });\n } catch (_a) {// 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\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 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 */\n\n\nfunction trustedHTMLFromString(html) {\n var _a;\n\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.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 */\n\n\nfunction trustedScriptFromString(script) {\n var _a;\n\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.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 */\n\n\nfunction trustedScriptURLFromString(url) {\n var _a;\n\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.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 */\n\n\nfunction newTrustedFunctionForDev(...args) {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\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 } // 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\n\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\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\n const fn = _global['eval'](trustedScriptFromString(body));\n\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 } // 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\n\n fn.toString = () => body; // 2. When calling the resulting function, `this` should refer to `global`\n\n\n return fn.bind(_global); // 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 * @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/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an