diff --git a/build.js b/build.js index 5323bd6..13cac63 100644 --- a/build.js +++ b/build.js @@ -1,8 +1,18 @@ -import { rollup } from "npm:rollup"; -import { minify } from "npm:terser"; +import { rollup } from "npm:rollup@3.13.0"; +import { minify } from "npm:terser@5.16.1"; +import { babel } from "npm:@rollup/plugin-babel@6.0.3"; +// This import is required for presetEnv to work: +import _ from "https://esm.sh/@babel/core@7.20.12"; +import babelPresetEnv from "https://esm.sh/@babel/preset-env@7.20.2"; let bundle = await rollup({ input: "mod.js", + plugins: [ + babel({ + babelHelpers: "bundled", + presets: [[babelPresetEnv]], + }), + ], }); // Write legacy UMD files to tinycolor.js and dist/tinycolor-min.js. diff --git a/deno.lock b/deno.lock index 9966983..b65a0df 100644 --- a/deno.lock +++ b/deno.lock @@ -1,223 +1,555 @@ { "version": "2", "remote": { - "https://cdn.esm.sh/v77/preact@10.7.1/deno/jsx-runtime.js": "459df0d2500481d01aa8d53a0a26ae0951dfe919f092c656a6d3352e23954f2e", - "https://cdn.esm.sh/v77/preact@10.7.1/deno/preact.js": "fb386f5e54f1809c32880de514835aa732c42b17e343ddbab0783b378ea8496e", - "https://cdn.esm.sh/v77/preact@10.7.1/jsx-runtime/src/index.d.ts": "e153460ed2b3fe2ad8b93696ecd48fbf73cd628b0b0ea6692b71804a3af69dfd", - "https://cdn.esm.sh/v77/preact@10.7.1/src/index.d.ts": "cd4a850a1901e3d690cafa55c85333a08734f288e4ac0348325a0887722f7399", - "https://cdn.esm.sh/v77/preact@10.7.1/src/jsx.d.ts": "3693adcbd3b8ef0308d3187aca29eb9fb8c9c39ba2fc179d7dd229fc49b63418", - "https://deno.land/std@0.126.0/async/deadline.ts": "edbdf6cd7a5e3337c4c24c9b616491f8f1d61d36fc415d5d5b4af33557de0d23", - "https://deno.land/std@0.126.0/async/debounce.ts": "3cf9306b4e9038ee3238111e338f412ecf3541b1a97ba9fc1f960be8af5a5f39", - "https://deno.land/std@0.126.0/async/deferred.ts": "677692a2399d4cabbc45e06abe4f585afd6196c59e24a98edb866598af9f0eef", - "https://deno.land/std@0.126.0/async/delay.ts": "f38013c800f5129b14fdbf41fb4f4fbaf9525f69f4266946e14d0cf57c830b0c", - "https://deno.land/std@0.126.0/async/mod.ts": "a28709190a1966cb50e5815ef269bb588ee192373cde73b1096641820dc52a36", - "https://deno.land/std@0.126.0/async/mux_async_iterator.ts": "35561f258d32c77170f9d1faf3d650890fb6502d5fe12f505c050b4ea1aee899", - "https://deno.land/std@0.126.0/async/pool.ts": "97b0dd27c69544e374df857a40902e74e39532f226005543eabacb551e277082", - "https://deno.land/std@0.126.0/async/tee.ts": "518c7bfd5184c8cd92b47115026a6a2243e81d83e2c3e71c2aa5cdb5988998b1", - "https://deno.land/std@0.126.0/http/server.ts": "10c3a7814666cdbabd6f9c18acdcc4593e222275a628280a4868881445fbb5bc", - "https://deno.land/std@0.140.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", - "https://deno.land/std@0.140.0/_util/os.ts": "3b4c6e27febd119d36a416d7a97bd3b0251b77c88942c8f16ee5953ea13e2e49", - "https://deno.land/std@0.140.0/async/abortable.ts": "87aa7230be8360c24ad437212311c9e8d4328854baec27b4c7abb26e85515c06", - "https://deno.land/std@0.140.0/async/deadline.ts": "48ac998d7564969f3e6ec6b6f9bf0217ebd00239b1b2292feba61272d5dd58d0", - "https://deno.land/std@0.140.0/async/debounce.ts": "564273ef242bcfcda19a439132f940db8694173abffc159ea34f07d18fc42620", - "https://deno.land/std@0.140.0/async/deferred.ts": "bc18e28108252c9f67dfca2bbc4587c3cbf3aeb6e155f8c864ca8ecff992b98a", - "https://deno.land/std@0.140.0/async/delay.ts": "cbbdf1c87d1aed8edc7bae13592fb3e27e3106e0748f089c263390d4f49e5f6c", - "https://deno.land/std@0.140.0/async/mod.ts": "6e42e275b44367361a81842dd1a789c55ab206d7c8a877d7163ab5c460625be6", - "https://deno.land/std@0.140.0/async/mux_async_iterator.ts": "f4d1d259b0c694d381770ddaaa4b799a94843eba80c17f4a2ec2949168e52d1e", - "https://deno.land/std@0.140.0/async/pool.ts": "97b0dd27c69544e374df857a40902e74e39532f226005543eabacb551e277082", - "https://deno.land/std@0.140.0/async/tee.ts": "1341feb1f5b1a96f8628d0f8fc07d8c43d3813423f18a63bf1b4785568d21b1f", - "https://deno.land/std@0.140.0/encoding/hex.ts": "7f023e1e51cfd6b189682e602e8640939e7be71a300a2fcf3daf8f84dc609bbc", - "https://deno.land/std@0.140.0/flags/mod.ts": "019df8a63ed24df2d10be22e8983aa9253623e871228a2f8f328ff2d0404f7ef", - "https://deno.land/std@0.140.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", - "https://deno.land/std@0.140.0/http/file_server.ts": "c1f0af1c846dabe5a930afff1c7fa6a8eaa9ad8b2573ceeca78d2668f6e9f50e", - "https://deno.land/std@0.140.0/http/http_status.ts": "71838ad33cb03ff2575f5e8fdea5f930979cdff8a81c11ade497f11d4c026019", - "https://deno.land/std@0.140.0/http/server.ts": "3da75405704bebcf212a55966a68a489f7e094ba52b5d38f181fe0ef8461a55d", - "https://deno.land/std@0.140.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", - "https://deno.land/std@0.140.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", - "https://deno.land/std@0.140.0/path/_util.ts": "c1e9686d0164e29f7d880b2158971d805b6e0efc3110d0b3e24e4b8af2190d2b", - "https://deno.land/std@0.140.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", - "https://deno.land/std@0.140.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee", - "https://deno.land/std@0.140.0/path/mod.ts": "d3e68d0abb393fb0bf94a6d07c46ec31dc755b544b13144dee931d8d5f06a52d", - "https://deno.land/std@0.140.0/path/posix.ts": "293cdaec3ecccec0a9cc2b534302dfe308adb6f10861fa183275d6695faace44", - "https://deno.land/std@0.140.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", - "https://deno.land/std@0.140.0/path/win32.ts": "31811536855e19ba37a999cd8d1b62078235548d67902ece4aa6b814596dd757", - "https://deno.land/std@0.165.0/_util/asserts.ts": "d0844e9b62510f89ce1f9878b046f6a57bf88f208a10304aab50efcb48365272", - "https://deno.land/std@0.165.0/_util/os.ts": "8a33345f74990e627b9dfe2de9b040004b08ea5146c7c9e8fe9a29070d193934", - "https://deno.land/std@0.165.0/async/abortable.ts": "87aa7230be8360c24ad437212311c9e8d4328854baec27b4c7abb26e85515c06", - "https://deno.land/std@0.165.0/async/deadline.ts": "48ac998d7564969f3e6ec6b6f9bf0217ebd00239b1b2292feba61272d5dd58d0", - "https://deno.land/std@0.165.0/async/debounce.ts": "dc8b92d4a4fe7eac32c924f2b8d3e62112530db70cadce27042689d82970b350", - "https://deno.land/std@0.165.0/async/deferred.ts": "d8fb253ffde2a056e4889ef7e90f3928f28be9f9294b6505773d33f136aab4e6", - "https://deno.land/std@0.165.0/async/delay.ts": "0419dfc993752849692d1f9647edf13407c7facc3509b099381be99ffbc9d699", - "https://deno.land/std@0.165.0/async/mod.ts": "dd0a8ed4f3984ffabe2fcca7c9f466b7932d57b1864ffee148a5d5388316db6b", - "https://deno.land/std@0.165.0/async/mux_async_iterator.ts": "3447b28a2a582224a3d4d3596bccbba6e85040da3b97ed64012f7decce98d093", - "https://deno.land/std@0.165.0/async/pool.ts": "ef9eb97b388543acbf0ac32647121e4dbe629236899586c4d4311a8770fbb239", - "https://deno.land/std@0.165.0/async/tee.ts": "9af3a3e7612af75861308b52249e167f5ebc3dcfc8a1a4d45462d96606ee2b70", - "https://deno.land/std@0.165.0/bytes/bytes_list.ts": "aba5e2369e77d426b10af1de0dcc4531acecec27f9b9056f4f7bfbf8ac147ab4", - "https://deno.land/std@0.165.0/bytes/equals.ts": "3c3558c3ae85526f84510aa2b48ab2ad7bdd899e2e0f5b7a8ffc85acb3a6043a", - "https://deno.land/std@0.165.0/bytes/mod.ts": "b2e342fd3669176a27a4e15061e9d588b89c1aaf5008ab71766e23669565d179", - "https://deno.land/std@0.165.0/crypto/timing_safe_equal.ts": "3784958e40a5fe10429a68b75cc5f8d34356bf0bc2eb93c80c3033e2a6f17821", - "https://deno.land/std@0.165.0/encoding/base64.ts": "c57868ca7fa2fbe919f57f88a623ad34e3d970d675bdc1ff3a9d02bba7409db2", - "https://deno.land/std@0.165.0/encoding/base64url.ts": "a5f82a9fa703bd85a5eb8e7c1296bc6529e601ebd9642cc2b5eaa6b38fa9e05a", - "https://deno.land/std@0.165.0/flags/mod.ts": "3b459daf581e047819b6b799c92b96c81b4eecbd5ea025643d54dc0abc6ac923", - "https://deno.land/std@0.165.0/io/buffer.ts": "245f1762a949082ddc0a6e9b15589d0be2d29c150266decd04320b8a8318f9f6", - "https://deno.land/std@0.165.0/io/types.d.ts": "107e1e64834c5ba917c783f446b407d33432c5d612c4b3430df64fc2b4ecf091", - "https://deno.land/std@0.165.0/node/_core.ts": "cd45c0cfa412ff57762b600710574a46f923dfa372003d9dfe52304000393b9b", - "https://deno.land/std@0.165.0/node/_events.d.ts": "3899ee9c37055fbb750e32cb43d7c435077c04446af948300080e1a590c6edf0", - "https://deno.land/std@0.165.0/node/_events.mjs": "303e8aa60ace559e4ca0d19e8475f87311bee9e8330b4b497644d70f2002fc27", - "https://deno.land/std@0.165.0/node/_global.d.ts": "6dadaf8cec2a0c506b22170617286e0bdc80be53dd0673e67fc7dd37a1130c68", - "https://deno.land/std@0.165.0/node/_next_tick.ts": "81c1826675493b76f90c646fb1274a4c84b5cc913a80ca4526c32cd7c46a0b06", - "https://deno.land/std@0.165.0/node/_process/exiting.ts": "bc9694769139ffc596f962087155a8bfef10101d03423b9dcbc51ce6e1f88fce", - "https://deno.land/std@0.165.0/node/_process/process.ts": "d5bf113a4b62f4abe4cb7ec5a9d00d44dac0ad9e82a23d00cc27d71e05ae8b66", - "https://deno.land/std@0.165.0/node/_process/stdio.mjs": "971c3b086040d8521562155db13f22f9971d5c42c852b2081d4d2f0d8b6ab6bd", - "https://deno.land/std@0.165.0/node/_process/streams.mjs": "3ce63d9eb24a8a8ec45eeebf5c184b43d888064f663f87e8f453888368e00f90", - "https://deno.land/std@0.165.0/node/_stream.d.ts": "83e9da2f81de3205926f1e86ba54442aa5a3caf4c5e84a4c8699402ad340142b", - "https://deno.land/std@0.165.0/node/_stream.mjs": "9a80217d9734f6e4284aae0ea55dd82b243f5517bc1814e983ad41b01732f712", - "https://deno.land/std@0.165.0/node/_utils.ts": "1085a229e910b3a6672f3c3be05507591811dc67be2ae2188e9fc9ef4376b172", - "https://deno.land/std@0.165.0/node/buffer.ts": "43f07b2d1523345bf35b7deb7fcdad6e916020a631a7bc1b5efcaff556db4e1d", - "https://deno.land/std@0.165.0/node/events.ts": "f848398d3591534ca94ac6b852a9f3c4dbb2da310c3a26059cf4ff06b7eae088", - "https://deno.land/std@0.165.0/node/internal/buffer.d.ts": "90f674081428a61978b6d481c5f557ff743a3f4a85d7ae113caab48fdf5b8a63", - "https://deno.land/std@0.165.0/node/internal/buffer.mjs": "70b74b34f1617b3492aee6dec35c7bdabbf26e034bfcf640aa61b3d63c5c850f", - "https://deno.land/std@0.165.0/node/internal/crypto/_keys.ts": "63229ff3d8d15b5bd0a1d2ebc19313cbb8ac969875bf16df1ce4f2b497d74fb5", - "https://deno.land/std@0.165.0/node/internal/crypto/constants.ts": "d2c8821977aef55e4d66414d623c24a2447791a8b49b6404b8db32d81e20c315", - "https://deno.land/std@0.165.0/node/internal/error_codes.ts": "ac03c4eae33de3a69d6c98e8678003207eecf75a6900eb847e3fea3c8c9e6d8f", - "https://deno.land/std@0.165.0/node/internal/errors.ts": "b9aec7d1fe3eaf21322d0ea9dc2fcb344055d6b0c7a1bd0f62a0c379a5baa799", - "https://deno.land/std@0.165.0/node/internal/fixed_queue.ts": "455b3c484de48e810b13bdf95cd1658ecb1ba6bcb8b9315ffe994efcde3ba5f5", - "https://deno.land/std@0.165.0/node/internal/hide_stack_frames.ts": "a91962ec84610bc7ec86022c4593cdf688156a5910c07b5bcd71994225c13a03", - "https://deno.land/std@0.165.0/node/internal/net.ts": "1239886cd2508a68624c2dae8abf895e8aa3bb15a748955349f9ac5539032238", - "https://deno.land/std@0.165.0/node/internal/normalize_encoding.mjs": "3779ec8a7adf5d963b0224f9b85d1bc974a2ec2db0e858396b5d3c2c92138a0a", - "https://deno.land/std@0.165.0/node/internal/options.ts": "a23c285975e058cb26a19abcb048cd8b46ab12d21cfb028868ac8003fffb43ac", - "https://deno.land/std@0.165.0/node/internal/primordials.mjs": "7cf5afe471583e4a384eeea109bdff276b6b7f3a3af830f99f951fb7d57ef423", - "https://deno.land/std@0.165.0/node/internal/process/per_thread.mjs": "bc1be72a6a662bf81573c20fe74893374847a7302065ddf52fb3fb2af505f31f", - "https://deno.land/std@0.165.0/node/internal/readline/callbacks.mjs": "17d9270a54fb5dceea8f894669e3401e5c6260bab075a1e9675a62f1fef50d8c", - "https://deno.land/std@0.165.0/node/internal/readline/utils.mjs": "a93ebb99f85e0dbb4f05f4aff5583d12a15150e45c335e4ecf925e1879dc9c84", - "https://deno.land/std@0.165.0/node/internal/streams/destroy.mjs": "9c9bbeb172a437041d529829f433df72cf0b63ae49f3ee6080a55ffbef7572ad", - "https://deno.land/std@0.165.0/node/internal/streams/end-of-stream.mjs": "38be76eaceac231dfde643e72bc0940625446bf6d1dbd995c91c5ba9fd59b338", - "https://deno.land/std@0.165.0/node/internal/streams/utils.mjs": "a0a6b93a7e68ef52bef4ed00b0c82bb7e335abf360af57335b07c6a3fcdde717", - "https://deno.land/std@0.165.0/node/internal/util.mjs": "35d24fb775468cd24443bcf0ec68904b8aa44e5b53845491a5e3382421917f9a", - "https://deno.land/std@0.165.0/node/internal/util/inspect.mjs": "1ddace0c97719d2cc0869ba177d375e96051301352ec235cbfb2ecbfcd4e8fba", - "https://deno.land/std@0.165.0/node/internal/util/types.ts": "de6e2b7f9b9985ab881b1e78f05ae51d1fc829ae1584063df21e57b35312f3c4", - "https://deno.land/std@0.165.0/node/internal/validators.mjs": "67deae0f488d013c8bf485742a5478112b8e48837cb2458c4a8b2669cf7017db", - "https://deno.land/std@0.165.0/node/internal_binding/_libuv_winerror.ts": "801e05c2742ae6cd42a5f0fd555a255a7308a65732551e962e5345f55eedc519", - "https://deno.land/std@0.165.0/node/internal_binding/_listen.ts": "c15a356ef4758770fc72d3ca4db33f0cc321016df1aafb927c027c0d73ac2c42", - "https://deno.land/std@0.165.0/node/internal_binding/_node.ts": "e4075ba8a37aef4eb5b592c8e3807c39cb49ca8653faf8e01a43421938076c1b", - "https://deno.land/std@0.165.0/node/internal_binding/_timingSafeEqual.ts": "80640f055101071cb3680a2d8a1fead5fd260ca8bf183efb94296b69463e06cd", - "https://deno.land/std@0.165.0/node/internal_binding/_utils.ts": "1c50883b5751a9ea1b38951e62ed63bacfdc9d69ea665292edfa28e1b1c5bd94", - "https://deno.land/std@0.165.0/node/internal_binding/_winerror.ts": "8811d4be66f918c165370b619259c1f35e8c3e458b8539db64c704fbde0a7cd2", - "https://deno.land/std@0.165.0/node/internal_binding/ares.ts": "33ff8275bc11751219af8bd149ea221c442d7e8676e3e9f20ccb0e1f0aac61b8", - "https://deno.land/std@0.165.0/node/internal_binding/async_wrap.ts": "b83e4021a4854b2e13720f96d21edc11f9905251c64c1bc625a361f574400959", - "https://deno.land/std@0.165.0/node/internal_binding/buffer.ts": "781e1d13adc924864e6e37ecb5152e8a4e994cf394695136e451c47f00bda76c", - "https://deno.land/std@0.165.0/node/internal_binding/cares_wrap.ts": "720e6d5cff7018bb3d00e1a49dd4c31f0fc6af3a593ab68cd39e3592ed163d61", - "https://deno.land/std@0.165.0/node/internal_binding/config.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/connection_wrap.ts": "9debd4210d29c658054476fcb640c900725f564ef35412c56dc79eb07213a7c1", - "https://deno.land/std@0.165.0/node/internal_binding/constants.ts": "f4afc504137fb21f3908ab549931604968dfa62432b285a0874f41c4cade9ed2", - "https://deno.land/std@0.165.0/node/internal_binding/contextify.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/credentials.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/crypto.ts": "d7f39700dc020364edf7f4785e5026bb91f099ce1bd02734182451b1af300c8c", - "https://deno.land/std@0.165.0/node/internal_binding/errors.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/fs.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/fs_dir.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/fs_event_wrap.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/handle_wrap.ts": "71c451060c9f555066d3ebe80de039a4e493a94b76c664450fbefd8f4167eb7e", - "https://deno.land/std@0.165.0/node/internal_binding/heap_utils.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/http_parser.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/icu.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/inspector.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/js_stream.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/messaging.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/mod.ts": "f68e74e8eed84eaa6b0de24f0f4c47735ed46866d7ee1c5a5e7c0667b4f0540f", - "https://deno.land/std@0.165.0/node/internal_binding/module_wrap.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/native_module.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/natives.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/node_file.ts": "37d6864897547d95ca24e0f5d01035915db0065bff128bc22191bc93f9ad59ad", - "https://deno.land/std@0.165.0/node/internal_binding/node_options.ts": "b098e6a1c80fa5003a1669c6828539167ab19337e13d20a47b610144cb888cef", - "https://deno.land/std@0.165.0/node/internal_binding/options.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/os.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/performance.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/pipe_wrap.ts": "105c73f268cb9ca1c6cebaf4bea089ab12e0c21c8c4e10bb0a14b0abd3e1661e", - "https://deno.land/std@0.165.0/node/internal_binding/process_methods.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/report.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/serdes.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/signal_wrap.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/spawn_sync.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/stream_wrap.ts": "ecbd50a6c6ff7f6fea9bdfdc7b3977637cd854814c812b59296458ca2f0fc209", - "https://deno.land/std@0.165.0/node/internal_binding/string_decoder.ts": "5cb1863763d1e9b458bc21d6f976f16d9c18b3b3f57eaf0ade120aee38fba227", - "https://deno.land/std@0.165.0/node/internal_binding/symbols.ts": "51cfca9bb6132d42071d4e9e6b68a340a7f274041cfcba3ad02900886e972a6c", - "https://deno.land/std@0.165.0/node/internal_binding/task_queue.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/tcp_wrap.ts": "4217fa10072e048a26f26e5f548b3f38422452c9956265592cac57379a610acb", - "https://deno.land/std@0.165.0/node/internal_binding/timers.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/tls_wrap.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/trace_events.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/tty_wrap.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/types.ts": "4c26fb74ba2e45de553c15014c916df6789529a93171e450d5afb016b4c765e7", - "https://deno.land/std@0.165.0/node/internal_binding/udp_wrap.ts": "cdd0882eff7e7db631d808608d20f5d1269b40fbcedd4a0972d6ed616a855c79", - "https://deno.land/std@0.165.0/node/internal_binding/url.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/util.ts": "faf5146c3cc3b2d6c26026a818b4a16e91488ab26e63c069f36ba3c3ae24c97b", - "https://deno.land/std@0.165.0/node/internal_binding/uv.ts": "3a63eebe0b69334bab5e9f037aadde1aef59ab21ab0e4cd01ac588d919be2c75", - "https://deno.land/std@0.165.0/node/internal_binding/v8.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/worker.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/internal_binding/zlib.ts": "e292217d048a33573966b7d25352828d3282921fbcadce8735a20fb3da370cc4", - "https://deno.land/std@0.165.0/node/process.ts": "7180a9e7022d62481daf6fac855f440882137046ef6941f659e8d40c077186be", - "https://deno.land/std@0.165.0/node/stream.ts": "2c6d5d207d0ad295f396b34fd03a908c1638beb1754bc9c1fccd9a4cdcace8be", - "https://deno.land/std@0.165.0/node/string_decoder.ts": "39b3846318f3a60cee417673dab0252a6f400af2e0f2a481bb6d74c00524b597", - "https://deno.land/std@0.165.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", - "https://deno.land/std@0.165.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", - "https://deno.land/std@0.165.0/path/_util.ts": "d16be2a16e1204b65f9d0dfc54a9bc472cafe5f4a190b3c8471ec2016ccd1677", - "https://deno.land/std@0.165.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", - "https://deno.land/std@0.165.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee", - "https://deno.land/std@0.165.0/path/mod.ts": "56fec03ad0ebd61b6ab39ddb9b0ddb4c4a5c9f2f4f632e09dd37ec9ebfd722ac", - "https://deno.land/std@0.165.0/path/posix.ts": "6b63de7097e68c8663c84ccedc0fd977656eb134432d818ecd3a4e122638ac24", - "https://deno.land/std@0.165.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", - "https://deno.land/std@0.165.0/path/win32.ts": "7cebd2bda6657371adc00061a1d23fdd87bcdf64b4843bb148b0b24c11b40f69", - "https://deno.land/std@0.165.0/streams/conversion.ts": "555c6c249f3acf85655f2d0af52d1cb3168e40b1c1fa26beefea501b333abe28", "https://deno.land/std@0.168.0/fmt/colors.ts": "03ad95e543d2808bc43c17a3dd29d25b43d0f16287fe562a0be89bf632454a12", "https://deno.land/std@0.168.0/testing/_diff.ts": "a23e7fc2b4d8daa3e158fa06856bedf5334ce2a2831e8bf9e509717f455adb2c", "https://deno.land/std@0.168.0/testing/_format.ts": "cd11136e1797791045e639e9f0f4640d5b4166148796cad37e6ef75f7d7f3832", "https://deno.land/std@0.168.0/testing/asserts.ts": "51353e79437361d4b02d8e32f3fc83b22231bc8f8d4c841d86fd32b0b0afe940", - "https://deno.land/x/og_edge@0.0.4/emoji.ts": "f14b3b9fbf52fdc389ee474a67f8e112ff6b17c70a7ee4dd5b242c4243abca98", - "https://deno.land/x/og_edge@0.0.4/mod.ts": "987426bda16fb886bbc708eb064318f6648e34aaca46798a55b79732325693b9", - "https://esm.sh/@resvg/resvg-wasm@2.0.0-alpha.4": "269ab08c2abfe3704dd33654efe3c3ce165e35e997c561c7d6f0209fc49af87f", - "https://esm.sh/preact-render-to-string@5.2.6": "7b0214b1bbc385caf84d8618aa82ee1b98c7f95438e71c05c7e8d1726f770410", - "https://esm.sh/preact/jsx-runtime": "40a4b63d4b47f89fbfd13335069df0a1aa2e117f161eb8003436a6d4aa3e9368", - "https://esm.sh/preact@10.11.3": "bb13c4579a68025fbfe7304c0c4dba6ec286c89bce5db830e56507851b208b80", - "https://esm.sh/react@18.2.0": "84aa07282d2f3c843f7d56daeae0be41ceae768391c4418f7358dd64e8fe4eca", - "https://esm.sh/satori@0.0.40": "a1fa945ecee570bdd30919002d7d461112158648b860b9f4b01f455f3a02178f", - "https://esm.sh/satori@0.0.40/wasm": "2a72f4ded67b1746bf74bb4d4bc9cc6c7b5c0af6b7f87a925b588df5c835cae7", - "https://esm.sh/stable/preact@10.11.2/deno/preact.js": "10e7be6ea2698598105f404198789d8a34fd6a1ca020482f94eaaaca736badf5", - "https://esm.sh/stable/preact@10.11.3/deno/preact.js": "d17d6b3217ccb0352f68bbd47930aa25d260c1a544f45bcbcf4cd1ded9d630bb", - "https://esm.sh/stable/react@18.2.0/deno/react.js": "806868069cfdb815e028419cf07ebc7a7bcba7f9e31dec9e3a045b9f8e82c1ed", - "https://esm.sh/v96/preact-render-to-string@5.2.6/deno/preact-render-to-string.js": "0554ba3b539a1fd09d6f751b2b0ad54fddf4fbf6c76386a02c6407c01ab1653d", - "https://esm.sh/v96/preact-render-to-string@5.2.6/src/index.d.ts": "a2c0d400b8900e30e1cba4970f2ccb36d65447ae1f73eb792b371b2db85ba4ff", - "https://esm.sh/v96/preact@10.11.2/src/index.d.ts": "76842a9d103548261ee001f2aee5fa5cacc8b1b4b4032af537ed84603c8f4a31", - "https://esm.sh/v96/preact@10.11.2/src/jsx.d.ts": "77ce5bd7324455c9f6dc85bfc3c94b733acb92cc98fdf82e4b1059c8bca7866d", - "https://esm.sh/v99/@resvg/resvg-wasm@2.0.0-alpha.4/deno/resvg-wasm.js": "f6413ffe16ea4b439c6060162916a29d2ee2e5a53e5ac6fd7e1d20170eb75620", - "https://esm.sh/v99/@resvg/resvg-wasm@2.0.0-alpha.4/index.d.ts": "41778cf1715edd3c641eb20932e69e7385af011d9c669560f8d50f5237ce42ed", - "https://esm.sh/v99/@shuding/opentype.js@1.4.0-beta.0/deno/opentype.js": "e21a61dff52cc88e52ab59483a9a68537d14ee6084ed401f4f408c8481546929", - "https://esm.sh/v99/@types/prop-types@15.7.5/index.d.ts": "6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea", - "https://esm.sh/v99/@types/react@18.0.25/global.d.ts": "bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f", - "https://esm.sh/v99/@types/react@18.0.25/index.d.ts": "12154bc47748a901d10aa84dc39d0ec3a5f2d50624a7f018b473ef5af23063b4", - "https://esm.sh/v99/@types/scheduler@0.16.2/tracing.d.ts": "f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5", - "https://esm.sh/v99/@types/yoga-layout@1.9.2/index.d.ts": "7693b0547e3b004443fa1f4327b61617e7317757a3e947ccc200c91111c77eca", - "https://esm.sh/v99/camelize@1.0.1/deno/camelize.js": "ddbaf21d81c36d9490aa126c37bc08a8d971a8e1d8ad8f8e240ba6cf088ed9c7", - "https://esm.sh/v99/css-background-parser@0.1.0/deno/css-background-parser.js": "03e302b0865521166c0d3901b0b39c08c59ce6256f2865441340d046612f8f73", - "https://esm.sh/v99/css-box-shadow@1.0.0-3/deno/css-box-shadow.js": "669ff9188747d9af1b56d0a7bbde8977da5aba6a8437f7dc81720adc83116c68", - "https://esm.sh/v99/css-color-keywords@1.0.0/deno/css-color-keywords.js": "97a2080cfa58f9275cc35ab9330c2d4e0bba65dbf9b1e3b3937d99ec9837f389", - "https://esm.sh/v99/css-to-react-native@3.0.0/deno/css-to-react-native.js": "afa74f4413ac7853b36c8fad0fad532faa096f1dab70f5b96cc5abd68d2e8c79", - "https://esm.sh/v99/csstype@3.1.1/index.d.ts": "1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383", - "https://esm.sh/v99/postcss-value-parser@4.2.0/deno/postcss-value-parser.js": "699a6f4d720d950fad4522b18562e394d906229ad62e3de90b96a6511462098b", - "https://esm.sh/v99/preact@10.11.3/src/index.d.ts": "76842a9d103548261ee001f2aee5fa5cacc8b1b4b4032af537ed84603c8f4a31", - "https://esm.sh/v99/preact@10.11.3/src/jsx.d.ts": "77ce5bd7324455c9f6dc85bfc3c94b733acb92cc98fdf82e4b1059c8bca7866d", - "https://esm.sh/v99/satori@0.0.40/deno/satori.js": "4d860fba8887732c767a3bc60488903519a26da683134a43ad3c90dfbe8d84fd", - "https://esm.sh/v99/satori@0.0.40/deno/wasm.js": "afa411a30c850b5e1b9cbf09aa7e933c5996b8f8760c086d8d004d0a3b208a69", - "https://esm.sh/v99/satori@0.0.40/dist/index.d.ts": "a530b51076e7b3bb02fd5154713b4bda89575593153c759f0e2388eda84859d3", - "https://esm.sh/v99/satori@0.0.40/wasm~.d.ts": "854cdc32752c20a63ea380b17a93c803d6d1e06fa939fdc231732a7b35e8a906", - "https://esm.sh/v99/yoga-layout-prebuilt@1.10.0/deno/yoga-layout-prebuilt.js": "fc79505c9ed7dfa4e220ee781a286864956b87d353bb2859b49cf5d9350a7aa9", - "https://esm.sh/v99/yoga-wasm-web@0.1.2/deno/yoga-wasm-web.js": "7d5a17036c9a6b7a5754d643401c2520ad5647b88f015a79b2d5cba21cae0dc1", - "https://esm.sh/v99/yoga-wasm-web@0.1.2/index.d.ts": "854cdc32752c20a63ea380b17a93c803d6d1e06fa939fdc231732a7b35e8a906", - "https://esm.sh/yoga-wasm-web@0.1.2": "0056c29fa8e61121b809966abbbdb1e6738b52079f8e742dcd08200df6679a08" + "https://deno.land/std@0.175.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", + "https://deno.land/std@0.175.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", + "https://deno.land/std@0.175.0/async/abortable.ts": "73acfb3ed7261ce0d930dbe89e43db8d34e017b063cf0eaa7d215477bf53442e", + "https://deno.land/std@0.175.0/async/deadline.ts": "b98e50d2c42399af03ad13bbb8cf59dadb9f0cd5d70648cc0c3b9202d75ab565", + "https://deno.land/std@0.175.0/async/debounce.ts": "adab11d04ca38d699444ac8a9d9856b4155e8dda2afd07ce78276c01ea5a4332", + "https://deno.land/std@0.175.0/async/deferred.ts": "42790112f36a75a57db4a96d33974a936deb7b04d25c6084a9fa8a49f135def8", + "https://deno.land/std@0.175.0/async/delay.ts": "73aa04cec034c84fc748c7be49bb15cac3dd43a57174bfdb7a4aec22c248f0dd", + "https://deno.land/std@0.175.0/async/mod.ts": "f04344fa21738e5ad6bea37a6bfffd57c617c2d372bb9f9dcfd118a1b622e576", + "https://deno.land/std@0.175.0/async/mux_async_iterator.ts": "70c7f2ee4e9466161350473ad61cac0b9f115cff4c552eaa7ef9d50c4cbb4cc9", + "https://deno.land/std@0.175.0/async/pool.ts": "fd082bd4aaf26445909889435a5c74334c017847842ec035739b4ae637ae8260", + "https://deno.land/std@0.175.0/async/retry.ts": "5efa3ba450ac0c07a40a82e2df296287b5013755d232049efd7ea2244f15b20f", + "https://deno.land/std@0.175.0/async/tee.ts": "47e42d35f622650b02234d43803d0383a89eb4387e1b83b5a40106d18ae36757", + "https://deno.land/std@0.175.0/bytes/index_of_needle.ts": "65c939607df609374c4415598fa4dad04a2f14c4d98cd15775216f0aaf597f24", + "https://deno.land/std@0.175.0/crypto/timing_safe_equal.ts": "8d69ab611c67fe51b6127d97fcfb4d8e7d0e1b6b4f3e0cc4ab86744c3691f965", + "https://deno.land/std@0.175.0/encoding/base64.ts": "7de04c2f8aeeb41453b09b186480be90f2ff357613b988e99fabb91d2eeceba1", + "https://deno.land/std@0.175.0/encoding/base64url.ts": "3f1178f6446834457b16bfde8b559c1cd3481727fe384d3385e4a9995dc2d851", + "https://deno.land/std@0.175.0/flags/mod.ts": "d1cdefa18472ef69858a17df5cf7c98445ed27ac10e1460183081303b0ebc270", + "https://deno.land/std@0.175.0/fmt/colors.ts": "938c5d44d889fb82eff6c358bea8baa7e85950a16c9f6dae3ec3a7a729164471", + "https://deno.land/std@0.175.0/fmt/printf.ts": "e5b426cd6ad13df5d408e9c375c025d59de30e380c5534715bd892df874ab057", + "https://deno.land/std@0.175.0/fs/exists.ts": "b8c8a457b71e9d7f29b9d2f87aad8dba2739cbe637e8926d6ba6e92567875f8e", + "https://deno.land/std@0.175.0/node/_core.ts": "32a72a2166688d0051db7771e76af823d87a19e84ed073604a0bf4fa2706403f", + "https://deno.land/std@0.175.0/node/_events.d.ts": "1347437fd6b084d7c9a4e16b9fe7435f00b030970086482edeeb3b179d0775af", + "https://deno.land/std@0.175.0/node/_events.mjs": "d4ba4e629abe3db9f1b14659fd5c282b7da8b2b95eaf13238eee4ebb142a2448", + "https://deno.land/std@0.175.0/node/_fs/_fs_access.ts": "48a722db00fd34ec567c1d03c47f6b94d07658c658eeb7d9a10c6b823ebdefbd", + "https://deno.land/std@0.175.0/node/_fs/_fs_appendFile.ts": "2e5230c88804f4b5bee29efa1ba723d71a53f9b0f85d5e6372509ba12e9c00c3", + "https://deno.land/std@0.175.0/node/_fs/_fs_chmod.ts": "fcba6aa4fe2d9178746b5b4ae7f42a72a971007c855988f0e26ff8f694c3c212", + "https://deno.land/std@0.175.0/node/_fs/_fs_chown.ts": "6a24414772d689f8e83b6f53f134420dc25d752bd5be56cade39e92f182c9c9a", + "https://deno.land/std@0.175.0/node/_fs/_fs_close.ts": "8fc5819affb69fb5708f3babce49cd673133e939cebef0665099da78a0d0be7a", + "https://deno.land/std@0.175.0/node/_fs/_fs_common.ts": "21caae4ab7c07c66244446c63c50291cc553d1224d3f6a0cd7bea688c6b2a815", + "https://deno.land/std@0.175.0/node/_fs/_fs_constants.ts": "22ce5f8b07fa8fd7ba37718ad85f6655954b7585d21e6d0b9d73676c16ef1b15", + "https://deno.land/std@0.175.0/node/_fs/_fs_copy.ts": "9074e3a1609b9ee10ca1a2d77e94836c57190e791a0878f7e03b2f0e4e0d5dfb", + "https://deno.land/std@0.175.0/node/_fs/_fs_dir.ts": "26c16ef8003772c9cd2439b448530443ea09a1508a6d808a5913576c3d11882b", + "https://deno.land/std@0.175.0/node/_fs/_fs_dirent.ts": "e8c30d8059336cb6b122738c487cb46c1bcfc4c99fd6d64186f04b4e1805be34", + "https://deno.land/std@0.175.0/node/_fs/_fs_exists.ts": "012e8bf6a6a9b53f9e6451db6ddabf1b883a25e6aebb8aadf8958b57efffefd0", + "https://deno.land/std@0.175.0/node/_fs/_fs_fdatasync.ts": "cfe9409aed4bfe707fb497fe5be449a678b4ae454c9068f3720138ff06f7a71f", + "https://deno.land/std@0.175.0/node/_fs/_fs_fstat.ts": "b15968d0f0da997960f0814e52beee35aff5e04519f007c3ac1c431829a03ac4", + "https://deno.land/std@0.175.0/node/_fs/_fs_fsync.ts": "902c1d4ef9b022c61a12c5f85db3ec4e14778019697cf453822313f9eab9516b", + "https://deno.land/std@0.175.0/node/_fs/_fs_ftruncate.ts": "36d76a3d6b325345ba6fbef745ec1a39d6efb4472214ede8421449296fd25711", + "https://deno.land/std@0.175.0/node/_fs/_fs_futimes.ts": "75b9aaa28588d94b9d8be3c5ca4b74595cde342d644afc9c5dda1e1dcc1e604f", + "https://deno.land/std@0.175.0/node/_fs/_fs_link.ts": "5cfa4f02cbedf913d90618c1bf130796bc3cdd7cd0e59cf5defb05619ae10b8a", + "https://deno.land/std@0.175.0/node/_fs/_fs_lstat.ts": "da6a26b4745dbb92eda21f07992d16497a6848fe2ded6a425ade4a2418262b57", + "https://deno.land/std@0.175.0/node/_fs/_fs_mkdir.ts": "94e4341f9bbc3bae9f1474e86621d48101a4a863ce51fd6b1170ef244533c494", + "https://deno.land/std@0.175.0/node/_fs/_fs_mkdtemp.ts": "33658ccb449f90d69305868b718f8fe8d72a2a8e2be7136ebd69ba313fd0b4a9", + "https://deno.land/std@0.175.0/node/_fs/_fs_open.ts": "9f728953c07748a54a73bb9ff0013530e33556a688a359a554d5db5b4ed30d06", + "https://deno.land/std@0.175.0/node/_fs/_fs_opendir.ts": "fe65a45b92b6b970da8f3acec15920cb5669c7a19fd07afa8ebcd248ec69740b", + "https://deno.land/std@0.175.0/node/_fs/_fs_read.ts": "a0223081bc460a8af5d1bb01e59a44182629bf7bff7c583031912abf20ac6b04", + "https://deno.land/std@0.175.0/node/_fs/_fs_readFile.ts": "2c155de6b568a4e5d3d089e58723355fc519de2d2c9422f7dd211cda2c8f36dc", + "https://deno.land/std@0.175.0/node/_fs/_fs_readdir.ts": "85f742c2ad38bebb8ba5dee72b37a966fc4b42b10382a76a60d7a2dda0a6278c", + "https://deno.land/std@0.175.0/node/_fs/_fs_readlink.ts": "d5d9746c1d3c76cce0be5045dbb3bfde100406a98f1d4db8243776a2fc5619af", + "https://deno.land/std@0.175.0/node/_fs/_fs_realpath.ts": "671afd8bc1b33126d56155de3827d6ec55361631eec9f4944d7f91835d897329", + "https://deno.land/std@0.175.0/node/_fs/_fs_rename.ts": "2fd973c38ab5c66d806a954914a2d2b6beec55308b6da0616837ba81946bba3b", + "https://deno.land/std@0.175.0/node/_fs/_fs_rm.ts": "27c01d261a3631729f9406d9dc7be263a7adf240094ba9133da511169785023b", + "https://deno.land/std@0.175.0/node/_fs/_fs_rmdir.ts": "d9a35aa265670aba4a6da10cb151139bd69762ccfb88e27f266c1260c244d3ec", + "https://deno.land/std@0.175.0/node/_fs/_fs_stat.ts": "bf1ca585b624f5b183ff547f02ad40b51d47247a7fd5df84f8c27376e7a7c2d5", + "https://deno.land/std@0.175.0/node/_fs/_fs_symlink.ts": "89752d75dd823be7ea2c0f2ca024b14c954f7d1507360abf883245f4b700464b", + "https://deno.land/std@0.175.0/node/_fs/_fs_truncate.ts": "4333d191574be1d6ab20fdee346c0dd4868e5c9c5e8ee716e3b09bf562aee698", + "https://deno.land/std@0.175.0/node/_fs/_fs_unlink.ts": "6a760088a99c7465d9da3cbd67a456a6207c9764c65926ce1e0d3172aab780a2", + "https://deno.land/std@0.175.0/node/_fs/_fs_utimes.ts": "c433ef58bfd20d84d0f940c17575b496dcd4706e8dc86aea777c73f667164444", + "https://deno.land/std@0.175.0/node/_fs/_fs_watch.ts": "2ed05b68759e1771515efa4c6d19db9c956cfbc79a715d61e4ce8f38ac12c966", + "https://deno.land/std@0.175.0/node/_fs/_fs_write.d.ts": "a405627931c1a5a3160d3f1cf028761d51b50cd632d6602cb0f98c6b39c96b23", + "https://deno.land/std@0.175.0/node/_fs/_fs_write.mjs": "595abc0d7be9ef3709b62bf09972c2836b25c945f4c531a6688b910e428e1b42", + "https://deno.land/std@0.175.0/node/_fs/_fs_writeFile.ts": "c65f61a167e5f80f29a88147012ade2a81233c882e51c6a07f45a153f2316a58", + "https://deno.land/std@0.175.0/node/_fs/_fs_writev.d.ts": "2cd3596fe24579debe43b587d5bb5845f6f0ce3913357376eb279511ce832d15", + "https://deno.land/std@0.175.0/node/_fs/_fs_writev.mjs": "54adae0d5e5148d2ee0690d04f7272dbccd1242ffbdf838778ac514c10197844", + "https://deno.land/std@0.175.0/node/_global.d.ts": "2d88342f38b4083b858998e27c706725fb03a74aa14ef8d985dc18438b5188e4", + "https://deno.land/std@0.175.0/node/_next_tick.ts": "9a3cf107d59b019a355d3cf32275b4c6157282e4b68ea85b46a799cb1d379305", + "https://deno.land/std@0.175.0/node/_process/exiting.ts": "6e336180aaabd1192bf99ffeb0d14b689116a3dec1dfb34a2afbacd6766e98ab", + "https://deno.land/std@0.175.0/node/_process/process.ts": "c96bb1f6253824c372f4866ee006dcefda02b7050d46759736e403f862d91051", + "https://deno.land/std@0.175.0/node/_process/stdio.mjs": "cf17727eac8da3a665851df700b5aca6a12bacc3ebbf33e63e4b919f80ba44a6", + "https://deno.land/std@0.175.0/node/_process/streams.mjs": "c1461c4dbf963a93a0ca8233467573a685bbde347562573761cc9435fd7080f6", + "https://deno.land/std@0.175.0/node/_stream.d.ts": "112e1a0677cd6db932c3ce0e6e5bbdc7a2ac1874572f449044ecc82afcf5ee2e", + "https://deno.land/std@0.175.0/node/_stream.mjs": "d6e2c86c1158ac65b4c2ca4fa019d7e84374ff12e21e2175345fe68c0823efe3", + "https://deno.land/std@0.175.0/node/_util/_util_callbackify.ts": "a7ffe799ac5f54f3a780ee1c9b190b94dc7dc8afbb430c0e1c73756638d25d64", + "https://deno.land/std@0.175.0/node/_utils.ts": "7fd55872a0cf9275e3c080a60e2fa6d45b8de9e956ebcde9053e72a344185884", + "https://deno.land/std@0.175.0/node/assert.ts": "52a682477f2b849b3e451a140d665faa2c26a9ac8f615191fe3d9ec18f55b0c8", + "https://deno.land/std@0.175.0/node/assertion_error.ts": "8d208eab48e50ed56fe0f82f755a0d471dc7cd0acd3947b51aa9764de7d30b86", + "https://deno.land/std@0.175.0/node/buffer.ts": "85617be2063eccaf177dbb84c7580d1e32023724ed14bd9df4e453b152a26167", + "https://deno.land/std@0.175.0/node/events.ts": "d2de352d509de11a375e2cb397d6b98f5fed4e562fc1d41be33214903a38e6b0", + "https://deno.land/std@0.175.0/node/fs.ts": "de13cb511655b594157b327cd11bb833cc96051409f34148f043e8a8a92d66a1", + "https://deno.land/std@0.175.0/node/fs/promises.ts": "5db686797cec9a6bc7b1460beb7e049ada81a43bbc0ff8231a26442261ec3fd0", + "https://deno.land/std@0.175.0/node/internal/assert.mjs": "1d50c20eeaf16a6d9c1d90347e497669cebc915f5ee238417a73847eb4c2f0de", + "https://deno.land/std@0.175.0/node/internal/buffer.d.ts": "bdfa991cd88cb02fd08bf8235d2618550e3e511c970b2a8f2e1a6885a2793cac", + "https://deno.land/std@0.175.0/node/internal/buffer.mjs": "e92303a3cc6d9aaabcd270a937ad9319825d9ba08cb332650944df4562029b27", + "https://deno.land/std@0.175.0/node/internal/crypto/_keys.ts": "8f3c3b5a141aa0331a53c205e9338655f1b3b307a08085fd6ff6dda6f7c4190b", + "https://deno.land/std@0.175.0/node/internal/crypto/constants.ts": "544d605703053218499b08214f2e25cf4310651d535b7ab995891c4b7a217693", + "https://deno.land/std@0.175.0/node/internal/error_codes.ts": "8495e33f448a484518d76fa3d41d34fc20fe03c14b30130ad8e936b0035d4b8b", + "https://deno.land/std@0.175.0/node/internal/errors.ts": "1c699b8a3cb93174f697a348c004b1c6d576b66688eac8a48ebb78e65c720aae", + "https://deno.land/std@0.175.0/node/internal/fixed_queue.ts": "62bb119afa5b5ae8fc0c7048b50502347bec82e2588017d0b250c4671d6eff8f", + "https://deno.land/std@0.175.0/node/internal/fs/streams.d.ts": "23571ff9af59d86307831b80823e440953f3e57b134ca7ec6e55b60b845d38de", + "https://deno.land/std@0.175.0/node/internal/fs/streams.mjs": "5de00d105009fb8cec6b6d0a6e6e6288ae40879cc64d9bf7a84852220be9fa34", + "https://deno.land/std@0.175.0/node/internal/fs/utils.mjs": "64b6dc17752fa861b46a0876647336ba24efe3b5130bd1826f1f2d59b9b374ed", + "https://deno.land/std@0.175.0/node/internal/hide_stack_frames.ts": "9dd1bad0a6e62a1042ce3a51eb1b1ecee2f246907bff44835f86e8f021de679a", + "https://deno.land/std@0.175.0/node/internal/idna.ts": "034043ac9273eb5ba83112c926dba1777775f1eca40e021c8703cd1720bedd9f", + "https://deno.land/std@0.175.0/node/internal/net.ts": "5538d31b595ac63d4b3e90393168bc65ace2f332c3317cffa2fd780070b2d86c", + "https://deno.land/std@0.175.0/node/internal/normalize_encoding.mjs": "fd1d9df61c44d7196432f6e8244621468715131d18cc79cd299fc78ac549f707", + "https://deno.land/std@0.175.0/node/internal/options.ts": "888f267c3fe8f18dc7b2f2fbdbe7e4a0fd3302ff3e99f5d6645601e924f3e3fb", + "https://deno.land/std@0.175.0/node/internal/primordials.mjs": "a72d86b5aa55d3d50b8e916b6a59b7cc0dc5a31da8937114b4a113ad5aa08c74", + "https://deno.land/std@0.175.0/node/internal/process/per_thread.mjs": "10142bbb13978c2f8f79778ad90f3a67a8ea6d8d2970f3dfc6bf2c6fff0162a2", + "https://deno.land/std@0.175.0/node/internal/querystring.ts": "479f30c136555dc3b6f09af7d0de8a70c753035c1d5b57acc696722028788323", + "https://deno.land/std@0.175.0/node/internal/readline/callbacks.mjs": "bdb129b140c3b21b5e08cdc3d8e43517ad818ac03f75197338d665cca1cbaed3", + "https://deno.land/std@0.175.0/node/internal/readline/utils.mjs": "c3dbf3a97c01ed14052cca3848f09e2fc24818c1822ceed57c33b9f0840f3b87", + "https://deno.land/std@0.175.0/node/internal/streams/destroy.mjs": "b665fc71178919a34ddeac8389d162a81b4bc693ff7dc2557fa41b3a91011967", + "https://deno.land/std@0.175.0/node/internal/streams/end-of-stream.mjs": "a4fb1c2e32d58dff440d4e716e2c4daaa403b3095304a028bb428575cfeed716", + "https://deno.land/std@0.175.0/node/internal/streams/utils.mjs": "f2fe2e6bdc506da24c758970890cc2a21642045b129dee618bd3827c60dd9e33", + "https://deno.land/std@0.175.0/node/internal/url.ts": "7e62e16520de552c130c354d9c725a2f5e2af453ff929a2009fa66ae445bbe14", + "https://deno.land/std@0.175.0/node/internal/util.mjs": "f7fe2e1ca5e66f550ad0856b9f5ee4d666f0c071fe212ea7fc7f37cfa81f97a5", + "https://deno.land/std@0.175.0/node/internal/util/comparisons.ts": "0da27292b2714c14873a798221189321ee044e52a9c5df99979f8415f1348665", + "https://deno.land/std@0.175.0/node/internal/util/debuglog.ts": "a2392980a65cc6916afc17fa6686242ee0e3b47bd98c792ff59358560b24185e", + "https://deno.land/std@0.175.0/node/internal/util/inspect.mjs": "11d7c9cab514b8e485acc3978c74b837263ff9c08ae4537fa18ad56bae633259", + "https://deno.land/std@0.175.0/node/internal/util/types.ts": "4f3625ea39111eaae1443c834e769b0c5ce9ea33b31d5a853b02af6a78105178", + "https://deno.land/std@0.175.0/node/internal/validators.mjs": "e02f2b02dd072a5d623970292588d541204dc82207b4c58985d933a5f4b382e6", + "https://deno.land/std@0.175.0/node/internal_binding/_libuv_winerror.ts": "30c9569603d4b97a1f1a034d88a3f74800d5ea1f12fcc3d225c9899d4e1a518b", + "https://deno.land/std@0.175.0/node/internal_binding/_listen.ts": "c6038be47116f7755c01fd98340a0d1e8e66ef874710ab59ed3f5607d50d7a25", + "https://deno.land/std@0.175.0/node/internal_binding/_node.ts": "cb2389b0eab121df99853eb6a5e3a684e4537e065fb8bf2cca0cbf219ce4e32e", + "https://deno.land/std@0.175.0/node/internal_binding/_timingSafeEqual.ts": "7d9732464d3c669ff07713868ce5d25bc974a06112edbfb5f017fc3c70c0853e", + "https://deno.land/std@0.175.0/node/internal_binding/_utils.ts": "7c58a2fbb031a204dee9583ba211cf9c67922112fe77e7f0b3226112469e9fe1", + "https://deno.land/std@0.175.0/node/internal_binding/_winerror.ts": "3e8cfdfe22e89f13d2b28529bab35155e6b1730c0221ec5a6fc7077dc037be13", + "https://deno.land/std@0.175.0/node/internal_binding/ares.ts": "bdd34c679265a6c115a8cfdde000656837a0a0dcdb0e4c258e622e136e9c31b8", + "https://deno.land/std@0.175.0/node/internal_binding/async_wrap.ts": "0dc5ae64eea2c9e57ab17887ef1573922245167ffe38e3685c28d636f487f1b7", + "https://deno.land/std@0.175.0/node/internal_binding/buffer.ts": "31729e0537921d6c730ad0afea44a7e8a0a1044d070ade8368226cb6f7390c8b", + "https://deno.land/std@0.175.0/node/internal_binding/cares_wrap.ts": "9b7247772167f8ed56acd0244a232d9d50e8d7c9cfc379f77f3d54cecc2f32ab", + "https://deno.land/std@0.175.0/node/internal_binding/config.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/connection_wrap.ts": "7dd089ea46de38e4992d0f43a09b586e4cf04878fb06863c1cb8cb2ece7da521", + "https://deno.land/std@0.175.0/node/internal_binding/constants.ts": "21ff9d1ee71d0a2086541083a7711842fc6ae25e264dbf45c73815aadce06f4c", + "https://deno.land/std@0.175.0/node/internal_binding/contextify.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/credentials.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/crypto.ts": "29e8f94f283a2e7d4229d3551369c6a40c2af9737fad948cb9be56bef6c468cd", + "https://deno.land/std@0.175.0/node/internal_binding/errors.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/fs.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/fs_dir.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/fs_event_wrap.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/handle_wrap.ts": "adf0b8063da2c54f26edd5e8ec50296a4d38e42716a70a229f14654b17a071d9", + "https://deno.land/std@0.175.0/node/internal_binding/heap_utils.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/http_parser.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/icu.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/inspector.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/js_stream.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/messaging.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/mod.ts": "9fc65f7af1d35e2d3557539a558ea9ad7a9954eefafe614ad82d94bddfe25845", + "https://deno.land/std@0.175.0/node/internal_binding/module_wrap.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/native_module.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/natives.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/node_file.ts": "21edbbc95653e45514aff252b6cae7bf127a4338cbc5f090557d258aa205d8a5", + "https://deno.land/std@0.175.0/node/internal_binding/node_options.ts": "0b5cb0bf4379a39278d7b7bb6bb2c2751baf428fe437abe5ed3e8441fae1f18b", + "https://deno.land/std@0.175.0/node/internal_binding/options.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/os.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/performance.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/pipe_wrap.ts": "e5429879551fb7195039986fe6da920a86971fad4342046cbf653643e6c85e21", + "https://deno.land/std@0.175.0/node/internal_binding/process_methods.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/report.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/serdes.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/signal_wrap.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/spawn_sync.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/stream_wrap.ts": "452bff74d1db280a0cd78c75a95bb6d163e849e06e9638c4af405d40296bd050", + "https://deno.land/std@0.175.0/node/internal_binding/string_decoder.ts": "54c3c1cbd5a9254881be58bf22637965dc69535483014dab60487e299cb95445", + "https://deno.land/std@0.175.0/node/internal_binding/symbols.ts": "4dee2f3a400d711fd57fa3430b8de1fdb011e08e260b81fef5b81cc06ed77129", + "https://deno.land/std@0.175.0/node/internal_binding/task_queue.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/tcp_wrap.ts": "cbede7224fcf0adc4b04e2e1222488a7a9c137807f143bd32cc8b1a121e0d4fa", + "https://deno.land/std@0.175.0/node/internal_binding/timers.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/tls_wrap.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/trace_events.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/tty_wrap.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/types.ts": "5a658bf08975af30d0fad6fa6247274379be26ba3f023425bec03e61c74083ef", + "https://deno.land/std@0.175.0/node/internal_binding/udp_wrap.ts": "cc86f7e51bf56fd619505cf9d4f77d7aae1526abdf295399dd277162d28ca6c1", + "https://deno.land/std@0.175.0/node/internal_binding/url.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/util.ts": "808ff3b92740284184ab824adfc420e75398c88c8bccf5111f0c24ac18c48f10", + "https://deno.land/std@0.175.0/node/internal_binding/uv.ts": "eb0048e30af4db407fb3f95563e30d70efd6187051c033713b0a5b768593a3a3", + "https://deno.land/std@0.175.0/node/internal_binding/v8.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/worker.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/internal_binding/zlib.ts": "37d293009d1718205bf28e878e54a9f1ca24c1c320cee2416c20dc054104c6ea", + "https://deno.land/std@0.175.0/node/path.ts": "1c6aa9101554136525b368e8280f0f78136d4071dd71ad3a70477f27d9e4dd91", + "https://deno.land/std@0.175.0/node/path/_constants.ts": "2e2f68b8679cbf0ef118de8e5719e90cfb091de17d4a7c026c911b6772e6a247", + "https://deno.land/std@0.175.0/node/path/_interface.ts": "c67d76726d0f86ea62ec68d17f11d50680c4659a60a0ea6dcd2488109435b4ce", + "https://deno.land/std@0.175.0/node/path/_util.ts": "44deaf5bbd947eafb3439ea7208d0625e231c5f55c421fe83f5ef91218dcd28c", + "https://deno.land/std@0.175.0/node/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", + "https://deno.land/std@0.175.0/node/path/glob.ts": "b5fc2aed74aa7511cfd07d52dcd595cc18cd7ca431326a664e735d8905d85ce8", + "https://deno.land/std@0.175.0/node/path/mod.ts": "cad27b16a7a3a8c2bb3ad1ba68a63d11e4fb616d63fd55c95e399a0a3a927be2", + "https://deno.land/std@0.175.0/node/path/posix.ts": "a066e77f554358a82b4a693726faa41932f02f5bcd520f07afb6b2372e62484d", + "https://deno.land/std@0.175.0/node/path/separator.ts": "5cfefe182e88bc8138022475703a9b39b13250c79bf234cdc6e3be9afd639662", + "https://deno.land/std@0.175.0/node/path/win32.ts": "3a1b21948e0063cf1ac1c6834ef3ed633b5405f107be01aadfaedd2088b57eef", + "https://deno.land/std@0.175.0/node/process.ts": "6608012d6d51a17a7346f36079c574b9b9f81f1b5c35436489ad089f39757466", + "https://deno.land/std@0.175.0/node/querystring.ts": "2dce8068cb80ce2bf503aecd888be1b89827288352b6581e0fc401886d56cd86", + "https://deno.land/std@0.175.0/node/stream.ts": "09e348302af40dcc7dc58aa5e40fdff868d11d8d6b0cfb85cbb9c75b9fe450c7", + "https://deno.land/std@0.175.0/node/string_decoder.ts": "1a17e3572037c512cc5fc4b29076613e90f225474362d18da908cb7e5ccb7e88", + "https://deno.land/std@0.175.0/node/url.ts": "f8c6656f32728a447705a273e3d8a5118631c0b6560d13fc613901ec9a3f69d0", + "https://deno.land/std@0.175.0/node/util.ts": "4c12edeafde7e50dfe2d4022e383decb422c77858b938b093698cb7250c9e125", + "https://deno.land/std@0.175.0/node/util/types.ts": "461b2e1118fd32456967e14b99f01c892dee1e94d144d6b96e9d94eb086a9574", + "https://deno.land/std@0.175.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://deno.land/std@0.175.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://deno.land/std@0.175.0/path/_util.ts": "d7abb1e0dea065f427b89156e28cdeb32b045870acdf865833ba808a73b576d0", + "https://deno.land/std@0.175.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", + "https://deno.land/std@0.175.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1", + "https://deno.land/std@0.175.0/path/mod.ts": "4b83694ac500d7d31b0cdafc927080a53dc0c3027eb2895790fb155082b0d232", + "https://deno.land/std@0.175.0/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d", + "https://deno.land/std@0.175.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1", + "https://deno.land/std@0.175.0/path/win32.ts": "d186344e5583bcbf8b18af416d13d82b35a317116e6460a5a3953508c3de5bba", + "https://deno.land/std@0.175.0/streams/write_all.ts": "3b2e1ce44913f966348ce353d02fa5369e94115181037cd8b602510853ec3033", + "https://deno.land/std@0.175.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", + "https://deno.land/std@0.175.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", + "https://deno.land/std@0.175.0/testing/asserts.ts": "984ab0bfb3faeed92ffaa3a6b06536c66811185328c5dd146257c702c41b01ab", + "https://deno.land/std@0.175.0/types.d.ts": "220ed56662a0bd393ba5d124aa6ae2ad36a00d2fcbc0e8666a65f4606aaa9784", + "https://esm.sh/@babel/core@7.20.12": "3861b5449eef4e85e3d43eb61b5d1a031ceb641f35616a9b33f2751e2e6f5060", + "https://esm.sh/@babel/preset-env@7.20.2": "7553a2bdd9238358f73b2adc4f8eae3576d0b11d2e4dea3031a9fc18362dd646", + "https://esm.sh/v106/@ampproject/remapping@2.2.0/deno/remapping.js": "dd03e541f1504f91e9bc27fc45571475b63692aa36945bc46990763bd8e2b05a", + "https://esm.sh/v106/@babel/code-frame@7.18.6/deno/code-frame.js": "ad2600ed5c49087e29e3c15993a628f26fc40b93d4b4c52e5daf9532eb9734d7", + "https://esm.sh/v106/@babel/compat-data@7.20.14/deno/corejs2-built-ins.js": "40d911d7f9867ac8fde6195868488c555de3ada8bd67ba31e764a795fe6dd87d", + "https://esm.sh/v106/@babel/compat-data@7.20.14/deno/native-modules.js": "624b143f7a90918cd12fcf68fe3938b14cf22ebe6a4bca70df284c9c2299abe7", + "https://esm.sh/v106/@babel/compat-data@7.20.14/deno/overlapping-plugins.js": "aec7b68029a9b06bd9f445044bae6f6a53c3879c6e90ea241bf515ce6dd734d4", + "https://esm.sh/v106/@babel/compat-data@7.20.14/deno/plugin-bugfixes.js": "f465f5a395fa34032b022107e462f96eb5d44b33d7986115d73f4796b730642f", + "https://esm.sh/v106/@babel/compat-data@7.20.14/deno/plugins.js": "4055bc7e7f4753dbeb64f5bccd68ca3b173aac0c977499fed331f1d5f62f6b26", + "https://esm.sh/v106/@babel/core@7.20.12/deno/core.js": "27a7380554109c90cda300d24ecb01e38e6c8f928266f7a62c82270ba0db7007", + "https://esm.sh/v106/@babel/generator@7.20.14/deno/generator.js": "deb9597468cfbab62c26a5f42af52b89d8ea344d06fbf47b51998a07c0d22b0a", + "https://esm.sh/v106/@babel/helper-annotate-as-pure@7.18.6/deno/helper-annotate-as-pure.js": "514e9cb799caaaacd266748e3fbc9f7886db0375b92fdc7b7e7ca37868efdd89", + "https://esm.sh/v106/@babel/helper-builder-binary-assignment-operator-visitor@7.18.9/deno/helper-builder-binary-assignment-operator-visitor.js": "c53f666f9e6a169a84437539e82d291ac4fafe4b9f4a501cfc4f8ffaa7d5693f", + "https://esm.sh/v106/@babel/helper-compilation-targets@7.20.7/deno/helper-compilation-targets.js": "639ba158dd951c48684f83711a9a2459e204dfbcd527283858733c476533f7e9", + "https://esm.sh/v106/@babel/helper-create-class-features-plugin@7.20.12/deno/helper-create-class-features-plugin.js": "fe224c239b7490f4f2a57216808ef8903b493bfb5c8fe8e81d232eaf5068294d", + "https://esm.sh/v106/@babel/helper-create-regexp-features-plugin@7.20.5/deno/helper-create-regexp-features-plugin.js": "5b48378375aeb0654d6e133ef3caa937bb2b45a21c580290831cb5d07d64102a", + "https://esm.sh/v106/@babel/helper-define-polyfill-provider@0.3.3/deno/helper-define-polyfill-provider.js": "d8fd60166f9fcf7032816bd6266fc54eabf8086efaf3cc366d3a0abc5e2da07e", + "https://esm.sh/v106/@babel/helper-environment-visitor@7.18.9/deno/helper-environment-visitor.js": "389fc43517b0bf0a65f4e1e6f7b53f392fdeea1609a803a1fb25065df4c54ead", + "https://esm.sh/v106/@babel/helper-explode-assignable-expression@7.18.6/deno/helper-explode-assignable-expression.js": "93ffd54db1f87e754e031f1ee3786bf2c5abbae92d4a33fd6ce23d20772c064b", + "https://esm.sh/v106/@babel/helper-function-name@7.19.0/deno/helper-function-name.js": "c742f28aa4c1bd338d152d06c838ef6d22d3f2583923014dfca884f0d416f41e", + "https://esm.sh/v106/@babel/helper-hoist-variables@7.18.6/deno/helper-hoist-variables.js": "4951780601644f1707648b931208bab961d83cf9081246133937eba4ec670385", + "https://esm.sh/v106/@babel/helper-member-expression-to-functions@7.20.7/deno/helper-member-expression-to-functions.js": "81d1d1ff9f359fd88d6b4c83651924ac645988fe9f866026c24a1514f48d8f2b", + "https://esm.sh/v106/@babel/helper-module-imports@7.18.6/deno/helper-module-imports.js": "1a4ce2396b1af2459badc297d2b355eec8fb93fade2635249ed67029e4e0469d", + "https://esm.sh/v106/@babel/helper-module-transforms@7.20.11/deno/helper-module-transforms.js": "9831919ce9760957521e2d2794f4e46bb465f2c012f836de84769edafe8f6447", + "https://esm.sh/v106/@babel/helper-optimise-call-expression@7.18.6/deno/helper-optimise-call-expression.js": "506671c6589413103363af9a45d0c3043e2c4db036a4d8f7a95ad0b202a44af1", + "https://esm.sh/v106/@babel/helper-plugin-utils@7.20.2/deno/helper-plugin-utils.js": "27bf9f40d1b0b5fb83dd52aacf42df8e7b7eb7635b6da4c17413b4f34d290d43", + "https://esm.sh/v106/@babel/helper-remap-async-to-generator@7.18.9/deno/helper-remap-async-to-generator.js": "eafd27f6bb74530f067815c146cee92326bfff0b9114b346b7a710ddf8fe0058", + "https://esm.sh/v106/@babel/helper-replace-supers@7.20.7/deno/helper-replace-supers.js": "aaa15db0f5c732d9062dfc02d0769e461068b199161661fad5e14eca03c9418b", + "https://esm.sh/v106/@babel/helper-simple-access@7.20.2/deno/helper-simple-access.js": "55cb962a731d27b9ea0aeeb7ffabf85d66f3c6596c489859cbe8ee8ab36f597d", + "https://esm.sh/v106/@babel/helper-skip-transparent-expression-wrappers@7.20.0/deno/helper-skip-transparent-expression-wrappers.js": "c133b80edbc2a6c27d47e83a4fe848cca0353a6a88b804138698470e294134ec", + "https://esm.sh/v106/@babel/helper-split-export-declaration@7.18.6/deno/helper-split-export-declaration.js": "d8ff95107ac057c219af91f4ff123ef5e3a1a885dbf848b8fb7f66d9709d8251", + "https://esm.sh/v106/@babel/helper-string-parser@7.19.4/deno/helper-string-parser.js": "8fd4f88a62fe4c4f5d5fc668b1d2fe177a12d741ab23de16acc1bbf2cd84b1cb", + "https://esm.sh/v106/@babel/helper-validator-identifier@7.19.1/deno/helper-validator-identifier.js": "0420a01d841c49fc6a0d0eaca9a97fdfb3c35795d62fb0be720f07df2c27452e", + "https://esm.sh/v106/@babel/helper-validator-option@7.18.6/deno/helper-validator-option.js": "efd82805c89c9a608e0540156627b9a0fcaf015ae6aab7a5376366657e6ccaaf", + "https://esm.sh/v106/@babel/helper-wrap-function@7.20.5/deno/helper-wrap-function.js": "ac1168ed3b5a3ac2eb1623b32797454c69010b20d2d490d4775237f548737133", + "https://esm.sh/v106/@babel/helpers@7.20.13/deno/helpers.js": "fe0f12b1db86c16d15fe94cdb3e00bc10e11393b389808075d1542102834c8b2", + "https://esm.sh/v106/@babel/highlight@7.18.6/deno/highlight.js": "2704698b19d2c450dfc00d302da22d0370513dd3b7f45b396dcbf9653e1c358d", + "https://esm.sh/v106/@babel/parser@7.20.13/deno/parser.js": "d12f2a2f9ff8526931c638d0a8069dfd35eebca81514e2d85b146e188e8c3249", + "https://esm.sh/v106/@babel/parser@7.20.13/typings/babel-parser.d.ts": "365101960e8f56d9d8bfc6c4328fd7780644d6fef3fb5587a900963d12c0ac2a", + "https://esm.sh/v106/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6/deno/plugin-bugfix-safari-id-destructuring-collision-in-function-expression.js": "7ba715db381bee011da34badbe2fa22eefc53dd11dfdd2221aeb1e39c982f561", + "https://esm.sh/v106/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.20.7/deno/plugin-bugfix-v8-spread-parameters-in-optional-chaining.js": "8cc4b06c65ba92edb2c946448c8a05d932a4f05a47b7102cd70a801f065ee89c", + "https://esm.sh/v106/@babel/plugin-proposal-async-generator-functions@7.20.7/deno/plugin-proposal-async-generator-functions.js": "81013c1f3059ba50d3e659b56f45aa2a644df2a010a5bfad00ff136b9d7b9ed7", + "https://esm.sh/v106/@babel/plugin-proposal-class-properties@7.18.6/deno/plugin-proposal-class-properties.js": "60880594e211299975563cda6fe8427ccb8ba0be367c90bc9b3745e5c9f4188c", + "https://esm.sh/v106/@babel/plugin-proposal-class-static-block@7.20.7/deno/plugin-proposal-class-static-block.js": "0c6f0ce054cf554b32449ba6985016b295e28d8a22dab71df1625c5e0254af72", + "https://esm.sh/v106/@babel/plugin-proposal-dynamic-import@7.18.6/deno/plugin-proposal-dynamic-import.js": "0dcba7324f7f59f50de20175a036d7f44e207e46b909c778df73932029d92b21", + "https://esm.sh/v106/@babel/plugin-proposal-export-namespace-from@7.18.9/deno/plugin-proposal-export-namespace-from.js": "bda5f190781f4c011398975c96cbf15d355a077bc87ac60150e6d67a56fd94b8", + "https://esm.sh/v106/@babel/plugin-proposal-json-strings@7.18.6/deno/plugin-proposal-json-strings.js": "6cf1fe32603a874930baea508e662039c59e299f362c20c998cc2cb023ad4824", + "https://esm.sh/v106/@babel/plugin-proposal-logical-assignment-operators@7.20.7/deno/plugin-proposal-logical-assignment-operators.js": "f681ddf81d6c5fbec9ff65bd187d7ebb8ce153ca3cfed9525b227dfbe0faf545", + "https://esm.sh/v106/@babel/plugin-proposal-nullish-coalescing-operator@7.18.6/deno/plugin-proposal-nullish-coalescing-operator.js": "5969afbcd611e2c5244d07c2e73c354af63b8b629a83c0b096c0d625ce7bd64a", + "https://esm.sh/v106/@babel/plugin-proposal-numeric-separator@7.18.6/deno/plugin-proposal-numeric-separator.js": "6e8633128d3f51e48f207ba5f17f700beb412a063205074cacf1a1221b1206da", + "https://esm.sh/v106/@babel/plugin-proposal-object-rest-spread@7.20.7/deno/plugin-proposal-object-rest-spread.js": "683d05e6868edff970fb4dd9f7b420592f78d437cd4d25f811e0067da982c125", + "https://esm.sh/v106/@babel/plugin-proposal-optional-catch-binding@7.18.6/deno/plugin-proposal-optional-catch-binding.js": "f0b30640819b0e4dc243da0e842e87685e10e890cadca2b04e9c8d9ccb0e1622", + "https://esm.sh/v106/@babel/plugin-proposal-optional-chaining@7.20.7/deno/plugin-proposal-optional-chaining.js": "e3b3880b93299d4139348371fd594c023fad7651795dea795ae91f607d2252cc", + "https://esm.sh/v106/@babel/plugin-proposal-private-methods@7.18.6/deno/plugin-proposal-private-methods.js": "6191c050816f059e91cf827739afa23a8c44cdbec602474ca58aa758ca67eb73", + "https://esm.sh/v106/@babel/plugin-proposal-private-property-in-object@7.20.5/deno/plugin-proposal-private-property-in-object.js": "37b01b96563c14d47787e4d69e01b92188aeb302d36d7a6e8d0d7af1688895a4", + "https://esm.sh/v106/@babel/plugin-proposal-unicode-property-regex@7.18.6/deno/plugin-proposal-unicode-property-regex.js": "a64677e6745df204a66ca8c706b9c4baa7505320931856633fcb0ffd0049fdb1", + "https://esm.sh/v106/@babel/plugin-syntax-async-generators@7.8.4/deno/plugin-syntax-async-generators.js": "ac2a699d8df844fb8a254bc04d1f03effa17eae493a54ca86f6bfaa88619f2ba", + "https://esm.sh/v106/@babel/plugin-syntax-class-properties@7.12.13/deno/plugin-syntax-class-properties.js": "ff394862020bfe67545a7e18a92ea6284ad20b9d90125d6ad16d240611f80311", + "https://esm.sh/v106/@babel/plugin-syntax-class-static-block@7.14.5/deno/plugin-syntax-class-static-block.js": "3db9aa0c7005d643ef18cdca5ee038af50091667cd39cb969392293130e22ab6", + "https://esm.sh/v106/@babel/plugin-syntax-dynamic-import@7.8.3/deno/plugin-syntax-dynamic-import.js": "778c2b48d281339ae031231c3d7d1c72aed3dd31a83f819810016d9e01a60e0a", + "https://esm.sh/v106/@babel/plugin-syntax-export-namespace-from@7.8.3/deno/plugin-syntax-export-namespace-from.js": "bf452c9454585d44252fa2d4536918ac5dfb934b29b024e54fe8bb36e8efd61d", + "https://esm.sh/v106/@babel/plugin-syntax-import-assertions@7.20.0/deno/plugin-syntax-import-assertions.js": "13d8905d7a0c160e88546715ed141adaf75a1ab5561168d486885eb5167eca03", + "https://esm.sh/v106/@babel/plugin-syntax-json-strings@7.8.3/deno/plugin-syntax-json-strings.js": "e83fcb79cca3c44b75b9f224ce664b98bc698eba2fa5e45ce07a7282b9b4f1f0", + "https://esm.sh/v106/@babel/plugin-syntax-logical-assignment-operators@7.10.4/deno/plugin-syntax-logical-assignment-operators.js": "39220dc36c8821588572a21a01992075c8048e868b41ce301e102c7a51500590", + "https://esm.sh/v106/@babel/plugin-syntax-nullish-coalescing-operator@7.8.3/deno/plugin-syntax-nullish-coalescing-operator.js": "428ec9476e1434099cb5d8122faf91f3bf69fa974e58ab0bdf4a3761facd7d46", + "https://esm.sh/v106/@babel/plugin-syntax-numeric-separator@7.10.4/deno/plugin-syntax-numeric-separator.js": "73755ec9ca1582fa3f61edbbdf490f2017f484d31f18651ab98847b15f15be90", + "https://esm.sh/v106/@babel/plugin-syntax-object-rest-spread@7.8.3/deno/plugin-syntax-object-rest-spread.js": "241f983c19ff0f77284623f1e7caec0729205ace9199091c1b3f7ce398179fc3", + "https://esm.sh/v106/@babel/plugin-syntax-optional-catch-binding@7.8.3/deno/plugin-syntax-optional-catch-binding.js": "297197ec8806ea56e9d7e25855dcc1877392f6ee5e799346f112fb5656496b15", + "https://esm.sh/v106/@babel/plugin-syntax-optional-chaining@7.8.3/deno/plugin-syntax-optional-chaining.js": "74e9a98bb848470df8629fd5b1e23cd39b8c6acd1bd822b88e0516e65fe4831e", + "https://esm.sh/v106/@babel/plugin-syntax-private-property-in-object@7.14.5/deno/plugin-syntax-private-property-in-object.js": "f9a0ed6fc7a8e2fcf526d2a6aa93b0b460523e5858d66c5ef97da21d9a84a43d", + "https://esm.sh/v106/@babel/plugin-syntax-top-level-await@7.14.5/deno/plugin-syntax-top-level-await.js": "ba53c89fde2eb8ccad932216237caa3cc4397282af66fb45d6d449d23ca6b613", + "https://esm.sh/v106/@babel/plugin-transform-arrow-functions@7.20.7/deno/plugin-transform-arrow-functions.js": "90edef6a7717837e5e53e9a2e01ad6fa085fc2003dc7065cf10db570d99f0103", + "https://esm.sh/v106/@babel/plugin-transform-async-to-generator@7.20.7/deno/plugin-transform-async-to-generator.js": "929d261be54cd44abd2895d660c411026cf85aabe5964b67683dce4862c07c77", + "https://esm.sh/v106/@babel/plugin-transform-block-scoped-functions@7.18.6/deno/plugin-transform-block-scoped-functions.js": "4c30611e686f029eca10ecad0136590b8250039791ceacbb70912ae7573b82f0", + "https://esm.sh/v106/@babel/plugin-transform-block-scoping@7.20.15/deno/plugin-transform-block-scoping.js": "fab1c3f6ecd6d05d979606858eabb36ad1c787677366e8a8bf930d385bd8558e", + "https://esm.sh/v106/@babel/plugin-transform-classes@7.20.7/deno/plugin-transform-classes.js": "d2c3d6e8b4fb89f79eb4fd07333c5acd71e3af529df264dc169a7ed43e598ba3", + "https://esm.sh/v106/@babel/plugin-transform-computed-properties@7.20.7/deno/plugin-transform-computed-properties.js": "34fd438bb229d7bba5284f103ba93cc0a847a1cf9bb1936bf8343e2d0762d396", + "https://esm.sh/v106/@babel/plugin-transform-destructuring@7.20.7/deno/plugin-transform-destructuring.js": "241bd968ce26e3f4b2eb6bc1e50037bc0b1fe789c558cd49cdf19d38b51e6a8c", + "https://esm.sh/v106/@babel/plugin-transform-dotall-regex@7.18.6/deno/plugin-transform-dotall-regex.js": "3135e3cdb3cc6798bc3b13ab27ae7ff43ac8077b5ffc9b51f1a652e757711773", + "https://esm.sh/v106/@babel/plugin-transform-duplicate-keys@7.18.9/deno/plugin-transform-duplicate-keys.js": "61d2231a0e2bf46e1988362c3e81e53d3f0e9fe6dc31fc03b49624faa4fce268", + "https://esm.sh/v106/@babel/plugin-transform-exponentiation-operator@7.18.6/deno/plugin-transform-exponentiation-operator.js": "9d49f815beedeec74e2ef16fc34bc94e4f7ae54e6bb210a31092ea59d4310e6a", + "https://esm.sh/v106/@babel/plugin-transform-for-of@7.18.8/deno/plugin-transform-for-of.js": "7732f67f75363f5c72c44960dd66aa4f0f68a1fafb4a6f5d98135da3621cccff", + "https://esm.sh/v106/@babel/plugin-transform-function-name@7.18.9/deno/plugin-transform-function-name.js": "def66951126d94e3038ac53cfc311a5cf064fa3b18c59444580ed6f89e525dd2", + "https://esm.sh/v106/@babel/plugin-transform-literals@7.18.9/deno/plugin-transform-literals.js": "cb4db6bb4e272264f13ee0e7ff4fb97e050da94e1c95a074eef44b08404c191a", + "https://esm.sh/v106/@babel/plugin-transform-member-expression-literals@7.18.6/deno/plugin-transform-member-expression-literals.js": "f26357ca2768c2f380d1793b0b5e85d5f4e2f3a4c09d349081f464232500f02c", + "https://esm.sh/v106/@babel/plugin-transform-modules-amd@7.20.11/deno/plugin-transform-modules-amd.js": "248da9883467973352524b13ec8cb8528a624e65a1b9cc6fbb0b8781d5e02802", + "https://esm.sh/v106/@babel/plugin-transform-modules-commonjs@7.20.11/deno/plugin-transform-modules-commonjs.js": "6916bf59608dc6c771b772f2b8d63f0b8d93a6f15a33d641de3b985a2076d2be", + "https://esm.sh/v106/@babel/plugin-transform-modules-systemjs@7.20.11/deno/plugin-transform-modules-systemjs.js": "2977ff6250560bbca2633241e9ddf8f287048bf810e83e5e6a967dbf11f968e4", + "https://esm.sh/v106/@babel/plugin-transform-modules-umd@7.18.6/deno/plugin-transform-modules-umd.js": "8813bdf4862ef89f6507224a582aba350e5896ac5427a491d662bae5a81d6dd4", + "https://esm.sh/v106/@babel/plugin-transform-named-capturing-groups-regex@7.20.5/deno/plugin-transform-named-capturing-groups-regex.js": "e914fd2b4ea981a19287650633a8ed128f30c28bf0c760ea26281b1063b0916b", + "https://esm.sh/v106/@babel/plugin-transform-new-target@7.18.6/deno/plugin-transform-new-target.js": "db809fe065e3aa03d1aba3a2b58bede0a4401973a911a25ce84341fa3614e3fd", + "https://esm.sh/v106/@babel/plugin-transform-object-super@7.18.6/deno/plugin-transform-object-super.js": "a44eb2c337744722844c4980478d1f5a5fa885e4cb08954b8359896b2032e978", + "https://esm.sh/v106/@babel/plugin-transform-parameters@7.20.7/deno/plugin-transform-parameters.js": "a1c8666959b86eb132d6d0179a90b44287edc31ee7a96163a5ef05f078943c0c", + "https://esm.sh/v106/@babel/plugin-transform-property-literals@7.18.6/deno/plugin-transform-property-literals.js": "8c3dad09f0f4e6383930593cd52675efefcebca42685ebf0d9e8eff3e533ce54", + "https://esm.sh/v106/@babel/plugin-transform-regenerator@7.20.5/deno/plugin-transform-regenerator.js": "193de1e8808049ff65d90f5e1bb14e05c6958f450ec18167942c9e6e82855d36", + "https://esm.sh/v106/@babel/plugin-transform-reserved-words@7.18.6/deno/plugin-transform-reserved-words.js": "614e2bfc418b2f2cd6c5cacd9a08c299d19741df35a006412e7aa89588389b03", + "https://esm.sh/v106/@babel/plugin-transform-shorthand-properties@7.18.6/deno/plugin-transform-shorthand-properties.js": "941693a132a32942ab46588010e64920db96dfdbc781f836d32dc5b0aa91c3ab", + "https://esm.sh/v106/@babel/plugin-transform-spread@7.20.7/deno/plugin-transform-spread.js": "1ae3aa05970b603d896da456f0645d753181680f063c7d850d0b827deba1b5cf", + "https://esm.sh/v106/@babel/plugin-transform-sticky-regex@7.18.6/deno/plugin-transform-sticky-regex.js": "c31178c36e55285aedc689e566760a2f7657501cee4e10f76f5a3cf616b8d915", + "https://esm.sh/v106/@babel/plugin-transform-template-literals@7.18.9/deno/plugin-transform-template-literals.js": "8aae360f35ab90b3e4dca4d31f80903c9446fb25b87060c35571c25ec3d6033c", + "https://esm.sh/v106/@babel/plugin-transform-typeof-symbol@7.18.9/deno/plugin-transform-typeof-symbol.js": "5400741f2ce46be077ecaef2365fe1ae612646a4120843d4b18a934d55d9c2c5", + "https://esm.sh/v106/@babel/plugin-transform-unicode-escapes@7.18.10/deno/plugin-transform-unicode-escapes.js": "4f90b881d4622f584f7bd4e61f67a44e29263a4d8e7c878a91cca8506ee7be9b", + "https://esm.sh/v106/@babel/plugin-transform-unicode-regex@7.18.6/deno/plugin-transform-unicode-regex.js": "78df41f3ae70a037500ed86ffc688e6e3bb3786f1a10476c4546395370868f24", + "https://esm.sh/v106/@babel/preset-env@7.20.2/deno/preset-env.js": "ef29f9fc1f4476f0bbf911fb39f872daac8cffd9f072073f7aa7123718a50940", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-async-arrows-in-class.js": "a516a479ebefb1e1c7627148d743592d48dd4917c8d1c24bec7987266d079f19", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-edge-default-parameters.js": "039099dbb94255418dc1cd58234d3b68ad3db4300f49f76b0d1330afb895a299", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-edge-function-name.js": "49fa6f9e23b12a15be78c267d2ff7b3ffde589bf96ac2c46e6e68f17514753a1", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-safari-block-shadowing.js": "aadb4c16ffff235540a12273e24093a617ae0bb7369a1ed250f6d856525ab9ea", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-safari-for-shadowing.js": "681019328a367953a19e761fd8c3c37b1047cc7c520f0e30090c3b70bbc8b1e5", + "https://esm.sh/v106/@babel/preset-modules@0.1.5/deno/lib/plugins/transform-tagged-template-caching.js": "faba073a785d70fed5117e730fcb28578b0c7b77eda115a88594c085ff560ec1", + "https://esm.sh/v106/@babel/runtime@7.20.13/deno/helpers/interopRequireDefault.js": "8e1a7eeef2b8369e016a10b52245f2d0649693486381c13f02c30276e06e167d", + "https://esm.sh/v106/@babel/template@7.20.7/deno/template.js": "2ccd7dd3da29adf8d107eb6a8ab565ecbef8ba9a37ae9b33d67816fd43fe1a66", + "https://esm.sh/v106/@babel/traverse@7.20.13/deno/traverse.js": "2642c89955ae506047eb65462bdd500f1f30e1c3dff371d2f2f4e0f9504f076a", + "https://esm.sh/v106/@babel/types@7.20.7/deno/types.js": "2d0c385833dfb6be9a0d8e14549388df205d10a648b35098ee847a361a56b9ee", + "https://esm.sh/v106/@babel/types@7.20.7/lib/index-legacy.d.ts": "500cd3a6b69408560fd50b7386c5bf0f1a11da7ece18357c8ca5cb4f21ff9f74", + "https://esm.sh/v106/@jridgewell/gen-mapping@0.1.1/deno/gen-mapping.js": "067773c42d72867809d7bb5d5978c5929d55dbb5ece904b27ca3876026b078d5", + "https://esm.sh/v106/@jridgewell/gen-mapping@0.3.2/deno/gen-mapping.js": "c17bf536a324f55ce356ab94561dd60df73722463c4c44fdb63079556979573d", + "https://esm.sh/v106/@jridgewell/resolve-uri@3.1.0/deno/resolve-uri.js": "532be46eb58021c43ac0b7648bbb6b010aa37fbb79d14267b4c5833df63379a3", + "https://esm.sh/v106/@jridgewell/set-array@1.1.2/deno/set-array.js": "6209cc2b94c3abd764bf7e0c58d2de5a82f743b53af9c14d42481ff6a9742538", + "https://esm.sh/v106/@jridgewell/sourcemap-codec@1.4.14/deno/sourcemap-codec.js": "37c1afa7832d355bc9586ebe40edf9cfdcb728996ae4fb890b79c9a01b61e5b9", + "https://esm.sh/v106/@jridgewell/trace-mapping@0.3.17/deno/trace-mapping.js": "8f07d8d4bbb2c9c525a3e64aa6f7461db57598abba6506384acca59de6a0d17c", + "https://esm.sh/v106/@types/babel__core@7.20.0/index.d.ts": "311af0473116345d23c092587bd583263776019e906ac877bdfd809477110cf3", + "https://esm.sh/v106/@types/babel__generator@7.6.4/index.d.ts": "c465296b6632976d06d490ec7db93347ec764d2fb8577033e436a8bed919fa04", + "https://esm.sh/v106/@types/babel__preset-env@7.9.2/index.d.ts": "f59e11c58af9c0b11c963414efb620b636df11a4bac4b48f27807a620d039ec5", + "https://esm.sh/v106/@types/babel__template@7.4.1/index.d.ts": "383d4f5e1b156eb46c4ff1c90dd1e4f542a2bd25961247abe7e496721d223db8", + "https://esm.sh/v106/@types/babel__traverse@7.18.3/index.d.ts": "bb311c1adbeeb21c79a7d91a02cc2b92cc0c57a4a8ea6507c13555dc30fc8ac6", + "https://esm.sh/v106/ansi-styles@3.2.1/deno/ansi-styles.js": "a19e74151a886b6cb83263cc1e01dd8c1881833be460542067df3539f694c957", + "https://esm.sh/v106/babel-plugin-polyfill-corejs2@0.3.3/deno/babel-plugin-polyfill-corejs2.js": "aae1370982390ec0898e47b5d98a3f60dfb2f46c714448a4da97b1e6be6967b0", + "https://esm.sh/v106/babel-plugin-polyfill-corejs3@0.6.0/deno/babel-plugin-polyfill-corejs3.js": "717f1b035440818ab1d88bd2db6c9d38009be87bd081e795f2789c0ed3ec7f49", + "https://esm.sh/v106/babel-plugin-polyfill-regenerator@0.4.1/deno/babel-plugin-polyfill-regenerator.js": "4a2d620576bd0d8f9e48e31d0705ed23899a2a59193360901dafcd156cf8d654", + "https://esm.sh/v106/browserslist@4.21.5/deno/browserslist.js": "094452ac2f4b6396f2b26d62632b5769de9fa076066a9c61c7aa1a7ea8c872c1", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/data/agents.js": "e28db4a87a9877312480283b18a28f4841a45e7e6837a639c1d47ce80dd50340", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/data/browserVersions.js": "1f8f0ebfc4fe65a68e5bad4f2f75e3415528117bd66d11568247748215bd555c", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/data/browsers.js": "e1b0c785d546b8e28b11f54b0941dec17fe25ef226c5edc5f0470ffc9ad6f5fe", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/dist/unpacker/agents.js": "0ae95b170ef265f8322704851351b8ffde57f4cf779d8df2b1b4a6c372fef2b6", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/dist/unpacker/browserVersions.js": "7e14196967850f6ce88a5c41d2215e86545dafa583827f808e54ba07383b2f32", + "https://esm.sh/v106/caniuse-lite@1.0.30001449/deno/dist/unpacker/browsers.js": "c05b532893801462ecc28d14d3cf14d4e22ea59b65008189b67e260a100074c1", + "https://esm.sh/v106/chalk@2.4.2/deno/chalk.js": "66076ac347686e9733934a54aa62a915a438472c73f2ebf064066cf863978806", + "https://esm.sh/v106/color-convert@1.9.3/deno/color-convert.js": "a32a2bbf972f182309176052a9dac5ea21925b493196aeb7e6d6f6686ac5f579", + "https://esm.sh/v106/color-name@1.1.3/deno/color-name.js": "91e521e1a5dc98a5655466c457c86a163117c69edd3a9c7d23162787b35b8504", + "https://esm.sh/v106/convert-source-map@1.9.0/deno/convert-source-map.js": "03350078e3e4cf887a4932b13b4fdb507c30e10ebbb6d6d701b029377d85d36b", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/data.js": "a7e98262c919a050a97ee57537ad1e752120ce4e146d6690a8fab033aaebcf1e", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/data.json.js": "0e0b946c53a7bd8162c71608c9b51f566856c5982dc3ecaf6d261cab029a22a2", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/entries.js": "90c395818735a2897e947eb35baef3ee0d2e7d69df14905eb024eeba9f688608", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/get-modules-list-for-target-version.js": "d3753d697d565fe2b695b962f9c01c7753de1cf82961e0da84fbb245ec4e70e5", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/helpers.js": "f7bac541759b99da6de0dd841ad837e4d153cf0e862ef2a55987b0fc6015b8db", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/modules-by-versions.js": "6e1ec5c65ad0a732af3cc8503c1eb80422319c3a631d340e8cda08c03c908bb5", + "https://esm.sh/v106/core-js-compat@3.27.2/deno/modules.js": "7243d0303469ba8a05e46847720b8778a6f46dab4080b47ecae27060e1ee0830", + "https://esm.sh/v106/debug@4.3.4/deno/debug.js": "795a6ed1ee3840e120e08fdc19ccae89ef4720d5a31e6f609de684b767be991e", + "https://esm.sh/v106/electron-to-chromium@1.4.284/deno/versions.js": "e112f928d5e4b05de66687353fa9b1e684eb619cc54593628e46946634b3d384", + "https://esm.sh/v106/escape-string-regexp@1.0.5/deno/escape-string-regexp.js": "65295de159fc0f387ac0aaa220aa74b853d01972b92f3a5fbefa76e4000acaf4", + "https://esm.sh/v106/gensync@1.0.0-beta.2/deno/gensync.js": "fe4bca845682a50b402ad945ff8b91bcba67a9bd730f07f954ac892b44637faa", + "https://esm.sh/v106/globals@11.12.0/deno/globals.js": "4c2b81e111c472bb0f2e7f18265086ea9a0b4a7d59960dabff34e799172f6e4a", + "https://esm.sh/v106/js-tokens@4.0.0/deno/js-tokens.js": "9cd280862778fb89ba4584eb450f84f2719d7fcd8c230283dc57632d4de3d74e", + "https://esm.sh/v106/jsesc@2.5.2/deno/jsesc.js": "06bd1752bcefb9547fe2899f0c5b04a97a001a96a6aa683d9af6aefddf275b56", + "https://esm.sh/v106/lru-cache@5.1.1/deno/lru-cache.js": "c924a4d5489e5ae14ecfcf7b2d694f1def56e21d3397ac0ea6963d7687bd0fe6", + "https://esm.sh/v106/ms@2.1.2/deno/ms.js": "8b0c2de5da189c681bae93d8482b42402e039b6438c16a686e0339374038636e", + "https://esm.sh/v106/node-releases@2.0.8/deno/data/processed/envs.json.js": "6e25e9d5f5294a3b1253f669747fdb548391bae93ac19d0067240969731f1814", + "https://esm.sh/v106/node-releases@2.0.8/deno/data/release-schedule/release-schedule.json.js": "120b702a3f7c56c50b74927d803e703b8b0efb80c10b7f64e196c53d2be6cf5d", + "https://esm.sh/v106/regenerate@1.4.2/deno/regenerate.js": "8d91480f2b6d156bcd32cb30cc2cf7e824a2fa372c2d1da2d63e15155fa93a35", + "https://esm.sh/v106/regenerator-transform@0.15.1/deno/regenerator-transform.js": "7dc67496324034e45a89ea1e67d8d9ad249194b249b00381be216c22370002bb", + "https://esm.sh/v106/regexpu-core@5.2.2/deno/regexpu-core.js": "a89b479d923d6bbc2d7363cf55a8ba682f5f8a544ba14da9c9f3e760a3df9b8b", + "https://esm.sh/v106/regjsgen@0.7.1/deno/regjsgen.js": "0e4fe0cab56dba800d1922acaa282cfc585005a17acabe2e290ed8e22992a0df", + "https://esm.sh/v106/regjsparser@0.9.1/deno/regjsparser.js": "1d170fed8201572959ec4bd10e63700ff93c4eab652fd4b15fab22be7010bb4b", + "https://esm.sh/v106/semver@6.3.0/deno/semver.js": "9e85b448f1ee6bfff5dc450fdc8ededb077b601faefd4d0257c854f72f443505", + "https://esm.sh/v106/supports-color@5.5.0/deno/supports-color.js": "70bd789fbdf8401ce76106c5413de72c96731c2a4f3925caae8266a4db9e1889", + "https://esm.sh/v106/to-fast-properties@2.0.0/deno/to-fast-properties.js": "503b515d1f05830169bd581d4d2ff4b217189aa0dc883bf75dd11221e918fd7e", + "https://esm.sh/v106/unicode-canonical-property-names-ecmascript@2.0.0/deno/unicode-canonical-property-names-ecmascript.js": "a04bdfd4f44d792b9ede751fd52ec4587b051c4c4db9049e1fcfa496299d116e", + "https://esm.sh/v106/unicode-match-property-ecmascript@2.0.0/deno/unicode-match-property-ecmascript.js": "ac01eb940f20d960837ab542f05062fd4f3d577b0302198193b1908d8cbd5511", + "https://esm.sh/v106/unicode-match-property-value-ecmascript@2.1.0/deno/unicode-match-property-value-ecmascript.js": "c1b93dc44ec967dc1373ea3cee4ea218b8fac55357209d35b140aecae6537eef", + "https://esm.sh/v106/unicode-property-aliases-ecmascript@2.1.0/deno/unicode-property-aliases-ecmascript.js": "df94dfeea15e82b172b0a874d79d56b9525beaed10d28306393538206ab83be5", + "https://esm.sh/v106/yallist@3.1.1/deno/yallist.js": "386d8dd24347b6c2f3fbbebdfd046498ee89107e699e35067de552d904dda266" }, "npm": { - "specifiers": { "rollup": "rollup@3.7.5", "terser": "terser@5.16.1" }, + "specifiers": { + "@rollup/plugin-babel@6.0.3": "@rollup/plugin-babel@6.0.3_rollup@3.13.0", + "rollup@3.13.0": "rollup@3.13.0", + "terser@5.16.1": "terser@5.16.1" + }, "packages": { + "@ampproject/remapping@2.2.0": { + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dependencies": { + "@jridgewell/gen-mapping": "@jridgewell/gen-mapping@0.1.1", + "@jridgewell/trace-mapping": "@jridgewell/trace-mapping@0.3.17" + } + }, + "@babel/code-frame@7.18.6": { + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dependencies": { "@babel/highlight": "@babel/highlight@7.18.6" } + }, + "@babel/compat-data@7.20.14": { + "integrity": "sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw==", + "dependencies": {} + }, + "@babel/core@7.20.12": { + "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "dependencies": { + "@ampproject/remapping": "@ampproject/remapping@2.2.0", + "@babel/code-frame": "@babel/code-frame@7.18.6", + "@babel/generator": "@babel/generator@7.20.14", + "@babel/helper-compilation-targets": "@babel/helper-compilation-targets@7.20.7_@babel+core@7.20.12", + "@babel/helper-module-transforms": "@babel/helper-module-transforms@7.20.11", + "@babel/helpers": "@babel/helpers@7.20.13", + "@babel/parser": "@babel/parser@7.20.15", + "@babel/template": "@babel/template@7.20.7", + "@babel/traverse": "@babel/traverse@7.20.13", + "@babel/types": "@babel/types@7.20.7", + "convert-source-map": "convert-source-map@1.9.0", + "debug": "debug@4.3.4", + "gensync": "gensync@1.0.0-beta.2", + "json5": "json5@2.2.3", + "semver": "semver@6.3.0" + } + }, + "@babel/generator@7.20.14": { + "integrity": "sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg==", + "dependencies": { + "@babel/types": "@babel/types@7.20.7", + "@jridgewell/gen-mapping": "@jridgewell/gen-mapping@0.3.2", + "jsesc": "jsesc@2.5.2" + } + }, + "@babel/helper-compilation-targets@7.20.7_@babel+core@7.20.12": { + "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "dependencies": { + "@babel/compat-data": "@babel/compat-data@7.20.14", + "@babel/core": "@babel/core@7.20.12", + "@babel/helper-validator-option": "@babel/helper-validator-option@7.18.6", + "browserslist": "browserslist@4.21.5", + "lru-cache": "lru-cache@5.1.1", + "semver": "semver@6.3.0" + } + }, + "@babel/helper-environment-visitor@7.18.9": { + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dependencies": {} + }, + "@babel/helper-function-name@7.19.0": { + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dependencies": { + "@babel/template": "@babel/template@7.20.7", + "@babel/types": "@babel/types@7.20.7" + } + }, + "@babel/helper-hoist-variables@7.18.6": { + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dependencies": { "@babel/types": "@babel/types@7.20.7" } + }, + "@babel/helper-module-imports@7.18.6": { + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dependencies": { "@babel/types": "@babel/types@7.20.7" } + }, + "@babel/helper-module-transforms@7.20.11": { + "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", + "dependencies": { + "@babel/helper-environment-visitor": "@babel/helper-environment-visitor@7.18.9", + "@babel/helper-module-imports": "@babel/helper-module-imports@7.18.6", + "@babel/helper-simple-access": "@babel/helper-simple-access@7.20.2", + "@babel/helper-split-export-declaration": "@babel/helper-split-export-declaration@7.18.6", + "@babel/helper-validator-identifier": "@babel/helper-validator-identifier@7.19.1", + "@babel/template": "@babel/template@7.20.7", + "@babel/traverse": "@babel/traverse@7.20.13", + "@babel/types": "@babel/types@7.20.7" + } + }, + "@babel/helper-simple-access@7.20.2": { + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dependencies": { "@babel/types": "@babel/types@7.20.7" } + }, + "@babel/helper-split-export-declaration@7.18.6": { + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dependencies": { "@babel/types": "@babel/types@7.20.7" } + }, + "@babel/helper-string-parser@7.19.4": { + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dependencies": {} + }, + "@babel/helper-validator-identifier@7.19.1": { + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dependencies": {} + }, + "@babel/helper-validator-option@7.18.6": { + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dependencies": {} + }, + "@babel/helpers@7.20.13": { + "integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==", + "dependencies": { + "@babel/template": "@babel/template@7.20.7", + "@babel/traverse": "@babel/traverse@7.20.13", + "@babel/types": "@babel/types@7.20.7" + } + }, + "@babel/highlight@7.18.6": { + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dependencies": { + "@babel/helper-validator-identifier": "@babel/helper-validator-identifier@7.19.1", + "chalk": "chalk@2.4.2", + "js-tokens": "js-tokens@4.0.0" + } + }, + "@babel/parser@7.20.15": { + "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", + "dependencies": {} + }, + "@babel/template@7.20.7": { + "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "dependencies": { + "@babel/code-frame": "@babel/code-frame@7.18.6", + "@babel/parser": "@babel/parser@7.20.15", + "@babel/types": "@babel/types@7.20.7" + } + }, + "@babel/traverse@7.20.13": { + "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", + "dependencies": { + "@babel/code-frame": "@babel/code-frame@7.18.6", + "@babel/generator": "@babel/generator@7.20.14", + "@babel/helper-environment-visitor": "@babel/helper-environment-visitor@7.18.9", + "@babel/helper-function-name": "@babel/helper-function-name@7.19.0", + "@babel/helper-hoist-variables": "@babel/helper-hoist-variables@7.18.6", + "@babel/helper-split-export-declaration": "@babel/helper-split-export-declaration@7.18.6", + "@babel/parser": "@babel/parser@7.20.15", + "@babel/types": "@babel/types@7.20.7", + "debug": "debug@4.3.4", + "globals": "globals@11.12.0" + } + }, + "@babel/types@7.20.7": { + "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "dependencies": { + "@babel/helper-string-parser": "@babel/helper-string-parser@7.19.4", + "@babel/helper-validator-identifier": "@babel/helper-validator-identifier@7.19.1", + "to-fast-properties": "to-fast-properties@2.0.0" + } + }, + "@jridgewell/gen-mapping@0.1.1": { + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dependencies": { + "@jridgewell/set-array": "@jridgewell/set-array@1.1.2", + "@jridgewell/sourcemap-codec": "@jridgewell/sourcemap-codec@1.4.14" + } + }, "@jridgewell/gen-mapping@0.3.2": { "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dependencies": { @@ -252,26 +584,153 @@ "@jridgewell/sourcemap-codec": "@jridgewell/sourcemap-codec@1.4.14" } }, - "acorn@8.8.1": { - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "@rollup/plugin-babel@6.0.3_rollup@3.13.0": { + "integrity": "sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==", + "dependencies": { + "@babel/core": "@babel/core@7.20.12", + "@babel/helper-module-imports": "@babel/helper-module-imports@7.18.6", + "@rollup/pluginutils": "@rollup/pluginutils@5.0.2_rollup@3.13.0", + "rollup": "rollup@3.13.0" + } + }, + "@rollup/pluginutils@5.0.2_rollup@3.13.0": { + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "dependencies": { + "@types/estree": "@types/estree@1.0.0", + "estree-walker": "estree-walker@2.0.2", + "picomatch": "picomatch@2.3.1", + "rollup": "rollup@3.13.0" + } + }, + "@types/estree@1.0.0": { + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", + "dependencies": {} + }, + "acorn@8.8.2": { + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dependencies": {} }, + "ansi-styles@3.2.1": { + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { "color-convert": "color-convert@1.9.3" } + }, + "browserslist@4.21.5": { + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dependencies": { + "caniuse-lite": "caniuse-lite@1.0.30001450", + "electron-to-chromium": "electron-to-chromium@1.4.286", + "node-releases": "node-releases@2.0.9", + "update-browserslist-db": "update-browserslist-db@1.0.10_browserslist@4.21.5" + } + }, "buffer-from@1.1.2": { "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dependencies": {} }, + "caniuse-lite@1.0.30001450": { + "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==", + "dependencies": {} + }, + "chalk@2.4.2": { + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "ansi-styles@3.2.1", + "escape-string-regexp": "escape-string-regexp@1.0.5", + "supports-color": "supports-color@5.5.0" + } + }, + "color-convert@1.9.3": { + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { "color-name": "color-name@1.1.3" } + }, + "color-name@1.1.3": { + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dependencies": {} + }, "commander@2.20.3": { "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dependencies": {} }, + "convert-source-map@1.9.0": { + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dependencies": {} + }, + "debug@4.3.4": { + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { "ms": "ms@2.1.2" } + }, + "electron-to-chromium@1.4.286": { + "integrity": "sha512-Vp3CVhmYpgf4iXNKAucoQUDcCrBQX3XLBtwgFqP9BUXuucgvAV9zWp1kYU7LL9j4++s9O+12cb3wMtN4SJy6UQ==", + "dependencies": {} + }, + "escalade@3.1.1": { + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dependencies": {} + }, + "escape-string-regexp@1.0.5": { + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dependencies": {} + }, + "estree-walker@2.0.2": { + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dependencies": {} + }, "fsevents@2.3.2": { "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dependencies": {} }, - "rollup@3.7.5": { - "integrity": "sha512-z0ZbqHBtS/et2EEUKMrAl2CoSdwN7ZPzL17UMiKN9RjjqHShTlv7F9J6ZJZJNREYjBh3TvBrdfjkFDIXFNeuiQ==", + "gensync@1.0.0-beta.2": { + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dependencies": {} + }, + "globals@11.12.0": { + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dependencies": {} + }, + "has-flag@3.0.0": { + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dependencies": {} + }, + "js-tokens@4.0.0": { + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dependencies": {} + }, + "jsesc@2.5.2": { + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dependencies": {} + }, + "json5@2.2.3": { + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dependencies": {} + }, + "lru-cache@5.1.1": { + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { "yallist": "yallist@3.1.1" } + }, + "ms@2.1.2": { + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dependencies": {} + }, + "node-releases@2.0.9": { + "integrity": "sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==", + "dependencies": {} + }, + "picocolors@1.0.0": { + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "rollup@3.13.0": { + "integrity": "sha512-HJwQtrXAc0AmyDohTJ/2c+Bx/sWPScJLlAUJ1kuD7rAkCro8Cr2SnVB2gVYBiSLxpgD2kZ24jbyXtG++GumrYQ==", "dependencies": { "fsevents": "fsevents@2.3.2" } }, + "semver@6.3.0": { + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dependencies": {} + }, "source-map-support@0.5.21": { "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { @@ -283,14 +742,34 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dependencies": {} }, + "supports-color@5.5.0": { + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { "has-flag": "has-flag@3.0.0" } + }, "terser@5.16.1": { "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", "dependencies": { "@jridgewell/source-map": "@jridgewell/source-map@0.3.2", - "acorn": "acorn@8.8.1", + "acorn": "acorn@8.8.2", "commander": "commander@2.20.3", "source-map-support": "source-map-support@0.5.21" } + }, + "to-fast-properties@2.0.0": { + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dependencies": {} + }, + "update-browserslist-db@1.0.10_browserslist@4.21.5": { + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dependencies": { + "browserslist": "browserslist@4.21.5", + "escalade": "escalade@3.1.1", + "picocolors": "picocolors@1.0.0" + } + }, + "yallist@3.1.1": { + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dependencies": {} } } } diff --git a/dist/tinycolor-min.js b/dist/tinycolor-min.js index d2eb93b..6af34fc 100644 --- a/dist/tinycolor-min.js +++ b/dist/tinycolor-min.js @@ -1 +1 @@ -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";const t=/^\s+/,r=/\s+$/;function e(a,n){if(n=n||{},(a=a||"")instanceof e)return a;if(!(this instanceof e))return new e(a,n);var i=function(e){var a={r:0,g:0,b:0},n=1,i=null,o=null,h=null,s=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(t,"").replace(r,"").toLowerCase();var a,n=!1;if(v[e])e=v[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(a=N.rgb.exec(e))return{r:a[1],g:a[2],b:a[3]};if(a=N.rgba.exec(e))return{r:a[1],g:a[2],b:a[3],a:a[4]};if(a=N.hsl.exec(e))return{h:a[1],s:a[2],l:a[3]};if(a=N.hsla.exec(e))return{h:a[1],s:a[2],l:a[3],a:a[4]};if(a=N.hsv.exec(e))return{h:a[1],s:a[2],v:a[3]};if(a=N.hsva.exec(e))return{h:a[1],s:a[2],v:a[3],a:a[4]};if(a=N.hex8.exec(e))return{r:k(a[1]),g:k(a[2]),b:k(a[3]),a:R(a[4]),format:n?"name":"hex8"};if(a=N.hex6.exec(e))return{r:k(a[1]),g:k(a[2]),b:k(a[3]),format:n?"name":"hex"};if(a=N.hex4.exec(e))return{r:k(a[1]+""+a[1]),g:k(a[2]+""+a[2]),b:k(a[3]+""+a[3]),a:R(a[4]+""+a[4]),format:n?"name":"hex8"};if(a=N.hex3.exec(e))return{r:k(a[1]+""+a[1]),g:k(a[2]+""+a[2]),b:k(a[3]+""+a[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(T(e.r)&&T(e.g)&&T(e.b)?(u=e.r,l=e.g,c=e.b,a={r:255*x(u,255),g:255*x(l,255),b:255*x(c,255)},s=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):T(e.h)&&T(e.s)&&T(e.v)?(i=S(e.s),o=S(e.v),a=function(t,r,e){t=6*x(t,360),r=x(r,100),e=x(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),o=e*(1-n*r),h=e*(1-(1-n)*r),s=a%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(e.h,i,o),s=!0,f="hsv"):T(e.h)&&T(e.s)&&T(e.l)&&(i=S(e.s),h=S(e.l),a=function(t,r,e){var a,n,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=x(t,360),r=x(r,100),e=x(e,100),0===r)a=n=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;a=o(s,h,t+1/3),n=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(e.h,i,h),s=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var u,l,c;return n=y(n),{ok:s,format:e.format||f,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:n}}(a);this._originalInput=a,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}function a(t,r,e){t=x(t,255),r=x(r,255),e=x(e,255);var a,n,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)a=n=0;else{var s=i-o;switch(n=h>.5?s/(2-i-o):s/(i+o),i){case t:a=(r-e)/s+(r>1)+720)%360;--r;)n.h=(n.h+i)%360,o.push(e(n));return o}function _(t,r){r=r||6;for(var a=e(t).toHsv(),n=a.h,i=a.s,o=a.v,h=[],s=1/r;r--;)h.push(e({h:n,s:i,v:o})),o=(o+s)%1;return h}e.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,a=this.toRgb();return t=a.r/255,r=a.g/255,e=a.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=y(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=n(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+a+"%)":"hsva("+r+", "+e+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return i(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,a,n){var i=[w(Math.round(t).toString(16)),w(Math.round(r).toString(16)),w(Math.round(e).toString(16)),w(H(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*x(this._r,255))+"%",g:Math.round(100*x(this._g,255))+"%",b:Math.round(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%)":"rgba("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[i(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+o(this._r,this._g,this._b,this._a),a=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=e(t);a="#"+o(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+a+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,a=this._a<1&&this._a>=0;return r||!a||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return e(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(u,arguments)},brighten:function(){return this._applyModification(l,arguments)},darken:function(){return this._applyModification(c,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(s,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(p,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(m,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},e.fromRatio=function(t,r){if("object"==typeof t){var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]="a"===n?t[n]:S(t[n]));t=a}return e(t,r)},e.equals=function(t,r){return!(!t||!r)&&e(t).toRgbString()==e(r).toRgbString()},e.random=function(){return e.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},e.mix=function(t,r,a){a=0===a?0:a||50;var n=e(t).toRgb(),i=e(r).toRgb(),o=a/100;return e({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},e.readability=function(t,r){var a=e(t),n=e(r);return(Math.max(a.getLuminance(),n.getLuminance())+.05)/(Math.min(a.getLuminance(),n.getLuminance())+.05)},e.isReadable=function(t,r,a){var n,i,o=e.readability(t,r);switch(i=!1,(n=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(a)).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},e.mostReadable=function(t,r,a){var n,i,o,h,s=null,f=0;i=(a=a||{}).includeFallbackColors,o=a.level,h=a.size;for(var u=0;uf&&(f=n,s=e(r[u]));return e.isReadable(t,s,{level:o,size:h})||!i?s:(a.includeFallbackColors=!1,e.mostReadable(t,["#fff","#000"],a))};var v=e.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=e.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(v);function y(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function x(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function A(t){return Math.min(1,Math.max(0,t))}function k(t){return parseInt(t,16)}function w(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function H(t){return Math.round(255*parseFloat(t)).toString(16)}function R(t){return k(t)/255}var F,C,q,N=(C="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",q="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+C),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+C),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+C),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function T(t){return!!N.CSS_UNIT.exec(t)}return e})); \ No newline at end of file +!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/,e=/\s+$/;function n(a,i){if(i=i||{},(a=a||"")instanceof n)return a;if(!(this instanceof n))return new n(a,i);var o=function(n){var a={r:0,g:0,b:0},i=1,o=null,h=null,s=null,f=!1,u=!1;"string"==typeof n&&(n=function(t){t=t.replace(r,"").replace(e,"").toLowerCase();var n,a=!1;if(y[t])t=y[t],a=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:F(n[4]),format:a?"name":"hex8"};if(n=T.hex6.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:a?"name":"hex"};if(n=T.hex4.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:F(n[4]+""+n[4]),format:a?"name":"hex8"};if(n=T.hex3.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:a?"name":"hex"};return!1}(n));"object"==t(n)&&(E(n.r)&&E(n.g)&&E(n.b)?(l=n.r,c=n.g,d=n.b,a={r:255*A(l,255),g:255*A(c,255),b:255*A(d,255)},f=!0,u="%"===String(n.r).substr(-1)?"prgb":"rgb"):E(n.h)&&E(n.s)&&E(n.v)?(o=H(n.s),h=H(n.v),a=function(t,r,e){t=6*A(t,360),r=A(r,100),e=A(e,100);var n=Math.floor(t),a=t-n,i=e*(1-r),o=e*(1-a*r),h=e*(1-(1-a)*r),s=n%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(n.h,o,h),f=!0,u="hsv"):E(n.h)&&E(n.s)&&E(n.l)&&(o=H(n.s),s=H(n.l),a=function(t,r,e){var n,a,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=A(t,360),r=A(r,100),e=A(e,100),0===r)n=a=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;n=o(s,h,t+1/3),a=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(n.h,o,s),f=!0,u="hsl"),n.hasOwnProperty("a")&&(i=n.a));var l,c,d;return i=x(i),{ok:f,format:n.format||u,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}(a);this._originalInput=a,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function a(t,r,e){t=A(t,255),r=A(r,255),e=A(e,255);var n,a,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=h>.5?s/(2-i-o):s/(i+o),i){case t:n=(r-e)/s+(r>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(n(a));return o}function v(t,r){r=r||6;for(var e=n(t).toHsv(),a=e.h,i=e.s,o=e.v,h=[],s=1/r;r--;)h.push(n({h:a,s:i,v:o})),o=(o+s)%1;return h}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,a){var i=[S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(Math.round(e).toString(16)),S(R(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+h(this._r,this._g,this._b,this._a),e=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=n(t);e="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(p,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(r,e){if("object"==t(r)){var a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]="a"===i?r[i]:H(r[i]));r=a}return n(r,e)},n.equals=function(t,r){return!(!t||!r)&&n(t).toRgbString()==n(r).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,r,e){e=0===e?0:e||50;var a=n(t).toRgb(),i=n(r).toRgb(),o=e/100;return n({r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a})},n.readability=function(t,r){var e=n(t),a=n(r);return(Math.max(e.getLuminance(),a.getLuminance())+.05)/(Math.min(e.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,r,e){var a,i,o=n.readability(t,r);switch(i=!1,(a=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+a.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},n.mostReadable=function(t,r,e){var a,i,o,h,s=null,f=0;i=(e=e||{}).includeFallbackColors,o=e.level,h=e.size;for(var u=0;uf&&(f=a,s=n(r[u]));return n.isReadable(t,s,{level:o,size:h})||!i?s:(e.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],e))};var y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=n.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(y);function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function k(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function F(t){return w(t)/255}var C,q,N,T=(q="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",N="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(t){return!!T.CSS_UNIT.exec(t)}return n})); \ No newline at end of file diff --git a/npm/cjs/tinycolor.js b/npm/cjs/tinycolor.js index 5fc19a3..4f584ca 100644 --- a/npm/cjs/tinycolor.js +++ b/npm/cjs/tinycolor.js @@ -5,12 +5,21 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory()); })(this, (function () { 'use strict'; + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License - const trimLeft = /^\s+/; - const trimRight = /\s+$/; - + var trimLeft = /^\s+/; + var trimRight = /\s+$/; function tinycolor(color, opts) { color = color ? color : ""; opts = opts || {}; @@ -23,15 +32,8 @@ if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } - var rgb = inputToRGB(color); - (this._originalInput = color), - (this._r = rgb.r), - (this._g = rgb.g), - (this._b = rgb.b), - (this._a = rgb.a), - (this._roundA = Math.round(100 * this._a) / 100), - (this._format = opts.format || rgb.format); + this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. @@ -41,194 +43,140 @@ if (this._r < 1) this._r = Math.round(this._r); if (this._g < 1) this._g = Math.round(this._g); if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; } - tinycolor.prototype = { - isDark: function () { + isDark: function isDark() { return this.getBrightness() < 128; }, - isLight: function () { + isLight: function isLight() { return !this.isDark(); }, - isValid: function () { + isValid: function isValid() { return this._ok; }, - getOriginalInput: function () { + getOriginalInput: function getOriginalInput() { return this._originalInput; }, - getFormat: function () { + getFormat: function getFormat() { return this._format; }, - getAlpha: function () { + getAlpha: function getAlpha() { return this._a; }, - getBrightness: function () { + getBrightness: function getBrightness() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, - getLuminance: function () { + getLuminance: function getLuminance() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r / 255; GsRGB = rgb.g / 255; BsRGB = rgb.b / 255; - - if (RsRGB <= 0.03928) R = RsRGB / 12.92; - else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92; - else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92; - else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); + if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); + if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); + if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); return 0.2126 * R + 0.7152 * G + 0.0722 * B; }, - setAlpha: function (value) { + setAlpha: function setAlpha(value) { this._a = boundAlpha(value); this._roundA = Math.round(100 * this._a) / 100; return this; }, - toHsv: function () { + toHsv: function toHsv() { var hsv = rgbToHsv(this._r, this._g, this._b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + return { + h: hsv.h * 360, + s: hsv.s, + v: hsv.v, + a: this._a + }; }, - toHsvString: function () { + toHsvString: function toHsvString() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100); - return this._a == 1 - ? "hsv(" + h + ", " + s + "%, " + v + "%)" - : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; }, - toHsl: function () { + toHsl: function toHsl() { var hsl = rgbToHsl(this._r, this._g, this._b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + return { + h: hsl.h * 360, + s: hsl.s, + l: hsl.l, + a: this._a + }; }, - toHslString: function () { + toHslString: function toHslString() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100); - return this._a == 1 - ? "hsl(" + h + ", " + s + "%, " + l + "%)" - : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; }, - toHex: function (allow3Char) { + toHex: function toHex(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, - toHexString: function (allow3Char) { + toHexString: function toHexString(allow3Char) { return "#" + this.toHex(allow3Char); }, - toHex8: function (allow4Char) { + toHex8: function toHex8(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, - toHex8String: function (allow4Char) { + toHex8String: function toHex8String(allow4Char) { return "#" + this.toHex8(allow4Char); }, - toRgb: function () { + toRgb: function toRgb() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), - a: this._a, + a: this._a }; }, - toRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ")" - : "rgba(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ", " + - this._roundA + - ")"; + toRgbString: function toRgbString() { + return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; }, - toPercentageRgb: function () { + toPercentageRgb: function toPercentageRgb() { return { r: Math.round(bound01(this._r, 255) * 100) + "%", g: Math.round(bound01(this._g, 255) * 100) + "%", b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a, + a: this._a }; }, - toPercentageRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%)" - : "rgba(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%, " + - this._roundA + - ")"; + toPercentageRgbString: function toPercentageRgbString() { + return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, - toName: function () { + toName: function toName() { if (this._a === 0) { return "transparent"; } - if (this._a < 1) { return false; } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, - toFilter: function (secondColor) { + toFilter: function toFilter(secondColor) { var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { var s = tinycolor(secondColor); secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); } - - return ( - "progid:DXImageTransform.Microsoft.gradient(" + - gradientType + - "startColorstr=" + - hex8String + - ",endColorstr=" + - secondHex8String + - ")" - ); + return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; }, - toString: function (format) { + toString: function toString(format) { var formatSet = !!format; format = format || this._format; - var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = - !formatSet && - hasAlpha && - (format === "hex" || - format === "hex6" || - format === "hex3" || - format === "hex4" || - format === "hex8" || - format === "name"); - + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. @@ -264,14 +212,12 @@ if (format === "hsv") { formattedString = this.toHsvString(); } - return formattedString || this.toHexString(); }, - clone: function () { + clone: function clone() { return tinycolor(this.toString()); }, - - _applyModification: function (fn, args) { + _applyModification: function _applyModification(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; @@ -279,59 +225,58 @@ this.setAlpha(color._a); return this; }, - lighten: function () { - return this._applyModification(lighten, arguments); + lighten: function lighten() { + return this._applyModification(_lighten, arguments); }, - brighten: function () { - return this._applyModification(brighten, arguments); + brighten: function brighten() { + return this._applyModification(_brighten, arguments); }, - darken: function () { - return this._applyModification(darken, arguments); + darken: function darken() { + return this._applyModification(_darken, arguments); }, - desaturate: function () { - return this._applyModification(desaturate, arguments); + desaturate: function desaturate() { + return this._applyModification(_desaturate, arguments); }, - saturate: function () { - return this._applyModification(saturate, arguments); + saturate: function saturate() { + return this._applyModification(_saturate, arguments); }, - greyscale: function () { - return this._applyModification(greyscale, arguments); + greyscale: function greyscale() { + return this._applyModification(_greyscale, arguments); }, - spin: function () { - return this._applyModification(spin, arguments); + spin: function spin() { + return this._applyModification(_spin, arguments); }, - - _applyCombination: function (fn, args) { + _applyCombination: function _applyCombination(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, - analogous: function () { - return this._applyCombination(analogous, arguments); + analogous: function analogous() { + return this._applyCombination(_analogous, arguments); }, - complement: function () { - return this._applyCombination(complement, arguments); + complement: function complement() { + return this._applyCombination(_complement, arguments); }, - monochromatic: function () { - return this._applyCombination(monochromatic, arguments); + monochromatic: function monochromatic() { + return this._applyCombination(_monochromatic, arguments); }, - splitcomplement: function () { - return this._applyCombination(splitcomplement, arguments); + splitcomplement: function splitcomplement() { + return this._applyCombination(_splitcomplement, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { // return this._applyCombination(polyad, [number]); // }, - triad: function () { + triad: function triad() { return this._applyCombination(polyad, [3]); }, - tetrad: function () { + tetrad: function tetrad() { return this._applyCombination(polyad, [4]); - }, + } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function (color, opts) { - if (typeof color == "object") { + if (_typeof(color) == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { @@ -344,7 +289,6 @@ } color = newColor; } - return tinycolor(color, opts); }; @@ -364,63 +308,50 @@ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { - var rgb = { r: 0, g: 0, b: 0 }; + var rgb = { + r: 0, + g: 0, + b: 0 + }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; - if (typeof color == "string") { color = stringInputToObject(color); } - - if (typeof color == "object") { - if ( - isValidCSSUnit(color.r) && - isValidCSSUnit(color.g) && - isValidCSSUnit(color.b) - ) { + if (_typeof(color) == "object") { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.v) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.l) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } - if (color.hasOwnProperty("a")) { a = color.a; } } - a = boundAlpha(a); - return { ok: ok, format: color.format || format, r: Math.min(255, Math.max(rgb.r, 0)), g: Math.min(255, Math.max(rgb.g, 0)), b: Math.min(255, Math.max(rgb.b, 0)), - a: a, + a: a }; } @@ -439,7 +370,7 @@ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255, + b: bound01(b, 255) * 255 }; } @@ -451,13 +382,11 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; - if (max == min) { h = s = 0; // achromatic } else { @@ -474,11 +403,13 @@ h = (r - g) / d + 4; break; } - h /= 6; } - - return { h: h, s: s, l: l }; + return { + h: h, + s: s, + l: l + }; } // `hslToRgb` @@ -487,11 +418,9 @@ // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; - h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); - function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; @@ -500,7 +429,6 @@ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } - if (s === 0) { r = g = b = l; // achromatic } else { @@ -510,8 +438,11 @@ g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1 / 3); } - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHsv` @@ -522,16 +453,13 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; - var d = max - min; s = max === 0 ? 0 : d / max; - if (max == min) { h = 0; // achromatic } else { @@ -548,7 +476,11 @@ } h /= 6; } - return { h: h, s: s, v: v }; + return { + h: h, + s: s, + v: v + }; } // `hsvToRgb` @@ -559,7 +491,6 @@ h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); - var i = Math.floor(h), f = h - i, p = v * (1 - s), @@ -569,8 +500,11 @@ r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHex` @@ -578,22 +512,12 @@ // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; // Return a 3 character hex if possible - if ( - allow3Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) - ) { + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } - return hex.join(""); } @@ -602,26 +526,12 @@ // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - pad2(convertDecimalToHex(a)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible - if ( - allow4Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) && - hex[3].charAt(0) == hex[3].charAt(1) - ) { - return ( - hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) - ); + if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } - return hex.join(""); } @@ -629,13 +539,7 @@ // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { - var hex = [ - pad2(convertDecimalToHex(a)), - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; - + var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; return hex.join(""); } @@ -645,12 +549,11 @@ if (!color1 || !color2) return false; return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; - tinycolor.random = function () { return tinycolor.fromRatio({ r: Math.random(), g: Math.random(), - b: Math.random(), + b: Math.random() }); }; @@ -659,35 +562,31 @@ // Thanks to less.js for some of the basics here // - function desaturate(color, amount) { + function _desaturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function saturate(color, amount) { + function _saturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function greyscale(color) { + function _greyscale(color) { return tinycolor(color).desaturate(100); } - - function lighten(color, amount) { + function _lighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } - - function brighten(color, amount) { + function _brighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var rgb = tinycolor(color).toRgb(); rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); @@ -695,8 +594,7 @@ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); return tinycolor(rgb); } - - function darken(color, amount) { + function _darken(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; @@ -706,7 +604,7 @@ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. - function spin(color, amount) { + function _spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; @@ -718,12 +616,11 @@ // Thanks to jQuery xColor for some of the ideas behind these // - function complement(color) { + function _complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } - function polyad(color, number) { if (isNaN(number) || number <= 0) { throw new Error("Argument to polyad must be a positive number"); @@ -732,38 +629,40 @@ var result = [tinycolor(color)]; var step = 360 / number; for (var i = 1; i < number; i++) { - result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l })); + result.push(tinycolor({ + h: (hsl.h + i * step) % 360, + s: hsl.s, + l: hsl.l + })); } - return result; } - - function splitcomplement(color) { + function _splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }), - ]; + return [tinycolor(color), tinycolor({ + h: (h + 72) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 216) % 360, + s: hsl.s, + l: hsl.l + })]; } - - function analogous(color, results, slices) { + function _analogous(color, results, slices) { results = results || 6; slices = slices || 30; - var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; - - for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) { + for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } - - function monochromatic(color, results) { + function _monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, @@ -771,12 +670,14 @@ v = hsv.v; var ret = []; var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v })); + ret.push(tinycolor({ + h: h, + s: s, + v: v + })); v = (v + modification) % 1; } - return ret; } @@ -785,19 +686,15 @@ tinycolor.mix = function (color1, color2, amount) { amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a, + a: (rgb2.a - rgb1.a) * p + rgb1.a }; - return tinycolor(rgba); }; @@ -810,10 +707,7 @@ tinycolor.readability = function (color1, color2) { var c1 = tinycolor(color1); var c2 = tinycolor(color2); - return ( - (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / - (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05) - ); + return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05); }; // `isReadable` @@ -829,9 +723,7 @@ tinycolor.isReadable = function (color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": @@ -866,7 +758,6 @@ includeFallbackColors = args.includeFallbackColors; level = args.level; size = args.size; - for (var i = 0; i < colorList.length; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { @@ -874,14 +765,10 @@ bestColor = tinycolor(colorList[i]); } } - - if ( - tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size, - }) || - !includeFallbackColors - ) { + if (tinycolor.isReadable(baseColor, bestColor, { + level: level, + size: size + }) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors = false; @@ -892,7 +779,7 @@ // Big List of Colors // ------------------ // - var names = (tinycolor.names = { + var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", @@ -1041,11 +928,11 @@ white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", - yellowgreen: "9acd32", - }); + yellowgreen: "9acd32" + }; // Make it easy to access colors via `hexNames[hex]` - var hexNames = (tinycolor.hexNames = flip(names)); + var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- @@ -1064,18 +951,15 @@ // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { a = 1; } - return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); n = Math.min(max, Math.max(0, parseFloat(n))); @@ -1090,7 +974,7 @@ } // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); + return n % max / parseFloat(max); } // Force a number between 0 and 1 @@ -1124,7 +1008,6 @@ if (n <= 1) { n = n * 100 + "%"; } - return n; } @@ -1136,8 +1019,7 @@ function convertHexToDecimal(h) { return parseIntFromHex(h) / 255; } - - var matchers = (function () { + var matchers = function () { // var CSS_INTEGER = "[-\\+]?\\d+%?"; @@ -1150,25 +1032,8 @@ // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), @@ -1180,9 +1045,9 @@ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; - })(); + }(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit @@ -1201,7 +1066,13 @@ color = names[color]; named = true; } else if (color == "transparent") { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + return { + r: 0, + g: 0, + b: 0, + a: 0, + format: "name" + }; } // Try to match string input using regular expressions. @@ -1209,67 +1080,95 @@ // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; + if (match = matchers.rgb.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3] + }; } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; + if (match = matchers.rgba.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3], + a: match[4] + }; } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; + if (match = matchers.hsl.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3] + }; } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; + if (match = matchers.hsla.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3], + a: match[4] + }; } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; + if (match = matchers.hsv.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3] + }; } - if ((match = matchers.hsva.exec(color))) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; + if (match = matchers.hsva.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3], + a: match[4] + }; } - if ((match = matchers.hex8.exec(color))) { + if (match = matchers.hex8.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex6.exec(color))) { + if (match = matchers.hex6.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - if ((match = matchers.hex4.exec(color))) { + if (match = matchers.hex4.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex3.exec(color))) { + if (match = matchers.hex3.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - return false; } - function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; - parms = parms || { level: "AA", size: "small" }; + parms = parms || { + level: "AA", + size: "small" + }; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { @@ -1278,7 +1177,10 @@ if (size !== "small" && size !== "large") { size = "small"; } - return { level: level, size: size }; + return { + level: level, + size: size + }; } return tinycolor; diff --git a/npm/dist/tinycolor-min.js b/npm/dist/tinycolor-min.js index 3ea4dbf..14389aa 100644 --- a/npm/dist/tinycolor-min.js +++ b/npm/dist/tinycolor-min.js @@ -2,4 +2,4 @@ // It's here at this path for backwards compatibility for links to it // but the npm package now exports both CJS and ESM. // See https://github.com/bgrins/TinyColor/ for instructions. - !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";const t=/^\s+/,r=/\s+$/;function e(a,n){if(n=n||{},(a=a||"")instanceof e)return a;if(!(this instanceof e))return new e(a,n);var i=function(e){var a={r:0,g:0,b:0},n=1,i=null,o=null,h=null,s=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(t,"").replace(r,"").toLowerCase();var a,n=!1;if(v[e])e=v[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(a=N.rgb.exec(e))return{r:a[1],g:a[2],b:a[3]};if(a=N.rgba.exec(e))return{r:a[1],g:a[2],b:a[3],a:a[4]};if(a=N.hsl.exec(e))return{h:a[1],s:a[2],l:a[3]};if(a=N.hsla.exec(e))return{h:a[1],s:a[2],l:a[3],a:a[4]};if(a=N.hsv.exec(e))return{h:a[1],s:a[2],v:a[3]};if(a=N.hsva.exec(e))return{h:a[1],s:a[2],v:a[3],a:a[4]};if(a=N.hex8.exec(e))return{r:k(a[1]),g:k(a[2]),b:k(a[3]),a:R(a[4]),format:n?"name":"hex8"};if(a=N.hex6.exec(e))return{r:k(a[1]),g:k(a[2]),b:k(a[3]),format:n?"name":"hex"};if(a=N.hex4.exec(e))return{r:k(a[1]+""+a[1]),g:k(a[2]+""+a[2]),b:k(a[3]+""+a[3]),a:R(a[4]+""+a[4]),format:n?"name":"hex8"};if(a=N.hex3.exec(e))return{r:k(a[1]+""+a[1]),g:k(a[2]+""+a[2]),b:k(a[3]+""+a[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(T(e.r)&&T(e.g)&&T(e.b)?(u=e.r,l=e.g,c=e.b,a={r:255*x(u,255),g:255*x(l,255),b:255*x(c,255)},s=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):T(e.h)&&T(e.s)&&T(e.v)?(i=S(e.s),o=S(e.v),a=function(t,r,e){t=6*x(t,360),r=x(r,100),e=x(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),o=e*(1-n*r),h=e*(1-(1-n)*r),s=a%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(e.h,i,o),s=!0,f="hsv"):T(e.h)&&T(e.s)&&T(e.l)&&(i=S(e.s),h=S(e.l),a=function(t,r,e){var a,n,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=x(t,360),r=x(r,100),e=x(e,100),0===r)a=n=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;a=o(s,h,t+1/3),n=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(e.h,i,h),s=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var u,l,c;return n=y(n),{ok:s,format:e.format||f,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:n}}(a);this._originalInput=a,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}function a(t,r,e){t=x(t,255),r=x(r,255),e=x(e,255);var a,n,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)a=n=0;else{var s=i-o;switch(n=h>.5?s/(2-i-o):s/(i+o),i){case t:a=(r-e)/s+(r>1)+720)%360;--r;)n.h=(n.h+i)%360,o.push(e(n));return o}function _(t,r){r=r||6;for(var a=e(t).toHsv(),n=a.h,i=a.s,o=a.v,h=[],s=1/r;r--;)h.push(e({h:n,s:i,v:o})),o=(o+s)%1;return h}e.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,a=this.toRgb();return t=a.r/255,r=a.g/255,e=a.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=y(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=n(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+a+"%)":"hsva("+r+", "+e+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return i(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,a,n){var i=[w(Math.round(t).toString(16)),w(Math.round(r).toString(16)),w(Math.round(e).toString(16)),w(H(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*x(this._r,255))+"%",g:Math.round(100*x(this._g,255))+"%",b:Math.round(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%)":"rgba("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[i(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+o(this._r,this._g,this._b,this._a),a=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=e(t);a="#"+o(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+a+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,a=this._a<1&&this._a>=0;return r||!a||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return e(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(u,arguments)},brighten:function(){return this._applyModification(l,arguments)},darken:function(){return this._applyModification(c,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(s,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(p,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(m,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},e.fromRatio=function(t,r){if("object"==typeof t){var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]="a"===n?t[n]:S(t[n]));t=a}return e(t,r)},e.equals=function(t,r){return!(!t||!r)&&e(t).toRgbString()==e(r).toRgbString()},e.random=function(){return e.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},e.mix=function(t,r,a){a=0===a?0:a||50;var n=e(t).toRgb(),i=e(r).toRgb(),o=a/100;return e({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},e.readability=function(t,r){var a=e(t),n=e(r);return(Math.max(a.getLuminance(),n.getLuminance())+.05)/(Math.min(a.getLuminance(),n.getLuminance())+.05)},e.isReadable=function(t,r,a){var n,i,o=e.readability(t,r);switch(i=!1,(n=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(a)).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},e.mostReadable=function(t,r,a){var n,i,o,h,s=null,f=0;i=(a=a||{}).includeFallbackColors,o=a.level,h=a.size;for(var u=0;uf&&(f=n,s=e(r[u]));return e.isReadable(t,s,{level:o,size:h})||!i?s:(a.includeFallbackColors=!1,e.mostReadable(t,["#fff","#000"],a))};var v=e.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=e.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(v);function y(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function x(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function A(t){return Math.min(1,Math.max(0,t))}function k(t){return parseInt(t,16)}function w(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function H(t){return Math.round(255*parseFloat(t)).toString(16)}function R(t){return k(t)/255}var F,C,q,N=(C="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",q="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+C),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+C),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+C),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function T(t){return!!N.CSS_UNIT.exec(t)}return e})); \ No newline at end of file + !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/,e=/\s+$/;function n(a,i){if(i=i||{},(a=a||"")instanceof n)return a;if(!(this instanceof n))return new n(a,i);var o=function(n){var a={r:0,g:0,b:0},i=1,o=null,h=null,s=null,f=!1,u=!1;"string"==typeof n&&(n=function(t){t=t.replace(r,"").replace(e,"").toLowerCase();var n,a=!1;if(y[t])t=y[t],a=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:F(n[4]),format:a?"name":"hex8"};if(n=T.hex6.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:a?"name":"hex"};if(n=T.hex4.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:F(n[4]+""+n[4]),format:a?"name":"hex8"};if(n=T.hex3.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:a?"name":"hex"};return!1}(n));"object"==t(n)&&(E(n.r)&&E(n.g)&&E(n.b)?(l=n.r,c=n.g,d=n.b,a={r:255*A(l,255),g:255*A(c,255),b:255*A(d,255)},f=!0,u="%"===String(n.r).substr(-1)?"prgb":"rgb"):E(n.h)&&E(n.s)&&E(n.v)?(o=H(n.s),h=H(n.v),a=function(t,r,e){t=6*A(t,360),r=A(r,100),e=A(e,100);var n=Math.floor(t),a=t-n,i=e*(1-r),o=e*(1-a*r),h=e*(1-(1-a)*r),s=n%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(n.h,o,h),f=!0,u="hsv"):E(n.h)&&E(n.s)&&E(n.l)&&(o=H(n.s),s=H(n.l),a=function(t,r,e){var n,a,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=A(t,360),r=A(r,100),e=A(e,100),0===r)n=a=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;n=o(s,h,t+1/3),a=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(n.h,o,s),f=!0,u="hsl"),n.hasOwnProperty("a")&&(i=n.a));var l,c,d;return i=x(i),{ok:f,format:n.format||u,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}(a);this._originalInput=a,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function a(t,r,e){t=A(t,255),r=A(r,255),e=A(e,255);var n,a,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=h>.5?s/(2-i-o):s/(i+o),i){case t:n=(r-e)/s+(r>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(n(a));return o}function v(t,r){r=r||6;for(var e=n(t).toHsv(),a=e.h,i=e.s,o=e.v,h=[],s=1/r;r--;)h.push(n({h:a,s:i,v:o})),o=(o+s)%1;return h}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,a){var i=[S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(Math.round(e).toString(16)),S(R(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+h(this._r,this._g,this._b,this._a),e=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=n(t);e="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(p,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(r,e){if("object"==t(r)){var a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]="a"===i?r[i]:H(r[i]));r=a}return n(r,e)},n.equals=function(t,r){return!(!t||!r)&&n(t).toRgbString()==n(r).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,r,e){e=0===e?0:e||50;var a=n(t).toRgb(),i=n(r).toRgb(),o=e/100;return n({r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a})},n.readability=function(t,r){var e=n(t),a=n(r);return(Math.max(e.getLuminance(),a.getLuminance())+.05)/(Math.min(e.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,r,e){var a,i,o=n.readability(t,r);switch(i=!1,(a=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+a.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},n.mostReadable=function(t,r,e){var a,i,o,h,s=null,f=0;i=(e=e||{}).includeFallbackColors,o=e.level,h=e.size;for(var u=0;uf&&(f=a,s=n(r[u]));return n.isReadable(t,s,{level:o,size:h})||!i?s:(e.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],e))};var y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=n.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(y);function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function k(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function F(t){return w(t)/255}var C,q,N,T=(q="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",N="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(t){return!!T.CSS_UNIT.exec(t)}return n})); \ No newline at end of file diff --git a/npm/esm/tinycolor.js b/npm/esm/tinycolor.js index 04c6bde..374f5ea 100644 --- a/npm/esm/tinycolor.js +++ b/npm/esm/tinycolor.js @@ -1,10 +1,19 @@ // This file is autogenerated. It's used to publish ESM to npm. +function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); +} + // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License -const trimLeft = /^\s+/; -const trimRight = /\s+$/; - +var trimLeft = /^\s+/; +var trimRight = /\s+$/; function tinycolor(color, opts) { color = color ? color : ""; opts = opts || {}; @@ -17,15 +26,8 @@ function tinycolor(color, opts) { if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } - var rgb = inputToRGB(color); - (this._originalInput = color), - (this._r = rgb.r), - (this._g = rgb.g), - (this._b = rgb.b), - (this._a = rgb.a), - (this._roundA = Math.round(100 * this._a) / 100), - (this._format = opts.format || rgb.format); + this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. @@ -35,194 +37,140 @@ function tinycolor(color, opts) { if (this._r < 1) this._r = Math.round(this._r); if (this._g < 1) this._g = Math.round(this._g); if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; } - tinycolor.prototype = { - isDark: function () { + isDark: function isDark() { return this.getBrightness() < 128; }, - isLight: function () { + isLight: function isLight() { return !this.isDark(); }, - isValid: function () { + isValid: function isValid() { return this._ok; }, - getOriginalInput: function () { + getOriginalInput: function getOriginalInput() { return this._originalInput; }, - getFormat: function () { + getFormat: function getFormat() { return this._format; }, - getAlpha: function () { + getAlpha: function getAlpha() { return this._a; }, - getBrightness: function () { + getBrightness: function getBrightness() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, - getLuminance: function () { + getLuminance: function getLuminance() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r / 255; GsRGB = rgb.g / 255; BsRGB = rgb.b / 255; - - if (RsRGB <= 0.03928) R = RsRGB / 12.92; - else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92; - else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92; - else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); + if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); + if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); + if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); return 0.2126 * R + 0.7152 * G + 0.0722 * B; }, - setAlpha: function (value) { + setAlpha: function setAlpha(value) { this._a = boundAlpha(value); this._roundA = Math.round(100 * this._a) / 100; return this; }, - toHsv: function () { + toHsv: function toHsv() { var hsv = rgbToHsv(this._r, this._g, this._b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + return { + h: hsv.h * 360, + s: hsv.s, + v: hsv.v, + a: this._a + }; }, - toHsvString: function () { + toHsvString: function toHsvString() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100); - return this._a == 1 - ? "hsv(" + h + ", " + s + "%, " + v + "%)" - : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; }, - toHsl: function () { + toHsl: function toHsl() { var hsl = rgbToHsl(this._r, this._g, this._b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + return { + h: hsl.h * 360, + s: hsl.s, + l: hsl.l, + a: this._a + }; }, - toHslString: function () { + toHslString: function toHslString() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100); - return this._a == 1 - ? "hsl(" + h + ", " + s + "%, " + l + "%)" - : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; }, - toHex: function (allow3Char) { + toHex: function toHex(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, - toHexString: function (allow3Char) { + toHexString: function toHexString(allow3Char) { return "#" + this.toHex(allow3Char); }, - toHex8: function (allow4Char) { + toHex8: function toHex8(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, - toHex8String: function (allow4Char) { + toHex8String: function toHex8String(allow4Char) { return "#" + this.toHex8(allow4Char); }, - toRgb: function () { + toRgb: function toRgb() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), - a: this._a, + a: this._a }; }, - toRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ")" - : "rgba(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ", " + - this._roundA + - ")"; + toRgbString: function toRgbString() { + return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; }, - toPercentageRgb: function () { + toPercentageRgb: function toPercentageRgb() { return { r: Math.round(bound01(this._r, 255) * 100) + "%", g: Math.round(bound01(this._g, 255) * 100) + "%", b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a, + a: this._a }; }, - toPercentageRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%)" - : "rgba(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%, " + - this._roundA + - ")"; + toPercentageRgbString: function toPercentageRgbString() { + return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, - toName: function () { + toName: function toName() { if (this._a === 0) { return "transparent"; } - if (this._a < 1) { return false; } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, - toFilter: function (secondColor) { + toFilter: function toFilter(secondColor) { var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { var s = tinycolor(secondColor); secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); } - - return ( - "progid:DXImageTransform.Microsoft.gradient(" + - gradientType + - "startColorstr=" + - hex8String + - ",endColorstr=" + - secondHex8String + - ")" - ); + return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; }, - toString: function (format) { + toString: function toString(format) { var formatSet = !!format; format = format || this._format; - var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = - !formatSet && - hasAlpha && - (format === "hex" || - format === "hex6" || - format === "hex3" || - format === "hex4" || - format === "hex8" || - format === "name"); - + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. @@ -258,14 +206,12 @@ tinycolor.prototype = { if (format === "hsv") { formattedString = this.toHsvString(); } - return formattedString || this.toHexString(); }, - clone: function () { + clone: function clone() { return tinycolor(this.toString()); }, - - _applyModification: function (fn, args) { + _applyModification: function _applyModification(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; @@ -273,59 +219,58 @@ tinycolor.prototype = { this.setAlpha(color._a); return this; }, - lighten: function () { - return this._applyModification(lighten, arguments); + lighten: function lighten() { + return this._applyModification(_lighten, arguments); }, - brighten: function () { - return this._applyModification(brighten, arguments); + brighten: function brighten() { + return this._applyModification(_brighten, arguments); }, - darken: function () { - return this._applyModification(darken, arguments); + darken: function darken() { + return this._applyModification(_darken, arguments); }, - desaturate: function () { - return this._applyModification(desaturate, arguments); + desaturate: function desaturate() { + return this._applyModification(_desaturate, arguments); }, - saturate: function () { - return this._applyModification(saturate, arguments); + saturate: function saturate() { + return this._applyModification(_saturate, arguments); }, - greyscale: function () { - return this._applyModification(greyscale, arguments); + greyscale: function greyscale() { + return this._applyModification(_greyscale, arguments); }, - spin: function () { - return this._applyModification(spin, arguments); + spin: function spin() { + return this._applyModification(_spin, arguments); }, - - _applyCombination: function (fn, args) { + _applyCombination: function _applyCombination(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, - analogous: function () { - return this._applyCombination(analogous, arguments); + analogous: function analogous() { + return this._applyCombination(_analogous, arguments); }, - complement: function () { - return this._applyCombination(complement, arguments); + complement: function complement() { + return this._applyCombination(_complement, arguments); }, - monochromatic: function () { - return this._applyCombination(monochromatic, arguments); + monochromatic: function monochromatic() { + return this._applyCombination(_monochromatic, arguments); }, - splitcomplement: function () { - return this._applyCombination(splitcomplement, arguments); + splitcomplement: function splitcomplement() { + return this._applyCombination(_splitcomplement, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { // return this._applyCombination(polyad, [number]); // }, - triad: function () { + triad: function triad() { return this._applyCombination(polyad, [3]); }, - tetrad: function () { + tetrad: function tetrad() { return this._applyCombination(polyad, [4]); - }, + } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function (color, opts) { - if (typeof color == "object") { + if (_typeof(color) == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { @@ -338,7 +283,6 @@ tinycolor.fromRatio = function (color, opts) { } color = newColor; } - return tinycolor(color, opts); }; @@ -358,63 +302,50 @@ tinycolor.fromRatio = function (color, opts) { // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { - var rgb = { r: 0, g: 0, b: 0 }; + var rgb = { + r: 0, + g: 0, + b: 0 + }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; - if (typeof color == "string") { color = stringInputToObject(color); } - - if (typeof color == "object") { - if ( - isValidCSSUnit(color.r) && - isValidCSSUnit(color.g) && - isValidCSSUnit(color.b) - ) { + if (_typeof(color) == "object") { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.v) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.l) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } - if (color.hasOwnProperty("a")) { a = color.a; } } - a = boundAlpha(a); - return { ok: ok, format: color.format || format, r: Math.min(255, Math.max(rgb.r, 0)), g: Math.min(255, Math.max(rgb.g, 0)), b: Math.min(255, Math.max(rgb.b, 0)), - a: a, + a: a }; } @@ -433,7 +364,7 @@ function rgbToRgb(r, g, b) { return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255, + b: bound01(b, 255) * 255 }; } @@ -445,13 +376,11 @@ function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; - if (max == min) { h = s = 0; // achromatic } else { @@ -468,11 +397,13 @@ function rgbToHsl(r, g, b) { h = (r - g) / d + 4; break; } - h /= 6; } - - return { h: h, s: s, l: l }; + return { + h: h, + s: s, + l: l + }; } // `hslToRgb` @@ -481,11 +412,9 @@ function rgbToHsl(r, g, b) { // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; - h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); - function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; @@ -494,7 +423,6 @@ function hslToRgb(h, s, l) { if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } - if (s === 0) { r = g = b = l; // achromatic } else { @@ -504,8 +432,11 @@ function hslToRgb(h, s, l) { g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1 / 3); } - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHsv` @@ -516,16 +447,13 @@ function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; - var d = max - min; s = max === 0 ? 0 : d / max; - if (max == min) { h = 0; // achromatic } else { @@ -542,7 +470,11 @@ function rgbToHsv(r, g, b) { } h /= 6; } - return { h: h, s: s, v: v }; + return { + h: h, + s: s, + v: v + }; } // `hsvToRgb` @@ -553,7 +485,6 @@ function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); - var i = Math.floor(h), f = h - i, p = v * (1 - s), @@ -563,8 +494,11 @@ function hsvToRgb(h, s, v) { r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHex` @@ -572,22 +506,12 @@ function hsvToRgb(h, s, v) { // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; // Return a 3 character hex if possible - if ( - allow3Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) - ) { + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } - return hex.join(""); } @@ -596,26 +520,12 @@ function rgbToHex(r, g, b, allow3Char) { // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - pad2(convertDecimalToHex(a)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible - if ( - allow4Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) && - hex[3].charAt(0) == hex[3].charAt(1) - ) { - return ( - hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) - ); + if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } - return hex.join(""); } @@ -623,13 +533,7 @@ function rgbaToHex(r, g, b, a, allow4Char) { // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { - var hex = [ - pad2(convertDecimalToHex(a)), - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; - + var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; return hex.join(""); } @@ -639,12 +543,11 @@ tinycolor.equals = function (color1, color2) { if (!color1 || !color2) return false; return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; - tinycolor.random = function () { return tinycolor.fromRatio({ r: Math.random(), g: Math.random(), - b: Math.random(), + b: Math.random() }); }; @@ -653,35 +556,31 @@ tinycolor.random = function () { // Thanks to less.js for some of the basics here // -function desaturate(color, amount) { +function _desaturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - -function saturate(color, amount) { +function _saturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - -function greyscale(color) { +function _greyscale(color) { return tinycolor(color).desaturate(100); } - -function lighten(color, amount) { +function _lighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } - -function brighten(color, amount) { +function _brighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var rgb = tinycolor(color).toRgb(); rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); @@ -689,8 +588,7 @@ function brighten(color, amount) { rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); return tinycolor(rgb); } - -function darken(color, amount) { +function _darken(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; @@ -700,7 +598,7 @@ function darken(color, amount) { // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. -function spin(color, amount) { +function _spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; @@ -712,12 +610,11 @@ function spin(color, amount) { // Thanks to jQuery xColor for some of the ideas behind these // -function complement(color) { +function _complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } - function polyad(color, number) { if (isNaN(number) || number <= 0) { throw new Error("Argument to polyad must be a positive number"); @@ -726,38 +623,40 @@ function polyad(color, number) { var result = [tinycolor(color)]; var step = 360 / number; for (var i = 1; i < number; i++) { - result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l })); + result.push(tinycolor({ + h: (hsl.h + i * step) % 360, + s: hsl.s, + l: hsl.l + })); } - return result; } - -function splitcomplement(color) { +function _splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }), - ]; + return [tinycolor(color), tinycolor({ + h: (h + 72) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 216) % 360, + s: hsl.s, + l: hsl.l + })]; } - -function analogous(color, results, slices) { +function _analogous(color, results, slices) { results = results || 6; slices = slices || 30; - var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; - - for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) { + for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } - -function monochromatic(color, results) { +function _monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, @@ -765,12 +664,14 @@ function monochromatic(color, results) { v = hsv.v; var ret = []; var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v })); + ret.push(tinycolor({ + h: h, + s: s, + v: v + })); v = (v + modification) % 1; } - return ret; } @@ -779,19 +680,15 @@ function monochromatic(color, results) { tinycolor.mix = function (color1, color2, amount) { amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a, + a: (rgb2.a - rgb1.a) * p + rgb1.a }; - return tinycolor(rgba); }; @@ -804,10 +701,7 @@ tinycolor.mix = function (color1, color2, amount) { tinycolor.readability = function (color1, color2) { var c1 = tinycolor(color1); var c2 = tinycolor(color2); - return ( - (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / - (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05) - ); + return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05); }; // `isReadable` @@ -823,9 +717,7 @@ tinycolor.readability = function (color1, color2) { tinycolor.isReadable = function (color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": @@ -860,7 +752,6 @@ tinycolor.mostReadable = function (baseColor, colorList, args) { includeFallbackColors = args.includeFallbackColors; level = args.level; size = args.size; - for (var i = 0; i < colorList.length; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { @@ -868,14 +759,10 @@ tinycolor.mostReadable = function (baseColor, colorList, args) { bestColor = tinycolor(colorList[i]); } } - - if ( - tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size, - }) || - !includeFallbackColors - ) { + if (tinycolor.isReadable(baseColor, bestColor, { + level: level, + size: size + }) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors = false; @@ -886,7 +773,7 @@ tinycolor.mostReadable = function (baseColor, colorList, args) { // Big List of Colors // ------------------ // -var names = (tinycolor.names = { +var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", @@ -1035,11 +922,11 @@ var names = (tinycolor.names = { white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", - yellowgreen: "9acd32", -}); + yellowgreen: "9acd32" +}; // Make it easy to access colors via `hexNames[hex]` -var hexNames = (tinycolor.hexNames = flip(names)); +var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- @@ -1058,18 +945,15 @@ function flip(o) { // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { a = 1; } - return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); n = Math.min(max, Math.max(0, parseFloat(n))); @@ -1084,7 +968,7 @@ function bound01(n, max) { } // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); + return n % max / parseFloat(max); } // Force a number between 0 and 1 @@ -1118,7 +1002,6 @@ function convertToPercentage(n) { if (n <= 1) { n = n * 100 + "%"; } - return n; } @@ -1130,8 +1013,7 @@ function convertDecimalToHex(d) { function convertHexToDecimal(h) { return parseIntFromHex(h) / 255; } - -var matchers = (function () { +var matchers = function () { // var CSS_INTEGER = "[-\\+]?\\d+%?"; @@ -1144,25 +1026,8 @@ var matchers = (function () { // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), @@ -1174,9 +1039,9 @@ var matchers = (function () { hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; -})(); +}(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit @@ -1195,7 +1060,13 @@ function stringInputToObject(color) { color = names[color]; named = true; } else if (color == "transparent") { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + return { + r: 0, + g: 0, + b: 0, + a: 0, + format: "name" + }; } // Try to match string input using regular expressions. @@ -1203,67 +1074,95 @@ function stringInputToObject(color) { // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; + if (match = matchers.rgb.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3] + }; } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; + if (match = matchers.rgba.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3], + a: match[4] + }; } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; + if (match = matchers.hsl.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3] + }; } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; + if (match = matchers.hsla.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3], + a: match[4] + }; } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; + if (match = matchers.hsv.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3] + }; } - if ((match = matchers.hsva.exec(color))) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; + if (match = matchers.hsva.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3], + a: match[4] + }; } - if ((match = matchers.hex8.exec(color))) { + if (match = matchers.hex8.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex6.exec(color))) { + if (match = matchers.hex6.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - if ((match = matchers.hex4.exec(color))) { + if (match = matchers.hex4.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex3.exec(color))) { + if (match = matchers.hex3.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - return false; } - function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; - parms = parms || { level: "AA", size: "small" }; + parms = parms || { + level: "AA", + size: "small" + }; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { @@ -1272,7 +1171,10 @@ function validateWCAG2Parms(parms) { if (size !== "small" && size !== "large") { size = "small"; } - return { level: level, size: size }; + return { + level: level, + size: size + }; } export { tinycolor as default }; diff --git a/npm/tinycolor.js b/npm/tinycolor.js index 43c7009..52601df 100644 --- a/npm/tinycolor.js +++ b/npm/tinycolor.js @@ -8,12 +8,21 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory()); })(this, (function () { 'use strict'; + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License - const trimLeft = /^\s+/; - const trimRight = /\s+$/; - + var trimLeft = /^\s+/; + var trimRight = /\s+$/; function tinycolor(color, opts) { color = color ? color : ""; opts = opts || {}; @@ -26,15 +35,8 @@ if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } - var rgb = inputToRGB(color); - (this._originalInput = color), - (this._r = rgb.r), - (this._g = rgb.g), - (this._b = rgb.b), - (this._a = rgb.a), - (this._roundA = Math.round(100 * this._a) / 100), - (this._format = opts.format || rgb.format); + this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. @@ -44,194 +46,140 @@ if (this._r < 1) this._r = Math.round(this._r); if (this._g < 1) this._g = Math.round(this._g); if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; } - tinycolor.prototype = { - isDark: function () { + isDark: function isDark() { return this.getBrightness() < 128; }, - isLight: function () { + isLight: function isLight() { return !this.isDark(); }, - isValid: function () { + isValid: function isValid() { return this._ok; }, - getOriginalInput: function () { + getOriginalInput: function getOriginalInput() { return this._originalInput; }, - getFormat: function () { + getFormat: function getFormat() { return this._format; }, - getAlpha: function () { + getAlpha: function getAlpha() { return this._a; }, - getBrightness: function () { + getBrightness: function getBrightness() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, - getLuminance: function () { + getLuminance: function getLuminance() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r / 255; GsRGB = rgb.g / 255; BsRGB = rgb.b / 255; - - if (RsRGB <= 0.03928) R = RsRGB / 12.92; - else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92; - else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92; - else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); + if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); + if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); + if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); return 0.2126 * R + 0.7152 * G + 0.0722 * B; }, - setAlpha: function (value) { + setAlpha: function setAlpha(value) { this._a = boundAlpha(value); this._roundA = Math.round(100 * this._a) / 100; return this; }, - toHsv: function () { + toHsv: function toHsv() { var hsv = rgbToHsv(this._r, this._g, this._b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + return { + h: hsv.h * 360, + s: hsv.s, + v: hsv.v, + a: this._a + }; }, - toHsvString: function () { + toHsvString: function toHsvString() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100); - return this._a == 1 - ? "hsv(" + h + ", " + s + "%, " + v + "%)" - : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; }, - toHsl: function () { + toHsl: function toHsl() { var hsl = rgbToHsl(this._r, this._g, this._b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + return { + h: hsl.h * 360, + s: hsl.s, + l: hsl.l, + a: this._a + }; }, - toHslString: function () { + toHslString: function toHslString() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100); - return this._a == 1 - ? "hsl(" + h + ", " + s + "%, " + l + "%)" - : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; }, - toHex: function (allow3Char) { + toHex: function toHex(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, - toHexString: function (allow3Char) { + toHexString: function toHexString(allow3Char) { return "#" + this.toHex(allow3Char); }, - toHex8: function (allow4Char) { + toHex8: function toHex8(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, - toHex8String: function (allow4Char) { + toHex8String: function toHex8String(allow4Char) { return "#" + this.toHex8(allow4Char); }, - toRgb: function () { + toRgb: function toRgb() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), - a: this._a, + a: this._a }; }, - toRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ")" - : "rgba(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ", " + - this._roundA + - ")"; + toRgbString: function toRgbString() { + return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; }, - toPercentageRgb: function () { + toPercentageRgb: function toPercentageRgb() { return { r: Math.round(bound01(this._r, 255) * 100) + "%", g: Math.round(bound01(this._g, 255) * 100) + "%", b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a, + a: this._a }; }, - toPercentageRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%)" - : "rgba(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%, " + - this._roundA + - ")"; + toPercentageRgbString: function toPercentageRgbString() { + return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, - toName: function () { + toName: function toName() { if (this._a === 0) { return "transparent"; } - if (this._a < 1) { return false; } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, - toFilter: function (secondColor) { + toFilter: function toFilter(secondColor) { var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { var s = tinycolor(secondColor); secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); } - - return ( - "progid:DXImageTransform.Microsoft.gradient(" + - gradientType + - "startColorstr=" + - hex8String + - ",endColorstr=" + - secondHex8String + - ")" - ); + return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; }, - toString: function (format) { + toString: function toString(format) { var formatSet = !!format; format = format || this._format; - var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = - !formatSet && - hasAlpha && - (format === "hex" || - format === "hex6" || - format === "hex3" || - format === "hex4" || - format === "hex8" || - format === "name"); - + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. @@ -267,14 +215,12 @@ if (format === "hsv") { formattedString = this.toHsvString(); } - return formattedString || this.toHexString(); }, - clone: function () { + clone: function clone() { return tinycolor(this.toString()); }, - - _applyModification: function (fn, args) { + _applyModification: function _applyModification(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; @@ -282,59 +228,58 @@ this.setAlpha(color._a); return this; }, - lighten: function () { - return this._applyModification(lighten, arguments); + lighten: function lighten() { + return this._applyModification(_lighten, arguments); }, - brighten: function () { - return this._applyModification(brighten, arguments); + brighten: function brighten() { + return this._applyModification(_brighten, arguments); }, - darken: function () { - return this._applyModification(darken, arguments); + darken: function darken() { + return this._applyModification(_darken, arguments); }, - desaturate: function () { - return this._applyModification(desaturate, arguments); + desaturate: function desaturate() { + return this._applyModification(_desaturate, arguments); }, - saturate: function () { - return this._applyModification(saturate, arguments); + saturate: function saturate() { + return this._applyModification(_saturate, arguments); }, - greyscale: function () { - return this._applyModification(greyscale, arguments); + greyscale: function greyscale() { + return this._applyModification(_greyscale, arguments); }, - spin: function () { - return this._applyModification(spin, arguments); + spin: function spin() { + return this._applyModification(_spin, arguments); }, - - _applyCombination: function (fn, args) { + _applyCombination: function _applyCombination(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, - analogous: function () { - return this._applyCombination(analogous, arguments); + analogous: function analogous() { + return this._applyCombination(_analogous, arguments); }, - complement: function () { - return this._applyCombination(complement, arguments); + complement: function complement() { + return this._applyCombination(_complement, arguments); }, - monochromatic: function () { - return this._applyCombination(monochromatic, arguments); + monochromatic: function monochromatic() { + return this._applyCombination(_monochromatic, arguments); }, - splitcomplement: function () { - return this._applyCombination(splitcomplement, arguments); + splitcomplement: function splitcomplement() { + return this._applyCombination(_splitcomplement, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { // return this._applyCombination(polyad, [number]); // }, - triad: function () { + triad: function triad() { return this._applyCombination(polyad, [3]); }, - tetrad: function () { + tetrad: function tetrad() { return this._applyCombination(polyad, [4]); - }, + } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function (color, opts) { - if (typeof color == "object") { + if (_typeof(color) == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { @@ -347,7 +292,6 @@ } color = newColor; } - return tinycolor(color, opts); }; @@ -367,63 +311,50 @@ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { - var rgb = { r: 0, g: 0, b: 0 }; + var rgb = { + r: 0, + g: 0, + b: 0 + }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; - if (typeof color == "string") { color = stringInputToObject(color); } - - if (typeof color == "object") { - if ( - isValidCSSUnit(color.r) && - isValidCSSUnit(color.g) && - isValidCSSUnit(color.b) - ) { + if (_typeof(color) == "object") { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.v) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.l) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } - if (color.hasOwnProperty("a")) { a = color.a; } } - a = boundAlpha(a); - return { ok: ok, format: color.format || format, r: Math.min(255, Math.max(rgb.r, 0)), g: Math.min(255, Math.max(rgb.g, 0)), b: Math.min(255, Math.max(rgb.b, 0)), - a: a, + a: a }; } @@ -442,7 +373,7 @@ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255, + b: bound01(b, 255) * 255 }; } @@ -454,13 +385,11 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; - if (max == min) { h = s = 0; // achromatic } else { @@ -477,11 +406,13 @@ h = (r - g) / d + 4; break; } - h /= 6; } - - return { h: h, s: s, l: l }; + return { + h: h, + s: s, + l: l + }; } // `hslToRgb` @@ -490,11 +421,9 @@ // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; - h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); - function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; @@ -503,7 +432,6 @@ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } - if (s === 0) { r = g = b = l; // achromatic } else { @@ -513,8 +441,11 @@ g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1 / 3); } - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHsv` @@ -525,16 +456,13 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; - var d = max - min; s = max === 0 ? 0 : d / max; - if (max == min) { h = 0; // achromatic } else { @@ -551,7 +479,11 @@ } h /= 6; } - return { h: h, s: s, v: v }; + return { + h: h, + s: s, + v: v + }; } // `hsvToRgb` @@ -562,7 +494,6 @@ h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); - var i = Math.floor(h), f = h - i, p = v * (1 - s), @@ -572,8 +503,11 @@ r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHex` @@ -581,22 +515,12 @@ // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; // Return a 3 character hex if possible - if ( - allow3Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) - ) { + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } - return hex.join(""); } @@ -605,26 +529,12 @@ // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - pad2(convertDecimalToHex(a)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible - if ( - allow4Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) && - hex[3].charAt(0) == hex[3].charAt(1) - ) { - return ( - hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) - ); + if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } - return hex.join(""); } @@ -632,13 +542,7 @@ // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { - var hex = [ - pad2(convertDecimalToHex(a)), - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; - + var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; return hex.join(""); } @@ -648,12 +552,11 @@ if (!color1 || !color2) return false; return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; - tinycolor.random = function () { return tinycolor.fromRatio({ r: Math.random(), g: Math.random(), - b: Math.random(), + b: Math.random() }); }; @@ -662,35 +565,31 @@ // Thanks to less.js for some of the basics here // - function desaturate(color, amount) { + function _desaturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function saturate(color, amount) { + function _saturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function greyscale(color) { + function _greyscale(color) { return tinycolor(color).desaturate(100); } - - function lighten(color, amount) { + function _lighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } - - function brighten(color, amount) { + function _brighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var rgb = tinycolor(color).toRgb(); rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); @@ -698,8 +597,7 @@ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); return tinycolor(rgb); } - - function darken(color, amount) { + function _darken(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; @@ -709,7 +607,7 @@ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. - function spin(color, amount) { + function _spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; @@ -721,12 +619,11 @@ // Thanks to jQuery xColor for some of the ideas behind these // - function complement(color) { + function _complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } - function polyad(color, number) { if (isNaN(number) || number <= 0) { throw new Error("Argument to polyad must be a positive number"); @@ -735,38 +632,40 @@ var result = [tinycolor(color)]; var step = 360 / number; for (var i = 1; i < number; i++) { - result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l })); + result.push(tinycolor({ + h: (hsl.h + i * step) % 360, + s: hsl.s, + l: hsl.l + })); } - return result; } - - function splitcomplement(color) { + function _splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }), - ]; + return [tinycolor(color), tinycolor({ + h: (h + 72) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 216) % 360, + s: hsl.s, + l: hsl.l + })]; } - - function analogous(color, results, slices) { + function _analogous(color, results, slices) { results = results || 6; slices = slices || 30; - var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; - - for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) { + for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } - - function monochromatic(color, results) { + function _monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, @@ -774,12 +673,14 @@ v = hsv.v; var ret = []; var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v })); + ret.push(tinycolor({ + h: h, + s: s, + v: v + })); v = (v + modification) % 1; } - return ret; } @@ -788,19 +689,15 @@ tinycolor.mix = function (color1, color2, amount) { amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a, + a: (rgb2.a - rgb1.a) * p + rgb1.a }; - return tinycolor(rgba); }; @@ -813,10 +710,7 @@ tinycolor.readability = function (color1, color2) { var c1 = tinycolor(color1); var c2 = tinycolor(color2); - return ( - (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / - (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05) - ); + return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05); }; // `isReadable` @@ -832,9 +726,7 @@ tinycolor.isReadable = function (color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": @@ -869,7 +761,6 @@ includeFallbackColors = args.includeFallbackColors; level = args.level; size = args.size; - for (var i = 0; i < colorList.length; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { @@ -877,14 +768,10 @@ bestColor = tinycolor(colorList[i]); } } - - if ( - tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size, - }) || - !includeFallbackColors - ) { + if (tinycolor.isReadable(baseColor, bestColor, { + level: level, + size: size + }) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors = false; @@ -895,7 +782,7 @@ // Big List of Colors // ------------------ // - var names = (tinycolor.names = { + var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", @@ -1044,11 +931,11 @@ white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", - yellowgreen: "9acd32", - }); + yellowgreen: "9acd32" + }; // Make it easy to access colors via `hexNames[hex]` - var hexNames = (tinycolor.hexNames = flip(names)); + var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- @@ -1067,18 +954,15 @@ // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { a = 1; } - return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); n = Math.min(max, Math.max(0, parseFloat(n))); @@ -1093,7 +977,7 @@ } // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); + return n % max / parseFloat(max); } // Force a number between 0 and 1 @@ -1127,7 +1011,6 @@ if (n <= 1) { n = n * 100 + "%"; } - return n; } @@ -1139,8 +1022,7 @@ function convertHexToDecimal(h) { return parseIntFromHex(h) / 255; } - - var matchers = (function () { + var matchers = function () { // var CSS_INTEGER = "[-\\+]?\\d+%?"; @@ -1153,25 +1035,8 @@ // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), @@ -1183,9 +1048,9 @@ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; - })(); + }(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit @@ -1204,7 +1069,13 @@ color = names[color]; named = true; } else if (color == "transparent") { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + return { + r: 0, + g: 0, + b: 0, + a: 0, + format: "name" + }; } // Try to match string input using regular expressions. @@ -1212,67 +1083,95 @@ // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; + if (match = matchers.rgb.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3] + }; } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; + if (match = matchers.rgba.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3], + a: match[4] + }; } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; + if (match = matchers.hsl.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3] + }; } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; + if (match = matchers.hsla.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3], + a: match[4] + }; } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; + if (match = matchers.hsv.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3] + }; } - if ((match = matchers.hsva.exec(color))) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; + if (match = matchers.hsva.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3], + a: match[4] + }; } - if ((match = matchers.hex8.exec(color))) { + if (match = matchers.hex8.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex6.exec(color))) { + if (match = matchers.hex6.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - if ((match = matchers.hex4.exec(color))) { + if (match = matchers.hex4.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex3.exec(color))) { + if (match = matchers.hex3.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - return false; } - function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; - parms = parms || { level: "AA", size: "small" }; + parms = parms || { + level: "AA", + size: "small" + }; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { @@ -1281,7 +1180,10 @@ if (size !== "small" && size !== "large") { size = "small"; } - return { level: level, size: size }; + return { + level: level, + size: size + }; } return tinycolor; diff --git a/tinycolor.js b/tinycolor.js index ce4189e..e52a3d5 100644 --- a/tinycolor.js +++ b/tinycolor.js @@ -4,12 +4,21 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory()); })(this, (function () { 'use strict'; + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License - const trimLeft = /^\s+/; - const trimRight = /\s+$/; - + var trimLeft = /^\s+/; + var trimRight = /\s+$/; function tinycolor(color, opts) { color = color ? color : ""; opts = opts || {}; @@ -22,15 +31,8 @@ if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } - var rgb = inputToRGB(color); - (this._originalInput = color), - (this._r = rgb.r), - (this._g = rgb.g), - (this._b = rgb.b), - (this._a = rgb.a), - (this._roundA = Math.round(100 * this._a) / 100), - (this._format = opts.format || rgb.format); + this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. @@ -40,194 +42,140 @@ if (this._r < 1) this._r = Math.round(this._r); if (this._g < 1) this._g = Math.round(this._g); if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; } - tinycolor.prototype = { - isDark: function () { + isDark: function isDark() { return this.getBrightness() < 128; }, - isLight: function () { + isLight: function isLight() { return !this.isDark(); }, - isValid: function () { + isValid: function isValid() { return this._ok; }, - getOriginalInput: function () { + getOriginalInput: function getOriginalInput() { return this._originalInput; }, - getFormat: function () { + getFormat: function getFormat() { return this._format; }, - getAlpha: function () { + getAlpha: function getAlpha() { return this._a; }, - getBrightness: function () { + getBrightness: function getBrightness() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, - getLuminance: function () { + getLuminance: function getLuminance() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r / 255; GsRGB = rgb.g / 255; BsRGB = rgb.b / 255; - - if (RsRGB <= 0.03928) R = RsRGB / 12.92; - else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92; - else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92; - else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); + if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); + if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); + if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); return 0.2126 * R + 0.7152 * G + 0.0722 * B; }, - setAlpha: function (value) { + setAlpha: function setAlpha(value) { this._a = boundAlpha(value); this._roundA = Math.round(100 * this._a) / 100; return this; }, - toHsv: function () { + toHsv: function toHsv() { var hsv = rgbToHsv(this._r, this._g, this._b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + return { + h: hsv.h * 360, + s: hsv.s, + v: hsv.v, + a: this._a + }; }, - toHsvString: function () { + toHsvString: function toHsvString() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100); - return this._a == 1 - ? "hsv(" + h + ", " + s + "%, " + v + "%)" - : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; }, - toHsl: function () { + toHsl: function toHsl() { var hsl = rgbToHsl(this._r, this._g, this._b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + return { + h: hsl.h * 360, + s: hsl.s, + l: hsl.l, + a: this._a + }; }, - toHslString: function () { + toHslString: function toHslString() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100); - return this._a == 1 - ? "hsl(" + h + ", " + s + "%, " + l + "%)" - : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; + return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; }, - toHex: function (allow3Char) { + toHex: function toHex(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, - toHexString: function (allow3Char) { + toHexString: function toHexString(allow3Char) { return "#" + this.toHex(allow3Char); }, - toHex8: function (allow4Char) { + toHex8: function toHex8(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, - toHex8String: function (allow4Char) { + toHex8String: function toHex8String(allow4Char) { return "#" + this.toHex8(allow4Char); }, - toRgb: function () { + toRgb: function toRgb() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), - a: this._a, + a: this._a }; }, - toRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ")" - : "rgba(" + - Math.round(this._r) + - ", " + - Math.round(this._g) + - ", " + - Math.round(this._b) + - ", " + - this._roundA + - ")"; + toRgbString: function toRgbString() { + return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; }, - toPercentageRgb: function () { + toPercentageRgb: function toPercentageRgb() { return { r: Math.round(bound01(this._r, 255) * 100) + "%", g: Math.round(bound01(this._g, 255) * 100) + "%", b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a, + a: this._a }; }, - toPercentageRgbString: function () { - return this._a == 1 - ? "rgb(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%)" - : "rgba(" + - Math.round(bound01(this._r, 255) * 100) + - "%, " + - Math.round(bound01(this._g, 255) * 100) + - "%, " + - Math.round(bound01(this._b, 255) * 100) + - "%, " + - this._roundA + - ")"; + toPercentageRgbString: function toPercentageRgbString() { + return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, - toName: function () { + toName: function toName() { if (this._a === 0) { return "transparent"; } - if (this._a < 1) { return false; } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, - toFilter: function (secondColor) { + toFilter: function toFilter(secondColor) { var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { var s = tinycolor(secondColor); secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); } - - return ( - "progid:DXImageTransform.Microsoft.gradient(" + - gradientType + - "startColorstr=" + - hex8String + - ",endColorstr=" + - secondHex8String + - ")" - ); + return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; }, - toString: function (format) { + toString: function toString(format) { var formatSet = !!format; format = format || this._format; - var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = - !formatSet && - hasAlpha && - (format === "hex" || - format === "hex6" || - format === "hex3" || - format === "hex4" || - format === "hex8" || - format === "name"); - + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. @@ -263,14 +211,12 @@ if (format === "hsv") { formattedString = this.toHsvString(); } - return formattedString || this.toHexString(); }, - clone: function () { + clone: function clone() { return tinycolor(this.toString()); }, - - _applyModification: function (fn, args) { + _applyModification: function _applyModification(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; @@ -278,59 +224,58 @@ this.setAlpha(color._a); return this; }, - lighten: function () { - return this._applyModification(lighten, arguments); + lighten: function lighten() { + return this._applyModification(_lighten, arguments); }, - brighten: function () { - return this._applyModification(brighten, arguments); + brighten: function brighten() { + return this._applyModification(_brighten, arguments); }, - darken: function () { - return this._applyModification(darken, arguments); + darken: function darken() { + return this._applyModification(_darken, arguments); }, - desaturate: function () { - return this._applyModification(desaturate, arguments); + desaturate: function desaturate() { + return this._applyModification(_desaturate, arguments); }, - saturate: function () { - return this._applyModification(saturate, arguments); + saturate: function saturate() { + return this._applyModification(_saturate, arguments); }, - greyscale: function () { - return this._applyModification(greyscale, arguments); + greyscale: function greyscale() { + return this._applyModification(_greyscale, arguments); }, - spin: function () { - return this._applyModification(spin, arguments); + spin: function spin() { + return this._applyModification(_spin, arguments); }, - - _applyCombination: function (fn, args) { + _applyCombination: function _applyCombination(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, - analogous: function () { - return this._applyCombination(analogous, arguments); + analogous: function analogous() { + return this._applyCombination(_analogous, arguments); }, - complement: function () { - return this._applyCombination(complement, arguments); + complement: function complement() { + return this._applyCombination(_complement, arguments); }, - monochromatic: function () { - return this._applyCombination(monochromatic, arguments); + monochromatic: function monochromatic() { + return this._applyCombination(_monochromatic, arguments); }, - splitcomplement: function () { - return this._applyCombination(splitcomplement, arguments); + splitcomplement: function splitcomplement() { + return this._applyCombination(_splitcomplement, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { // return this._applyCombination(polyad, [number]); // }, - triad: function () { + triad: function triad() { return this._applyCombination(polyad, [3]); }, - tetrad: function () { + tetrad: function tetrad() { return this._applyCombination(polyad, [4]); - }, + } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function (color, opts) { - if (typeof color == "object") { + if (_typeof(color) == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { @@ -343,7 +288,6 @@ } color = newColor; } - return tinycolor(color, opts); }; @@ -363,63 +307,50 @@ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { - var rgb = { r: 0, g: 0, b: 0 }; + var rgb = { + r: 0, + g: 0, + b: 0 + }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; - if (typeof color == "string") { color = stringInputToObject(color); } - - if (typeof color == "object") { - if ( - isValidCSSUnit(color.r) && - isValidCSSUnit(color.g) && - isValidCSSUnit(color.b) - ) { + if (_typeof(color) == "object") { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.v) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; - } else if ( - isValidCSSUnit(color.h) && - isValidCSSUnit(color.s) && - isValidCSSUnit(color.l) - ) { + } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } - if (color.hasOwnProperty("a")) { a = color.a; } } - a = boundAlpha(a); - return { ok: ok, format: color.format || format, r: Math.min(255, Math.max(rgb.r, 0)), g: Math.min(255, Math.max(rgb.g, 0)), b: Math.min(255, Math.max(rgb.b, 0)), - a: a, + a: a }; } @@ -438,7 +369,7 @@ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255, + b: bound01(b, 255) * 255 }; } @@ -450,13 +381,11 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; - if (max == min) { h = s = 0; // achromatic } else { @@ -473,11 +402,13 @@ h = (r - g) / d + 4; break; } - h /= 6; } - - return { h: h, s: s, l: l }; + return { + h: h, + s: s, + l: l + }; } // `hslToRgb` @@ -486,11 +417,9 @@ // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; - h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); - function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; @@ -499,7 +428,6 @@ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } - if (s === 0) { r = g = b = l; // achromatic } else { @@ -509,8 +437,11 @@ g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1 / 3); } - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHsv` @@ -521,16 +452,13 @@ r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); - var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; - var d = max - min; s = max === 0 ? 0 : d / max; - if (max == min) { h = 0; // achromatic } else { @@ -547,7 +475,11 @@ } h /= 6; } - return { h: h, s: s, v: v }; + return { + h: h, + s: s, + v: v + }; } // `hsvToRgb` @@ -558,7 +490,6 @@ h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); - var i = Math.floor(h), f = h - i, p = v * (1 - s), @@ -568,8 +499,11 @@ r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; + return { + r: r * 255, + g: g * 255, + b: b * 255 + }; } // `rgbToHex` @@ -577,22 +511,12 @@ // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; // Return a 3 character hex if possible - if ( - allow3Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) - ) { + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } - return hex.join(""); } @@ -601,26 +525,12 @@ // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - pad2(convertDecimalToHex(a)), - ]; + var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible - if ( - allow4Char && - hex[0].charAt(0) == hex[0].charAt(1) && - hex[1].charAt(0) == hex[1].charAt(1) && - hex[2].charAt(0) == hex[2].charAt(1) && - hex[3].charAt(0) == hex[3].charAt(1) - ) { - return ( - hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) - ); + if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } - return hex.join(""); } @@ -628,13 +538,7 @@ // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { - var hex = [ - pad2(convertDecimalToHex(a)), - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b).toString(16)), - ]; - + var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; return hex.join(""); } @@ -644,12 +548,11 @@ if (!color1 || !color2) return false; return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; - tinycolor.random = function () { return tinycolor.fromRatio({ r: Math.random(), g: Math.random(), - b: Math.random(), + b: Math.random() }); }; @@ -658,35 +561,31 @@ // Thanks to less.js for some of the basics here // - function desaturate(color, amount) { + function _desaturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function saturate(color, amount) { + function _saturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } - - function greyscale(color) { + function _greyscale(color) { return tinycolor(color).desaturate(100); } - - function lighten(color, amount) { + function _lighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } - - function brighten(color, amount) { + function _brighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var rgb = tinycolor(color).toRgb(); rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); @@ -694,8 +593,7 @@ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); return tinycolor(rgb); } - - function darken(color, amount) { + function _darken(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; @@ -705,7 +603,7 @@ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. - function spin(color, amount) { + function _spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; @@ -717,12 +615,11 @@ // Thanks to jQuery xColor for some of the ideas behind these // - function complement(color) { + function _complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } - function polyad(color, number) { if (isNaN(number) || number <= 0) { throw new Error("Argument to polyad must be a positive number"); @@ -731,38 +628,40 @@ var result = [tinycolor(color)]; var step = 360 / number; for (var i = 1; i < number; i++) { - result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l })); + result.push(tinycolor({ + h: (hsl.h + i * step) % 360, + s: hsl.s, + l: hsl.l + })); } - return result; } - - function splitcomplement(color) { + function _splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }), - ]; + return [tinycolor(color), tinycolor({ + h: (h + 72) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 216) % 360, + s: hsl.s, + l: hsl.l + })]; } - - function analogous(color, results, slices) { + function _analogous(color, results, slices) { results = results || 6; slices = slices || 30; - var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; - - for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) { + for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } - - function monochromatic(color, results) { + function _monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, @@ -770,12 +669,14 @@ v = hsv.v; var ret = []; var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v })); + ret.push(tinycolor({ + h: h, + s: s, + v: v + })); v = (v + modification) % 1; } - return ret; } @@ -784,19 +685,15 @@ tinycolor.mix = function (color1, color2, amount) { amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a, + a: (rgb2.a - rgb1.a) * p + rgb1.a }; - return tinycolor(rgba); }; @@ -809,10 +706,7 @@ tinycolor.readability = function (color1, color2) { var c1 = tinycolor(color1); var c2 = tinycolor(color2); - return ( - (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / - (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05) - ); + return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05); }; // `isReadable` @@ -828,9 +722,7 @@ tinycolor.isReadable = function (color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": @@ -865,7 +757,6 @@ includeFallbackColors = args.includeFallbackColors; level = args.level; size = args.size; - for (var i = 0; i < colorList.length; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { @@ -873,14 +764,10 @@ bestColor = tinycolor(colorList[i]); } } - - if ( - tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size, - }) || - !includeFallbackColors - ) { + if (tinycolor.isReadable(baseColor, bestColor, { + level: level, + size: size + }) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors = false; @@ -891,7 +778,7 @@ // Big List of Colors // ------------------ // - var names = (tinycolor.names = { + var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", @@ -1040,11 +927,11 @@ white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", - yellowgreen: "9acd32", - }); + yellowgreen: "9acd32" + }; // Make it easy to access colors via `hexNames[hex]` - var hexNames = (tinycolor.hexNames = flip(names)); + var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- @@ -1063,18 +950,15 @@ // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { a = 1; } - return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); n = Math.min(max, Math.max(0, parseFloat(n))); @@ -1089,7 +973,7 @@ } // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); + return n % max / parseFloat(max); } // Force a number between 0 and 1 @@ -1123,7 +1007,6 @@ if (n <= 1) { n = n * 100 + "%"; } - return n; } @@ -1135,8 +1018,7 @@ function convertHexToDecimal(h) { return parseIntFromHex(h) / 255; } - - var matchers = (function () { + var matchers = function () { // var CSS_INTEGER = "[-\\+]?\\d+%?"; @@ -1149,25 +1031,8 @@ // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = - "[\\s|\\(]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")[,|\\s]+(" + - CSS_UNIT + - ")\\s*\\)?"; - + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), @@ -1179,9 +1044,9 @@ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; - })(); + }(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit @@ -1200,7 +1065,13 @@ color = names[color]; named = true; } else if (color == "transparent") { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + return { + r: 0, + g: 0, + b: 0, + a: 0, + format: "name" + }; } // Try to match string input using regular expressions. @@ -1208,67 +1079,95 @@ // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; + if (match = matchers.rgb.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3] + }; } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; + if (match = matchers.rgba.exec(color)) { + return { + r: match[1], + g: match[2], + b: match[3], + a: match[4] + }; } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; + if (match = matchers.hsl.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3] + }; } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; + if (match = matchers.hsla.exec(color)) { + return { + h: match[1], + s: match[2], + l: match[3], + a: match[4] + }; } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; + if (match = matchers.hsv.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3] + }; } - if ((match = matchers.hsva.exec(color))) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; + if (match = matchers.hsva.exec(color)) { + return { + h: match[1], + s: match[2], + v: match[3], + a: match[4] + }; } - if ((match = matchers.hex8.exec(color))) { + if (match = matchers.hex8.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex6.exec(color))) { + if (match = matchers.hex6.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - if ((match = matchers.hex4.exec(color))) { + if (match = matchers.hex4.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8", + format: named ? "name" : "hex8" }; } - if ((match = matchers.hex3.exec(color))) { + if (match = matchers.hex3.exec(color)) { return { r: parseIntFromHex(match[1] + "" + match[1]), g: parseIntFromHex(match[2] + "" + match[2]), b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex", + format: named ? "name" : "hex" }; } - return false; } - function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; - parms = parms || { level: "AA", size: "small" }; + parms = parms || { + level: "AA", + size: "small" + }; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { @@ -1277,7 +1176,10 @@ if (size !== "small" && size !== "large") { size = "small"; } - return { level: level, size: size }; + return { + level: level, + size: size + }; } return tinycolor;