From 1477e7265d05a3738d89e79e1c44d6a3cfe8511a Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 23 Mar 2020 02:52:38 +0800 Subject: [PATCH] OpenClash: bump to v0.37.1-beta --- package/ctcgfw/luci-app-openclash/Makefile | 2 +- .../files/etc/openclash/default.yaml | 53 ++++- .../files/etc/openclash/openclash_version | 4 +- .../model/cbi/openclash/groups-config.lua | 1 + .../cbi/openclash/proxy-provider-config.lua | 4 +- .../model/cbi/openclash/servers-config.lua | 4 +- .../lib/lua/luci/view/openclash/update.htm | 12 +- .../usr/share/openclash/clash_version.sh | 10 +- .../usr/share/openclash/openclash_update.sh | 6 +- .../usr/share/openclash/openclash_version.sh | 14 +- .../openclash/yacd/8.61fe79e386de4226efcc.js | 1 - .../openclash/yacd/8.cfac5eece126ce875152.js | 1 + .../yacd/app.623087d3dd2fb338b3d6.js | 2 - .../yacd/app.97da0bf63bfa93de767f.js | 2 + ...> app.97da0bf63bfa93de767f.js.LICENSE.txt} | 0 ...js => core-js~app.e768d5b23b7e7ef5d68d.js} | 2 +- .../files/usr/share/openclash/yacd/index.html | 6 +- .../yacd/proxies.49fb4634cda581289b5a.js | 1 - .../yacd/proxies.bdb3659841c50b543b0e.js | 1 + ...a.css => proxies.cea47222a686cf441cb9.css} | 2 +- .../usr/share/openclash/yacd/report.html | 4 +- ...6e02d.js => rules.efdab873e544c5738c5c.js} | 0 ...ade.js => runtime.c72e8723983b31413a8e.js} | 2 +- .../usr/share/openclash/yml_groups_get.sh | 38 ++-- .../usr/share/openclash/yml_groups_name_ch.sh | 9 +- .../usr/share/openclash/yml_groups_set.sh | 104 +++++---- .../usr/share/openclash/yml_proxys_get.sh | 52 +++-- .../usr/share/openclash/yml_proxys_set.sh | 204 ++++++++++++------ .../i18n/zh_Hans/openclash.zh-cn.po | 3 + 29 files changed, 354 insertions(+), 190 deletions(-) delete mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/8.61fe79e386de4226efcc.js create mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/8.cfac5eece126ce875152.js delete mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.623087d3dd2fb338b3d6.js create mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js rename package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/{app.623087d3dd2fb338b3d6.js.LICENSE.txt => app.97da0bf63bfa93de767f.js.LICENSE.txt} (100%) rename package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/{core-js~app.6649a23b1d13a5f65fc1.js => core-js~app.e768d5b23b7e7ef5d68d.js} (54%) delete mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.49fb4634cda581289b5a.js create mode 100644 package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.bdb3659841c50b543b0e.js rename package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/{proxies.1041caa2a300c5b850ba.css => proxies.cea47222a686cf441cb9.css} (95%) rename package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/{rules.9d27c78e021c1d86e02d.js => rules.efdab873e544c5738c5c.js} (100%) rename package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/{runtime.3f467867c30e4422dade.js => runtime.c72e8723983b31413a8e.js} (92%) diff --git a/package/ctcgfw/luci-app-openclash/Makefile b/package/ctcgfw/luci-app-openclash/Makefile index ac6121181e..dfe8299424 100644 --- a/package/ctcgfw/luci-app-openclash/Makefile +++ b/package/ctcgfw/luci-app-openclash/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclash -PKG_VERSION:=0.36.12 +PKG_VERSION:=0.37.1 PKG_RELEASE:=beta PKG_MAINTAINER:=vernesong diff --git a/package/ctcgfw/luci-app-openclash/files/etc/openclash/default.yaml b/package/ctcgfw/luci-app-openclash/files/etc/openclash/default.yaml index cd3d32aa3e..132ebfc3e3 100644 --- a/package/ctcgfw/luci-app-openclash/files/etc/openclash/default.yaml +++ b/package/ctcgfw/luci-app-openclash/files/etc/openclash/default.yaml @@ -186,18 +186,63 @@ Proxy: # 节点设置,此部分与proxy-provider两者不能同时删除 Proxy Group: # 此参数必须保留,不能删除 +# relay chains the proxies. proxies shall not contain a proxy-group. No UDP support. +# Traffic: clash <-> http <-> vmess <-> ss1 <-> ss2 <-> Internet +- name: "relay" + type: relay + proxies: + - http + - vmess + - ss1 + - ss2 + # url-test select which proxy will be used by benchmarking speed to a URL. -- { name: "auto", type: url-test, proxies: ["ss1", "ss2", "vmess1"], url: "http://www.gstatic.com/generate_204", interval: 300 } +- name: "auto" + type: url-test + proxies: + - ss1 + - ss2 + - vmess1 + url: 'http://www.gstatic.com/generate_204' + interval: 300 # fallback select an available policy by priority. The availability is tested by accessing an URL, just like an auto url-test group. -- { name: "fallback-auto", type: fallback, proxies: ["ss1", "ss2", "vmess1"], url: "http://www.gstatic.com/generate_204", interval: 300 } +- name: "fallback-auto" + type: fallback + proxies: + - ss1 + - ss2 + - vmess1 + url: 'http://www.gstatic.com/generate_204' + interval: 300 # load-balance: The request of the same eTLD will be dial on the same proxy. -- { name: "load-balance", type: load-balance, proxies: ["ss1", "ss2", "vmess1"], url: "http://www.gstatic.com/generate_204", interval: 300 } +- name: "load-balance" + type: load-balance + proxies: + - ss1 + - ss2 + - vmess1 + url: 'http://www.gstatic.com/generate_204' + interval: 300 # select is used for selecting proxy or proxy group # you can use RESTful API to switch proxy, is recommended for use in GUI. -- { name: "Proxy", type: select, proxies: ["ss1", "ss2", "vmess1", "auto"] } +- name: Proxy + type: select + proxies: + - ss1 + - ss2 + - vmess1 + - auto + +- name: UseProvider + type: select + use: + - provider1 + proxies: + - Proxy + - DIRECT Rule: # 此参数必须保留,不能删除 # 如果您将一直使用第三方规则,下方可以留空。 diff --git a/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version b/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version index bbb255ca12..0be6512c06 100644 --- a/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version +++ b/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version @@ -1,2 +1,2 @@ -v0.36.12-beta -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYQAAAAqCAMAAACEAtzLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkQzMkI0OEVFNkE0MzExRUE4ODI1Q0I0MTVGNjYzQThEIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkQzMkI0OEVGNkE0MzExRUE4ODI1Q0I0MTVGNjYzQThEIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDMyQjQ4RUM2QTQzMTFFQTg4MjVDQjQxNUY2NjNBOEQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDMyQjQ4RUQ2QTQzMTFFQTg4MjVDQjQxNUY2NjNBOEQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4a7y+kAAADAFBMVEUKaqE1dZp+fn6tra0GXpFJns6hoaGGv99lrNQqjcW6uroFbakGcKwIca05lcnR5vOUxeFUi6vh7/dISEilpaWKioqxytjR0dEHVoQccaI9PT0bhcFFgKIihLwFVYIGZp0JeLienp6CgoJjlLEwk8t1tdne3t61tbUVapo/Pz8IXIyStclubm7a2tqizeUXYYzn5+ckeqrOzs7R4emRkZFFRUVLS0sEXI5ycnIkapI2kcZ3d3eixtqFhYUEU4BFmsoJZJhFkb2cnJxiYmJjnLxYptK/v794eHhWlrqy1uqCrseEtNDg4OBDQ0MEWYlBQUEKYZPw9PeUlJTCwsIFYJRqamqiwNHIyMgKdrUXgb7FxcVAQEDAwMA0fKYFZZsFaaLQ3+i2trbKysqy0OEgdabB1ODB2ecIZ54HdbIJWIVlZWVgYGAYbZ5Hi7IKdbGTvteDudikzuYmicF0p8SNjY1zoLoFcrAIbKU1hrRynrhHnMyDq8KCqsBkp82hv9AEYph0dHQFa6WJweIUXol0sdUmb5lEf6GEsswJb6portcYe7QIcq8BcrNZWVlTU1NRUVFUVFRVVVULfL1SUlIKe7wHeLkFdrdWVlYOf8AOgMADdLUEdrYDdbUEdbYDdLQSg8MSg8QShMQThMUAcrJXV1cOf78Gd7gNfr8Nfr4Mfb4Mfb0IeboJeroJe7sJers6OjqqqqrV1dXU1NSrq6upqak7Ozvw9/vC3u6AgID19fWBgYGEvN2DvNzq6uqCqcCEvd309PTz8/NMTEzv9PeFvt7B3e3g6vBGm8vB3e7A1N/o6OiCss6Xl5eErMLB3u7g6u/C3++Fvd6Fvd3W1tZHm8zC3u9Vos8IV4TD3++Du9xEmcqDr8jB1eAHdrWy0+bv9vqEq8IFdLPB2+qixNeDrcUnbZUFZ5/R5O8nhr0Lerl/uNgmcZzP5PEHWIdGibACc7QRgsMPgMEQgcJaWlpfX19NTU1eXl5cXFxbW1tPT09QUFBYWFhdXV1OTk7///////8wtP/fAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAADH5JREFUeNrsVwtYVGUaPsAMF0FQBhAHJWdQkIuo6AwqMeCSEsIISl7YCi+54qW1tNIyy9K2MtcRYWB2t932RlfE4dbQqNy8kJqpXa2cLma51a7ttpuWGh99//+fy5wZUJ6t56mZx/d55vzf/fvP9545/wzX02P3m/S1N2D83zwQIzfZenq4ngLvoABJ+KtHYmRYD2efdMFLMP4vnomRNs7vgteQ8GcPxSZu0nfegvH/8VCM5L67RsJPDm8i4b+eCu4br8E1En4GWPKVp4L71mtwjYSfAwm/91Rw//MaLPmdp6JXErR+fn53p/z4Y1qh1a4QlRSttj85udrc/pLwdF/4KmhLQIDS3a4MCNg0LUZu6CXuK2WoKMZMC9g0KtQtJAACnv7/wW1zRc4iO1AUHM3Z9gOh9dPKdDscFeViWNyfEm/AG/1stuTZvjCI3k94qNy6mt2mLUAwBNiI/o5bulK0Bb3DcsJcSj2LJPTZXRmgfPbKcCMhtxVgTJNGk4a9tD+UBD/wc1Yt06FA5Bpg4o9MwnN94ADMuuvXN94GthiZGaAr+dXkLoADVI0JA5jw6qtzP3DJDtpigxO8rARwYMgs11LY4sBzfbfv28fAXZYjpwA6U9QEek2n9vIPBJIg01MAUnjxKHRW9qeETq3rZ7Mlz/eOIACf5QgHrJbZHcOIdXkUhFP1BEygYUXybPrkn+AV5dxPSYjPhzBKHoWDfr4vXMnHwLmNrTNHbVTp9Tq12jKnv8PO0Mr40mpTeidBNQ78ebEBFnX3livQJdSQSMjRanOcHxe5iiS80DtGQdTydasezx4GNpl9+fKkMo5LGgZAtC0wa+zyIo7LzpZnH7jzlANO8Mqq5SSk7FyyaBGi4MALLwQpQyVLjFIZ5OTjoVQ6xwhwJcEOmsTtVLLoidAAu6m2Gxr469ECgKbLTdCU04RvLuJtIoeIvYnGAeRQtSGHKgxi9e0aaJW+ExZ5rlT8sraApNlvwSJNwApnNBBTQwYfmXILURc5b33o8xUMMQBBTFoNgyoq8uCjVUQpAgitcELRVrrcCF1kCYO4olUV7jh58uRH8BavbM2eT5ZVn4gWHjjoaeHk3JnG9NC3yPbeIv2EIaAxnB1CB1x7cDUy7AaoqRSU8vKaGiSBdzTQawGdRVNNEyxuJdLuGnyB2QdEDLDDLSQOoBXsaWPwWEeloRVaGxBS/W0AGVTwh3GqGnmuVPxugCEREfNIdWzUROIz7BAfEREP9gwaabfDkbRxyIJU+vJQ8aZWA3+fNsJGGNzIJjgBprkPGY+CwbjgO2vs56FKZYzbgDguH1pcjB/AHa4k4KG+1IG7VxJ1C8A/8vMngA1ZaAmH8BZERYUSws/k519vI0/GlUjA2ehlBlcSoMN/n1qVg7OBI5E3q3d8U5MAY1R4hKg66XiJGbUcqqk1oCHHi1ROPwYSqFAA9Zdq5LlS8VaWpqqXSGiFRcS0CFrZNoZMQi0T7E5bHWrm8fkwCKdCIDjKzGaAqRVUdcBrZjkCX8uzdQ1OQmk9dD1GH9SWILMrXoMWuQEZ+9I1xPbY2JPRYxfSzkE2iItG3A95ZjNe7yeK2fzZMLJG+wDEyLM5iwxNkGaSGRrgJbq+BA30euQ8HQ8G/jKRSJfwV065WqfSqSdCAkYA6NVqY6G6GJosFqM/+BsRUjlTJnSQNQPfURaLPFcqjq8qowrN6ktkR1jIMhs61YUqVSHSNZtEjlGrE42J6k5+dxQiCebsLphG1haIm09IyGLmj+F1l/G24MvhrrGPo/Q6OX7z88/gD59QVxJedyWhBRzXuYZ8Eh1dpIiejK88s3kQzI1OwuMmehaOW3EKZhQpihRm89bopGw8dM45YP1VSBhiuSIJaWpVuaXchIGaxH041PJIGFNYjq7yFBoBQMwWfPk3WYQJOuM8QCQu5CtgschzpeLjID6DmFUiCQlQrCPpumJGV5oRXZZ9aTIS6gQMvAdScQmCWQpzXR3AemZugfY6Oe79cvBcsE1BqR26xifFRpNnucUlCH1yUyqe4QNxnXKCvGZaBtGQT8pG1NWNSOqCwLo6fMOtI4FlDtK6XWg7f2Dd+vb2vKWzhA0J4HbIUA/xcgOSQFckgV6HmITACEEQQSIAWEAE1FNnvbzcjn3FMB2XVphY6ZorFc9EQ+vi+od2iCUaQEM9Jg2LbGSBQ/jdUQzdJeI3ACW7drVD8jpUAN5kViRhlxyK6Ohzd0H4LhLriFaUlWWfwx9LQS5RSIKzihz4KIjwJtt6Cw1hpec7iCDdFmndLrZtt0lWZ7iQkAuw8ookNIhs1QtCaz1FhCaSkuDsdyfBlAsdK7EOnHfLlYonphTTvS52IoHnPIKR0CDfHSNhpwguCkbt3BkOnxLlOLzMrMfggZ1ybB34ePZYgCl1O/fA0mXEMiIJhHARe+CYk5YK+33OjSDSE8Mobq0jIXuYdykRAFL3UJza8JmTD/+4n7nhy38qHK4duHI5AGbL9EbwpasvNIpXApyNIIx5kUchzXf2i1ESjPhWL58OxSq3XKm4Hg0rM/E/u0YoMQ8SmCsB5jlFCrujGForYtlgCK99GRylRHHAHmbFE7rWHQtw6rW1UzGBYiBVZUASRLkkFRb6nNvKQmMpFDSE7xEGj5BGg2N5DJR8JQD3UJvDtYMLCd348+NrQfl6DrnNyCuTgN+d71QM+v6QsG8RLC7vgMxKt1ypeHm3kRCziBhYCX+IZ5548N9xdRJqb8LHPxXilhH5FKRS2xSAdb2QsAa/CbW1QwHWCFFPuETslUgoCYOFm3kOat8PodhKQ/YKxe4ltJ8p47FM8r0MELtxXciy2mNuJJhkqDQBxF9gcmSHr8k0AKYT+cJ0aMTFl14JmqGZCfgneB5vewg/eCY4+TUsWwb8SaSBTqN7rlRcg5+L+sJm4mWFvgXwNdENwLdOkY3MyrY+tEpC8AbIg/0KKt8KthKyDoKoEFymHDoUSNS3s1hoHhxHc0gU5FWxqF+RqEGHDonF9oIgT7HBg5vTt1a5AQdN11Q4vqCqKg555RPw8wikUjkLYDy1hUOWPNuFBJMRD8WOhEhf3+Z4et94182+vgkd0BcJ5/FxnoeBkzStzW4kzAEk8sJseYdx0AEJevdcqTi0zp6DaR1kA6yQqhk6sAyamlV9kGC6vdbpvvBohuSHqXhdFIRNqSoZBfAoP4u9bG5he7OyRoXhuwOn/r7PfshbU7VmL77x30fvQQBWKCsrKxXC8FpCrfs3bLhzL0GWCwm2QW9nBR7CHgOrqhQLwRa4pqrk7VRS5F6wZVWVBFaFHIewwCy0wdVIuGidM44/wjs123BkCVQ+MrsvEkzq3E4+4RduJKhYtqxD90S0rOwlVyou7KDZKBS6aGWVIMF6sU8SnnFCaRTAZCaGbF7IcuMURH0P4F2yPsA32R83k6iKR/cz1SedqEgCyxZ/57zHrALede72zLuyYgs2Rwk6amcfpOIzwT6swx0TaC0ncJUuUFmtuZq0tLTmXKt1X2Wl3ppZnFacqTZpItG5gl4JMjQZvKS36jIHNDYOmG3SoabROPu7Mbtxnr+8g0Wj0Rh7yZWKW3P9hzQO8TdZ9WIjnXVOfWNj/RyrznkbkZoVUl0ZCWt92u7byMsKQ9z1Bz+eMdkQTLThbW1TKU2b45IPH466jzeHxG6+77aDt92zOTaEqDe0tbHkV155ZUbb/Xj9jFkFTJWNcWrbsMFnDh9O5ovNNPjMWHrw41ODDaSyIS7q2Acz0DoZGybfaohrG34VEir3qa0ML+ouoWqkslplvZn46JUNRSck6F/kE1RkflaZn2W70Ww930uuVFzYgc6pEatkpeyJkTeT50QkodoJTyoMhrW8fHqmgWIB1YINhlKyLmBGQywzVwfHMjWEaukGAzMbBAQzq4BS527VpfJiTykEnWg3UbG6OoR12DiT1nICt90del1iYqJOz2uqwsRC1fZunQpldmUxejH+ksqYmGhUdRNZp5P7SbZOXr5bp9P1lisV53fQLWtEbLwsRqpYDIOMhOqQ0rOSsuCm9PRSnpO1paVsBqcXbExPV5wVqKo+fVaB6mk+o5SfcqmAtcwqQD7H4NLgh7HHxrVS+3Rs+TBfDAuTcmux4cYQrLL26iR4KG5/0lPBXfIa3P4nT4U3kfBHTwV30Wsw+g+eCm8i4SlPBbei21sw+t8eiuFcxDUSfmp8wXV4zVdh9G89E8M/5Hric857BzyUhOH/6uF6ejoivIOG0X/3QAz/4sOenu8FGAChFYYk5w0y3gAAAABJRU5ErkJggg== \ No newline at end of file +v0.37.1-beta +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXMAAAAqCAMAAAB2kksrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVERkMzMDEzNkM1ODExRUFCNTc0QUEzRkMwODc0OUZGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVERkMzMDE0NkM1ODExRUFCNTc0QUEzRkMwODc0OUZGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NURGQzMwMTE2QzU4MTFFQUI1NzRBQTNGQzA4NzQ5RkYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NURGQzMwMTI2QzU4MTFFQUI1NzRBQTNGQzA4NzQ5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fTGFDAAADAFBMVEW6urokhLuCss6iwNJ1tNlXpdIHVoRjlLEHX5EJeLg5lcmCgoKenp7a2tqlpaXR4uxTiqp4eHjf39/n5+cJca2Gv98/Pz+izOUGcKzGxsahoaHOzs4GVYJpaWkkapJlnr2TvNORkZFxcXG/v7/R5vJGRkasrKy1tbVjo8hFmsoHXIwEXI4FYJXKysoGbamz1upiYmKEhIRFgKI0dZtkq9JmrdZLS0tDQ0Pg4OCTxeGLi4tzsdR2dnYGdLIXgL3AwMCcnJwEU4AEWYkKaqHCwsJBQUGx0eMJZJkrjsZHi7OStchCQkImcZxsbGxKn8+2trajxdlHnM2Xl5cnicEJdbQFcrDS0tLQ0NBJns5lZWWNjY3B1OAKYZM2kcYFaaJzobsGZJqxzdxFkbyDrcUYYo0WaJevr69gYGAHZ53w9feiyd9vb28Zdapyn7iUlJQHbKXB2ecJWIWEtNB0dHSyytgdh8MJbaYFYpejzuaJweIwk8sahME1h7URgsMCc7QBcrNRUVFUVFRVVVVSUlILfL0Ke7wHeLkFdrdWVlYEdrYOgMADdbUOf8ADdLQEdbYDdLUSg8NXV1cSg8QShMQAcrIThMUGd7gOf78Nfr8Nfr4Mfb4Mfb0Je7sJeroIebkJers6OjqqqqrU1NTV1dWrq6tISEg9PT2pqak7OzuAgIB+fn48PDxJSUnw9/uBgYHq6urz8/NMTEz19fXC3u6EvN309PTh7/eEvd1/f3+CqcCDvNyFvt7v9PfB1eHB3e3g6u+JiYmhv9DA1N/g6vCErMLB3e7o6OhGm8tHm8zB3u7g7vYFZZsFZ58UXonD3++Du9zW1tZInc2Dq8ILerkFZ6ALb6iFvd4IV4QIaJ/C3++DqsGGhoYFa6YIcKyDr8gGWIfv9voKeLcGdbQLdK9Vos9EmMgZg8DR4OiRuM+Audmyz+BGiK5/uNjP5PFkmLVTU1MPgMEQgcJZWVlaWlpfX19bW1tcXFxNTU1eXl5PT09QUFBYWFhdXV1OTk7///////82LFRbAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAAC+ZJREFUeNrsmAtYVGUax4+oQDCQIzqiIIUysHgFxRmk0EUkzSTL2+JuYhczy7Twspq1uyIXp720y16oLcLhbsDIRcFQ8K5laFt2s/JSW1vtutu0rhuI8Wff7zuXOWcGiGfr8XlmHn/P0/ne9/3eyzn/7zAzJnR11a8YedkT+JMbsPkJW1eX0BW/7rJn8Ae3YHNEl1A/qt1D+L17sNkmrPAUydt/5yY8IYz6xlP4mZuwWfjmuubXGg/S/N/ugvC1x3Bd82vPV+6C8F+P4brm155fugvCfzyGX7sL3WruHxkZ+eNV378qS/z9lyjOKn//vtTo/fV97P5sT3zlN+CJAX4u4Q0Dhw4deqdoz77TgXPe7Ds3uNQOxdBn/2+ES87EzKsHJ35+zKXviH+kv8avx3zFno7xfWnxBt7o47DnemDD6/xxXt+gic4Wo2gcyLyhcOBc/zrSXHqS5j2Ney5taNpzveKiub4GCCjV6UJouv931TwSkWrXMhrxytEC4d+v5n/ugfdx402333Qj3tdE04DPjx7t/zCQRl5ci8TngLY6baKYoWUf9vU0rtc9jnBVS0w8alcZGCZdrf/V7whprvFHAamSOR+1WX1pYTQY+zjs+e6ZgiPLMzIylj+MKepwWv+wDBY+gk3kJWdIHMURddY+/uanuTQlXZ/vid72OIKLSrUxBnO1yWQ0GCwj+6qt3l9zPP7+qd1rXhaEEZJZgnmdUrK++44xTpqnaofEyBkyL3TPRCzzfeeTd3yPYqI6/ElGhm9y8koS+X3y3rlH5MGH8aU6K23f2qOkuUtT0vWFF2an+alTZY/vKUFNjoiz5vXQGbZwy2JiRgl2cm8nSqTr/Hig9GopSmNK6WOI7ZayL4D6Up4HxHC3JIY7Ikr3LTrUSAICqywk3HS2X5NwVdP86ogaHmYtSyE2TuCh6TFSZiovnKe+9WyJgWiUrEYMzM624eJbZL81CbZsFZ/M+pgtb32BR1TRTTgyRp2V/N577wFvZjtDug5s5N8Gov/kJsie/NDZ2X6N3LDtcyoW8jTsBPKyZCczMy+PNJc2Svg1voS1Kc0rxXguws48+jSqFwKFekxneaQU6kMC6BuYnJIa1JQQjv6XAD03RiDImJenr0fNisDhwHxN83mAEBg4mO4ljwaVsvz5wPDAFTWIj+GZ9fU4HhJEoqvuXXmmRkkkPyb+k8Cj3HsUeNJFu2w/20dzFSdnNjDpp5qTSU5O7l5zG/B4C6Q9Pxsab177D2BKdvauRjTuIrKz30TjXWvX3mXD1F41JylMmoCz5mgYUVdeHUNS4PhBQ/nWr/OiEFBdXl5eXYtbueYsXB7DvXIddLRV7mhnCkAUN+JR1MGu89h+KurVzelvIJWFt4YomlPoQzYkgJ8sZS4eRe6HvE4mR+LcaWzixiacPpdzNzCEe0OAu3O0vPvuLrRMnpWtBDahZUyOM651VAmb13Jv7+Wfo5G5EejvTdCfUk6O92mcZk5OzoJJbPWeTIetKRYsGkoRYtcESvASX19CCb8eb6siqilxuIFZHfT7I9NgrDYawhFFGYCpymBOqZqJUovFPAIjzISjnT0WDWy9lT5wLJYEBFVRrZmyE1TNXwKqjNXVKVVV/I6okWU6ZlaZaQg7DpYZYKAphqpa6e44yjPNBT6j5TMb5uYwzT/m0Y9dtaPXNOLLCwsV349e8yF91PwBb29fX+8wwC8nZyCOeI9ZeeYe7/UYmON7Hud9CTpl7zGzkpNnXWhxauCi+WJLr5qHGKozLZl2StQZ6kjDzAQEpGTSVuYqngGwsIU+uEsVwdS0gclroT8OI7sWGVmwg2crzUcCo1PZAZmVFoMRztpmptSKpxNi7iC3LkSteYHMmfWYQssUrD9TUECaS2HSrkDLxYs+LYj4TPHprfctcMFRt0uErD144MwNBQU3jDnCRk3FnFlsf8gH2MP29ojpC4cU3L1nz8THm50GC1s1FGGwNkCa85U059fFdjkxUDYUWAYgJgSiiG8WadttrZuJ0bTUIDyLNVcoUjW/Qp/nGDxaN3Kr0gK4VdwKkTLFbj+S7o6zXWahDyJo2YVBC7dvfxWQwsCr27WEhnqPuQ+bZPdV9ppvd8FRJ90rWaSrOKqFGbscz7HHsUeWTYpqBztprgce6lXzEuVwimSjpogTqEvg4qj3XTW369HwEPVBG29eItfqVc2zqmID+K3qVJrrLZLKRarMErXmLyqMa8bSggU4MI7sfoAUBfoVvKhhyJDHfAfBJrsn6DV/0RXgFcmaJELWbuwWQ48z4wRO7OZ4fXC/am8qcNeXF+f6tigNRIRMLcAajV+Ml/n6MoqVK4OkkI2AHRIpvF69r2Q5MNfShNGYWc2bV8i1ZermZgqkhtPPknVyi1ocFLcGQ6fKlO+OU6jw2BwMK9yNDyaQfY4k48FXgHOFrtwOSNanQFh3GXKDwsJQEbJIVzEUgVsKC09gjrQVutKxNw1YzWMtSgMRJ80756HmsuxcHsme6mDvmtNfxjdlIqa+aF43D+MzGxCbRXYggqTSsk5180yTgZ1DEKsWW4QgSrwleuG/XfPCMNimvYa5N5CZ2II4HhuAlsRuFI1Ds2S9hkO+hb1qHixC1l7s5ZEFwFOFhV44sFIi2LFHhxy68bHgRDoSJ83tGrLs9EnaLtoHGyrtdgGjmd0+GsW0VPIrowIVomEMwngpto7+o89z1b5OrNZAP3R0qL2DmfRrXScG20eqmq+jufa2svIAtis2+hAN7WLboDJVZjEqHY1zHdz7E0zE+pXcXo1jfI3AarbEHTu2lK0DFvAoHc0hsSaOXvNEucGxY1OVZkB0rjOkK1+H4UB6bi79UBogxqdR11swjNvR9GHG1qWvOTVw0txujqVfyVEHKysr6J8klezxUFFZGdWAnjRvoxd9PCWu09VUuGieCjq39jXaCUFoQJSJn1cFdaeTov6VquZkHGy3j6xA7WW5kSEAg6kT5evb+qB5og99GwwSFXzwAIYtyF0wDM0PimqJCuzHxAHR0XttaA4rlMXfqNJ5P18XREeTdJS41Flz29RPo+OOsW/d3NyVc4C9lBE91Ua9nwJdp8XlBh9ARFz0p8OAb9H8ijU1SPqyrdVdIoWiuH18TU+a28v1tVLBD100LxOrNRM6wynykDRMJ3/fj1I1HyU1rI0tkxtVG8VvVcSW23vSPF/F2GYc8BXNk5ObeWXz5LeZ+xdSgK2PSIMPTB6XL8XDEpV60lyOiuzP1yDHm31mkJeY1CTnLc3Pf/sQt/InSINvvlGcqCBkOVFttep1ISEhFXqrtS4ry2SNnR4yM7bKrkugzSX8ytDr9JJlshpjhcXFwhq7kTydTr3faY2dWTx8hHaCRafTmUXTaLWHD19cHBlrrFM1rzPGRi4uHh5urLqiDDJYachind1qUt9Ggm6Jo6/6sdIHNQ06K5p/nXFq2W37b1t2KvQZ5t7f1NSPn0rY6kOHDx/yORUqKn1Lk884R31T0018/ZuXl1dT03kvrx9oNb+/adKg/i2H54QlTWDuvUlhy+47tv9mn1PkBif53Lf/tvP5+TPC5hw+/MXkUB9xYs+aZ9WVW0V2GDvINXO73Gg1sD1+FdUyygWmHVIBi1itmn2xWjvASJE2lc1pUzVvkxruqHY06jCIseos9W0Y2Gshs03F06FJF2QzODSJERrM3dakpAlsHZckckEMs/giR31S0lg5KjJ2mwY5Hpqu9ZOCldbS4NCkjTPEiQrCFlfY/8c1mE2SV5ZiSCnb0mksI1u8ijkmJb+j7A6D4Q5jJ7ONRu0+qzZq23cajUaVk0Kzyjo0zTvKzAYq69AMYkPEGY7MMinA0TzX2dazip140nes78lE0ZnQ2ipqu+jkuLFjx6VL4W0nW9PVmkoeZYukazWf0DrhLJVvVI5pEc0Yu1Hqlk7zWllwI8WCt6W3LvpWzd2Up90FocNjeMZd8CDNf+UuCFc8ht+6Cx6k+W/cBWFJp6fwczehnxB4XfNrzN+FBo950X/hHvT7SOgaHNPmGbiJ5P/qErq6GgI9Q/U/ugH9/vlRV9f/BBgANSGm4os6Hc8AAAAASUVORK5CYII= \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua index 53de1e66ad..642fa091a5 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua @@ -56,6 +56,7 @@ o:value("select", translate("Select")) o:value("url-test", translate("URL-Test")) o:value("fallback", translate("Fallback")) o:value("load-balance", translate("Load-Balance")) +o:value("relay", translate("Relay Traffic")) o = s:option(Value, "name", translate("Group Name")) o.rmempty = false diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-config.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-config.lua index 7377a8f48b..a48b7f5153 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-config.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-config.lua @@ -101,7 +101,9 @@ o.description = font_red..bold_on..translate("No Need Set when Config Create, Th o.rmempty = true m.uci:foreach("openclash", "groups", function(s) - o:value(s.name) + if s.name ~= "" and s.name ~= nil and s.type ~= "relay" then + o:value(s.name) + end end) local t = { diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua index e0528588e2..b8d2b793d3 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua @@ -250,7 +250,9 @@ o.description = font_red..bold_on..translate("No Need Set when Config Create, Th o.rmempty = true m.uci:foreach("openclash", "groups", function(s) - o:value(s.name) + if s.name ~= "" and s.name ~= nil then + o:value(s.name) + end end) local t = { diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm index 3eacb18068..f8cea6e0b8 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm @@ -64,7 +64,7 @@ var arr_core = corelv.split(","); var corelvis = arr_core[0]; var new_ch = arr_core[1]; - if ( corelvis != "" && new_ch == "2" && status.corecv != "" && status.corecv != "0" && corelvis != "\n" ) { + if ( new_ch == "2" ) { core_lv.innerHTML = ""+corelvis+"<%:%>"; } else if (corelvis != "" && corelvis != "\n" ) { @@ -78,10 +78,10 @@ var oplvis = arr_op[0]; var new_op = arr_op[1]; op_cv.innerHTML = status.opcv ? ""+status.opcv+"" : "<%:Unknown%>"; - if ( status.oplv != "" && status.oplv != "\n" && new_op == "2" && status.opcv != "" ) { + if ( new_op == "2" ) { op_lv.innerHTML = ""+oplvis+"<%:%>"; } - else if (status.oplv != "" && status.oplv != "\n") { + else if (oplvis != "" && oplvis != "\n") { op_lv.innerHTML = ""+oplvis+""; } else { @@ -123,7 +123,7 @@ var arr_core = corelv.split(","); var corelvis = arr_core[0]; var new_ch = arr_core[1]; - if ( corelvis != "" && new_ch == "2" && status.corecv != "" && status.corecv != "0" && corelvis != "\n" ) { + if ( new_ch == "2" ) { core_lv.innerHTML = ""+corelvis+"<%:%>"; } else if (corelvis != "" && corelvis != "\n" ) { @@ -137,10 +137,10 @@ var oplvis = arr_op[0]; var new_op = arr_op[1]; op_cv.innerHTML = status.opcv ? ""+status.opcv+"" : "<%:Unknown%>"; - if ( status.oplv != "" && status.oplv != "\n" && new_op == "2" && status.opcv != "" ) { + if ( new_op == "2" ) { op_lv.innerHTML = ""+oplvis+"<%:%>"; } - else if (status.oplv != "" && status.oplv != "\n") { + else if (oplvis != "" && oplvis != "\n") { op_lv.innerHTML = ""+oplvis+""; } else { diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/clash_version.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/clash_version.sh index 03c7adf6b4..6884b37e57 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/clash_version.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/clash_version.sh @@ -1,9 +1,8 @@ #!/bin/sh CKTIME=$(date "+%Y-%m-%d-%H") LAST_OPVER="/tmp/clash_last_version" -LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F '.' '{print $2$3}' 2>/dev/null) -CLASH_VERF=$(/etc/openclash/clash -v 2>/dev/null) -CLASH_VER=$(echo "$CLASH_VERF" 2>/dev/null |awk -F ' ' '{print $2}' 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F '.' '{print $2$3}' 2>/dev/null) +LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F 'v' '{print $2}' 2>/dev/null |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) +CLASH_VER=$(/etc/openclash/clash -v 2>/dev/null |awk -F ' ' '{print $2}' 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F 'v' '{print $2}' 2>/dev/null |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null) PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null) @@ -18,13 +17,14 @@ if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{prin else curl -sL --connect-timeout 10 --retry 2 "$VERSION_URL" -o $LAST_OPVER >/dev/null 2>&1 fi - LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F '.' '{print $2$3}' 2>/dev/null) if [ "$?" -eq "0" ] && [ -s "$LAST_OPVER" ]; then + LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F '-' '{print $1$2}' 2>/dev/null |awk -F 'v' '{print $2}' 2>/dev/null |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) echo "CheckTime:$CKTIME" >>$LAST_OPVER else rm -rf $LAST_OPVER fi fi -if [ "$LAST_VER" -gt "$CLASH_VER" ]; then + +if [ "$(expr "$LAST_VER" \> "$CLASH_VER")" -eq 1 ]; then return 2 fi 2>/dev/null \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_update.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_update.sh index c09e3f60e3..460b788dc6 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_update.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_update.sh @@ -8,15 +8,15 @@ LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") LOG_FILE="/tmp/openclash.log" LAST_OPVER="/tmp/openclash_last_version" LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |sed "s/^v//g") -OP_CV=$(sed -n 1p /etc/openclash/openclash_version 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}') -OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}') +OP_CV=$(sed -n 1p /etc/openclash/openclash_version 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) +OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null) PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null) if [ -s "/tmp/openclash.auth" ]; then PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null) fi -if [ "$OP_CV" -lt "$OP_LV" ] && [ -f "$LAST_OPVER" ]; then +if [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ] && [ -f "$LAST_OPVER" ]; then echo "开始下载 OpenClash-$LAST_VER ..." >$START_LOG if pidof clash >/dev/null; then curl -sL --connect-timeout 10 --retry 5 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://github.com/vernesong/OpenClash/releases/download/v"$LAST_VER"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk >/dev/null 2>&1 diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_version.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_version.sh index 52e74cebd9..7dc5b710c9 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_version.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_version.sh @@ -1,8 +1,8 @@ #!/bin/sh CKTIME=$(date "+%Y-%m-%d-%H") LAST_OPVER="/tmp/openclash_last_version" -OP_CV=$(sed -n 1p /etc/openclash/openclash_version 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}') -OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}') +OP_CV=$(sed -n 1p /etc/openclash/openclash_version 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) +OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null) PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null) @@ -18,20 +18,20 @@ if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{prin curl -sL --connect-timeout 10 --retry 2 "$VERSION_URL" -o $LAST_OPVER >/dev/null 2>&1 fi if [ "$?" -eq "0" ] && [ -s "$LAST_OPVER" ]; then - OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}') - if [ "$OP_CV" -ge "$OP_LV" ]; then + OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $1"."$2$3}' 2>/dev/null) + if [ "$(expr "$OP_CV" \>= "$OP_LV")" -eq 1 ]; then sed -i "/^https:/i\CheckTime:${CKTIME}" "$LAST_OPVER" 2>/dev/null sed -i '/^https:/,$d' $LAST_OPVER - elif [ "$OP_CV" -lt "$OP_LV" ]; then + elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ]; then sed -i "/^https:/i\CheckTime:${CKTIME}" "$LAST_OPVER" 2>/dev/null return 2 fi else rm -rf "$LAST_OPVER" fi -elif [ "$OP_CV" -ge "$OP_LV" ]; then +elif [ "$(expr "$OP_CV" \>= "$OP_LV")" -eq 1 ]; then sed -i '/^CheckTime:/,$d' $LAST_OPVER echo "CheckTime:$CKTIME" >> $LAST_OPVER -elif [ "$OP_CV" -lt "$OP_LV" ]; then +elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ]; then return 2 fi diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/8.61fe79e386de4226efcc.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/8.61fe79e386de4226efcc.js deleted file mode 100644 index 140c9c8efe..0000000000 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/8.61fe79e386de4226efcc.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"+924":function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return c}));var r=n("9AQC");function o(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e?t:t.length<=e?t:t.substr(0,e)+"..."}function i(t,e){var n=t,r=n.length;if(r<=150)return n;e>r&&(e=r);var o=Math.max(e-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i"}try{c.currentTarget=Object(r.c)(a.currentTarget)?Object(i.i)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(t){c.currentTarget=""}for(var o in"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(c.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,o)&&(c[o]=a);return c}return t}function p(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function l(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r=d(t,e);return p(r)>n?l(t,e-1,n):r}function f(e,n){return"domain"===n&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==t&&e===t?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":Object(r.l)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+Object(i.f)(e)+"]":e}function h(t,e,n,i){if(void 0===n&&(n=1/0),void 0===i&&(i=new o.a),0===n)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=f(t);return Object(r.i)(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var a=f(e,t);if(Object(r.i)(a))return a;var c=u(e),s=Array.isArray(e)?[]:{};if(i.memoize(e))return"[Circular ~]";for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(s[p]=h(p,c[p],n-1,i));return i.unmemoize(e),s}function d(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,n){return h(t,n,e)})))}catch(t){return"**non-serializable**"}}function v(t,e){void 0===e&&(e=40);var n=Object.keys(u(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(a.d)(n[0],e);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>e))return r===n.length?o:Object(a.d)(o,e)}return""}}).call(this,n("yLpj"))},"8LbN":function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n("9/Zf"),o=Object(r.g)(),i="Sentry Logger ",a=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e"}return t.event_id||""}function h(t){var e=u();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)}));var o=t();return Object.keys(r).forEach((function(t){n[t]=r[t]})),o}function d(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function v(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(n){t.exception.values[0].mechanism[n]=e[n]}))}catch(t){}}function _(){try{return document.location.href}catch(t){return""}}function g(t){try{for(var e=t,n=[],r=0,o=0,i=" > ".length,a=void 0;e&&r++<5&&!("html"===(a=y(e))||r>1&&o+n.length*i+a.length>=80);)n.push(a),o+=a.length,e=e.parentNode;return n.reverse().join(" > ")}catch(t){return""}}function y(t){var e,n,r,o,a,c=t,s=[];if(!c||!c.tagName)return"";if(s.push(c.tagName.toLowerCase()),c.id&&s.push("#"+c.id),(e=c.className)&&Object(i.k)(e))for(n=e.split(/\s+/),a=0;a"}catch(t){return""}}}).call(this,n("8oxB"),n("yLpj"),n("3UD+")(t))},"9AQC":function(t,e,n){"use strict";function r(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function o(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function i(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function s(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function p(t){return"undefined"!=typeof Event&&v(t,Event)}function l(t){return"undefined"!=typeof Element&&v(t,Element)}function f(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return u(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t,e){try{return t instanceof e}catch(t){return!1}}n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"k",(function(){return c})),n.d(e,"i",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"f",(function(){return p})),n.d(e,"c",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"m",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"g",(function(){return v}))},HR75:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r,o=n("9AQC");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(r||(r={}));var i=function(){function t(t){var e=this;this._state=r.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(r.RESOLVED,t)},this._reject=function(t){e._setResult(r.REJECTED,t)},this._setResult=function(t,n){e._state===r.PENDING&&(Object(o.m)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){e._state!==r.PENDING&&(e._state===r.REJECTED?e._handlers.forEach((function(t){t.onrejected&&t.onrejected(e._value)})):e._handlers.forEach((function(t){t.onfulfilled&&t.onfulfilled(e._value)})),e._handlers=[])};try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}return t.prototype.toString=function(){return"[object SyncPromise]"},t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.all=function(e){return new t((function(n,r){if(Array.isArray(e))if(0!==e.length){var o=e.length,i=[];e.forEach((function(e,a){t.resolve(e).then((function(t){i[a]=t,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,n){var r=this;return new t((function(t,o){r._attachHandler({onfulfilled:function(n){if(e)try{return void t(e(n))}catch(t){return void o(t)}else t(n)},onrejected:function(e){if(n)try{return void t(n(e))}catch(t){return void o(t)}else o(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var o,i;return n.then((function(t){i=!1,o=t,e&&e()}),(function(t){i=!0,o=t,e&&e()})).then((function(){i?r(o):t(o)}))}))},t}()},KjyA:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var r=n("mrSG"),o=n("HR75"),i=n("9AQC"),a=n("9/Zf"),c=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){t._scopeListeners.forEach((function(e){e(t)})),t._notifyingListeners=!1})))},t.prototype._notifyEventProcessors=function(t,e,n,a){var c=this;return void 0===a&&(a=0),new o.a((function(o,s){var u=t[a];if(null===e||"function"!=typeof u)o(e);else{var p=u(r.a({},e),n);Object(i.m)(p)?p.then((function(e){return c._notifyEventProcessors(t,e,n,a+1).then(o)})).then(null,s):c._notifyEventProcessors(t,p,n,a+1).then(o).then(null,s)}}))},t.prototype.setUser=function(t){return this._user=t||{},this._notifyScopeListeners(),this},t.prototype.setTags=function(t){return this._tags=r.a({},this._tags,t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=r.a({},this._tags,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=r.a({},this._extra,t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=r.a({},this._extra,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this._transaction=t,this._span&&(this._span.transaction=t),this._notifyScopeListeners(),this},t.prototype.setContext=function(t,e){var n;return this._context=r.a({},this._context,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=r.e(e._breadcrumbs),n._tags=r.a({},e._tags),n._extra=r.a({},e._extra),n._context=r.a({},e._context),n._user=e._user,n._level=e._level,n._span=e._span,n._transaction=e._transaction,n._fingerprint=e._fingerprint,n._eventProcessors=r.e(e._eventProcessors)),n},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n=r.a({timestamp:Object(a.m)()},t);return this._breadcrumbs=void 0!==e&&e>=0?r.e(this._breadcrumbs,[n]).slice(-e):r.e(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t.prototype.applyToEvent=function(t,e){return this._extra&&Object.keys(this._extra).length&&(t.extra=r.a({},this._extra,t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=r.a({},this._tags,t.tags)),this._user&&Object.keys(this._user).length&&(t.user=r.a({},this._user,t.user)),this._context&&Object.keys(this._context).length&&(t.contexts=r.a({},this._context,t.contexts)),this._level&&(t.level=this._level),this._transaction&&(t.transaction=this._transaction),this._span&&(t.contexts=r.a({trace:this._span.getTraceContext()},t.contexts)),this._applyFingerprint(t),t.breadcrumbs=r.e(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(r.e(s(),this._eventProcessors),t,e)},t}();function s(){var t=Object(a.g)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function u(t){s().push(t)}},WSEr:function(t,e,n){"use strict";n.r(e),n.d(e,"Severity",(function(){return a})),n.d(e,"Status",(function(){return c})),n.d(e,"addGlobalEventProcessor",(function(){return u.b})),n.d(e,"addBreadcrumb",(function(){return _})),n.d(e,"captureException",(function(){return f})),n.d(e,"captureEvent",(function(){return d})),n.d(e,"captureMessage",(function(){return h})),n.d(e,"configureScope",(function(){return v})),n.d(e,"getHubFromCarrier",(function(){return p.c})),n.d(e,"getCurrentHub",(function(){return p.b})),n.d(e,"Hub",(function(){return p.a})),n.d(e,"Scope",(function(){return u.a})),n.d(e,"setContext",(function(){return g})),n.d(e,"setExtra",(function(){return m})),n.d(e,"setExtras",(function(){return y})),n.d(e,"setTag",(function(){return E})),n.d(e,"setTags",(function(){return b})),n.d(e,"setUser",(function(){return O})),n.d(e,"withScope",(function(){return j})),n.d(e,"BrowserClient",(function(){return lt})),n.d(e,"defaultIntegrations",(function(){return qt})),n.d(e,"forceLoad",(function(){return Jt})),n.d(e,"init",(function(){return Wt})),n.d(e,"lastEventId",(function(){return Gt})),n.d(e,"onLoad",(function(){return Xt})),n.d(e,"showReportDialog",(function(){return Yt})),n.d(e,"flush",(function(){return zt})),n.d(e,"close",(function(){return $t})),n.d(e,"wrap",(function(){return Vt})),n.d(e,"SDK_NAME",(function(){return ut})),n.d(e,"SDK_VERSION",(function(){return pt})),n.d(e,"Integrations",(function(){return Zt})),n.d(e,"Transports",(function(){return i}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ft})),n.d(r,"InboundFilters",(function(){return dt}));var o={};n.r(o),n.d(o,"GlobalHandlers",(function(){return Bt})),n.d(o,"TryCatch",(function(){return mt})),n.d(o,"Breadcrumbs",(function(){return Pt})),n.d(o,"LinkedErrors",(function(){return Ft})),n.d(o,"UserAgent",(function(){return Mt}));var i={};n.r(i),n.d(i,"BaseTransport",(function(){return ot})),n.d(i,"FetchTransport",(function(){return at})),n.d(i,"XHRTransport",(function(){return ct}));var a,c,s=n("mrSG");!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(a||(a={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(a||(a={})),function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(c||(c={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(c||(c={}));var u=n("KjyA"),p=n("lW6c");function l(t){for(var e=[],n=1;n1&&(l=h.slice(0,-1).join("/"),f=h.pop()),this._fromComponents({host:c,pass:a,path:l,projectId:f,port:p,protocol:r,user:o})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new w("Invalid Dsn")})),"http"!==this.protocol&&"https"!==this.protocol)throw new w("Invalid Dsn");if(this.port&&isNaN(parseInt(this.port,10)))throw new w("Invalid Dsn")},t}(),T=n("6PXS"),R=function(){function t(t){this.dsn=t,this._dsnObject=new k(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getStoreEndpoint=function(){return""+this._getBaseUrl()+this.getStoreEndpointPath()},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var t={sentry_key:this._dsnObject.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+Object(T.e)(t)},t.prototype._getBaseUrl=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,n=this._getBaseUrl()+(e.path?"/"+e.path:"")+"/api/embed/error-page/",r=[];for(var o in r.push("dsn="+e.toString()),t)if("user"===o){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));return r.length?n+"?"+r.join("&"):n},t}(),I=n("8LbN"),D=n("9AQC"),N=n("HR75"),C=n("+924"),U=n("9/Zf"),L=[];function P(t){var e={};return function(t){var e=t.defaultIntegrations&&s.e(t.defaultIntegrations)||[],n=t.integrations,r=[];if(Array.isArray(n)){var o=n.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===o.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),n.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=s.e(e);var a=r.map((function(t){return t.name}));return-1!==a.indexOf("Debug")&&r.push.apply(r,s.e(r.splice(a.indexOf("Debug"),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===L.indexOf(t.name)&&(t.setupOnce(u.b,p.b),L.push(t.name),I.a.log("Integration installed: "+t.name))}(t)})),e}var A=function(){function t(t,e){this._integrations={},this._processing=!1,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new k(e.dsn)),this._isEnabled()&&(this._integrations=P(this._options))}return t.prototype.captureException=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._getBackend().eventFromException(t,e).then((function(t){return r._processEvent(t,e,n)})).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){I.a.error(t),r._processing=!1})),o},t.prototype.captureMessage=function(t,e,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(Object(D.i)(t)?this._getBackend().eventFromMessage(""+t,e,n):this._getBackend().eventFromException(t,n)).then((function(t){return o._processEvent(t,n,r)})).then((function(t){i=t&&t.event_id,o._processing=!1})).then(null,(function(t){I.a.error(t),o._processing=!1})),i},t.prototype.captureEvent=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._processEvent(t,e,n).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){I.a.error(t),r._processing=!1})),o},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(n){return clearInterval(n.interval),e._getBackend().getTransport().close(t).then((function(t){return n.ready&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.getIntegrations=function(){return this._integrations||{}},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return I.a.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._isClientProcessing=function(t){var e=this;return new N.a((function(n){var r=0,o=0;clearInterval(o),o=setInterval((function(){e._processing?(r+=1,t&&r>=t&&n({interval:o,ready:!1})):n({interval:o,ready:!0})}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.environment,a=o.release,c=o.dist,u=o.maxValueLength,p=void 0===u?250:u,l=o.normalizeDepth,f=void 0===l?3:l,h=s.a({},t);void 0===h.environment&&void 0!==i&&(h.environment=i),void 0===h.release&&void 0!==a&&(h.release=a),void 0===h.dist&&void 0!==c&&(h.dist=c),h.message&&(h.message=Object(C.d)(h.message,p));var d=h.exception&&h.exception.values&&h.exception.values[0];d&&d.value&&(d.value=Object(C.d)(d.value,p));var v=h.request;v&&v.url&&(v.url=Object(C.d)(v.url,p)),void 0===h.event_id&&(h.event_id=n&&n.event_id?n.event_id:Object(U.n)()),this._addIntegrations(h.sdk);var _=N.a.resolve(h);return e&&(_=e.applyToEvent(h,n)),_.then((function(t){return"number"==typeof f&&f>0?r._normalizeEvent(t,f):t}))},t.prototype._normalizeEvent=function(t,e){return t?s.a({},t,t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return s.a({},t,t.data&&{data:Object(T.c)(t.data,e)})}))},t.user&&{user:Object(T.c)(t.user,e)},t.contexts&&{contexts:Object(T.c)(t.contexts,e)},t.extra&&{extra:Object(T.c)(t.extra,e)}):null},t.prototype._addIntegrations=function(t){var e=Object.keys(this._integrations);t&&e.length>0&&(t.integrations=e)},t.prototype._processEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;return this._isEnabled()?"number"==typeof a&&Math.random()>a?N.a.reject("This event has been sampled, will not send event."):new N.a((function(o,a){r._prepareEvent(t,n,e).then((function(t){if(null!==t){var n=t;if(e&&e.data&&!0===e.data.__sentry__||!i)return r._getBackend().sendEvent(n),void o(n);var c=i(t,e);if(void 0===c)I.a.error("`beforeSend` method has to return `null` or a valid event.");else if(Object(D.m)(c))r._handleAsyncBeforeSend(c,o,a);else{if(null===(n=c))return I.a.log("`beforeSend` returned `null`, will not send event."),void o(null);r._getBackend().sendEvent(n),o(n)}}else a("An event processor returned null, will not send event.")})).then(null,(function(t){r.captureException(t,{data:{__sentry__:!0},originalException:t}),a("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))})):N.a.reject("SDK not enabled, will not send event.")},t.prototype._handleAsyncBeforeSend=function(t,e,n){var r=this;t.then((function(t){null!==t?(r._getBackend().sendEvent(t),e(t)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(t){n("beforeSend rejected with "+t)}))},t}(),B=function(){function t(){}return t.prototype.sendEvent=function(t){return N.a.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:c.Skipped})},t.prototype.close=function(t){return N.a.resolve(!0)},t}(),F=function(){function t(t){this._options=t,this._options.dsn||I.a.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype._setupTransport=function(){return new B},t.prototype.eventFromException=function(t,e){throw new w("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new w("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){I.a.error("Error while sending event: "+t)}))},t.prototype.getTransport=function(){return this._transport},t}();function H(){if(!("fetch"in Object(U.g)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function M(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function q(){if(!H())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var W=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Y=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,G=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,J=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,X=/\((\S*)(?::(\d+))(?::(\d+))\)/;function z(t){var e=null,n=t&&t.framesToPop;try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],c=0;c eval")>-1&&(e=J.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]=""):0!==a||n[5]||void 0===t.columnNumber||(o[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),o.push(r)}if(!o.length)return null;return{message:V(t),name:t.name,stack:o}}(t))return $(e,n)}catch(t){}return{message:V(t),name:t&&t.name,stack:[],failed:!0}}function $(t,e){try{return s.a({},t,{stack:t.stack.slice(e)})}catch(e){return t}}function V(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function K(t){var e=Z(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Q(t){return{exception:{values:[K(t)]}}}function Z(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).slice(0,50).reverse()}function tt(t,e,n){var r;if(void 0===n&&(n={}),Object(D.e)(t)&&t.error)return r=Q(z(t=t.error));if(Object(D.a)(t)||Object(D.b)(t)){var o=t,i=o.name||(Object(D.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=et(a,e,n),Object(U.b)(r,a),r}return Object(D.d)(t)?r=Q(z(t)):Object(D.h)(t)||Object(D.f)(t)?(r=function(t,e,n){var r={exception:{values:[{type:Object(D.f)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(T.a)(t)}]},extra:{__serialized__:Object(T.d)(t)}};if(e){var o=Z(z(e).stack);r.stacktrace={frames:o}}return r}(t,e,n.rejection),Object(U.a)(r,{synthetic:!0}),r):(r=et(t,e,n),Object(U.b)(r,""+t,void 0),Object(U.a)(r,{synthetic:!0}),r)}function et(t,e,n){void 0===n&&(n={});var r={message:t};if(n.attachStacktrace&&e){var o=Z(z(e).stack);r.stacktrace={frames:o}}return r}var nt,rt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),t);N.a.all(e._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},t}(),ot=function(){function t(t){this.options=t,this._buffer=new rt(30),this.url=new R(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new w("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t}(),it=Object(U.g)(),at=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disabledUntil=new Date(Date.now()),e}return s.b(e,t),e.prototype.sendEvent=function(t){var e=this;if(new Date(Date.now())0}function gt(){vt+=1,setTimeout((function(){vt-=1}))}function yt(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(t){return yt(t,e)}));return t.handleEvent?t.handleEvent.apply(this,o):t.apply(this,o)}catch(t){throw gt(),j((function(n){n.addEventProcessor((function(t){var n=s.a({},t);return e.mechanism&&(Object(U.b)(n,void 0,void 0),Object(U.a)(n,e.mechanism)),n.extra=s.a({},n.extra,{arguments:r}),n})),f(t)})),t}};try{for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch(t){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(t){}return r}var bt,mt=function(){function t(){this._ignoreOnError=0,this.name=t.id}return t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],n=0;n2?e[2]:void 0;if(r){var o=bt,i=String(r);bt=i,St("history",{from:o,to:i})}return t.apply(this,e)}}Et.onpopstate=function(){for(var t=[],e=0;e"}0!==e.length&&Object(p.b)().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;Object(p.b)().addBreadcrumb({category:"xhr",data:t.xhr.__sentry_xhr__,type:"http"},{xhr:t.xhr})}else t.xhr.__sentry_own_request__&&At(t.args[0])},t.prototype._fetchBreadcrumb=function(t){if(t.endTimestamp){var e=Object(p.b)().getClient(),n=e&&e.getDsn();if(n){var r=new R(n).getStoreEndpoint();if(r&&-1!==t.fetchData.url.indexOf(r)&&"POST"===t.fetchData.method&&t.args[1]&&t.args[1].body)return void At(t.args[1].body)}t.error?Object(p.b)().addBreadcrumb({category:"fetch",data:s.a({},t.fetchData,{status_code:t.response.status}),level:a.Error,type:"http"},{data:t.error,input:t.args}):Object(p.b)().addBreadcrumb({category:"fetch",data:s.a({},t.fetchData,{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})}},t.prototype._historyBreadcrumb=function(t){var e=Object(U.g)(),n=t.from,r=t.to,o=Object(U.l)(e.location.href),i=Object(U.l)(n),a=Object(U.l)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Object(p.b)().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},t.prototype.setupOnce=function(){var t=this;this._options.console&&wt({callback:function(){for(var e=[],n=0;n0?e:Object(U.h)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),Ft=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){Object(u.b)((function(e,n){var r=Object(p.b)().getIntegration(t);return r?r._handler(e,n):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(D.g)(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=s.e(n,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!Object(D.g)(t[e],Error)||n.length+1>=this._limit)return n;var r=K(z(t[e]));return this._walkErrorTree(t[e],e,s.e([r],n))},t.id="LinkedErrors",t}(),Ht=Object(U.g)(),Mt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Object(u.b)((function(e){if(Object(p.b)().getIntegration(t)){if(!Ht.navigator||!Ht.location)return e;var n=e.request||{};return n.url=n.url||Ht.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=Ht.navigator.userAgent,s.a({},e,{request:n})}return e}))},t.id="UserAgent",t}(),qt=[new r.InboundFilters,new r.FunctionToString,new mt,new Pt,new Bt,new Ft,new Mt];function Wt(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=qt),void 0===t.release){var e=Object(U.g)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&I.a.enable(),Object(p.b)().bindClient(new t(e))}(lt,t)}function Yt(t){void 0===t&&(t={}),t.eventId||(t.eventId=Object(p.b)().lastEventId());var e=Object(p.b)().getClient();e&&e.showReportDialog(t)}function Gt(){return Object(p.b)().lastEventId()}function Jt(){}function Xt(t){t()}function zt(t){var e=Object(p.b)().getClient();return e?e.flush(t):N.a.reject(!1)}function $t(t){var e=Object(p.b)().getClient();return e?e.close(t):N.a.reject(!1)}function Vt(t){return yt(t)()}var Kt={},Qt=Object(U.g)();Qt.Sentry&&Qt.Sentry.Integrations&&(Kt=Qt.Sentry.Integrations);var Zt=s.a({},Kt,r,o)},lW6c:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"c",(function(){return f}));var r=n("mrSG"),o=n("9/Zf"),i=n("8LbN"),a=n("KjyA"),c=function(){function t(t,e,n){void 0===e&&(e=new a.a),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:t,scope:e})}return t.prototype._invokeClient=function(t){for(var e,n=[],o=1;o0?t[t.length-1].scope:void 0,n=a.a.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n},t.prototype.popScope=function(){return void 0!==this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var n=this._lastEventId=Object(o.n)(),i=e;if(!e){var a=void 0;try{throw new Error("Sentry syntheticException")}catch(t){a=t}i={originalException:t,syntheticException:a}}return this._invokeClient("captureException",t,r.a({},i,{event_id:n})),n},t.prototype.captureMessage=function(t,e,n){var i=this._lastEventId=Object(o.n)(),a=n;if(!n){var c=void 0;try{throw new Error(t)}catch(t){c=t}a={originalException:t,syntheticException:c}}return this._invokeClient("captureMessage",t,e,r.a({},a,{event_id:i})),i},t.prototype.captureEvent=function(t,e){var n=this._lastEventId=Object(o.n)();return this._invokeClient("captureEvent",t,r.a({},e,{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop();if(n.scope&&n.client){var i=n.client.getOptions&&n.client.getOptions()||{},a=i.beforeBreadcrumb,c=void 0===a?null:a,s=i.maxBreadcrumbs,u=void 0===s?100:s;if(!(u<=0)){var p=Object(o.m)(),l=r.a({timestamp:p},t),f=c?Object(o.c)((function(){return c(l,e)})):l;null!==f&&n.scope.addBreadcrumb(f,Math.min(u,100))}}},t.prototype.setUser=function(t){var e=this.getStackTop();e.scope&&e.scope.setUser(t)},t.prototype.setTags=function(t){var e=this.getStackTop();e.scope&&e.scope.setTags(t)},t.prototype.setExtras=function(t){var e=this.getStackTop();e.scope&&e.scope.setExtras(t)},t.prototype.setTag=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setTag(t,e)},t.prototype.setExtra=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)},t.prototype.setContext=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop();e.scope&&e.client&&t(e.scope)},t.prototype.run=function(t){var e=u(this);try{t(this)}finally{u(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return i.a.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t,e){return void 0===e&&(e=!1),this._callExtensionMethod("startSpan",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype._callExtensionMethod=function(t){for(var e=[],n=1;nr&&(e=r);var o=Math.max(e-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i"}try{c.currentTarget=Object(r.c)(a.currentTarget)?Object(i.i)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(t){c.currentTarget=""}for(var o in"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(c.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,o)&&(c[o]=a);return c}return t}function p(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function l(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r=d(t,e);return p(r)>n?l(t,e-1,n):r}function f(e,n){return"domain"===n&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==t&&e===t?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":Object(r.l)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+Object(i.f)(e)+"]":e}function h(t,e,n,i){if(void 0===n&&(n=1/0),void 0===i&&(i=new o.a),0===n)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=f(t);return Object(r.i)(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var a=f(e,t);if(Object(r.i)(a))return a;var c=u(e),s=Array.isArray(e)?[]:{};if(i.memoize(e))return"[Circular ~]";for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(s[p]=h(p,c[p],n-1,i));return i.unmemoize(e),s}function d(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,n){return h(t,n,e)})))}catch(t){return"**non-serializable**"}}function v(t,e){void 0===e&&(e=40);var n=Object.keys(u(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(a.d)(n[0],e);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>e))return r===n.length?o:Object(a.d)(o,e)}return""}}).call(this,n("yLpj"))},"8LbN":function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n("9/Zf"),o=Object(r.g)(),i="Sentry Logger ",a=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e"}return t.event_id||""}function h(t){var e=u();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)}));var o=t();return Object.keys(r).forEach((function(t){n[t]=r[t]})),o}function d(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function v(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(n){t.exception.values[0].mechanism[n]=e[n]}))}catch(t){}}function _(){try{return document.location.href}catch(t){return""}}function g(t){try{for(var e=t,n=[],r=0,o=0,i=" > ".length,a=void 0;e&&r++<5&&!("html"===(a=y(e))||r>1&&o+n.length*i+a.length>=80);)n.push(a),o+=a.length,e=e.parentNode;return n.reverse().join(" > ")}catch(t){return""}}function y(t){var e,n,r,o,a,c=t,s=[];if(!c||!c.tagName)return"";if(s.push(c.tagName.toLowerCase()),c.id&&s.push("#"+c.id),(e=c.className)&&Object(i.k)(e))for(n=e.split(/\s+/),a=0;a"}catch(t){return""}}}).call(this,n("8oxB"),n("yLpj"),n("3UD+")(t))},"9AQC":function(t,e,n){"use strict";function r(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function o(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function i(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function s(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function p(t){return"undefined"!=typeof Event&&v(t,Event)}function l(t){return"undefined"!=typeof Element&&v(t,Element)}function f(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return u(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t,e){try{return t instanceof e}catch(t){return!1}}n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"k",(function(){return c})),n.d(e,"i",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"f",(function(){return p})),n.d(e,"c",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"m",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"g",(function(){return v}))},HR75:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r,o=n("9AQC");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(r||(r={}));var i=function(){function t(t){var e=this;this._state=r.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(r.RESOLVED,t)},this._reject=function(t){e._setResult(r.REJECTED,t)},this._setResult=function(t,n){e._state===r.PENDING&&(Object(o.m)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){e._state!==r.PENDING&&(e._state===r.REJECTED?e._handlers.forEach((function(t){t.onrejected&&t.onrejected(e._value)})):e._handlers.forEach((function(t){t.onfulfilled&&t.onfulfilled(e._value)})),e._handlers=[])};try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}return t.prototype.toString=function(){return"[object SyncPromise]"},t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.all=function(e){return new t((function(n,r){if(Array.isArray(e))if(0!==e.length){var o=e.length,i=[];e.forEach((function(e,a){t.resolve(e).then((function(t){i[a]=t,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,n){var r=this;return new t((function(t,o){r._attachHandler({onfulfilled:function(n){if(e)try{return void t(e(n))}catch(t){return void o(t)}else t(n)},onrejected:function(e){if(n)try{return void t(n(e))}catch(t){return void o(t)}else o(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var o,i;return n.then((function(t){i=!1,o=t,e&&e()}),(function(t){i=!0,o=t,e&&e()})).then((function(){i?r(o):t(o)}))}))},t}()},KjyA:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var r=n("mrSG"),o=n("HR75"),i=n("9AQC"),a=n("9/Zf"),c=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){t._scopeListeners.forEach((function(e){e(t)})),t._notifyingListeners=!1})))},t.prototype._notifyEventProcessors=function(t,e,n,a){var c=this;return void 0===a&&(a=0),new o.a((function(o,s){var u=t[a];if(null===e||"function"!=typeof u)o(e);else{var p=u(r.a({},e),n);Object(i.m)(p)?p.then((function(e){return c._notifyEventProcessors(t,e,n,a+1).then(o)})).then(null,s):c._notifyEventProcessors(t,p,n,a+1).then(o).then(null,s)}}))},t.prototype.setUser=function(t){return this._user=t||{},this._notifyScopeListeners(),this},t.prototype.setTags=function(t){return this._tags=r.a({},this._tags,t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=r.a({},this._tags,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=r.a({},this._extra,t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=r.a({},this._extra,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this._transaction=t,this._span&&(this._span.transaction=t),this._notifyScopeListeners(),this},t.prototype.setContext=function(t,e){var n;return this._context=r.a({},this._context,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=r.e(e._breadcrumbs),n._tags=r.a({},e._tags),n._extra=r.a({},e._extra),n._context=r.a({},e._context),n._user=e._user,n._level=e._level,n._span=e._span,n._transaction=e._transaction,n._fingerprint=e._fingerprint,n._eventProcessors=r.e(e._eventProcessors)),n},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n=r.a({timestamp:Object(a.m)()},t);return this._breadcrumbs=void 0!==e&&e>=0?r.e(this._breadcrumbs,[n]).slice(-e):r.e(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t.prototype.applyToEvent=function(t,e){return this._extra&&Object.keys(this._extra).length&&(t.extra=r.a({},this._extra,t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=r.a({},this._tags,t.tags)),this._user&&Object.keys(this._user).length&&(t.user=r.a({},this._user,t.user)),this._context&&Object.keys(this._context).length&&(t.contexts=r.a({},this._context,t.contexts)),this._level&&(t.level=this._level),this._transaction&&(t.transaction=this._transaction),this._span&&(t.contexts=r.a({trace:this._span.getTraceContext()},t.contexts)),this._applyFingerprint(t),t.breadcrumbs=r.e(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(r.e(s(),this._eventProcessors),t,e)},t}();function s(){var t=Object(a.g)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function u(t){s().push(t)}},WSEr:function(t,e,n){"use strict";n.r(e),n.d(e,"Severity",(function(){return a})),n.d(e,"Status",(function(){return c})),n.d(e,"addGlobalEventProcessor",(function(){return u.b})),n.d(e,"addBreadcrumb",(function(){return _})),n.d(e,"captureException",(function(){return f})),n.d(e,"captureEvent",(function(){return d})),n.d(e,"captureMessage",(function(){return h})),n.d(e,"configureScope",(function(){return v})),n.d(e,"getHubFromCarrier",(function(){return p.c})),n.d(e,"getCurrentHub",(function(){return p.b})),n.d(e,"Hub",(function(){return p.a})),n.d(e,"Scope",(function(){return u.a})),n.d(e,"setContext",(function(){return g})),n.d(e,"setExtra",(function(){return m})),n.d(e,"setExtras",(function(){return y})),n.d(e,"setTag",(function(){return E})),n.d(e,"setTags",(function(){return b})),n.d(e,"setUser",(function(){return O})),n.d(e,"withScope",(function(){return j})),n.d(e,"BrowserClient",(function(){return lt})),n.d(e,"defaultIntegrations",(function(){return qt})),n.d(e,"forceLoad",(function(){return Jt})),n.d(e,"init",(function(){return Wt})),n.d(e,"lastEventId",(function(){return Gt})),n.d(e,"onLoad",(function(){return Xt})),n.d(e,"showReportDialog",(function(){return Yt})),n.d(e,"flush",(function(){return zt})),n.d(e,"close",(function(){return $t})),n.d(e,"wrap",(function(){return Vt})),n.d(e,"SDK_NAME",(function(){return ut})),n.d(e,"SDK_VERSION",(function(){return pt})),n.d(e,"Integrations",(function(){return Zt})),n.d(e,"Transports",(function(){return i}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ft})),n.d(r,"InboundFilters",(function(){return dt}));var o={};n.r(o),n.d(o,"GlobalHandlers",(function(){return Bt})),n.d(o,"TryCatch",(function(){return mt})),n.d(o,"Breadcrumbs",(function(){return Pt})),n.d(o,"LinkedErrors",(function(){return Ft})),n.d(o,"UserAgent",(function(){return Mt}));var i={};n.r(i),n.d(i,"BaseTransport",(function(){return ot})),n.d(i,"FetchTransport",(function(){return at})),n.d(i,"XHRTransport",(function(){return ct}));var a,c,s=n("mrSG");!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(a||(a={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(a||(a={})),function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(c||(c={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(c||(c={}));var u=n("KjyA"),p=n("lW6c");function l(t){for(var e=[],n=1;n1&&(l=h.slice(0,-1).join("/"),f=h.pop()),this._fromComponents({host:c,pass:a,path:l,projectId:f,port:p,protocol:r,user:o})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new w("Invalid Dsn")})),"http"!==this.protocol&&"https"!==this.protocol)throw new w("Invalid Dsn");if(this.port&&isNaN(parseInt(this.port,10)))throw new w("Invalid Dsn")},t}(),T=n("6PXS"),R=function(){function t(t){this.dsn=t,this._dsnObject=new k(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getStoreEndpoint=function(){return""+this._getBaseUrl()+this.getStoreEndpointPath()},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var t={sentry_key:this._dsnObject.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+Object(T.e)(t)},t.prototype._getBaseUrl=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,n=this._getBaseUrl()+(e.path?"/"+e.path:"")+"/api/embed/error-page/",r=[];for(var o in r.push("dsn="+e.toString()),t)if("user"===o){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));return r.length?n+"?"+r.join("&"):n},t}(),I=n("8LbN"),D=n("9AQC"),N=n("HR75"),C=n("+924"),U=n("9/Zf"),L=[];function P(t){var e={};return function(t){var e=t.defaultIntegrations&&s.e(t.defaultIntegrations)||[],n=t.integrations,r=[];if(Array.isArray(n)){var o=n.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===o.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),n.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=s.e(e);var a=r.map((function(t){return t.name}));return-1!==a.indexOf("Debug")&&r.push.apply(r,s.e(r.splice(a.indexOf("Debug"),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===L.indexOf(t.name)&&(t.setupOnce(u.b,p.b),L.push(t.name),I.a.log("Integration installed: "+t.name))}(t)})),e}var A=function(){function t(t,e){this._integrations={},this._processing=!1,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new k(e.dsn))}return t.prototype.captureException=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._getBackend().eventFromException(t,e).then((function(t){return r._processEvent(t,e,n)})).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){I.a.error(t),r._processing=!1})),o},t.prototype.captureMessage=function(t,e,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(Object(D.i)(t)?this._getBackend().eventFromMessage(""+t,e,n):this._getBackend().eventFromException(t,n)).then((function(t){return o._processEvent(t,n,r)})).then((function(t){i=t&&t.event_id,o._processing=!1})).then(null,(function(t){I.a.error(t),o._processing=!1})),i},t.prototype.captureEvent=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._processEvent(t,e,n).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){I.a.error(t),r._processing=!1})),o},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(n){return clearInterval(n.interval),e._getBackend().getTransport().close(t).then((function(t){return n.ready&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=P(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return I.a.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._isClientProcessing=function(t){var e=this;return new N.a((function(n){var r=0,o=0;clearInterval(o),o=setInterval((function(){e._processing?(r+=1,t&&r>=t&&n({interval:o,ready:!1})):n({interval:o,ready:!0})}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.environment,a=o.release,c=o.dist,u=o.maxValueLength,p=void 0===u?250:u,l=o.normalizeDepth,f=void 0===l?3:l,h=s.a({},t);void 0===h.environment&&void 0!==i&&(h.environment=i),void 0===h.release&&void 0!==a&&(h.release=a),void 0===h.dist&&void 0!==c&&(h.dist=c),h.message&&(h.message=Object(C.d)(h.message,p));var d=h.exception&&h.exception.values&&h.exception.values[0];d&&d.value&&(d.value=Object(C.d)(d.value,p));var v=h.request;v&&v.url&&(v.url=Object(C.d)(v.url,p)),void 0===h.event_id&&(h.event_id=n&&n.event_id?n.event_id:Object(U.n)()),this._addIntegrations(h.sdk);var _=N.a.resolve(h);return e&&(_=e.applyToEvent(h,n)),_.then((function(t){return"number"==typeof f&&f>0?r._normalizeEvent(t,f):t}))},t.prototype._normalizeEvent=function(t,e){return t?s.a({},t,t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return s.a({},t,t.data&&{data:Object(T.c)(t.data,e)})}))},t.user&&{user:Object(T.c)(t.user,e)},t.contexts&&{contexts:Object(T.c)(t.contexts,e)},t.extra&&{extra:Object(T.c)(t.extra,e)}):null},t.prototype._addIntegrations=function(t){var e=Object.keys(this._integrations);t&&e.length>0&&(t.integrations=e)},t.prototype._processEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;return this._isEnabled()?"number"==typeof a&&Math.random()>a?N.a.reject("This event has been sampled, will not send event."):new N.a((function(o,a){r._prepareEvent(t,n,e).then((function(t){if(null!==t){var n=t;if(e&&e.data&&!0===e.data.__sentry__||!i)return r._getBackend().sendEvent(n),void o(n);var c=i(t,e);if(void 0===c)I.a.error("`beforeSend` method has to return `null` or a valid event.");else if(Object(D.m)(c))r._handleAsyncBeforeSend(c,o,a);else{if(null===(n=c))return I.a.log("`beforeSend` returned `null`, will not send event."),void o(null);r._getBackend().sendEvent(n),o(n)}}else a("An event processor returned null, will not send event.")})).then(null,(function(t){r.captureException(t,{data:{__sentry__:!0},originalException:t}),a("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))})):N.a.reject("SDK not enabled, will not send event.")},t.prototype._handleAsyncBeforeSend=function(t,e,n){var r=this;t.then((function(t){null!==t?(r._getBackend().sendEvent(t),e(t)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(t){n("beforeSend rejected with "+t)}))},t}(),B=function(){function t(){}return t.prototype.sendEvent=function(t){return N.a.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:c.Skipped})},t.prototype.close=function(t){return N.a.resolve(!0)},t}(),F=function(){function t(t){this._options=t,this._options.dsn||I.a.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype._setupTransport=function(){return new B},t.prototype.eventFromException=function(t,e){throw new w("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new w("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){I.a.error("Error while sending event: "+t)}))},t.prototype.getTransport=function(){return this._transport},t}();function H(){if(!("fetch"in Object(U.g)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function M(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function q(){if(!H())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var W=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Y=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,G=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,J=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,X=/\((\S*)(?::(\d+))(?::(\d+))\)/;function z(t){var e=null,n=t&&t.framesToPop;try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],c=0;c eval")>-1&&(e=J.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]=""):0!==a||n[5]||void 0===t.columnNumber||(o[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),o.push(r)}if(!o.length)return null;return{message:V(t),name:t.name,stack:o}}(t))return $(e,n)}catch(t){}return{message:V(t),name:t&&t.name,stack:[],failed:!0}}function $(t,e){try{return s.a({},t,{stack:t.stack.slice(e)})}catch(e){return t}}function V(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function K(t){var e=Z(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Q(t){return{exception:{values:[K(t)]}}}function Z(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).slice(0,50).reverse()}function tt(t,e,n){var r;if(void 0===n&&(n={}),Object(D.e)(t)&&t.error)return r=Q(z(t=t.error));if(Object(D.a)(t)||Object(D.b)(t)){var o=t,i=o.name||(Object(D.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=et(a,e,n),Object(U.b)(r,a),r}return Object(D.d)(t)?r=Q(z(t)):Object(D.h)(t)||Object(D.f)(t)?(r=function(t,e,n){var r={exception:{values:[{type:Object(D.f)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(T.a)(t)}]},extra:{__serialized__:Object(T.d)(t)}};if(e){var o=Z(z(e).stack);r.stacktrace={frames:o}}return r}(t,e,n.rejection),Object(U.a)(r,{synthetic:!0}),r):(r=et(t,e,n),Object(U.b)(r,""+t,void 0),Object(U.a)(r,{synthetic:!0}),r)}function et(t,e,n){void 0===n&&(n={});var r={message:t};if(n.attachStacktrace&&e){var o=Z(z(e).stack);r.stacktrace={frames:o}}return r}var nt,rt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),t);N.a.all(e._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},t}(),ot=function(){function t(t){this.options=t,this._buffer=new rt(30),this.url=new R(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new w("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t}(),it=Object(U.g)(),at=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disabledUntil=new Date(Date.now()),e}return s.b(e,t),e.prototype.sendEvent=function(t){var e=this;if(new Date(Date.now())0}function gt(){vt+=1,setTimeout((function(){vt-=1}))}function yt(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(t){return yt(t,e)}));return t.handleEvent?t.handleEvent.apply(this,o):t.apply(this,o)}catch(t){throw gt(),j((function(n){n.addEventProcessor((function(t){var n=s.a({},t);return e.mechanism&&(Object(U.b)(n,void 0,void 0),Object(U.a)(n,e.mechanism)),n.extra=s.a({},n.extra,{arguments:r}),n})),f(t)})),t}};try{for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch(t){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(t){}return r}var bt,mt=function(){function t(){this._ignoreOnError=0,this.name=t.id}return t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],n=0;n2?e[2]:void 0;if(r){var o=bt,i=String(r);bt=i,St("history",{from:o,to:i})}return t.apply(this,e)}}Et.onpopstate=function(){for(var t=[],e=0;e"}0!==e.length&&Object(p.b)().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;Object(p.b)().addBreadcrumb({category:"xhr",data:t.xhr.__sentry_xhr__,type:"http"},{xhr:t.xhr})}else this._options.sentry&&t.xhr.__sentry_own_request__&&At(t.args[0])},t.prototype._fetchBreadcrumb=function(t){if(t.endTimestamp){var e=Object(p.b)().getClient(),n=e&&e.getDsn();if(this._options.sentry&&n){var r=new R(n).getStoreEndpoint();if(r&&-1!==t.fetchData.url.indexOf(r)&&"POST"===t.fetchData.method&&t.args[1]&&t.args[1].body)return void At(t.args[1].body)}t.error?Object(p.b)().addBreadcrumb({category:"fetch",data:s.a({},t.fetchData,{status_code:t.response.status}),level:a.Error,type:"http"},{data:t.error,input:t.args}):Object(p.b)().addBreadcrumb({category:"fetch",data:s.a({},t.fetchData,{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})}},t.prototype._historyBreadcrumb=function(t){var e=Object(U.g)(),n=t.from,r=t.to,o=Object(U.l)(e.location.href),i=Object(U.l)(n),a=Object(U.l)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Object(p.b)().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},t.prototype.setupOnce=function(){var t=this;this._options.console&&wt({callback:function(){for(var e=[],n=0;n0?e:Object(U.h)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),Ft=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){Object(u.b)((function(e,n){var r=Object(p.b)().getIntegration(t);return r?r._handler(e,n):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(D.g)(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=s.e(n,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!Object(D.g)(t[e],Error)||n.length+1>=this._limit)return n;var r=K(z(t[e]));return this._walkErrorTree(t[e],e,s.e([r],n))},t.id="LinkedErrors",t}(),Ht=Object(U.g)(),Mt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Object(u.b)((function(e){if(Object(p.b)().getIntegration(t)){if(!Ht.navigator||!Ht.location)return e;var n=e.request||{};return n.url=n.url||Ht.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=Ht.navigator.userAgent,s.a({},e,{request:n})}return e}))},t.id="UserAgent",t}(),qt=[new r.InboundFilters,new r.FunctionToString,new mt,new Pt,new Bt,new Ft,new Mt];function Wt(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=qt),void 0===t.release){var e=Object(U.g)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&I.a.enable();var n=Object(p.b)(),r=new t(e);n.bindClient(r)}(lt,t)}function Yt(t){void 0===t&&(t={}),t.eventId||(t.eventId=Object(p.b)().lastEventId());var e=Object(p.b)().getClient();e&&e.showReportDialog(t)}function Gt(){return Object(p.b)().lastEventId()}function Jt(){}function Xt(t){t()}function zt(t){var e=Object(p.b)().getClient();return e?e.flush(t):N.a.reject(!1)}function $t(t){var e=Object(p.b)().getClient();return e?e.close(t):N.a.reject(!1)}function Vt(t){return yt(t)()}var Kt={},Qt=Object(U.g)();Qt.Sentry&&Qt.Sentry.Integrations&&(Kt=Qt.Sentry.Integrations);var Zt=s.a({},Kt,r,o)},lW6c:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"c",(function(){return f}));var r=n("mrSG"),o=n("9/Zf"),i=n("8LbN"),a=n("KjyA"),c=function(){function t(t,e,n){void 0===e&&(e=new a.a),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:t,scope:e})}return t.prototype._invokeClient=function(t){for(var e,n=[],o=1;o0?t[t.length-1].scope:void 0,n=a.a.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n},t.prototype.popScope=function(){return void 0!==this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var n=this._lastEventId=Object(o.n)(),i=e;if(!e){var a=void 0;try{throw new Error("Sentry syntheticException")}catch(t){a=t}i={originalException:t,syntheticException:a}}return this._invokeClient("captureException",t,r.a({},i,{event_id:n})),n},t.prototype.captureMessage=function(t,e,n){var i=this._lastEventId=Object(o.n)(),a=n;if(!n){var c=void 0;try{throw new Error(t)}catch(t){c=t}a={originalException:t,syntheticException:c}}return this._invokeClient("captureMessage",t,e,r.a({},a,{event_id:i})),i},t.prototype.captureEvent=function(t,e){var n=this._lastEventId=Object(o.n)();return this._invokeClient("captureEvent",t,r.a({},e,{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop();if(n.scope&&n.client){var i=n.client.getOptions&&n.client.getOptions()||{},a=i.beforeBreadcrumb,c=void 0===a?null:a,s=i.maxBreadcrumbs,u=void 0===s?100:s;if(!(u<=0)){var p=Object(o.m)(),l=r.a({timestamp:p},t),f=c?Object(o.c)((function(){return c(l,e)})):l;null!==f&&n.scope.addBreadcrumb(f,Math.min(u,100))}}},t.prototype.setUser=function(t){var e=this.getStackTop();e.scope&&e.scope.setUser(t)},t.prototype.setTags=function(t){var e=this.getStackTop();e.scope&&e.scope.setTags(t)},t.prototype.setExtras=function(t){var e=this.getStackTop();e.scope&&e.scope.setExtras(t)},t.prototype.setTag=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setTag(t,e)},t.prototype.setExtra=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)},t.prototype.setContext=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop();e.scope&&e.client&&t(e.scope)},t.prototype.run=function(t){var e=u(this);try{t(this)}finally{u(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return i.a.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t,e){return void 0===e&&(e=!1),this._callExtensionMethod("startSpan",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype._callExtensionMethod=function(t){for(var e=[],n=1;n=x},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0k(i,n))void 0!==u&&0>k(u,i)?(e[r]=u,e[s]=n,r=s):(e[r]=i,e[a]=n,r=a);else{if(!(void 0!==u&&0>k(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],M=[],R=1,A=null,D=3,_=!1,N=!1,I=!1;function L(e){for(var t=P(M);null!==t;){if(null===t.callback)S(M);else{if(!(t.startTime<=e))break;S(M),t.sortIndex=t.expirationTime,C(T,t)}t=P(M)}}function F(e){if(I=!1,L(e),!N)if(null!==P(T))N=!0,r(B);else{var t=P(M);null!==t&&o(F,t.startTime-e)}}function B(e,n){N=!1,I&&(I=!1,a()),_=!0;var r=D;try{for(L(n),A=P(T);null!==A&&(!(A.expirationTime>n)||e&&!i());){var s=A.callback;if(null!==s){A.callback=null,D=A.priorityLevel;var u=s(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===P(T)&&S(T),L(n)}else S(T);A=P(T)}if(null!==A)var c=!0;else{var l=P(M);null!==l&&o(F,l.startTime-n),c=!1}return c}finally{A=null,D=r,_=!1}}function W(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,i){var s=t.unstable_now();if("object"==typeof i&&null!==i){var u=i.delay;u="number"==typeof u&&0s?(e.sortIndex=u,C(M,e),null===P(T)&&e===P(M)&&(I?a():I=!0,o(F,u-s))):(e.sortIndex=i,C(T,e),N||_||(N=!0,r(B))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=P(T);return n!==A&&null!==A&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r;return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))}be.propTypes={width:h.a.number,height:h.a.number};var Oe=n("Tk1H"),we=n.n(Oe);function xe(e){var t=e.message,n=e.detail;return o.a.createElement("div",{className:we.a.root},o.a.createElement("div",{className:we.a.yacd},o.a.createElement(Z,{width:150,height:150})),t?o.a.createElement("h1",null,t):null,n?o.a.createElement("p",null,n):null,o.a.createElement("p",null,o.a.createElement("a",{className:we.a.link,href:"https://github.com/haishanh/yacd/issues"},o.a.createElement(be,{width:16,height:16}),"haishanh/yacd")))}xe.propTypes={message:h.a.string};var je=xe,Ee={0:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};var Ce=function(e){function t(){var e,n;ae(this,t);for(var r=arguments.length,o=new Array(r),a=0;a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Me=function(e){var t=e.color,n=e.size,r=Te(e,["color","size"]);return o.a.createElement("svg",ke({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"}))};Me.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Me.defaultProps={color:"currentColor",size:"24"};var Re=Me;function Ae(){return(Ae=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _e=function(e){var t=e.color,n=e.size,r=De(e,["color","size"]);return o.a.createElement("svg",Ae({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),o.a.createElement("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),o.a.createElement("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}))};_e.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},_e.defaultProps={color:"currentColor",size:"24"};var Ne=_e;function Ie(){return(Ie=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fe=function(e){var t=e.color,n=e.size,r=Le(e,["color","size"]);return o.a.createElement("svg",Ie({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}))};Fe.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Fe.defaultProps={color:"currentColor",size:"24"};var Be=Fe;function We(){return(We=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var He=function(e){var t=e.color,n=e.size,r=ze(e,["color","size"]);return o.a.createElement("svg",We({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),o.a.createElement("polyline",{points:"13 2 13 9 20 9"}))};He.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},He.defaultProps={color:"currentColor",size:"24"};var Ue=He;function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xe=function(e){var t=e.color,n=e.size,r=qe(e,["color","size"]);return o.a.createElement("svg",Ve({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("circle",{cx:"12",cy:"12",r:"3"}),o.a.createElement("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}))};Xe.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Xe.defaultProps={color:"currentColor",size:"24"};var Ge=Xe;function Ye(){return(Ye=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Je=function(e){var t=e.color,n=e.size,r=Ke(e,["color","size"]);return o.a.createElement("svg",Ye({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"}),o.a.createElement("line",{x1:"8",y1:"12",x2:"16",y2:"12"}))};Je.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Je.defaultProps={color:"currentColor",size:"24"};var Qe=Je,Ze=n("OADI"),$e=n("kGfw"),et=n.n($e),tt=o.a.useCallback,nt={activity:Re,globe:Ne,command:Be,file:Ue,settings:Ge,link:Qe},rt=o.a.memo((function(e){var t=e.isActive,n=e.to,r=e.iconId,a=e.labelText,i=nt[r],s=Y()(et.a.row,t?et.a.rowActive:null);return o.a.createElement(X,{to:n,className:s},o.a.createElement(i,null),o.a.createElement("div",{className:et.a.label},a))}));rt.propTypes={isActive:h.a.bool.isRequired,to:h.a.string.isRequired,iconId:h.a.string,labelText:h.a.string};var ot=[{to:"/",iconId:"activity",labelText:"Overview"},{to:"/proxies",iconId:"globe",labelText:"Proxies"},{to:"/rules",iconId:"command",labelText:"Rules"},{to:"/connections",iconId:"link",labelText:"Conns"},{to:"/configs",iconId:"settings",labelText:"Config"},{to:"/logs",iconId:"file",labelText:"Logs"}];function at(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement(Se.a.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}}))}function it(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("circle",{cx:"12",cy:"12",r:"5"}),o.a.createElement(Se.a.g,{initial:{scale:.8},animate:{scale:1},transition:{duration:.7}},o.a.createElement("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.a.createElement("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.a.createElement("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.a.createElement("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.a.createElement("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.a.createElement("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.a.createElement("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.a.createElement("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})))}var st=Object(l.a)((function(e){return{theme:Object(Ze.e)(e)}}))((function(e){var t=e.dispatch,n=e.theme,r=C(),a=tt((function(){t(Object(Ze.h)())}),[t]);return o.a.createElement("div",{className:et.a.root},o.a.createElement("a",{href:"https://github.com/haishanh/yacd",className:et.a.logoLink,target:"_blank",rel:"noopener noreferrer"},o.a.createElement("div",{className:et.a.logo},o.a.createElement(Z,{width:80,height:80}))),o.a.createElement("div",{className:et.a.rows},ot.map((function(e){var t=e.to,n=e.iconId,a=e.labelText;return o.a.createElement(rt,{key:t,to:t,isActive:r.pathname===t,iconId:n,labelText:a})}))),o.a.createElement("button",{className:et.a.themeSwitchContainer,onClick:a},"light"===n?o.a.createElement(at,null):o.a.createElement(it,null)))})),ut=n("DKqX"),ct=(n("pNMO"),n("QWBl"),n("27RR"),n("FZtP"),n("Jf6s")),lt=n("xaHF"),ft=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],pt=function(e){if(e<1e3)return e+" B";var t=Math.min(Math.floor(Math.log10(e)/3),ft.length-1);return(e=Number((e/Math.pow(1e3,t)).toPrecision(3)))+" "+ft[t]},dt=Object(lt.unstable_createResource)((function(){return n.e(6).then(n.t.bind(null,"JVhT",7)).then((function(e){return e.default}))})),ht={borderWidth:1,lineTension:0,pointRadius:0},vt={responsive:!0,maintainAspectRatio:!0,title:{display:!1},legend:{display:!0,position:"top",labels:{fontColor:"#ccc",boxWidth:20}},tooltips:{enabled:!1,mode:"index",intersect:!1,animationDuration:100},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{display:!1,gridLines:{display:!1}}],yAxes:[{display:!0,gridLines:{display:!0,color:"#555",borderDash:[3,6],drawBorder:!1},ticks:{callback:e=>pt(e)+"/s "}}]}},mt=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}];function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};bt((function(){var a=document.getElementById(t).getContext("2d"),i=new e(a,{type:"line",data:n,options:gt({},Ot,{},o)}),s=r&&r.subscribe((function(){return i.update()}));return function(){s&&s(),i.destroy()}}),[e,t,n,r,o])}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t=0;o--)r.push(e[o]);if(300===e.length)for(var a=299;a>t;a--)r.push(e[a]);return""===n?r:r.filter((function(e){return e.payload.toLowerCase().indexOf(n)>=0}))}));function fn(e){return function(t){t("logsUpdateSearchText",(function(t){t.logs.searchText=e.toLowerCase()}))}}var pn=Object(l.a)((function(e){return{searchText:cn(e),updateSearchText:fn}}))(on.a),dn=n("vJea"),hn=n("RLOP"),vn=n.n(hn),mn=o.a.useCallback,yn=o.a.memo,gn=o.a.useEffect,bn={debug:"none",info:"#454545",warning:"#b99105",error:"#c11c1c"};function On(e){var t=e.time,n=e.even,r=e.payload,a=e.type,i=Y()({even:n},vn.a.log);return o.a.createElement("div",{className:i},o.a.createElement("div",{className:vn.a.logMeta},o.a.createElement("div",{className:vn.a.logTime},t),o.a.createElement("div",{className:vn.a.logType,style:{backgroundColor:bn[a]}},a),o.a.createElement("div",{className:vn.a.logText},r)))}function wn(e,t){return t[e].id}On.propTypes={time:h.a.string,even:h.a.bool,payload:h.a.string,type:h.a.string};var xn=yn((function(e){var t=e.index,n=e.style,r=e.data[t];return o.a.createElement("div",{style:n},o.a.createElement(On,r))}),Xt.b);var jn=Object(l.a)((function(e){return{logs:ln(e),logLevel:Object(dn.c)(e),apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.dispatch,n=e.logLevel,r=e.apiConfig,a=e.logs,i=r.hostname,s=r.port,u=r.secret,l=mn((function(e){t(function(e){return function(t,n){var r=n(),o=sn(r),a=un(r),i=a>=299?0:a+1;o[i]=e,t("logsAppendLog",(function(e){e.logs.tail=i}))}}(e))}),[t]);gn((function(){rn({hostname:i,port:s,secret:u,logLevel:n},l)}),[i,s,u,n,l]);var f=Object(Gt.a)(),p=Object(c.a)(f,2),d=p[0],h=p[1];return o.a.createElement("div",null,o.a.createElement(ut.a,{title:"Logs"}),o.a.createElement(pn,null),o.a.createElement("div",{ref:d,style:{paddingBottom:30}},0===a.length?o.a.createElement("div",{className:vn.a.logPlaceholder,style:{height:h-30}},o.a.createElement("div",{className:vn.a.logPlaceholderIcon},o.a.createElement(Z,{width:200,height:200})),o.a.createElement("div",null,"No logs yet, hang tight...")):o.a.createElement("div",{className:vn.a.logsWrapper},o.a.createElement(Xt.a,{height:h-30,width:"100%",itemCount:a.length,itemSize:80,itemData:a,itemKey:wn},xn))))})),En=n("ohBo"),Cn=n.n(En);var Pn=Object(l.a)((function(e){return{theme:Object(Ze.e)(e)}}))((function(e){var t=e.checked,n=void 0!==t&&t,r=e.onChange,a=e.theme,i=e.name,s="dark"===a?"#393939":"#e9e9e9";return o.a.createElement(Cn.a,{onChange:r,checked:n,uncheckedIcon:!1,checkedIcon:!1,offColor:s,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:i})})),Sn=n("YKzy"),kn=n.n(Sn);function Tn(e){var t=e.options,n=e.value,a=e.name,i=e.onChange,s=Object(r.useMemo)((function(){return t.map((function(e){return e.value})).indexOf(n)}),[t,n]),u=(100/t.length).toPrecision(3);return o.a.createElement("div",null,o.a.createElement("div",{className:kn.a.ToggleSwitch},o.a.createElement("div",{className:kn.a.slider,style:{width:u+"%",left:s*u+"%"}}),t.map((function(e,t){var r="".concat(a,"-").concat(e.label),s=0===t?"":"border-left";return o.a.createElement("label",{htmlFor:r,key:r,className:s},o.a.createElement("input",{id:r,name:a,type:"radio",value:e.value,checked:n===e.value,onChange:i}),o.a.createElement("div",null,e.label))}))))}Tn.propTypes={options:h.a.array,value:h.a.string,name:h.a.string,onChange:h.a.func};var Mn=o.a.memo(Tn),Rn=n("Ff2n");function An(){return(An=Object.assign||function(e){for(var t=1;t65535)return}h(r,o);break;default:return}}),[i,t,h]),y=Object(l.c)(),g=y.selectChartStyleIndex,b=y.updateAppConfig,O=rr((function(e){var n=e.target,r=n.name,o=n.value;switch(r){case"port":case"socks-port":case"redir-port":var a=parseInt(o,10);if(a<0||a>65535)return;t(Object(dn.e)(i,{[r]:a}));break;case"latencyTestUrl":b(r,o);break;default:throw new Error("unknown input name ".concat(r))}}),[i,t,b]);return o.a.createElement("div",null,o.a.createElement(ut.a,{title:"Config"}),o.a.createElement("div",{className:$n.a.root},o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"HTTP Proxy Port"),o.a.createElement(Bn,{name:"port",value:f.port,onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"SOCKS5 Proxy Port"),o.a.createElement(Bn,{name:"socks-port",value:f["socks-port"],onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Redir Port"),o.a.createElement(Bn,{name:"redir-port",value:f["redir-port"],onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Allow LAN"),o.a.createElement(Pn,{name:"allow-lan",checked:f["allow-lan"],onChange:v})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Mode"),o.a.createElement(Mn,{options:ir,name:"mode",value:f.mode,onChange:m})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Log Level"),o.a.createElement(Mn,{options:sr,name:"log-level",value:f["log-level"],onChange:m}))),o.a.createElement("div",{className:$n.a.sep},o.a.createElement("div",null)),o.a.createElement("div",{className:$n.a.section},o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Chart Style"),o.a.createElement(Vn,{OptionComponent:Qn,optionPropsList:ar,selectedIndex:r,onChange:g})),o.a.createElement("div",{style:{maxWidth:360}},o.a.createElement("div",{className:$n.a.label},"Latency Test URL"),o.a.createElement(Wn,{name:"latencyTestUrl",type:"text",value:a,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:$n.a.label},"Action"),o.a.createElement(zn.a,{label:"Log out",onClick:Ze.a}))))})),cr=Object(l.a)((function(e){return{configs:Object(dn.b)(e),apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.dispatch,n=e.configs,r=e.apiConfig;return tr((function(){t(Object(dn.a)(r))}),[t,r]),o.a.createElement(ur,{configs:n})}));ur.propTypes={configs:h.a.object};var lr=n("ySHw"),fr=n("riol");function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=o.a.useState(e),n=Object(c.a)(t,2),r=n[0],a=n[1],i=o.a.useCallback((function(){a((function(e){return!e}))}),[]);return[r,i]}(!1),t=Object(c.a)(e,2),n=t[0],r=t[1];return o.a.createElement(Pn,{checked:n,onChange:r})}r.PureComponent,n("4Brf"),n("x0AG"),n("4mDm"),n("Junv"),n("+2oP"),n("3bBZ");var gr=n("KQm4"),br=n("j7o3"),Or=n("FVam");function wr(){return(wr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var jr={init:"init"},Er={Cell:function(e){var t=e.cell.value;return void 0===t?"":t},width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function Cr(e,t,n){return[].concat(e).sort((function(e,r){for(var o=0;o1?t-1:0),r=1;r(a="number"==typeof a?a:1/0)){var i=o;o=a,a=i}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=o&&n<=a}))}))};jo.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};jr.resetFilters="resetFilters",jr.setFilter="setFilter",jr.setAllFilters="setAllFilters";jr.resetGlobalFilter="resetGlobalFilter",jr.setGlobalFilter="setGlobalFilter";jr.resetGroupBy="resetGroupBy",jr.toggleGroupBy="toggleGroupBy";var Eo=/([0-9]+)/gm;function Co(e,t){return e===t?0:e>t?1:-1}function Po(e,t){return e.values[t]}function So(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var ko=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=Po(e,n),o=Po(t,n);for(r=So(r),o=So(o),r=r.split(Eo).filter(Boolean),o=o.split(Eo).filter(Boolean);r.length&&o.length;){var a=r.shift(),i=o.shift(),s=parseInt(a,10),u=parseInt(i,10),c=[s,u].sort();if(isNaN(c[0])){if(a>i)return 1;if(i>a)return-1}else{if(isNaN(c[1]))return isNaN(s)?-1:1;if(s>u)return 1;if(u>s)return-1}}return r.length-o.length},datetime:function(e,t,n){var r=Po(e,n),o=Po(t,n);return Co(r=r.getTime(),o=o.getTime())},basic:function(e,t,n){return Co(Po(e,n),Po(t,n))}});jr.resetSortBy="resetSortBy",jr.toggleSortBy="toggleSortBy",jr.clearSortBy="clearSortBy",Er.sortType="alphanumeric",Er.sortDescFirst=!1;var To=function(e){e.getSortByToggleProps=[Mo],e.stateReducers.push(Ro),e.useInstance.push(Ao)};To.pluginName="useSortBy";var Mo=function(e,t){var n=t.instance,r=t.column,o=n.isMultiSortEvent,a=void 0===o?function(e){return e.shiftKey}:o;return[e,{onClick:r.canSort?function(e){e.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&a(e))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Ro(e,t,n,r){if(t.type===jr.init)return wr({sortBy:[]},e);if(t.type===jr.resetSortBy)return wr({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===jr.clearSortBy)return wr({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===jr.toggleSortBy){var o,a=t.columnId,i=t.desc,s=t.multi,u=r.flatColumns,c=r.disableMultiSort,l=r.disableSortRemove,f=r.disableMultiRemove,p=r.maxMultiSortColCount,d=void 0===p?Number.MAX_SAFE_INTEGER:p,h=e.sortBy,v=u.find((function(e){return e.id===a})).sortDescFirst,m=h.find((function(e){return e.id===a})),y=h.findIndex((function(e){return e.id===a})),g=null!=i,b=[];return"toggle"!==(o=!c&&s?m?"toggle":"add":y!==h.length-1?"replace":m?"toggle":"replace")||l||g||s&&f||!(m&&m.desc&&!v||!m.desc&&v)||(o="remove"),"replace"===o?b=[{id:a,desc:g?i:v}]:"add"===o?(b=[].concat(h,[{id:a,desc:g?i:v}])).splice(0,b.length-d):"toggle"===o?b=h.map((function(e){return e.id===a?wr({},e,{desc:g?i:!m.desc}):e})):"remove"===o&&(b=h.filter((function(e){return e.id!==a}))),wr({},e,{sortBy:b})}}function Ao(e){var t=e.data,n=e.rows,r=e.flatColumns,a=e.orderByFn,i=void 0===a?Cr:a,s=e.sortTypes,u=e.manualSortBy,c=e.defaultCanSort,l=e.disableSortBy,f=e.flatHeaders,p=e.state.sortBy,d=e.dispatch,h=e.plugins,v=e.autoResetSortBy,m=void 0===v||v;Mr(h,["useFilters"],"useSortBy",[]);var y=function(e,t,n){d({type:jr.toggleSortBy,columnId:e,desc:t,multi:n})},g=Ar(e),b=Nr(g().hooks,"getSortByToggleProps");f.forEach((function(e){var t=e.accessor,n=e.canSort,r=e.disableSortBy,o=e.id,a=t?zr(!0!==r&&void 0,!0!==l&&void 0,!0):zr(c,n,!1);e.canSort=a,e.canSort&&(e.toggleSortBy=function(t,n){return y(e.id,t,n)},e.clearSortBy=function(){d({type:jr.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=Sr(b(),{instance:g(),column:e});var i=p.find((function(e){return e.id===o}));e.isSorted=!!i,e.sortedIndex=p.findIndex((function(e){return e.id===o})),e.isSortedDesc=e.isSorted?i.desc:void 0}));var O=o.a.useMemo((function(){if(u||!p.length)return n;var e=p.filter((function(e){return r.find((function(t){return t.id===e.id}))}));return function t(n){var o=i(n,e.map((function(e){var t=r.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,o=Hr(n)||(s||{})[n]||ko[n];if(!o)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return o(t,n,e.id)}})),e.map((function(e){var t=r.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return o.forEach((function(e){!e.subRows||e.subRows.length<=1||(e.subRows=t(e.subRows))})),o}(n)}),[u,p,n,r,i,s]),w=Ar(m);_r((function(){w()&&d({type:jr.resetSortBy})}),[u?null:t]),Object.assign(e,{preSortedRows:n,sortedRows:O,rows:O,toggleSortBy:y})}jr.resetPage="resetPage",jr.gotoPage="gotoPage",jr.setPageSize="setPageSize";jr.resetSelectedRows="resetSelectedRows",jr.toggleAllRowsSelected="toggleAllRowsSelected",jr.toggleRowSelected="toggleRowSelected";jr.setRowState="setRowState",jr.resetRowState="resetRowState";jr.resetColumnOrder="resetColumnOrder",jr.setColumnOrder="setColumnOrder";Er.canResize=!0,jr.columnStartResizing="columnStartResizing",jr.columnResizing="columnResizing",jr.columnDoneResizing="columnDoneResizing";var Do={position:"absolute",top:0},_o=function(e){e.getTableBodyProps.push(No),e.getRowProps.push(No),e.getHeaderGroupProps.push(No),e.useInstance.push(Io),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:wr({},Do,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:wr({},Do,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]}))};_o.pluginName="useAbsoluteLayout";var No=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]};function Io(e){Mr(e.plugins,[],_o.pluginName,["useResizeColumns"])}var Lo=n("eWP2"),Fo=n.n(Lo),Bo=[{accessor:"id",show:!1},{Header:"Host",accessor:"host"},{Header:"Download",accessor:"download"},{Header:"Upload",accessor:"upload"},{Header:"Download Speed",accessor:"downloadSpeedCurr"},{Header:"Upload Speed",accessor:"uploadSpeedCurr"},{Header:"Network",accessor:"network"},{Header:"Type",accessor:"type"},{Header:"Chains",accessor:"chains"},{Header:"Rule",accessor:"rule"},{Header:"Time",accessor:"start"},{Header:"Source IP",accessor:"sourceIP"},{Header:"Source Port",accessor:"sourcePort"},{Header:"Destination IP",accessor:"destinationIP"}];var Wo={sortBy:[{id:"id",desc:!0}],hiddenColumns:["id"]};var zo=function(e){var t=e.data,n=new Date,r=ho({columns:Bo,data:t,initialState:Wo,autoResetSortBy:!1},To),a=r.getTableProps,i=r.headerGroups,s=r.rows,u=r.prepareRow;return o.a.createElement("div",a(),o.a.createElement("div",{className:Fo.a.thead},i.map((function(e){return o.a.createElement("div",An({},e.getHeaderGroupProps(),{className:Fo.a.tr}),e.headers.map((function(e){return o.a.createElement("div",An({},e.getHeaderProps(e.getSortByToggleProps()),{className:Fo.a.th}),o.a.createElement("span",null,e.render("Header")),o.a.createElement("span",{className:Fo.a.sortIconContainer},e.isSorted?o.a.createElement("span",{className:e.isSortedDesc?"":Fo.a.rotate180},o.a.createElement(br.a,{size:16})):null))})),s.map((function(e,t){return u(e),e.cells.map((function(e,r){return o.a.createElement("div",An({},e.getCellProps(),{className:Y()(Fo.a.td,t%2==0&&Fo.a.odd,r>=1&&r<=4&&Fo.a.du)}),function(e,t){switch(e.column.id){case"start":return Object(Or.a)(-e.value,t);case"download":case"upload":return pt(e.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return pt(e.value)+"/s";default:return e.value}}(e,n))}))})))}))))};function Ho(){return(Ho=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vo=function(e){var t=e.color,n=e.size,r=Uo(e,["color","size"]);return o.a.createElement("svg",Ho({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};Vo.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Vo.defaultProps={color:"currentColor",size:"24"};var qo=Vo;function Xo(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Go=Xo("Tab"),Yo=Xo("TabList"),Ko=Xo("TabPanel");function Jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e,t){return r.Children.map(e,(function(e){return null===e?null:function(e){return Go(e)||Yo(e)||Ko(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?Object(r.cloneElement)(e,function(e){for(var t=1;t=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},i.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;ne;)if(!sa(this.getTab(t)))return t;return e},i.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t=0||(o[n]=e[n]);return o}(t,["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName"]));return o.a.createElement("div",oa({},a,{className:Y()(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,r&&r(t)},"data-tabs":!0}),this.getChildren())},a}(r.Component);ua.defaultProps={className:"react-tabs",focus:!1},ua.propTypes={};var ca=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,r){var o=n.props.onSelect,a=n.state.mode;if("function"!=typeof o||!1!==o(e,t,r)){var i={focus:"keydown"===r.type};1===a&&(i.selectedIndex=e),n.setState(i)}},n.state=r.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e,t){return r.copyPropsToState(e,t)},r.getModeFromProps=function(e){return null===e.selectedIndex?1:0},r.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var o={focus:n,mode:r.getModeFromProps(e)};if(1===o.mode){var a=ra(e.children)-1,i=null;i=null!=t.selectedIndex?Math.min(t.selectedIndex,a):e.defaultIndex||0,o.selectedIndex=i}return o},r.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["children","defaultIndex","defaultFocus"])),r=this.state,a=r.focus,i=r.selectedIndex;return n.focus=a,n.onSelect=this.handleSelected,null!=i&&(n.selectedIndex=i),o.a.createElement(ua,n,t)},r}(r.Component);function la(){return(la=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","className"]);return o.a.createElement("ul",la({},r,{className:Y()(n),role:"tablist"}),t)},r}(r.Component);function pa(){return(pa=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(n,["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"]);return o.a.createElement("li",pa({},h,{className:Y()(a,(e={},e[f]=l,e[s]=i,e)),ref:function(e){t.node=e,d&&d(e)},role:"tab",id:u,"aria-selected":l?"true":"false","aria-disabled":i?"true":"false","aria-controls":c,tabIndex:p||(l?"0":null)}),r)},r}(r.Component);function ha(){return(ha=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(t,["children","className","forceRender","id","selected","selectedClassName","tabId"]);return o.a.createElement("div",ha({},l,{className:Y()(r,(e={},e[u]=s,e)),role:"tabpanel",id:i,"aria-labelledby":c}),a||s?n:null)},r}(r.Component);va.defaultProps={className:"react-tabs__tab-panel",forceRender:!1,selectedClassName:"react-tabs__tab-panel--selected"},va.propTypes={},va.tabsRole="TabPanel";var ma=n("Z9Yo"),ya=n.n(ma),ga=n("09d0"),ba=n.n(ga),Oa=o.a.useRef,wa=o.a.useCallback,xa=o.a.useMemo;function ja(e){var t=e.isOpen,n=e.onRequestClose,r=e.primaryButtonOnTap,a=Oa(null),i=wa((function(){a.current.focus()}),[]),s=xa((function(){return{base:Y()(ya.a.content,ba.a.cnt),afterOpen:ba.a.afterOpen,beforeClose:""}}),[]);return o.a.createElement(u.a,{isOpen:t,onRequestClose:n,onAfterOpen:i,className:s,overlayClassName:Y()(ya.a.overlay,ba.a.overlay)},o.a.createElement("p",null,"Are you sure you want to close all connections?"),o.a.createElement("div",{className:ba.a.btngrp},o.a.createElement(zn.a,{onClick:r,ref:a},"I'm sure"),o.a.createElement("div",{style:{width:20}}),o.a.createElement(zn.a,{onClick:n},"No")))}n("KcxQ");var Ea=n("zCtg"),Ca=n.n(Ea);function Pa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sa(e){for(var t=1;t0?o.a.createElement(zo,{data:e}):o.a.createElement("div",{className:Ca.a.placeHolder},o.a.createElement(Z,{width:200,height:200,c1:"var(--color-text)"}))}function _a(e){var t=e.qty;return t<100?""+t:"99+"}var Na=Object(l.a)((function(e){return{apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.apiConfig,n=Object(Gt.a)(),r=Object(c.a)(n,2),a=r[0],i=r[1],s=Ta([]),u=Object(c.a)(s,2),l=u[0],f=u[1],p=Ta([]),d=Object(c.a)(p,2),h=d[0],v=d[1],m=Ta(!1),y=Object(c.a)(m,2),g=y[0],b=y[1],O=Ra((function(){return b(!0)}),[]),w=Ra((function(){return b(!1)}),[]),x=Ra((function(){!function(e){Dt.apply(this,arguments)}(t),w()}),[t,w]),j=Aa((function(){return o.a.createElement(qo,{width:16})}),[]),E=Ma(l),C=Ra((function(e){var t=e.connections,n=function(e){for(var t={},n=0;n=0}))}));function v(e){return function(t){t("rulesUpdateSearchText",(function(t){t.rules.searchText=e.toLowerCase()}))}}function m(e){return function(){var t=Object(a.a)(o.a.mark((function t(n){var r,a,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(e);case 2:return r=t.sent,t.next=5,r.json();case 5:a=t.sent,l()(a.rules&&a.rules.length>=0,"there is no valid rules list in the rules API response"),i=a.rules.map((function(e,t){return e.id=t,e})),n("rulesFetchRules",(function(e){e.rules.allRules=i}));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}function y(e){return function(){var t=Object(a.a)(o.a.mark((function t(n,r){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==p(r()).length){t.next=5;break}return t.next=4,n(m(e));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}var g={allRules:[],searchText:""}},FVam:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":" required, but only "+t.length+" present")}function o(e){r(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function a(e,t){r(2,arguments);var n=o(e),a=o(t),i=n.getTime()-a.getTime();return i<0?-1:i>0?1:i}function i(e,t){r(2,arguments);var n=o(e),a=o(t),i=n.getFullYear()-a.getFullYear(),s=n.getMonth()-a.getMonth();return 12*i+s}function s(e,t){r(2,arguments);var n=o(e),s=o(t),u=a(n,s),c=Math.abs(i(n,s));n.setMonth(n.getMonth()-u*c);var l=a(n,s)===-u,f=u*(c-l);return 0===f?0:f}function u(e,t){r(2,arguments);var n=o(e),a=o(t);return n.getTime()-a.getTime()}function c(e,t){r(2,arguments);var n=u(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}n.d(t,"a",(function(){return w}));var l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function f(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var p={date:f({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:f({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:f({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},d={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function h(e){return function(t,n){var r,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,i=o.width?String(o.width):a;r=e.formattingValues[i]||e.formattingValues[a]}else{var s=e.defaultWidth,u=o.width?String(o.width):e.defaultWidth;r=e.values[u]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function v(e){return function(t,n){var r=String(t),o=n||{},a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=r.match(i);if(!s)return null;var u,c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(e,t){for(var n=0;n0?"in "+r:r+" ago":r},formatLong:p,formatRelative:function(e,t,n,r){return d[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:h({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:h({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:h({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:h({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:h({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(m={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},o=n.match(m.matchPattern);if(!o)return null;var a=o[0],i=n.match(m.parsePattern);if(!i)return null;var s=m.valueCallback?m.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:v({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:v({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:v({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:v({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:v({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function g(e){return function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}({},e)}function b(e){return e.getTime()%6e4}function O(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+(n>0?(6e4+b(t))%6e4:b(t))}function w(e,t,n){r(2,arguments);var i=n||{},u=i.locale||y;if(!u.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=a(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f,p,d=g(i);d.addSuffix=Boolean(i.addSuffix),d.comparison=l,l>0?(f=o(t),p=o(e)):(f=o(e),p=o(t));var h,v=c(p,f),m=(O(p)-O(f))/1e3,b=Math.round((v-m)/60);if(b<2)return i.includeSeconds?v<5?u.formatDistance("lessThanXSeconds",5,d):v<10?u.formatDistance("lessThanXSeconds",10,d):v<20?u.formatDistance("lessThanXSeconds",20,d):v<40?u.formatDistance("halfAMinute",null,d):v<60?u.formatDistance("lessThanXMinutes",1,d):u.formatDistance("xMinutes",1,d):0===b?u.formatDistance("lessThanXMinutes",1,d):u.formatDistance("xMinutes",b,d);if(b<45)return u.formatDistance("xMinutes",b,d);if(b<90)return u.formatDistance("aboutXHours",1,d);if(b<1440){var w=Math.round(b/60);return u.formatDistance("aboutXHours",w,d)}if(b<2520)return u.formatDistance("xDays",1,d);if(b<43200){var x=Math.round(b/1440);return u.formatDistance("xDays",x,d)}if(b<86400)return h=Math.round(b/43200),u.formatDistance("aboutXMonths",h,d);if((h=s(p,f))<12){var j=Math.round(b/43200);return u.formatDistance("xMonths",j,d)}var E=h%12,C=Math.floor(h/12);return E<3?u.formatDistance("aboutXYears",C,d):E<9?u.formatDistance("overXYears",C,d):u.formatDistance("almostXYears",C+1,d)}},Ff2n:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},G4qV:function(e,t,n){"use strict";function r(e,t){return e===t}function o(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},HGr0:function(e,t,n){"use strict";n.d(t,"c",(function(){return S})),n.d(t,"b",(function(){return k})),n.d(t,"f",(function(){return T})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return R})),n.d(t,"a",(function(){return A})),n.d(t,"l",(function(){return D})),n.d(t,"g",(function(){return I})),n.d(t,"j",(function(){return L})),n.d(t,"i",(function(){return W})),n.d(t,"k",(function(){return z})),n.d(t,"h",(function(){return V}));n("pNMO"),n("4Brf"),n("TeQF"),n("QWBl"),n("yXV3"),n("4mDm"),n("2B1R"),n("ToJy"),n("27RR"),n("07d7"),n("5s+n"),n("FZtP"),n("3bBZ");var r=n("o0o1"),o=n.n(r),a=n("rePB"),i=n("ODXe"),s=(n("ls82"),n("HaE+")),u=(n("ma9I"),n("EJpJ"));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t2&&void 0!==f[2]?f[2]:"http://www.gstatic.com/generate_204",a=Object(u.a)(t),i=a.url,s=a.init,c="timeout=5000&url=".concat(r),l="".concat(i).concat("/proxies","/").concat(n,"/delay?").concat(c),e.next=6,fetch(l,s);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return g.apply(this,arguments)}function g(){return(g=Object(s.a)(o.a.mark((function e(t){var n,r,a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(u.a)(t),r=n.url,a=n.init,e.next=3,fetch(r+"/providers/proxies",a);case 3:if(404!==(i=e.sent).status){e.next=6;break}return e.abrupt("return",{providers:{}});case 6:return e.next=8,i.json();case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,t){return O.apply(this,arguments)}function O(){return(O=Object(s.a)(o.a.mark((function e(t,n){var r,a,i,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(u.a)(t),a=r.url,i=r.init,s=l({},i,{method:"PUT"}),e.next=4,fetch(a+"/providers/proxies/"+n,s);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e,t){return x.apply(this,arguments)}function x(){return(x=Object(s.a)(o.a.mark((function e(t,n){var r,a,i,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(u.a)(t),a=r.url,i=r.init,s=l({},i,{method:"GET"}),e.next=4,fetch(a+"/providers/proxies/"+n+"/healthcheck",s);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var j=n("OADI");function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=function(e){var t=e.color,n=e.size,r=c(e,["color","size"]);return a.a.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),a.a.createElement("circle",{cx:"11",cy:"11",r:"8"}),a.a.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))};l.propTypes={color:s.a.string,size:s.a.oneOfType([s.a.string,s.a.number])},l.defaultProps={color:"currentColor",size:"24"};var f=l;var p=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},d=n("XqMk"),h="object"==typeof self&&self&&self.Object===Object&&self,v=d.a||h||Function("return this")(),m=function(){return v.Date.now()},y=v.Symbol,g=Object.prototype,b=g.hasOwnProperty,O=g.toString,w=y?y.toStringTag:void 0;var x=function(e){var t=b.call(e,w),n=e[w];try{e[w]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[w]=n:delete e[w]),o},j=Object.prototype.toString;var E=function(e){return j.call(e)},C=y?y.toStringTag:void 0;var P=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?x(e):E(e)};var S=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==P(e)},T=/^\s+|\s+$/g,M=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,A=/^0o[0-7]+$/i,D=parseInt;var _=function(e){if("number"==typeof e)return e;if(k(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(T,"");var n=R.test(e);return n||A.test(e)?D(e.slice(2),n?2:8):M.test(e)?NaN:+e},N=Math.max,I=Math.min;var L=function(e,t,n){var r,o,a,i,s,u,c=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function v(e){return c=e,s=setTimeout(g,t),l?h(e):i}function y(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-c>=a}function g(){var e=m();if(y(e))return b(e);s=setTimeout(g,function(e){var n=t-(e-u);return f?I(n,a-(e-c)):n}(e))}function b(e){return s=void 0,d&&r?h(e):(r=o=void 0,i)}function O(){var e=m(),n=y(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return v(u);if(f)return clearTimeout(s),s=setTimeout(g,t),h(u)}return void 0===s&&(s=setTimeout(g,t)),i}return t=_(t)||0,p(n)&&(l=!!n.leading,a=(f="maxWait"in n)?N(_(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),O.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=o=s=void 0},O.flush=function(){return void 0===s?i:b(m())},O},F=n("OA2e"),B=n.n(F);t.a=function(e){var t=e.dispatch,n=e.searchText,i=e.updateSearchText,s=Object(o.useState)(n),u=Object(r.a)(s,2),c=u[0],l=u[1],p=Object(o.useCallback)((function(e){t(i(e))}),[t,i]),d=Object(o.useMemo)((function(){return L(p,300)}),[p]);return a.a.createElement("div",{className:B.a.RuleSearch},a.a.createElement("div",{className:B.a.RuleSearchContainer},a.a.createElement("div",{className:B.a.inputWrapper},a.a.createElement("input",{type:"text",value:c,onChange:function(e){l(e.target.value),d(e.target.value)},className:B.a.input})),a.a.createElement("div",{className:B.a.iconWrapper},a.a.createElement(f,{size:20}))))}},"J3/6":function(e,t,n){e.exports={TrafficNow:"_37kQcxVR4T"}},Jf6s:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n("ma9I"),n("QWBl"),n("yXV3"),n("pDQq"),n("07d7"),n("5s+n"),n("EnZy"),n("FZtP");var r,o=n("EJpJ"),a=new TextDecoder("utf-8"),i={labels:Array(150),up:Array(150),down:Array(150),size:150,subscribers:[],appendData(e){this.up.push(e.up),this.down.push(e.down);var t=new Date,n=""+t.getMinutes()+t.getSeconds();this.labels.push(n),this.up.length>this.size&&this.up.shift(),this.down.length>this.size&&this.down.shift(),this.labels.length>this.size&&this.labels.shift(),this.subscribers.forEach((function(t){return t(e)}))},subscribe(e){var t=this;return this.subscribers.push(e),function(){var n=t.subscribers.indexOf(e);t.subscribers.splice(n,1)}}},s=!1,u="";function c(e){i.appendData(JSON.parse(e))}function l(e){if(s||1===r)return i;r=1;var t=function(e){var t=e.hostname,n=e.port,r=e.secret,o="";return"string"==typeof r&&""!==r&&(o+="?token="+r),"ws://".concat(t,":").concat(n).concat("/traffic").concat(o)}(e),n=new WebSocket(t);return n.addEventListener("error",(function(e){r=3})),n.addEventListener("close",(function(t){r=3,function(e){if(s)return i;s=!0;var t=Object(o.a)(e),n=t.url,r=t.init;fetch(n+"/traffic",r).then((function(e){e.ok?function e(t){return t.read().then((function(n){for(var r=n.done,o=n.value,i=a.decode(o,{stream:!r}),l=(u+=i).split("\n"),f=l[l.length-1],p=0;p0&&void 0!==arguments[0]?arguments[0]:"dark";"dark"===e?(y.classList.remove("light"),y.classList.add("dark")):(y.classList.remove("dark"),y.classList.add("light"))}function b(){return function(e,t){var n="light"===d(t())?"dark":"light";g(n),e("storeSwitchTheme",(function(e){e.app.theme=n})),u(t().app)}}function O(){!function(){try{localStorage.removeItem("yacd.haishan.me")}catch(e){}}();try{window.location.reload()}catch(e){}}function w(e){return function(t,n){t("appSelectChartStyleIndex",(function(t){t.app.selectedChartStyleIndex=e})),u(n().app)}}function x(e,t){return function(n,r){n("appUpdateAppConfig",(function(n){n.app[e]=t})),u(r().app)}}var j={clashAPIConfig:{hostname:"127.0.0.1",port:"7892",secret:""},latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark"};function E(){var e=function(){try{var e=localStorage.getItem("yacd.haishan.me");if(!e)return;return JSON.parse(e)}catch(e){return}}();e=function(e){for(var t=1;t0&&0===(g-=1)&&f.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(c.returnFocus(),c.teardownScopedFocus()):c.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(c.setupScopedFocus(n.node),c.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,l.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":o(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},a=r.base;return n.state.afterOpen&&(a=a+" "+r.afterOpen),n.state.beforeClose&&(a=a+" "+r.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,f.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,a=e.defaultStyles,i=n?{}:a.content,u=o?{}:a.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",r({id:t,ref:this.setContentRef,style:r({},i,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.instanceOf(d.default),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,testId:u.default.string},t.default=b,e.exports=t.default},QLaP:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],l=0;(u=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},RLOP:function(e,t,n){e.exports={logMeta:"_2tpN_G7FeO",logType:"_3wuPHKqO5W",logTime:"IwiVCclCSC",logText:"_3I1beKAMFt",logsWrapper:"_2MDNI6JESq",log:"_3KX1sKJ1QD",logPlaceholder:"_19_8g6kTIV",logPlaceholderIcon:"_3ljFcrWmBC"}},S1to:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,i=n[0],s=n[n.length-1];if(e===document.activeElement){if(!o)return;r=s}s!==document.activeElement||o||(r=i);i===document.activeElement&&o&&(r=s);if(r)return t.preventDefault(),void r.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==u||"Chrome"==u[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var c=n.indexOf(document.activeElement);c>-1&&(c+=o?-1:1);if(void 0===(r=n[c]))return t.preventDefault(),void(r=o?s:i).focus();t.preventDefault(),r.focus()};var r,o=n("ZDLa"),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},S7Mu:function(e,t,n){e.exports={root:"_2OZZRrEL0J",section:"lF_ZoyIdZN",sep:"VduFBb2hWX",label:"_2NQoBOQcGA"}},SzcZ:function(e,t,n){e.exports={root:"_1r-KsYFNaj",floatAbove:"Hn6h5kxOg7"}},TSYQ:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;tl&&i[f-1]===u[f+c-1];)--f;for(var p=l;p=f;--p){d=t.concat([p]);n[h+p-f]={op:"add",path:d,value:u[p]},r.push({op:"remove",path:d})}}(e,t,n,r);case o.Set:(function(e,t,n,r){var o=e.base,a=e.copy,i=0;o.forEach((function(e){if(!a.has(e)){var o=t.concat([i]);n.push({op:"remove",path:o,value:e}),r.unshift({op:"add",path:o,value:e})}i++})),i=0,a.forEach((function(e){if(!o.has(e)){var a=t.concat([i]);n.push({op:"add",path:a,value:e}),r.unshift({op:"remove",path:a,value:e})}i++}))})(e,t,n,r)}}(a,r,n.patches,n.inversePatches)}return a.copy}function D(e,t,n,a){var i=t[l];return i&&(i.type!==o.ES5Object&&i.type!==o.ES5Array||(i.copy=C(i.draft,!0)),t=i.copy),y(t,(function(o,s){return function e(t,n,o,a,i,s,u,c){if(u===i)throw Error("Immer forbids circular references");var l=!!a&&i===o,f=j(i);if(h(u)){var p=c&&l&&!f&&!b(a.assigned,s)?c.concat(s):void 0;u=A(t,u,n,p),function(e,t,n){switch(g(e)){case r.Map:e.set(t,n);break;case r.Set:e.delete(t),e.add(n);break;default:e[t]=n}}(i,s,u),h(u)&&(n.canAutoFreeze=!1)}else{if(l&&w(u,O(a.base,s)))return;v(u)&&(y(u,(function(r,i){return e(t,n,o,a,u,r,i,c)})),n.parent||_(t,u))}l&&t.onAssign&&!f&&t.onAssign(a,s,u)}(e,n,t,i,t,o,s,a)})),t}function _(e,t,n){void 0===n&&(n=!1),e.autoFreeze&&!h(t)&&P(t,n)}var N={get:function(e,t){if(t===l)return e;var n=e.drafts;if(!e.modified&&b(n,t))return n[t];var r=E(e)[t];if(e.finalized||!v(r))return r;if(e.modified){if(r!==L(e.base,t))return r;n=e.copy}return n[t]=e.scope.immer.createProxy(r,e)},has:function(e,t){return t in E(e)},ownKeys:function(e){return Reflect.ownKeys(E(e))},set:function(e,t,n){if(!e.modified){var r=L(e.base,t);if(n?w(r,n)||n===e.drafts[t]:w(r,n)&&t in e.base)return!0;B(e),F(e)}return e.assigned[t]=!0,e.copy[t]=n,!0},deleteProperty:function(e,t){return void 0!==L(e.base,t)||t in e.base?(e.assigned[t]=!1,B(e),F(e)):e.assigned[t]&&delete e.assigned[t],e.copy&&delete e.copy[t],!0},getOwnPropertyDescriptor:function(e,t){var n=E(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&(r.writable=!0,r.configurable=e.type!==o.ProxyArray||"length"!==t),r},defineProperty:function(){throw new Error("Object.defineProperty() cannot be used on an Immer draft")},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base)},setPrototypeOf:function(){throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")}},I={};function L(e,t){var n=e[l],r=Reflect.getOwnPropertyDescriptor(n?E(n):e,t);return r&&r.value}function F(e){if(!e.modified){if(e.modified=!0,e.type===o.ProxyObject||e.type===o.ProxyArray){var t=e.copy=C(e.base);y(e.drafts,(function(e,n){t[e]=n})),e.drafts=void 0}e.parent&&F(e.parent)}}function B(e){e.copy||(e.copy=C(e.base))}function W(e,t,n){e.drafts.forEach((function(e){e[l].finalizing=!0})),n?h(t)&&t[l].scope===e&&Y(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[l];if(!n)return;var r=n.base,a=n.draft,i=n.assigned,s=n.type;if(s===o.ES5Object)y(a,(function(t){t!==l&&(void 0!==r[t]||b(r,t)?i[t]||e(a[t]):(i[t]=!0,U(n)))})),y(r,(function(e){void 0!==a[e]||b(a,e)||(i[e]=!1,U(n))}));else if(s===o.ES5Array){if(J(n)&&(U(n),i.length=!0),a.length=0;t--){var n=e[t][l];if(!n.modified)switch(n.type){case o.ES5Array:J(n)&&U(n);break;case o.ES5Object:K(n)&&U(n)}}}function K(e){for(var t=e.base,n=e.draft,r=Object.keys(n),o=r.length-1;o>=0;o--){var a=r[o],i=t[a];if(void 0===i&&!b(t,a))return!0;var s=n[a],u=s&&s[l];if(u?u.base!==i:!w(s,i))return!0}return r.length!==Object.keys(t).length}function J(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var Q=function(e){if(!e)throw new Error("Map is not polyfilled");function t(e,t){return this[l]={type:o.Map,parent:t,scope:t?t.scope:T.current,modified:!1,finalized:!1,copy:void 0,assigned:void 0,base:e,draft:this,isManual:!1,revoked:!1},this}d(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return E(this[l]).size},enumerable:!0,configurable:!0}),n.has=function(e){return E(this[l]).has(e)},n.set=function(e,t){var n=this[l];return G(n),E(n).get(e)!==t&&(Z(n),n.scope.immer.markChanged(n),n.assigned.set(e,!0),n.copy.set(e,t),n.assigned.set(e,!0)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[l];return G(t),Z(t),t.scope.immer.markChanged(t),t.assigned.set(e,!1),t.copy.delete(e),!0},n.clear=function(){var e=this[l];return G(e),Z(e),e.scope.immer.markChanged(e),e.assigned=new Map,e.copy.clear()},n.forEach=function(e,t){var n=this;E(this[l]).forEach((function(r,o,a){e.call(t,n.get(o),o,n)}))},n.get=function(e){var t=this[l];G(t);var n=E(t).get(e);if(t.finalized||!v(n))return n;if(n!==t.base.get(e))return n;var r=t.scope.immer.createProxy(n,t);return Z(t),t.copy.set(e,r),r},n.keys=function(){return E(this[l]).keys()},n.values=function(){var e,t=this,n=this.keys();return(e={})[f]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},n.entries=function(){var e,t=this,n=this.keys();return(e={})[f]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},n[f]=function(){return this.entries()},t}(Map);function Z(e){e.copy||(e.assigned=new Map,e.copy=new Map(e.base))}var $=function(e){if(!e)throw new Error("Set is not polyfilled");function t(e,t){return this[l]={type:o.Set,parent:t,scope:t?t.scope:T.current,modified:!1,finalized:!1,copy:void 0,base:e,draft:this,drafts:new Map,revoked:!1,isManual:!1},this}d(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return E(this[l]).size},enumerable:!0,configurable:!0}),n.has=function(e){var t=this[l];return G(t),t.copy?!!t.copy.has(e)||!(!t.drafts.has(e)||!t.copy.has(t.drafts.get(e))):t.base.has(e)},n.add=function(e){var t=this[l];return G(t),t.copy?t.copy.add(e):t.base.has(e)||(ee(t),t.scope.immer.markChanged(t),t.copy.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[l];return G(t),ee(t),t.scope.immer.markChanged(t),t.copy.delete(e)||!!t.drafts.has(e)&&t.copy.delete(t.drafts.get(e))},n.clear=function(){var e=this[l];return G(e),ee(e),e.scope.immer.markChanged(e),e.copy.clear()},n.values=function(){var e=this[l];return G(e),ee(e),e.copy.values()},n.entries=function(){var e=this[l];return G(e),ee(e),e.copy.entries()},n.keys=function(){return this.values()},n[f]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}(Set);function ee(e){e.copy||(e.copy=new Set,e.base.forEach((function(t){if(v(t)){var n=e.scope.immer.createProxy(t,e);e.drafts.set(t,n),e.copy.add(n)}else e.copy.add(t)})))}function te(e,t){return t.forEach((function(t){var n=t.path,o=t.op;n.length||k();for(var a=e,i=0;i=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return h(e)?te(e,t):this.produce(e,(function(e){return te(e,t.slice(n+1))}))},e.prototype.createProxy=function(e,t){var n=x(e)?function(e,t){return new Q(e,t)}(e,t):j(e)?function(e,t){return new $(e,t)}(e,t):this.useProxies?function(e,t){var n=Array.isArray(e),r={type:n?o.ProxyArray:o.ProxyObject,scope:t?t.scope:T.current,modified:!1,finalized:!1,assigned:{},parent:t,base:e,draft:null,drafts:{},copy:null,revoke:null,isManual:!1},a=r,i=N;n&&(a=[r],i=I);var s=Proxy.revocable(a,i),u=s.revoke,c=s.proxy;return r.draft=c,r.revoke=u,c}(e,t):z(e,t);return(t?t.scope:T.current).drafts.push(n),n},e.prototype.willFinalize=function(e,t,n){this.useProxies||W(e,t,n)},e.prototype.markChanged=function(e){this.useProxies?F(e):U(e)},e}()),ie=ae.produce;ae.produceWithPatches.bind(ae),ae.setAutoFreeze.bind(ae),ae.setUseProxies.bind(ae),ae.applyPatches.bind(ae),ae.createDraft.bind(ae),ae.finishDraft.bind(ae);t.a=ie}).call(this,n("8oxB"))},V4mC:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("q1tI"),o=n("QCnb"),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function i(e,t){var n=a.current;if(null===n)throw Error("react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods.");return n.readContext(e,t)}function s(e){return e}var u=function(e){function t(){!1===s&&i>r&&(s=!0,o.unstable_scheduleCallback(n))}function n(){s=!1;var e=r;if(null!==a)for(var t=a.previous;i>e&&null!==t;){var n=t.onDelete,o=t.previous;t.onDelete=null,t.previous=t.next=null,t===a?a=t=null:(a.previous=o,o.next=a,t=o),--i,n()}}var r=500,a=null,i=0,s=!1;return{add:function(e,t){return e={value:e,onDelete:t,next:null,previous:null},null===a?e.previous=e.next=e:((t=a.previous).next=e,e.previous=t,a.previous=e,e.next=a),a=e,i+=1,e},update:function(e,t){e.value=t},access:function(e){var n=e.next;if(null!==n){var r=a;if(a!==e){var o=e.previous;o.next=n,n.previous=o,(n=r.previous).next=e,e.previous=n,r.previous=e,e.next=r,a=e}}return t(),e.value},setLimit:function(e){r=e,t()}}}(),c=new Map,l=r.createContext(null);function f(e,t,n,r){var o=c.get(e);void 0===o&&(o=new Map,c.set(e,o));var a=o.get(r);if(void 0===a){(t=t(n)).then((function(e){if(0===i.status){var t=i;t.status=1,t.value=e}}),(function(e){if(0===i.status){var t=i;t.status=2,t.value=e}}));var i={status:0,value:t};return e=u.add(i,p.bind(null,e,r)),o.set(r,e),i}return u.access(a)}function p(e,t){var n=c.get(e);void 0!==n&&(n.delete(t),0===n.size&&c.delete(e))}t.unstable_createResource=function(e,t){var n=void 0!==t?t:s,r={read:function(t){i(l);var o=n(t);switch((t=f(r,e,t,o)).status){case 0:throw t.value;case 1:return t.value;case 2:throw t.value}},preload:function(t){i(l);var o=n(t);f(r,e,t,o)}};return r},t.unstable_setGlobalCacheLimit=function(e){u.setLimit(e)}},VCL8:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var u=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},VKEO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=c,t.handleFocus=l,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==i.length&&(e=i.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",l))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",l))};var r,o=n("ZDLa"),a=(r=o)&&r.__esModule?r:{default:r};var i=[],s=null,u=!1;function c(){u=!0}function l(){if(u){if(u=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},WbBG:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WfPo:function(e,t,n){"use strict";n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return x}));n("pNMO"),n("TeQF"),n("QWBl"),n("27RR"),n("FZtP");var r=n("rePB"),o=n("ODXe"),a=n("q1tI"),i=n.n(a),s=n("V/h/");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=i.a.createContext,l=i.a.memo,f=i.a.useMemo,p=i.a.useRef,d=i.a.useEffect,h=i.a.useCallback,v=i.a.useContext,m=i.a.useState,y=c(null),g=c(null),b=c(null);function O(){return v(b)}function w(e){var t=e.initialState,n=e.actions,r=void 0===n?{}:n,a=e.children,u=p(t),c=m(t),l=Object(o.a)(c,2),v=l[0],O=l[1],w=h((function(){return u.current}),[]);d((function(){0}),[w]);var x=h((function(e,t){if("function"==typeof e)return e(x,w);var n=Object(s.a)(w(),t);n!==u.current&&(u.current=n,O(n))}),[w]),E=f((function(){return function(e,t){var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=j(o,t))}return n}(r,x)}),[r,x]);return i.a.createElement(y.Provider,{value:v},i.a.createElement(g.Provider,{value:x},i.a.createElement(b.Provider,{value:E},a)))}function x(e){return function(t){var n=l(t);return function(t){var o=v(y),a=function(e){for(var t=1;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},Wwog:function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n=0)&&a(e,!n)}e.exports=t.default},ZMKu:function(e,t,n){"use strict";n.d(t,"a",(function(){return ua}));var r={};n.r(r),n.d(r,"reversed",(function(){return $})),n.d(r,"mirrored",(function(){return ee})),n.d(r,"createReversedEasing",(function(){return te})),n.d(r,"createMirroredEasing",(function(){return ne})),n.d(r,"createExpoIn",(function(){return re})),n.d(r,"createBackIn",(function(){return oe})),n.d(r,"createAnticipateEasing",(function(){return ae})),n.d(r,"linear",(function(){return ie})),n.d(r,"easeIn",(function(){return se})),n.d(r,"easeOut",(function(){return ue})),n.d(r,"easeInOut",(function(){return ce})),n.d(r,"circIn",(function(){return le})),n.d(r,"circOut",(function(){return fe})),n.d(r,"circInOut",(function(){return pe})),n.d(r,"backIn",(function(){return de})),n.d(r,"backOut",(function(){return he})),n.d(r,"backInOut",(function(){return ve})),n.d(r,"anticipate",(function(){return me})),n.d(r,"bounceOut",(function(){return ye})),n.d(r,"bounceIn",(function(){return ge})),n.d(r,"bounceInOut",(function(){return be})),n.d(r,"cubicBezier",(function(){return Pe}));var o=n("mrSG"),a=n("q1tI");var i,s=0,u="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-s));s=t+n,setTimeout((function(){return e(s)}),n)};!function(e){e.Read="read",e.Update="update",e.Render="render",e.PostRender="postRender",e.FixedUpdate="fixedUpdate"}(i||(i={}));var c=1/60*1e3,l=!0,f=!1,p=!1,d={delta:0,timestamp:0},h=[i.Read,i.Update,i.Render,i.PostRender],v=function(e){return f=e},m=h.reduce((function(e,t){var n,r,o,a,i,s,u,c,l,p=(n=v,r=[],o=[],a=0,i=!1,s=0,u=new WeakSet,c=new WeakSet,l={cancel:function(e){var t=o.indexOf(e);u.add(e),-1!==t&&o.splice(t,1)},process:function(e){var t,f;if(i=!0,r=(t=[o,r])[0],(o=t[1]).length=0,a=r.length)for(s=0;s4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(e){return"string"==typeof e&&M.test(e)||H(e)||U(e)},parse:function(e){return G.test(e)?G.parse(e):Y.test(e)?Y.parse(e):K.test(e)?K.parse(e):e},transform:function(e){return H(e)?G.transform(e):U(e)?Y.transform(e):e}},Q=function(e){return"number"==typeof e?0:e},Z={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(k),r=e.match(T);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(T);r&&(t=t.replace(T,"${c}"),n.push.apply(n,r.map(J.parse)));var o=t.match(k);return o&&n.push.apply(n,o.map(R.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(T),o=r?r.length:0;if(r)for(var a=0;a=.001?function(t,r){for(var o=0,a=0;o<8;++o){if(0===(a=Ee(r,e,n)))return r;r-=(Ce(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Ce(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>1e-7&&++s<10);return i}(t,s,s+.1)};!function(){for(var t=0;t<11;++t)o[t]=Ce(.1*t,e,n)}();return function(o){return e===t&&n===r?o:0===o?0:1===o?1:Ce(a(o),t,r)}}var Se={x:0,y:0,z:0},ke=function(e){return"number"==typeof e},Te=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Me=Te((function(e,t,n){return Math.min(Math.max(n,e),t)})),Re=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ae=function(e){return Re(e)&&e.hasOwnProperty("z")},De=function(e,t){return Math.abs(e-t)},_e=function(e,t){if(void 0===t&&(t=Se),ke(e)&&ke(t))return De(e,t);if(Re(e)&&Re(t)){var n=De(e.x,t.x),r=De(e.y,t.y),o=Ae(e)&&Ae(t)?De(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Ne=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},Ie=function(e,t,n){return-n*e+n*t+e},Le=function(){return(Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;nd||o<-d;r(a?g+o:g),a||(b.update(O),n())}),!0);return{stop:function(){return b.update(O)}}}))}),{from:R.test,modifyTarget:function(e){return"function"==typeof e},velocity:R.test}),Zt=Kt((function(e){return void 0===e&&(e={}),zt((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,u=e.to,c=void 0===u?0:u,l=e.stiffness,f=void 0===l?100:l,p=e.damping,d=void 0===p?10:p,h=e.mass,v=void 0===h?1:h,m=e.restSpeed,y=void 0===m?.01:m,g=e.restDelta,O=void 0===g?.01:g,w=a?-a/1e3:0,x=0,j=c-s,C=s,P=C,S=E.update((function(e){var t=e.delta;x+=t;var o=d/(2*Math.sqrt(f*v)),i=Math.sqrt(f/v)/1e3;if(P=C,o<1){var s=Math.exp(-o*i*x),u=i*Math.sqrt(1-o*o);C=c-s*((w+o*i*j)/u*Math.sin(u*x)+j*Math.cos(u*x))}else{s=Math.exp(-i*x);C=c-s*(j+(w+i*j)*x)}a=Ze(C-P,t);var l=Math.abs(a)<=y,p=Math.abs(c-C)<=O;l&&p?(n(C=c),b.update(S),r()):n(C)}),!0);return{stop:function(){return b.update(S)}}}))}),{from:R.test,to:R.test,stiffness:R.test,damping:R.test,mass:R.test,velocity:R.test}),$t=Kt((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,a=void 0===r?0:r,i=e.min,s=e.max,u=e.power,c=void 0===u?.8:u,l=e.timeConstant,f=void 0===l?700:l,p=e.bounceStiffness,d=void 0===p?500:p,h=e.bounceDamping,v=void 0===h?10:h,m=e.restDelta,y=void 0===m?1:m,g=e.modifyTarget;return zt((function(e){var t,r=e.update,u=e.complete,l=n,p=n,h=!1,m=function(e){return void 0!==i&&e<=i},b=function(e){return void 0!==s&&e>=s},O=function(e){return m(e)||b(e)},w=function(e){r(e),l=p,a=Ze((p=e)-l,j().delta),t&&!h&&function(e,t){return m(e)&&t<0||b(e)&&t>0}(e,a)&&E({from:e,velocity:a})},x=function(e,n){t&&t.stop(),t=e.start({update:w,complete:function(){n?n():u()}})},E=function(e){h=!0,x(Zt(Object(o.a)({},e,{to:m(e.from)?i:s,stiffness:d,damping:v,restDelta:y})))};if(O(n))E({from:n,velocity:a});else if(0!==a){var C=Qt({from:n,velocity:a,timeConstant:f,power:c,restDelta:O(n)?20:y,modifyTarget:g});x(C,(function(){O(p)?E({from:p,velocity:a}):u()}))}else u();return{stop:function(){return t&&t.stop()}}}))}),{from:R.test,velocity:R.test,min:R.test,max:R.test,damping:R.test,stiffness:R.test,modifyTarget:function(e){return"function"==typeof e}}),en=Kt((function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?ie:a,s=e.reverseEase;return void 0!==s&&s&&(i=te(i)),zt((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return Ie(n,o,e)}))}),{ease:function(e){return"function"==typeof e},from:R.test,to:R.test}),tn=Me(0,1),nn=function(e){return void 0===e&&(e={}),zt((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,u=void 0===s?ue:s,c=e.flip,l=void 0===c?0:c,f=e.loop,p=void 0===f?0:f,d=e.yoyo,h=void 0===d?0:d,v=e.repeatDelay,m=void 0===v?0:v,y=e.from,g=void 0===y?0:y,O=e.to,w=void 0===O?1:O,x=e.elapsed,j=void 0===x?0:x,C=e.flipCount,P=void 0===C?0:C,S=e.yoyoCount,k=void 0===S?0:S,T=e.loopCount,M=void 0===T?0:T,R=en({from:g,to:w,ease:u}).start(r),A=0,D=!1,_=function(e){var t;void 0===e&&(e=!1),R=en({from:g=(t=[w,g])[0],to:w=t[1],ease:u,reverseEase:e}).start(r)},N=function(){A=tn(Ne(0,i,j)),R.seek(A)},I=function(){D=!0,n=E.update((function(e){var t,r=e.delta;j+=r,N(),!(t=D&&j>i+m)||(!t||p||l||h)&&(j=j-i-m,p&&M=e[o]&&i[a].seek(1);for(var n=1;nt||n===o);n++);var s=Ne(e[n-1],e[n],t);i[n-1].seek(rn(s))}}(a,u,e)}))},an=function(e,t,n){return zt((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},sn=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},un=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},cn=[sn()];if("undefined"!=typeof document){an(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches;!0;var n=t.length;cn.length=0;for(var r=0;r=3;if(t||n){var a=e.point,i=j().timestamp;r.history.push(Object(o.a)(Object(o.a)({},a),{timestamp:i}));var s=r.handlers,u=s.onStart,c=s.onMove;t||(u&&u(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,e)}}},!(pr(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=a;var i=kr(vr(e),this.transformPagePoint),s=i.point,u=j().timestamp;this.history=[Object(o.a)(Object(o.a)({},s),{timestamp:u})];var c=t.onSessionStart;c&&c(e,Tr(i,this.history));var l=jr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),f=jr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){l&&l(),f&&f()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=kr(t,this.transformPagePoint),fr(e)&&0===e.buttons?this.handlePointerUp(e,t):E.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=Tr(kr(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),b.update(this.updatePoint),Pr()},e}();function kr(e,t){return t?{point:t(e.point)}:e}function Tr(e,t){var n=e.point;return{point:n,delta:mr.subtract(n,Rr(t)),offset:mr.subtract(n,Mr(t)),velocity:Ar(t,.1)}}function Mr(e){return e[0]}function Rr(e){return e[e.length-1]}function Ar(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Rr(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Gn(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Dr=function(e,t){return!!t&&(e===t||Dr(e,t.parentElement))},_r=["whileHover","whileTap","whileDrag"],Nr=function(e){return _r.indexOf(e)+1};function Ir(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Lr=Ir("dragHorizontal"),Fr=Ir("dragVertical");function Br(e){var t=!1;if("y"===e)t=Fr();else if("x"===e)t=Lr();else{var n=Lr(),r=Fr();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var Wr=Nr("whileTap");var zr=Nr("whileHover"),Hr=function(e){return function(t,n){fr(t)&&e(t,n)}};function Ur(e,t){!function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,i=e.onPanSessionStart,s=n||r||o||i,u=Object(a.useRef)(null),c=Object(a.useContext)(ur).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:n,onEnd:function(e,t){u.current=null,o&&o(e,t)}};null!==u.current&&u.current.updateHandlers(l),Er(t,"pointerdown",s&&function(e){u.current=new Sr(e,l,{transformPagePoint:c})}),cr((function(){return u.current&&u.current.end()}))}(e,t),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,i=e.whileTap,s=e.controls,u=n||r||o||i,c=Object(a.useRef)(!1),l=Object(a.useRef)(null);function f(){l.current&&l.current(),l.current=null}i&&s&&s.setOverride(i,Wr);var p=Object(a.useRef)(null);p.current=function(e,r){var a=t.current;if(f(),c.current&&a){c.current=!1,s&&i&&s.clearOverride(Wr);var u=Br(!0);u&&(u(),Dr(a,e.target)?n&&n(e,r):o&&o(e,r))}},Er(t,"pointerdown",u?function(e,n){f(),l.current=jr(window,"pointerup",(function(e,t){return p.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),s&&i&&s.startOverride(Wr))}:void 0),cr(f)}(e,t),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,zr),Er(t,"pointerenter",Hr((function(e,t){r&&r(e,t),n&&a&&a.startOverride(zr)}))),Er(t,"pointerleave",Hr((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(zr)})))}(e,t)}var Vr=function(e){return function(t){return e(t),null}},qr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Xr={key:"gestures",shouldRender:function(e){return qr.some((function(t){return e.hasOwnProperty(t)}))},Component:Vr((function(e){var t=e.innerRef;Ur(Object(o.d)(e,["innerRef"]),t)}))},Gr=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},Yr=function(e){return e},Kr=new Set(["INPUT","TEXTAREA","SELECT"]),Jr=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Yr},this.point={},this.origin={x:dn(0),y:dn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Sr(e,{onSessionStart:function(e){e.target&&!Kr.has(e.target.tagName)&&(br()||(e.preventDefault(),document.activeElement instanceof HTMLElement&&document.activeElement.blur())),Cr=!0,Qr((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=to(o,n.ref,n.point,a),n.applyConstraintsToPoint()}Qr((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,u=i.dragPropagation;if(!s||u||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Br(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var c=n.props.onDragStart;c&&c(e,Zr(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var u=n.props.onDrag;u&&u(e,Zr(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){Pr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var u=t.velocity;this.animateDragEnd(u)}else this.recordBoxInfo(this.constraints);s&&s(e,Zr(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=vr(e).point,o=no(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};Qr((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(eo(e,r,this.currentDirection)&&a){var i=oo(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,a=e.dragDirectionLock,i=void 0!==a&&a,s=e.dragPropagation,u=void 0!==s&&s,c=e.dragConstraints,l=void 0!==c&&c,f=e.dragElastic,p=void 0===f||f,d=e.dragMomentum,h=void 0===d||d,v=Object(o.d)(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(o.a)({drag:r,dragDirectionLock:i,dragPropagation:u,dragConstraints:l,dragElastic:p,dragMomentum:h},v);var m=v._dragValueX,y=v._dragValueY,g=v.dragOriginX,b=v.dragOriginY;g&&(this.origin.x=g),b&&(this.origin.y=b),Qr((function(e){if(eo(e,r,t.currentDirection)){var n="x"===e?m:y;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=Gr(l),this.constraints=this.constraintsNeedResolution?this.constraints||!1:l},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),Qr((function(n){var r=t.point[n];r&&!r.isAnimating()&&oo(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,a=n.dragMomentum,i=n.dragElastic,s=n.dragTransition,u=n._dragValueX,c=n._dragValueY,l=n._dragTransitionControls,f=Qr((function(n){var f;if(eo(n,r,t.currentDirection)){var p=t.constraints?$r(n,t.constraints):{},d=i?200:1e6,h=i?40:1e7,v=l||t.controls,m=Object(o.a)(Object(o.a)({type:"inertia",velocity:a?e[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1},s),p),y="x"===n?u:c;return y?Zn(n,y,0,m):v.start(((f={})[n]=0,f.transition=m,f))}}));return Promise.all(f).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(Gr(n)){var o=no(n,r),a=no(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=jr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=lr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=to(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function Qr(e){return[e("x"),e("y")]}function Zr(e,t){return Object(o.a)(Object(o.a)({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function $r(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function eo(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function to(e,t,n,r){null!==e.current&&t.current;var o=no(e,r),a=no(t,r),i=o.left-a.left+ro(n.x),s=o.top-a.top+ro(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function no(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function ro(e){return e?e.get():0}function oo(e,t,n,r){var o=t instanceof pn?t.get():t;if(!n)return o;var a=$r(e,n),i=a.min,s=a.max;return void 0!==i&&os&&(o=r?ao(s,o,r):Math.min(s,o)),t instanceof pn&&t.set(o),o}function ao(e,t,n){return Ie(e,t,"number"==typeof n?n:.35)}var io={key:"drag",shouldRender:function(e){return!!e.drag},Component:Vr((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var i=e.dragControls,s=Object(a.useContext)(ur).transformPagePoint,u=hn((function(){return new Jr({ref:t,values:n,controls:r})}));u.updateProps(Object(o.a)(Object(o.a)({},e),{transformPagePoint:s})),Object(a.useEffect)((function(){return i&&i.subscribe(u)}),[u]),Object(a.useEffect)((function(){return u.mount(t.current)}),[])}(Object(o.d)(e,["innerRef","values","controls"]),t,n,r)}))};function so(e){return"string"==typeof e&&e.startsWith("var(--")}var uo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function co(e,t,n){void 0===n&&(n=1);var r=function(e){var t=uo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i||(so(a)?co(a,t,n+1):a)}}var lo,fo=new Set(["width","height","top","left","right","bottom","x","y"]),po=function(e){return fo.has(e)},ho=function(e,t){e.set(t,!1),e.set(t)},vo=function(e){return e===R||e===L};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(lo||(lo={}));var mo=function(e,t){return parseFloat(e.split(", ")[t])},yo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return mo(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return mo(i[1],e)}},go=new Set(["x","y","z"]),bo=lt.filter((function(e){return!go.has(e)}));var Oo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:yo(4,13),y:yo(5,14)},wo=function(e,t,n,r){void 0===r&&(r={}),n=Object(o.a)({},n),r=Object(o.a)({},r);var a=t.current,i=Lt(a),s=Object.keys(n).filter(po),u=[],c=!1,l=s.reduce((function(t,o){var a=e.get(o);if(!a)return t;var s,l=a.get(),f=n[o],p=In(l);if(Rn(f))for(var d=f.length,h=null===f[0]?1:0;h=0||(o[n]=e[n]);return o}var c="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function l(e){cancelAnimationFrame(e.id)}function f(e,t){var n=c();var r={id:requestAnimationFrame((function o(){c()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var p=null;function d(e){if(void 0===e&&(e=!1),null===p||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?p="positive-descending":(t.scrollLeft=1,p=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),p}return p}var h=function(e,t){return e};function v(e){var t,n,u=e.getItemOffset,c=e.getEstimatedTotalSize,p=e.getItemSize,v=e.getOffsetForIndexAndAlignment,y=e.getStartIndexForOffset,g=e.getStopIndexForStartIndex,b=e.initInstanceProps,O=e.shouldResetStyleCacheOnItemSizeChange,w=e.validateProps;return n=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=b(n.props,a(a(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:a(a(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=Object(i.a)((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=Object(i.a)((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,o=r.direction,a=r.itemSize,i=r.layout,s=n._getItemStyleCache(O&&a,O&&i,O&&o);if(s.hasOwnProperty(e))t=s[e];else{var c,l=u(n.props,e,n._instanceProps),f=p(n.props,e,n._instanceProps),d="horizontal"===o||"horizontal"===i;s[e]=((c={position:"absolute"})["rtl"===o?"right":"left"]=d?l:0,c.top=d?0:l,c.height=d?"100%":f,c.width=d?f:"100%",t=c)}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=Object(i.a)((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,a=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,i=o;if("rtl"===t)switch(d()){case"negative":i=-o;break;case"positive-descending":i=a-r-o}return i=Math.max(0,Math.min(i,a-r)),{isScrolling:!0,scrollDirection:e.scrollOffset0)for(var T=P;T<=S;T++)k.push(Object(s.createElement)(t,{data:p,key:v(T,p),index:T,isScrolling:O?x:void 0,style:this._getItemStyle(T)}));var M=c(this.props,this._instanceProps);return Object(s.createElement)(y||g||"div",{className:n,onScroll:E,ref:this._outerRefSetter,style:r({position:"relative",height:a,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},Object(s.createElement)(u||l||"div",{children:k,ref:i,style:{height:j?"100%":M,pointerEvents:x?"none":void 0,width:j?M:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var a=this.state,i=a.scrollDirection,s=a.scrollOffset,u=a.scrollUpdateWasRequested;this._callOnScroll(i,s,u)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,a=r.scrollDirection,i=r.scrollOffset;if(0===t)return[0,0,0,0];var s=y(this.props,i,this._instanceProps),u=g(this.props,s,i,this._instanceProps),c=o&&"backward"!==a?1:Math.max(1,n),l=o&&"forward"!==a?1:Math.max(1,n);return[Math.max(0,s-c),Math.max(0,Math.min(t-1,u+l)),s,u]},t}(s.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var m=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},y=v({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,a=e.height,i=e.itemCount,s=e.itemSize,u=e.layout,c=e.width,l="horizontal"===o||"horizontal"===u?c:a,f=Math.max(0,i*s-l),p=Math.min(f,t*s),d=Math.max(0,t*s-l+s);switch("smart"===n&&(n=r>=d-l&&r<=p+l?"auto":"center"),n){case"start":return p;case"end":return d;case"center":var h=Math.round(d+(p-d)/2);return hf+Math.floor(l/2)?f:h;case"auto":default:return r>=d&&r<=p?r:r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=function(e){var t=e.color,n=e.size,r=u(e,["color","size"]);return o.a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polyline",{points:"6 9 12 15 18 9"}))};c.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},c.defaultProps={color:"currentColor",size:"24"},t.a=c},kGfw:function(e,t,n){e.exports={root:"_30oJwXNik9",logoLink:"_1SsCcpJvxN",logo:"_2r8EkOI78X",pulse:"_2KRqAfqV8c",rows:"_2vUQ0Hs_C5",row:"_8mEn9Wlw1n",rowActive:"_1WyHmd6t6y",label:"_2eMIYGbP9O",themeSwitchContainer:"nURY8qkFLS"}},ls82:function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof l?t:l,a=Object.create(o.prototype),i=new x(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return E()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=b(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(j([])));v&&v!==t&&n.call(v,o)&&(d=v);var m=p.prototype=l.prototype=Object.create(d);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function g(e,t){var r;this._invoke=function(o,a){function i(){return new t((function(r,i){!function r(o,a,i,s){var c=u(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(c.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},mrSG:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function c(){for(var e=[],t=0;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=function(e){var t=e.color,n=e.size,r=u(e,["color","size"]);return o.a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))};c.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},c.defaultProps={color:"currentColor",size:"24"},t.a=c},zCtg:function(e,t,n){e.exports={placeHolder:"duOnUwq-nI",connQty:"CCpULSE9Uh"}}},[[0,5,1,3]],[7,2,4,6]]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js new file mode 100644 index 0000000000..3ead363df1 --- /dev/null +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js @@ -0,0 +1,2 @@ +/*! For license information please see app.97da0bf63bfa93de767f.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+wdc":function(e,t,n){"use strict";var r,o,a,i,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,l=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(l,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},o=function(e,t){c=setTimeout(e,t)},a=function(){clearTimeout(c)},i=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,h=window.setTimeout,v=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var y=d.now();t.unstable_now=function(){return d.now()-y}}var g=!1,b=null,O=-1,w=5,j=0;i=function(){return t.unstable_now()>=j},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0k(i,n))void 0!==u&&0>k(u,i)?(e[r]=u,e[s]=n,r=s):(e[r]=i,e[a]=n,r=a);else{if(!(void 0!==u&&0>k(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],M=[],R=1,A=null,D=3,_=!1,I=!1,N=!1;function L(e){for(var t=S(M);null!==t;){if(null===t.callback)P(M);else{if(!(t.startTime<=e))break;P(M),t.sortIndex=t.expirationTime,C(T,t)}t=S(M)}}function F(e){if(N=!1,L(e),!I)if(null!==S(T))I=!0,r(W);else{var t=S(M);null!==t&&o(F,t.startTime-e)}}function W(e,n){I=!1,N&&(N=!1,a()),_=!0;var r=D;try{for(L(n),A=S(T);null!==A&&(!(A.expirationTime>n)||e&&!i());){var s=A.callback;if(null!==s){A.callback=null,D=A.priorityLevel;var u=s(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===S(T)&&P(T),L(n)}else P(T);A=S(T)}if(null!==A)var c=!0;else{var l=S(M);null!==l&&o(F,l.startTime-n),c=!1}return c}finally{A=null,D=r,_=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,i){var s=t.unstable_now();if("object"==typeof i&&null!==i){var u=i.delay;u="number"==typeof u&&0s?(e.sortIndex=u,C(M,e),null===S(T)&&e===S(M)&&(N?a():N=!0,o(F,u-s))):(e.sortIndex=i,C(T,e),I||_||(I=!0,r(W))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=S(T);return n!==A&&null!==A&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r;return(o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})))}be.propTypes={width:h.a.number,height:h.a.number};var Oe=n("Tk1H"),we=n.n(Oe);function je(e){var t=e.message,n=e.detail;return(o.a.createElement("div",{className:we.a.root},o.a.createElement("div",{className:we.a.yacd},o.a.createElement(Q,{width:150,height:150})),t?o.a.createElement("h1",null,t):null,n?o.a.createElement("p",null,n):null,o.a.createElement("p",null,o.a.createElement("a",{className:we.a.link,href:"https://github.com/haishanh/yacd/issues"},o.a.createElement(be,{width:16,height:16}),"haishanh/yacd"))))}je.propTypes={message:h.a.string};var xe=je,Ee={0:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};function Ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Se=function(e){de(r,e);var t,n=(t=r,function(){var e,n=fe(t);if(Ce()){var r=fe(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return le(this,e)});function r(){var e;ae(this,r);for(var t=arguments.length,o=new Array(t),a=0;a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Re=function(e){var t=e.color,n=e.size,r=Me(e,["color","size"]);return o.a.createElement("svg",Te({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"}))};Re.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Re.defaultProps={color:"currentColor",size:"24"};var Ae=Re;function De(){return(De=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ie=function(e){var t=e.color,n=e.size,r=_e(e,["color","size"]);return o.a.createElement("svg",De({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),o.a.createElement("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),o.a.createElement("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}))};Ie.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Ie.defaultProps={color:"currentColor",size:"24"};var Ne=Ie;function Le(){return(Le=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var We=function(e){var t=e.color,n=e.size,r=Fe(e,["color","size"]);return o.a.createElement("svg",Le({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}))};We.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},We.defaultProps={color:"currentColor",size:"24"};var Be=We;function ze(){return(ze=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ue=function(e){var t=e.color,n=e.size,r=He(e,["color","size"]);return o.a.createElement("svg",ze({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),o.a.createElement("polyline",{points:"13 2 13 9 20 9"}))};Ue.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Ue.defaultProps={color:"currentColor",size:"24"};var Ve=Ue;function qe(){return(qe=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ge=function(e){var t=e.color,n=e.size,r=Xe(e,["color","size"]);return o.a.createElement("svg",qe({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("circle",{cx:"12",cy:"12",r:"3"}),o.a.createElement("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}))};Ge.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Ge.defaultProps={color:"currentColor",size:"24"};var Ye=Ge;function Ke(){return(Ke=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $e=function(e){var t=e.color,n=e.size,r=Je(e,["color","size"]);return o.a.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("path",{d:"M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"}),o.a.createElement("line",{x1:"8",y1:"12",x2:"16",y2:"12"}))};$e.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},$e.defaultProps={color:"currentColor",size:"24"};var Qe=$e,Ze=n("OADI"),et=n("kGfw"),tt=n.n(et),nt=o.a.useCallback,rt={activity:Ae,globe:Ne,command:Be,file:Ve,settings:Ye,link:Qe},ot=o.a.memo((function(e){var t=e.isActive,n=e.to,r=e.iconId,a=e.labelText,i=rt[r],s=Y()(tt.a.row,t?tt.a.rowActive:null);return o.a.createElement(X,{to:n,className:s},o.a.createElement(i,null),o.a.createElement("div",{className:tt.a.label},a))}));ot.propTypes={isActive:h.a.bool.isRequired,to:h.a.string.isRequired,iconId:h.a.string,labelText:h.a.string};var at=[{to:"/",iconId:"activity",labelText:"Overview"},{to:"/proxies",iconId:"globe",labelText:"Proxies"},{to:"/rules",iconId:"command",labelText:"Rules"},{to:"/connections",iconId:"link",labelText:"Conns"},{to:"/configs",iconId:"settings",labelText:"Config"},{to:"/logs",iconId:"file",labelText:"Logs"}];function it(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement(ke.a.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}}))}function st(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("circle",{cx:"12",cy:"12",r:"5"}),o.a.createElement(ke.a.g,{initial:{scale:.8},animate:{scale:1},transition:{duration:.7}},o.a.createElement("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.a.createElement("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.a.createElement("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.a.createElement("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.a.createElement("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.a.createElement("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.a.createElement("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.a.createElement("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})))}var ut=Object(l.a)((function(e){return{theme:Object(Ze.f)(e)}}))((function(e){var t=e.dispatch,n=e.theme,r=C(),a=nt((function(){t(Object(Ze.i)())}),[t]);return o.a.createElement("div",{className:tt.a.root},o.a.createElement("a",{href:"https://github.com/haishanh/yacd",className:tt.a.logoLink,target:"_blank",rel:"noopener noreferrer"},o.a.createElement("div",{className:tt.a.logo},o.a.createElement(Q,{width:80,height:80}))),o.a.createElement("div",{className:tt.a.rows},at.map((function(e){var t=e.to,n=e.iconId,a=e.labelText;return(o.a.createElement(ot,{key:t,to:t,isActive:r.pathname===t,iconId:n,labelText:a}))}))),o.a.createElement("button",{className:tt.a.themeSwitchContainer,onClick:a},"light"===n?o.a.createElement(it,null):o.a.createElement(st,null)))})),ct=n("DKqX"),lt=(n("pNMO"),n("QWBl"),n("27RR"),n("FZtP"),n("Jf6s")),ft=n("xaHF"),pt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dt=function(e){if(e<1e3)return e+" B";var t=Math.min(Math.floor(Math.log10(e)/3),pt.length-1);return(e=Number((e/Math.pow(1e3,t)).toPrecision(3)))+" "+pt[t]},ht=Object(ft.unstable_createResource)((function(){return n.e(6).then(n.t.bind(null,"JVhT",7)).then((function(e){return e.default}))})),vt={borderWidth:1,lineTension:0,pointRadius:0},mt={responsive:!0,maintainAspectRatio:!0,title:{display:!1},legend:{display:!0,position:"top",labels:{fontColor:"#ccc",boxWidth:20}},tooltips:{enabled:!1,mode:"index",intersect:!1,animationDuration:100},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{display:!1,gridLines:{display:!1}}],yAxes:[{display:!0,gridLines:{display:!0,color:"#555",borderDash:[3,6],drawBorder:!1},ticks:{callback:e=>dt(e)+"/s "}}]}},yt=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}];function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};Ot((function(){var a=document.getElementById(t).getContext("2d"),i=new e(a,{type:"line",data:n,options:bt({},wt,{},o)}),s=r&&r.subscribe((function(){return i.update()}));return function(){s&&s(),i.destroy()}}),[e,t,n,r,o])}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t=0;o--)r.push(e[o]);if(300===e.length)for(var a=299;a>t;a--)r.push(e[a]);return""===n?r:r.filter((function(e){return e.payload.toLowerCase().indexOf(n)>=0}))}));function dn(e){return function(t){t("logsUpdateSearchText",(function(t){t.logs.searchText=e.toLowerCase()}))}}var hn=Object(l.a)((function(e){return{searchText:fn(e),updateSearchText:dn}}))(sn.a),vn=n("vJea"),mn=n("RLOP"),yn=n.n(mn),gn=o.a.useCallback,bn=o.a.memo,On=o.a.useEffect,wn={debug:"none",info:"#454545",warning:"#b99105",error:"#c11c1c"};function jn(e){var t=e.time,n=e.even,r=e.payload,a=e.type,i=Y()({even:n},yn.a.log);return o.a.createElement("div",{className:i},o.a.createElement("div",{className:yn.a.logMeta},o.a.createElement("div",{className:yn.a.logTime},t),o.a.createElement("div",{className:yn.a.logType,style:{backgroundColor:wn[a]}},a),o.a.createElement("div",{className:yn.a.logText},r)))}function xn(e,t){return t[e].id}jn.propTypes={time:h.a.string,even:h.a.bool,payload:h.a.string,type:h.a.string};var En=bn((function(e){var t=e.index,n=e.style,r=e.data[t];return o.a.createElement("div",{style:n},o.a.createElement(jn,r))}),Yt.b);var Cn=Object(l.a)((function(e){return{logs:pn(e),logLevel:Object(vn.c)(e),apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.dispatch,n=e.logLevel,r=e.apiConfig,a=e.logs,i=r.hostname,s=r.port,u=r.secret,l=gn((function(e){t(function(e){return function(t,n){var r=n(),o=cn(r),a=ln(r),i=a>=299?0:a+1;o[i]=e,t("logsAppendLog",(function(e){e.logs.tail=i}))}}(e))}),[t]);On((function(){an({hostname:i,port:s,secret:u,logLevel:n},l)}),[i,s,u,n,l]);var f=Object(Kt.a)(),p=Object(c.a)(f,2),d=p[0],h=p[1];return(o.a.createElement("div",null,o.a.createElement(ct.a,{title:"Logs"}),o.a.createElement(hn,null),o.a.createElement("div",{ref:d,style:{paddingBottom:30}},0===a.length?o.a.createElement("div",{className:yn.a.logPlaceholder,style:{height:h-30}},o.a.createElement("div",{className:yn.a.logPlaceholderIcon},o.a.createElement(Q,{width:200,height:200})),o.a.createElement("div",null,"No logs yet, hang tight...")):o.a.createElement("div",{className:yn.a.logsWrapper},o.a.createElement(Yt.a,{height:h-30,width:"100%",itemCount:a.length,itemSize:80,itemData:a,itemKey:xn},En)))))})),Sn=n("ohBo"),Pn=n.n(Sn);var kn=Object(l.a)((function(e){return{theme:Object(Ze.f)(e)}}))((function(e){var t=e.checked,n=void 0!==t&&t,r=e.onChange,a=e.theme,i=e.name,s="dark"===a?"#393939":"#e9e9e9";return o.a.createElement(Pn.a,{onChange:r,checked:n,uncheckedIcon:!1,checkedIcon:!1,offColor:s,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:i})})),Tn=n("YKzy"),Mn=n.n(Tn);function Rn(e){var t=e.options,n=e.value,a=e.name,i=e.onChange,s=Object(r.useMemo)((function(){return t.map((function(e){return e.value})).indexOf(n)}),[t,n]),u=(100/t.length).toPrecision(3);return o.a.createElement("div",null,o.a.createElement("div",{className:Mn.a.ToggleSwitch},o.a.createElement("div",{className:Mn.a.slider,style:{width:u+"%",left:s*u+"%"}}),t.map((function(e,t){var r=`${a}-${e.label}`,s=0===t?"":"border-left";return o.a.createElement("label",{htmlFor:r,key:r,className:s},o.a.createElement("input",{id:r,name:a,type:"radio",value:e.value,checked:n===e.value,onChange:i}),o.a.createElement("div",null,e.label))}))))}Rn.propTypes={options:h.a.array,value:h.a.string,name:h.a.string,onChange:h.a.func};var An=o.a.memo(Rn),Dn=n("Ff2n");function _n(){return(_n=Object.assign||function(e){for(var t=1;t65535)return}h(r,o);break;default:return}}),[i,t,h]),y=Object(l.c)(),g=y.selectChartStyleIndex,b=y.updateAppConfig,O=ar((function(e){var n=e.target,r=n.name,o=n.value;switch(r){case"port":case"socks-port":case"redir-port":var a=parseInt(o,10);if(a<0||a>65535)return;t(Object(vn.e)(i,{[r]:a}));break;case"latencyTestUrl":b(r,o);break;default:throw new Error(`unknown input name ${r}`)}}),[i,t,b]);return o.a.createElement("div",null,o.a.createElement(ct.a,{title:"Config"}),o.a.createElement("div",{className:tr.a.root},o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"HTTP Proxy Port"),o.a.createElement(zn,{name:"port",value:f.port,onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"SOCKS5 Proxy Port"),o.a.createElement(zn,{name:"socks-port",value:f["socks-port"],onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Redir Port"),o.a.createElement(zn,{name:"redir-port",value:f["redir-port"],onChange:m,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Allow LAN"),o.a.createElement(kn,{name:"allow-lan",checked:f["allow-lan"],onChange:v})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Mode"),o.a.createElement(An,{options:ur,name:"mode",value:f.mode,onChange:m})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Log Level"),o.a.createElement(An,{options:cr,name:"log-level",value:f["log-level"],onChange:m}))),o.a.createElement("div",{className:tr.a.sep},o.a.createElement("div",null)),o.a.createElement("div",{className:tr.a.section},o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Chart Style"),o.a.createElement(Xn,{OptionComponent:Zn,optionPropsList:sr,selectedIndex:r,onChange:g})),o.a.createElement("div",{style:{maxWidth:360}},o.a.createElement("div",{className:tr.a.label},"Latency Test URL"),o.a.createElement(Hn,{name:"latencyTestUrl",type:"text",value:a,onBlur:O})),o.a.createElement("div",null,o.a.createElement("div",{className:tr.a.label},"Action"),o.a.createElement(Un.a,{label:"Log out",onClick:Ze.a}))))})),fr=Object(l.a)((function(e){return{configs:Object(vn.b)(e),apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.dispatch,n=e.configs,r=e.apiConfig;return rr((function(){t(Object(vn.a)(r))}),[t,r]),o.a.createElement(lr,{configs:n})}));lr.propTypes={configs:h.a.object};var pr=n("ySHw"),dr=n("riol");function hr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=o.a.useState(e),n=Object(c.a)(t,2),r=n[0],a=n[1],i=o.a.useCallback((function(){a((function(e){return!e}))}),[]);return[r,i]}(!1),t=Object(c.a)(e,2),n=t[0],r=t[1];return(o.a.createElement(kn,{checked:n,onChange:r}))}r.PureComponent,n("4Brf"),n("x0AG"),n("pjDv"),n("4mDm"),n("Junv"),n("+2oP"),n("3bBZ");var wr=n("KQm4"),jr=n("j7o3"),xr=n("FVam");function Er(){return(Er=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var Sr={init:"init"},Pr={Cell:function(e){var t=e.cell.value;return void 0===t?"":t},width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function kr(e,t,n){return[].concat(e).sort((function(e,r){for(var o=0;o1?t-1:0),r=1;r(a="number"==typeof a?a:1/0)){var i=o;o=a,a=i}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=o&&n<=a}))}))};So.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};Sr.resetFilters="resetFilters",Sr.setFilter="setFilter",Sr.setAllFilters="setAllFilters";Sr.resetGlobalFilter="resetGlobalFilter",Sr.setGlobalFilter="setGlobalFilter";Sr.resetGroupBy="resetGroupBy",Sr.toggleGroupBy="toggleGroupBy";var Po=/([0-9]+)/gm;function ko(e,t){return e===t?0:e>t?1:-1}function To(e,t){return e.values[t]}function Mo(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var Ro=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=To(e,n),o=To(t,n);for(r=Mo(r),o=Mo(o),r=r.split(Po).filter(Boolean),o=o.split(Po).filter(Boolean);r.length&&o.length;){var a=r.shift(),i=o.shift(),s=parseInt(a,10),u=parseInt(i,10),c=[s,u].sort();if(isNaN(c[0])){if(a>i)return 1;if(i>a)return-1}else{if(isNaN(c[1]))return isNaN(s)?-1:1;if(s>u)return 1;if(u>s)return-1}}return r.length-o.length},datetime:function(e,t,n){var r=To(e,n),o=To(t,n);return ko(r=r.getTime(),o=o.getTime())},basic:function(e,t,n){return ko(To(e,n),To(t,n))}});Sr.resetSortBy="resetSortBy",Sr.toggleSortBy="toggleSortBy",Sr.clearSortBy="clearSortBy",Pr.sortType="alphanumeric",Pr.sortDescFirst=!1;var Ao=function(e){e.getSortByToggleProps=[Do],e.stateReducers.push(_o),e.useInstance.push(Io)};Ao.pluginName="useSortBy";var Do=function(e,t){var n=t.instance,r=t.column,o=n.isMultiSortEvent,a=void 0===o?function(e){return e.shiftKey}:o;return[e,{onClick:r.canSort?function(e){e.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&a(e))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function _o(e,t,n,r){if(t.type===Sr.init)return Er({sortBy:[]},e);if(t.type===Sr.resetSortBy)return Er({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===Sr.clearSortBy)return Er({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===Sr.toggleSortBy){var o,a=t.columnId,i=t.desc,s=t.multi,u=r.flatColumns,c=r.disableMultiSort,l=r.disableSortRemove,f=r.disableMultiRemove,p=r.maxMultiSortColCount,d=void 0===p?Number.MAX_SAFE_INTEGER:p,h=e.sortBy,v=u.find((function(e){return e.id===a})).sortDescFirst,m=h.find((function(e){return e.id===a})),y=h.findIndex((function(e){return e.id===a})),g=null!=i,b=[];return"toggle"!==(o=!c&&s?m?"toggle":"add":y!==h.length-1?"replace":m?"toggle":"replace")||l||g||s&&f||!(m&&m.desc&&!v||!m.desc&&v)||(o="remove"),"replace"===o?b=[{id:a,desc:g?i:v}]:"add"===o?(b=[].concat(h,[{id:a,desc:g?i:v}])).splice(0,b.length-d):"toggle"===o?b=h.map((function(e){return e.id===a?Er({},e,{desc:g?i:!m.desc}):e})):"remove"===o&&(b=h.filter((function(e){return e.id!==a}))),Er({},e,{sortBy:b})}}function Io(e){var t=e.data,n=e.rows,r=e.flatColumns,a=e.orderByFn,i=void 0===a?kr:a,s=e.sortTypes,u=e.manualSortBy,c=e.defaultCanSort,l=e.disableSortBy,f=e.flatHeaders,p=e.state.sortBy,d=e.dispatch,h=e.plugins,v=e.autoResetSortBy,m=void 0===v||v;Dr(h,["useFilters"],"useSortBy",[]);var y=function(e,t,n){d({type:Sr.toggleSortBy,columnId:e,desc:t,multi:n})},g=Ir(e),b=Fr(g().hooks,"getSortByToggleProps");f.forEach((function(e){var t=e.accessor,n=e.canSort,r=e.disableSortBy,o=e.id,a=t?Vr(!0!==r&&void 0,!0!==l&&void 0,!0):Vr(c,n,!1);e.canSort=a,e.canSort&&(e.toggleSortBy=function(t,n){return y(e.id,t,n)},e.clearSortBy=function(){d({type:Sr.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=Mr(b(),{instance:g(),column:e});var i=p.find((function(e){return e.id===o}));e.isSorted=!!i,e.sortedIndex=p.findIndex((function(e){return e.id===o})),e.isSortedDesc=e.isSorted?i.desc:void 0}));var O=o.a.useMemo((function(){if(u||!p.length)return n;var e=p.filter((function(e){return r.find((function(t){return t.id===e.id}))}));return function t(n){var o=i(n,e.map((function(e){var t=r.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,o=qr(n)||(s||{})[n]||Ro[n];if(!o)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return o(t,n,e.id)}})),e.map((function(e){var t=r.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return o.forEach((function(e){!e.subRows||e.subRows.length<=1||(e.subRows=t(e.subRows))})),o}(n)}),[u,p,n,r,i,s]),w=Ir(m);Lr((function(){w()&&d({type:Sr.resetSortBy})}),[u?null:t]),Object.assign(e,{preSortedRows:n,sortedRows:O,rows:O,toggleSortBy:y})}Sr.resetPage="resetPage",Sr.gotoPage="gotoPage",Sr.setPageSize="setPageSize";Sr.resetSelectedRows="resetSelectedRows",Sr.toggleAllRowsSelected="toggleAllRowsSelected",Sr.toggleRowSelected="toggleRowSelected";Sr.setRowState="setRowState",Sr.resetRowState="resetRowState";Sr.resetColumnOrder="resetColumnOrder",Sr.setColumnOrder="setColumnOrder";Pr.canResize=!0,Sr.columnStartResizing="columnStartResizing",Sr.columnResizing="columnResizing",Sr.columnDoneResizing="columnDoneResizing";var No={position:"absolute",top:0},Lo=function(e){e.getTableBodyProps.push(Fo),e.getRowProps.push(Fo),e.getHeaderGroupProps.push(Fo),e.useInstance.push(Wo),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:Er({},No,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:Er({},No,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]}))};Lo.pluginName="useAbsoluteLayout";var Fo=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]};function Wo(e){Dr(e.plugins,[],Lo.pluginName,["useResizeColumns"])}var Bo=n("eWP2"),zo=n.n(Bo),Ho=[{accessor:"id",show:!1},{Header:"Host",accessor:"host"},{Header:"Download",accessor:"download"},{Header:"Upload",accessor:"upload"},{Header:"Download Speed",accessor:"downloadSpeedCurr"},{Header:"Upload Speed",accessor:"uploadSpeedCurr"},{Header:"Network",accessor:"network"},{Header:"Type",accessor:"type"},{Header:"Chains",accessor:"chains"},{Header:"Rule",accessor:"rule"},{Header:"Time",accessor:"start"},{Header:"Source IP",accessor:"sourceIP"},{Header:"Source Port",accessor:"sourcePort"},{Header:"Destination IP",accessor:"destinationIP"}];var Uo={sortBy:[{id:"id",desc:!0}],hiddenColumns:["id"]};var Vo=function(e){var t=e.data,n=new Date,r=yo({columns:Ho,data:t,initialState:Uo,autoResetSortBy:!1},Ao),a=r.getTableProps,i=r.headerGroups,s=r.rows,u=r.prepareRow;return o.a.createElement("div",a(),o.a.createElement("div",{className:zo.a.thead},i.map((function(e){return o.a.createElement("div",_n({},e.getHeaderGroupProps(),{className:zo.a.tr}),e.headers.map((function(e){return o.a.createElement("div",_n({},e.getHeaderProps(e.getSortByToggleProps()),{className:zo.a.th}),o.a.createElement("span",null,e.render("Header")),o.a.createElement("span",{className:zo.a.sortIconContainer},e.isSorted?o.a.createElement("span",{className:e.isSortedDesc?"":zo.a.rotate180},o.a.createElement(jr.a,{size:16})):null))})),s.map((function(e,t){return u(e),e.cells.map((function(e,r){return o.a.createElement("div",_n({},e.getCellProps(),{className:Y()(zo.a.td,t%2==0&&zo.a.odd,r>=1&&r<=4&&zo.a.du)}),function(e,t){switch(e.column.id){case"start":return Object(xr.a)(-e.value,t);case"download":case"upload":return dt(e.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return dt(e.value)+"/s";default:return e.value}}(e,n))}))})))}))))};function qo(){return(qo=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Go=function(e){var t=e.color,n=e.size,r=Xo(e,["color","size"]);return o.a.createElement("svg",qo({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};Go.propTypes={color:h.a.string,size:h.a.oneOfType([h.a.string,h.a.number])},Go.defaultProps={color:"currentColor",size:"24"};var Yo=Go;function Ko(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Jo=Ko("Tab"),$o=Ko("TabList"),Qo=Ko("TabPanel");function Zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ta(e,t){return r.Children.map(e,(function(e){return null===e?null:function(e){return Jo(e)||$o(e)||Qo(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?Object(r.cloneElement)(e,function(e){for(var t=1;t=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},i.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;ne;)if(!la(this.getTab(t)))return t;return e},i.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t=0||(o[n]=e[n]);return o}(t,["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName"]));return o.a.createElement("div",sa({},a,{className:Y()(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,r&&r(t)},"data-tabs":!0}),this.getChildren())},a}(r.Component);fa.defaultProps={className:"react-tabs",focus:!1},fa.propTypes={};var pa=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,r){var o=n.props.onSelect,a=n.state.mode;if("function"!=typeof o||!1!==o(e,t,r)){var i={focus:"keydown"===r.type};1===a&&(i.selectedIndex=e),n.setState(i)}},n.state=r.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e,t){return r.copyPropsToState(e,t)},r.getModeFromProps=function(e){return null===e.selectedIndex?1:0},r.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var o={focus:n,mode:r.getModeFromProps(e)};if(1===o.mode){var a=ia(e.children)-1,i=null;i=null!=t.selectedIndex?Math.min(t.selectedIndex,a):e.defaultIndex||0,o.selectedIndex=i}return o},r.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["children","defaultIndex","defaultFocus"])),r=this.state,a=r.focus,i=r.selectedIndex;return n.focus=a,n.onSelect=this.handleSelected,null!=i&&(n.selectedIndex=i),o.a.createElement(fa,n,t)},r}(r.Component);function da(){return(da=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","className"]);return o.a.createElement("ul",da({},r,{className:Y()(n),role:"tablist"}),t)},r}(r.Component);function va(){return(va=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(n,["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"]);return o.a.createElement("li",va({},h,{className:Y()(a,(e={},e[f]=l,e[s]=i,e)),ref:function(e){t.node=e,d&&d(e)},role:"tab",id:u,"aria-selected":l?"true":"false","aria-disabled":i?"true":"false","aria-controls":c,tabIndex:p||(l?"0":null)}),r)},r}(r.Component);function ya(){return(ya=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(t,["children","className","forceRender","id","selected","selectedClassName","tabId"]);return o.a.createElement("div",ya({},l,{className:Y()(r,(e={},e[u]=s,e)),role:"tabpanel",id:i,"aria-labelledby":c}),a||s?n:null)},r}(r.Component);ga.defaultProps={className:"react-tabs__tab-panel",forceRender:!1,selectedClassName:"react-tabs__tab-panel--selected"},ga.propTypes={},ga.tabsRole="TabPanel";var ba=n("Z9Yo"),Oa=n.n(ba),wa=n("09d0"),ja=n.n(wa),xa=o.a.useRef,Ea=o.a.useCallback,Ca=o.a.useMemo;function Sa(e){var t=e.isOpen,n=e.onRequestClose,r=e.primaryButtonOnTap,a=xa(null),i=Ea((function(){a.current.focus()}),[]),s=Ca((function(){return{base:Y()(Oa.a.content,ja.a.cnt),afterOpen:ja.a.afterOpen,beforeClose:""}}),[]);return o.a.createElement(u.a,{isOpen:t,onRequestClose:n,onAfterOpen:i,className:s,overlayClassName:Y()(Oa.a.overlay,ja.a.overlay)},o.a.createElement("p",null,"Are you sure you want to close all connections?"),o.a.createElement("div",{className:ja.a.btngrp},o.a.createElement(Un.a,{onClick:r,ref:a},"I'm sure"),o.a.createElement("div",{style:{width:20}}),o.a.createElement(Un.a,{onClick:n},"No")))}n("KcxQ");var Pa=n("zCtg"),ka=n.n(Pa);function Ta(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Ma(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s(){r=e[Symbol.iterator]()},n(){var e=r.next();return a=e.done,e},e(e){i=!0,o=e},f(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function Ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o.a.createElement(Vo,{data:e}):o.a.createElement("div",{className:ka.a.placeHolder},o.a.createElement(Q,{width:200,height:200,c1:"var(--color-text)"}))}function Wa(e){var t=e.qty;return t<100?""+t:"99+"}var Ba=Object(l.a)((function(e){return{apiConfig:Object(Ze.b)(e)}}))((function(e){var t=e.apiConfig,n=Object(Kt.a)(),r=Object(c.a)(n,2),a=r[0],i=r[1],s=_a([]),u=Object(c.a)(s,2),l=u[0],f=u[1],p=_a([]),d=Object(c.a)(p,2),h=d[0],v=d[1],m=_a(!1),y=Object(c.a)(m,2),g=y[0],b=y[1],O=Na((function(){return b(!0)}),[]),w=Na((function(){return b(!1)}),[]),j=Na((function(){!function(e){_t.apply(this,arguments)}(t),w()}),[t,w]),x=La((function(){return o.a.createElement(Yo,{width:16})}),[]),E=Ia(l),C=Na((function(e){var t,n=e.connections,r=function(e){for(var t={},n=0;n=0}))}));function v(e){return function(t){t("rulesUpdateSearchText",(function(t){t.rules.searchText=e.toLowerCase()}))}}function m(e){return function(){var t=Object(a.a)(o.a.mark((function t(n){var r,a,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(e);case 2:return r=t.sent,t.next=5,r.json();case 5:a=t.sent,l()(a.rules&&a.rules.length>=0,"there is no valid rules list in the rules API response"),i=a.rules.map((function(e,t){return e.id=t,e})),n("rulesFetchRules",(function(e){e.rules.allRules=i}));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}function y(e){return function(){var t=Object(a.a)(o.a.mark((function t(n,r){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==p(r()).length){t.next=5;break}return t.next=4,n(m(e));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}var g={allRules:[],searchText:""}},FVam:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":" required, but only "+t.length+" present")}function o(e){r(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function a(e,t){r(2,arguments);var n=o(e),a=o(t),i=n.getTime()-a.getTime();return i<0?-1:i>0?1:i}function i(e,t){r(2,arguments);var n=o(e),a=o(t),i=n.getFullYear()-a.getFullYear(),s=n.getMonth()-a.getMonth();return 12*i+s}function s(e,t){r(2,arguments);var n=o(e),s=o(t),u=a(n,s),c=Math.abs(i(n,s));n.setMonth(n.getMonth()-u*c);var l=a(n,s)===-u,f=u*(c-l);return 0===f?0:f}function u(e,t){r(2,arguments);var n=o(e),a=o(t);return n.getTime()-a.getTime()}function c(e,t){r(2,arguments);var n=u(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}n.d(t,"a",(function(){return w}));var l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function f(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var p={date:f({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:f({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:f({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},d={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function h(e){return function(t,n){var r,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,i=o.width?String(o.width):a;r=e.formattingValues[i]||e.formattingValues[a]}else{var s=e.defaultWidth,u=o.width?String(o.width):e.defaultWidth;r=e.values[u]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function v(e){return function(t,n){var r=String(t),o=n||{},a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=r.match(i);if(!s)return null;var u,c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(e,t){for(var n=0;n0?"in "+r:r+" ago":r},formatLong:p,formatRelative:function(e,t,n,r){return d[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:h({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:h({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:h({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:h({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:h({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(m={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},o=n.match(m.matchPattern);if(!o)return null;var a=o[0],i=n.match(m.parsePattern);if(!i)return null;var s=m.valueCallback?m.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:v({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:v({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:v({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:v({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:v({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function g(e){return function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}({},e)}function b(e){return e.getTime()%6e4}function O(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+(n>0?(6e4+b(t))%6e4:b(t))}function w(e,t,n){r(2,arguments);var i=n||{},u=i.locale||y;if(!u.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=a(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f,p,d=g(i);d.addSuffix=Boolean(i.addSuffix),d.comparison=l,l>0?(f=o(t),p=o(e)):(f=o(e),p=o(t));var h,v=c(p,f),m=(O(p)-O(f))/1e3,b=Math.round((v-m)/60);if(b<2)return i.includeSeconds?v<5?u.formatDistance("lessThanXSeconds",5,d):v<10?u.formatDistance("lessThanXSeconds",10,d):v<20?u.formatDistance("lessThanXSeconds",20,d):v<40?u.formatDistance("halfAMinute",null,d):v<60?u.formatDistance("lessThanXMinutes",1,d):u.formatDistance("xMinutes",1,d):0===b?u.formatDistance("lessThanXMinutes",1,d):u.formatDistance("xMinutes",b,d);if(b<45)return u.formatDistance("xMinutes",b,d);if(b<90)return u.formatDistance("aboutXHours",1,d);if(b<1440){var w=Math.round(b/60);return u.formatDistance("aboutXHours",w,d)}if(b<2520)return u.formatDistance("xDays",1,d);if(b<43200){var j=Math.round(b/1440);return u.formatDistance("xDays",j,d)}if(b<86400)return h=Math.round(b/43200),u.formatDistance("aboutXMonths",h,d);if((h=s(p,f))<12){var x=Math.round(b/43200);return u.formatDistance("xMonths",x,d)}var E=h%12,C=Math.floor(h/12);return E<3?u.formatDistance("aboutXYears",C,d):E<9?u.formatDistance("overXYears",C,d):u.formatDistance("almostXYears",C+1,d)}},Ff2n:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},G4qV:function(e,t,n){"use strict";function r(e,t){return e===t}function o(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},HGr0:function(e,t,n){"use strict";n.d(t,"c",(function(){return T})),n.d(t,"b",(function(){return M})),n.d(t,"f",(function(){return R})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return D})),n.d(t,"a",(function(){return _})),n.d(t,"l",(function(){return I})),n.d(t,"g",(function(){return F})),n.d(t,"j",(function(){return W})),n.d(t,"i",(function(){return H})),n.d(t,"k",(function(){return U})),n.d(t,"h",(function(){return X}));n("pNMO"),n("4Brf"),n("TeQF"),n("QWBl"),n("pjDv"),n("yXV3"),n("4mDm"),n("2B1R"),n("+2oP"),n("ToJy"),n("27RR"),n("07d7"),n("5s+n"),n("JfAA"),n("FZtP"),n("3bBZ");var r=n("o0o1"),o=n.n(r),a=n("rePB"),i=n("ODXe"),s=(n("ls82"),n("HaE+")),u=n("EJpJ");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t2&&void 0!==l[2]?l[2]:"http://www.gstatic.com/generate_204",a=Object(u.a)(t),i=a.url,s=a.init,c=`${i}/proxies/${n}/delay?${`timeout=5000&url=${r}`}`,e.next=6,fetch(c,s);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return g.apply(this,arguments)}function g(){return(g=Object(s.a)(o.a.mark((function e(t){var n,r,a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(u.a)(t),r=n.url,a=n.init,e.next=3,fetch(r+"/providers/proxies",a);case 3:if(404!==(i=e.sent).status){e.next=6;break}return e.abrupt("return",{providers:{}});case 6:return e.next=8,i.json();case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,t){return O.apply(this,arguments)}function O(){return(O=Object(s.a)(o.a.mark((function e(t,n){var r,a,i,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(u.a)(t),a=r.url,i=r.init,s=l({},i,{method:"PUT"}),e.next=4,fetch(a+"/providers/proxies/"+n,s);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e,t){return j.apply(this,arguments)}function j(){return(j=Object(s.a)(o.a.mark((function e(t,n){var r,a,i,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(u.a)(t),a=r.url,i=r.init,s=l({},i,{method:"GET"}),e.next=4,fetch(a+"/providers/proxies/"+n+"/healthcheck",s);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var x=n("OADI");function E(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s(){r=e[Symbol.iterator]()},n(){var e=r.next();return a=e.done,e},e(e){i=!0,o=e},f(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=function(e){var t=e.color,n=e.size,r=c(e,["color","size"]);return a.a.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),a.a.createElement("circle",{cx:"11",cy:"11",r:"8"}),a.a.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))};l.propTypes={color:s.a.string,size:s.a.oneOfType([s.a.string,s.a.number])},l.defaultProps={color:"currentColor",size:"24"};var f=l;var p=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},d=n("XqMk"),h="object"==typeof self&&self&&self.Object===Object&&self,v=d.a||h||Function("return this")(),m=function(){return v.Date.now()},y=v.Symbol,g=Object.prototype,b=g.hasOwnProperty,O=g.toString,w=y?y.toStringTag:void 0;var j=function(e){var t=b.call(e,w),n=e[w];try{e[w]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[w]=n:delete e[w]),o},x=Object.prototype.toString;var E=function(e){return x.call(e)},C=y?y.toStringTag:void 0;var S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?j(e):E(e)};var P=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||P(e)&&"[object Symbol]"==S(e)},T=/^\s+|\s+$/g,M=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,A=/^0o[0-7]+$/i,D=parseInt;var _=function(e){if("number"==typeof e)return e;if(k(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(T,"");var n=R.test(e);return n||A.test(e)?D(e.slice(2),n?2:8):M.test(e)?NaN:+e},I=Math.max,N=Math.min;var L=function(e,t,n){var r,o,a,i,s,u,c=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function v(e){return c=e,s=setTimeout(g,t),l?h(e):i}function y(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-c>=a}function g(){var e=m();if(y(e))return b(e);s=setTimeout(g,function(e){var n=t-(e-u);return f?N(n,a-(e-c)):n}(e))}function b(e){return s=void 0,d&&r?h(e):(r=o=void 0,i)}function O(){var e=m(),n=y(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return v(u);if(f)return clearTimeout(s),s=setTimeout(g,t),h(u)}return void 0===s&&(s=setTimeout(g,t)),i}return t=_(t)||0,p(n)&&(l=!!n.leading,a=(f="maxWait"in n)?I(_(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),O.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=o=s=void 0},O.flush=function(){return void 0===s?i:b(m())},O},F=n("OA2e"),W=n.n(F);t.a=function(e){var t=e.dispatch,n=e.searchText,i=e.updateSearchText,s=Object(o.useState)(n),u=Object(r.a)(s,2),c=u[0],l=u[1],p=Object(o.useCallback)((function(e){t(i(e))}),[t,i]),d=Object(o.useMemo)((function(){return L(p,300)}),[p]);return a.a.createElement("div",{className:W.a.RuleSearch},a.a.createElement("div",{className:W.a.RuleSearchContainer},a.a.createElement("div",{className:W.a.inputWrapper},a.a.createElement("input",{type:"text",value:c,onChange:function(e){l(e.target.value),d(e.target.value)},className:W.a.input})),a.a.createElement("div",{className:W.a.iconWrapper},a.a.createElement(f,{size:20}))))}},"J3/6":function(e,t,n){e.exports={TrafficNow:"_37kQcxVR4T"}},Jf6s:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n("QWBl"),n("yXV3"),n("pDQq"),n("07d7"),n("5s+n"),n("EnZy"),n("FZtP");var r,o=n("EJpJ"),a=new TextDecoder("utf-8"),i={labels:Array(150),up:Array(150),down:Array(150),size:150,subscribers:[],appendData(e){this.up.push(e.up),this.down.push(e.down);var t=new Date,n=""+t.getMinutes()+t.getSeconds();this.labels.push(n),this.up.length>this.size&&this.up.shift(),this.down.length>this.size&&this.down.shift(),this.labels.length>this.size&&this.labels.shift(),this.subscribers.forEach((function(t){return t(e)}))},subscribe(e){var t=this;return this.subscribers.push(e),function(){var n=t.subscribers.indexOf(e);t.subscribers.splice(n,1)}}},s=!1,u="";function c(e){i.appendData(JSON.parse(e))}function l(e){if(s||1===r)return i;r=1;var t=function(e){var t=e.hostname,n=e.port,r=e.secret,o="";return"string"==typeof r&&""!==r&&(o+="?token="+r),`ws://${t}:${n}/traffic${o}`}(e),n=new WebSocket(t);return n.addEventListener("error",(function(e){r=3})),n.addEventListener("close",(function(t){r=3,function(e){if(s)return i;s=!0;var t=Object(o.a)(e),n=t.url,r=t.init;fetch(n+"/traffic",r).then((function(e){e.ok?function e(t){return t.read().then((function(n){for(var r=n.done,o=n.value,i=a.decode(o,{stream:!r}),l=(u+=i).split("\n"),f=l[l.length-1],p=0;p0&&void 0!==arguments[0]?arguments[0]:"dark";"dark"===e?(j.classList.remove("light"),j.classList.add("dark")):(j.classList.remove("dark"),j.classList.add("light"))}function E(){return function(e,t){var n="light"===m(t())?"dark":"light";x(n),e("storeSwitchTheme",(function(e){e.app.theme=n})),u(t().app)}}function C(){!function(){try{localStorage.removeItem("yacd.haishan.me")}catch(e){}}();try{window.location.reload()}catch(e){}}function S(e){return function(t,n){t("appSelectChartStyleIndex",(function(t){t.app.selectedChartStyleIndex=e})),u(n().app)}}function P(e,t){return function(n,r){n("appUpdateAppConfig",(function(n){n.app[e]=t})),u(r().app)}}function k(e,t,n){return function(r,o){r("updateCollapsibleIsOpen",(function(r){r.app.collapsibleIsOpen[`${e}:${t}`]=n})),O(o().app)}}var T={clashAPIConfig:{hostname:"127.0.0.1",port:"7892",secret:""},latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{}};function M(){var e=function(){try{var e=localStorage.getItem("yacd.haishan.me");if(!e)return;return JSON.parse(e)}catch(e){return}}();e=function(e){for(var t=1;t0&&0===(g-=1)&&f.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(c.returnFocus(),c.teardownScopedFocus()):c.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(c.setupScopedFocus(n.node),c.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,l.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":o(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},a=r.base;return n.state.afterOpen&&(a=a+" "+r.afterOpen),n.state.beforeClose&&(a=a+" "+r.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,f.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,a=e.defaultStyles,i=n?{}:a.content,u=o?{}:a.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",r({id:t,ref:this.setContentRef,style:r({},i,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.instanceOf(d.default),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,testId:u.default.string},t.default=b,e.exports=t.default},QLaP:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],l=0;(u=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},RLOP:function(e,t,n){e.exports={logMeta:"_2tpN_G7FeO",logType:"_3wuPHKqO5W",logTime:"IwiVCclCSC",logText:"_3I1beKAMFt",logsWrapper:"_2MDNI6JESq",log:"_3KX1sKJ1QD",logPlaceholder:"_19_8g6kTIV",logPlaceholderIcon:"_3ljFcrWmBC"}},S1to:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,i=n[0],s=n[n.length-1];if(e===document.activeElement){if(!o)return;r=s}s!==document.activeElement||o||(r=i);i===document.activeElement&&o&&(r=s);if(r)return t.preventDefault(),void r.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==u||"Chrome"==u[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var c=n.indexOf(document.activeElement);c>-1&&(c+=o?-1:1);if(void 0===(r=n[c]))return t.preventDefault(),void(r=o?s:i).focus();t.preventDefault(),r.focus()};var r,o=n("ZDLa"),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},S7Mu:function(e,t,n){e.exports={root:"_2OZZRrEL0J",section:"lF_ZoyIdZN",sep:"VduFBb2hWX",label:"_2NQoBOQcGA"}},SzcZ:function(e,t,n){e.exports={root:"_1r-KsYFNaj",floatAbove:"Hn6h5kxOg7"}},TSYQ:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;tl&&i[f-1]===u[f+c-1];)--f;for(var p=l;p=f;--p){d=t.concat([p]);n[h+p-f]={op:"add",path:d,value:u[p]},r.push({op:"remove",path:d})}}(e,t,n,r);case o.Set:(function(e,t,n,r){var o=e.base,a=e.copy,i=0;o.forEach((function(e){if(!a.has(e)){var o=t.concat([i]);n.push({op:"remove",path:o,value:e}),r.unshift({op:"add",path:o,value:e})}i++})),i=0,a.forEach((function(e){if(!o.has(e)){var a=t.concat([i]);n.push({op:"add",path:a,value:e}),r.unshift({op:"remove",path:a,value:e})}i++}))})(e,t,n,r)}}(a,r,n.patches,n.inversePatches)}return a.copy}function D(e,t,n,a){var i=t[l];return i&&(i.type!==o.ES5Object&&i.type!==o.ES5Array||(i.copy=C(i.draft,!0)),t=i.copy),y(t,(function(o,s){return function e(t,n,o,a,i,s,u,c){if(u===i)throw Error("Immer forbids circular references");var l=!!a&&i===o,f=x(i);if(h(u)){var p=c&&l&&!f&&!b(a.assigned,s)?c.concat(s):void 0;u=A(t,u,n,p),function(e,t,n){switch(g(e)){case r.Map:e.set(t,n);break;case r.Set:e.delete(t),e.add(n);break;default:e[t]=n}}(i,s,u),h(u)&&(n.canAutoFreeze=!1)}else{if(l&&w(u,O(a.base,s)))return;v(u)&&(y(u,(function(r,i){return e(t,n,o,a,u,r,i,c)})),n.parent||_(t,u))}l&&t.onAssign&&!f&&t.onAssign(a,s,u)}(e,n,t,i,t,o,s,a)})),t}function _(e,t,n){void 0===n&&(n=!1),e.autoFreeze&&!h(t)&&S(t,n)}var I={get:function(e,t){if(t===l)return e;var n=e.drafts;if(!e.modified&&b(n,t))return n[t];var r=E(e)[t];if(e.finalized||!v(r))return r;if(e.modified){if(r!==L(e.base,t))return r;n=e.copy}return n[t]=e.scope.immer.createProxy(r,e)},has:function(e,t){return t in E(e)},ownKeys:function(e){return Reflect.ownKeys(E(e))},set:function(e,t,n){if(!e.modified){var r=L(e.base,t);if(n?w(r,n)||n===e.drafts[t]:w(r,n)&&t in e.base)return!0;W(e),F(e)}return e.assigned[t]=!0,e.copy[t]=n,!0},deleteProperty:function(e,t){return void 0!==L(e.base,t)||t in e.base?(e.assigned[t]=!1,W(e),F(e)):e.assigned[t]&&delete e.assigned[t],e.copy&&delete e.copy[t],!0},getOwnPropertyDescriptor:function(e,t){var n=E(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&(r.writable=!0,r.configurable=e.type!==o.ProxyArray||"length"!==t),r},defineProperty:function(){throw new Error("Object.defineProperty() cannot be used on an Immer draft")},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base)},setPrototypeOf:function(){throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")}},N={};function L(e,t){var n=e[l],r=Reflect.getOwnPropertyDescriptor(n?E(n):e,t);return r&&r.value}function F(e){if(!e.modified){if(e.modified=!0,e.type===o.ProxyObject||e.type===o.ProxyArray){var t=e.copy=C(e.base);y(e.drafts,(function(e,n){t[e]=n})),e.drafts=void 0}e.parent&&F(e.parent)}}function W(e){e.copy||(e.copy=C(e.base))}function B(e,t,n){e.drafts.forEach((function(e){e[l].finalizing=!0})),n?h(t)&&t[l].scope===e&&Y(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[l];if(!n)return;var r=n.base,a=n.draft,i=n.assigned,s=n.type;if(s===o.ES5Object)y(a,(function(t){t!==l&&(void 0!==r[t]||b(r,t)?i[t]||e(a[t]):(i[t]=!0,U(n)))})),y(r,(function(e){void 0!==a[e]||b(a,e)||(i[e]=!1,U(n))}));else if(s===o.ES5Array){if(J(n)&&(U(n),i.length=!0),a.length=0;t--){var n=e[t][l];if(!n.modified)switch(n.type){case o.ES5Array:J(n)&&U(n);break;case o.ES5Object:K(n)&&U(n)}}}function K(e){for(var t=e.base,n=e.draft,r=Object.keys(n),o=r.length-1;o>=0;o--){var a=r[o],i=t[a];if(void 0===i&&!b(t,a))return!0;var s=n[a],u=s&&s[l];if(u?u.base!==i:!w(s,i))return!0}return r.length!==Object.keys(t).length}function J(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var $=function(e){if(!e)throw new Error("Map is not polyfilled");function t(e,t){return this[l]={type:o.Map,parent:t,scope:t?t.scope:T.current,modified:!1,finalized:!1,copy:void 0,assigned:void 0,base:e,draft:this,isManual:!1,revoked:!1},this}d(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return E(this[l]).size},enumerable:!0,configurable:!0}),n.has=function(e){return E(this[l]).has(e)},n.set=function(e,t){var n=this[l];return G(n),E(n).get(e)!==t&&(Q(n),n.scope.immer.markChanged(n),n.assigned.set(e,!0),n.copy.set(e,t),n.assigned.set(e,!0)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[l];return G(t),Q(t),t.scope.immer.markChanged(t),t.assigned.set(e,!1),t.copy.delete(e),!0},n.clear=function(){var e=this[l];return G(e),Q(e),e.scope.immer.markChanged(e),e.assigned=new Map,e.copy.clear()},n.forEach=function(e,t){var n=this;E(this[l]).forEach((function(r,o,a){e.call(t,n.get(o),o,n)}))},n.get=function(e){var t=this[l];G(t);var n=E(t).get(e);if(t.finalized||!v(n))return n;if(n!==t.base.get(e))return n;var r=t.scope.immer.createProxy(n,t);return Q(t),t.copy.set(e,r),r},n.keys=function(){return E(this[l]).keys()},n.values=function(){var e,t=this,n=this.keys();return(e={})[f]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},n.entries=function(){var e,t=this,n=this.keys();return(e={})[f]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},n[f]=function(){return this.entries()},t}(Map);function Q(e){e.copy||(e.assigned=new Map,e.copy=new Map(e.base))}var Z=function(e){if(!e)throw new Error("Set is not polyfilled");function t(e,t){return this[l]={type:o.Set,parent:t,scope:t?t.scope:T.current,modified:!1,finalized:!1,copy:void 0,base:e,draft:this,drafts:new Map,revoked:!1,isManual:!1},this}d(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return E(this[l]).size},enumerable:!0,configurable:!0}),n.has=function(e){var t=this[l];return G(t),t.copy?!!t.copy.has(e)||!(!t.drafts.has(e)||!t.copy.has(t.drafts.get(e))):t.base.has(e)},n.add=function(e){var t=this[l];return G(t),t.copy?t.copy.add(e):t.base.has(e)||(ee(t),t.scope.immer.markChanged(t),t.copy.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[l];return G(t),ee(t),t.scope.immer.markChanged(t),t.copy.delete(e)||!!t.drafts.has(e)&&t.copy.delete(t.drafts.get(e))},n.clear=function(){var e=this[l];return G(e),ee(e),e.scope.immer.markChanged(e),e.copy.clear()},n.values=function(){var e=this[l];return G(e),ee(e),e.copy.values()},n.entries=function(){var e=this[l];return G(e),ee(e),e.copy.entries()},n.keys=function(){return this.values()},n[f]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}(Set);function ee(e){e.copy||(e.copy=new Set,e.base.forEach((function(t){if(v(t)){var n=e.scope.immer.createProxy(t,e);e.drafts.set(t,n),e.copy.add(n)}else e.copy.add(t)})))}function te(e,t){return t.forEach((function(t){var n=t.path,o=t.op;n.length||k();for(var a=e,i=0;i=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return h(e)?te(e,t):this.produce(e,(function(e){return te(e,t.slice(n+1))}))},e.prototype.createProxy=function(e,t){var n=j(e)?function(e,t){return new $(e,t)}(e,t):x(e)?function(e,t){return new Z(e,t)}(e,t):this.useProxies?function(e,t){var n=Array.isArray(e),r={type:n?o.ProxyArray:o.ProxyObject,scope:t?t.scope:T.current,modified:!1,finalized:!1,assigned:{},parent:t,base:e,draft:null,drafts:{},copy:null,revoke:null,isManual:!1},a=r,i=I;n&&(a=[r],i=N);var s=Proxy.revocable(a,i),u=s.revoke,c=s.proxy;return r.draft=c,r.revoke=u,c}(e,t):z(e,t);return(t?t.scope:T.current).drafts.push(n),n},e.prototype.willFinalize=function(e,t,n){this.useProxies||B(e,t,n)},e.prototype.markChanged=function(e){this.useProxies?F(e):U(e)},e}()),ie=ae.produce;ae.produceWithPatches.bind(ae),ae.setAutoFreeze.bind(ae),ae.setUseProxies.bind(ae),ae.applyPatches.bind(ae),ae.createDraft.bind(ae),ae.finishDraft.bind(ae);t.a=ie}).call(this,n("8oxB"))},V4mC:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("q1tI"),o=n("QCnb"),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function i(e,t){var n=a.current;if(null===n)throw Error("react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods.");return n.readContext(e,t)}function s(e){return e}var u=function(e){function t(){!1===s&&i>r&&(s=!0,o.unstable_scheduleCallback(n))}function n(){s=!1;var e=r;if(null!==a)for(var t=a.previous;i>e&&null!==t;){var n=t.onDelete,o=t.previous;t.onDelete=null,t.previous=t.next=null,t===a?a=t=null:(a.previous=o,o.next=a,t=o),--i,n()}}var r=500,a=null,i=0,s=!1;return{add:function(e,t){return e={value:e,onDelete:t,next:null,previous:null},null===a?e.previous=e.next=e:((t=a.previous).next=e,e.previous=t,a.previous=e,e.next=a),a=e,i+=1,e},update:function(e,t){e.value=t},access:function(e){var n=e.next;if(null!==n){var r=a;if(a!==e){var o=e.previous;o.next=n,n.previous=o,(n=r.previous).next=e,e.previous=n,r.previous=e,e.next=r,a=e}}return t(),e.value},setLimit:function(e){r=e,t()}}}(),c=new Map,l=r.createContext(null);function f(e,t,n,r){var o=c.get(e);void 0===o&&(o=new Map,c.set(e,o));var a=o.get(r);if(void 0===a){(t=t(n)).then((function(e){if(0===i.status){var t=i;t.status=1,t.value=e}}),(function(e){if(0===i.status){var t=i;t.status=2,t.value=e}}));var i={status:0,value:t};return e=u.add(i,p.bind(null,e,r)),o.set(r,e),i}return u.access(a)}function p(e,t){var n=c.get(e);void 0!==n&&(n.delete(t),0===n.size&&c.delete(e))}t.unstable_createResource=function(e,t){var n=void 0!==t?t:s,r={read:function(t){i(l);var o=n(t);switch((t=f(r,e,t,o)).status){case 0:throw t.value;case 1:return t.value;case 2:throw t.value}},preload:function(t){i(l);var o=n(t);f(r,e,t,o)}};return r},t.unstable_setGlobalCacheLimit=function(e){u.setLimit(e)}},VCL8:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var u=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},VKEO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=c,t.handleFocus=l,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==i.length&&(e=i.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",l))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",l))};var r,o=n("ZDLa"),a=(r=o)&&r.__esModule?r:{default:r};var i=[],s=null,u=!1;function c(){u=!0}function l(){if(u){if(u=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},WbBG:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WfPo:function(e,t,n){"use strict";n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return j}));n("pNMO"),n("TeQF"),n("QWBl"),n("27RR"),n("FZtP");var r=n("rePB"),o=n("ODXe"),a=n("q1tI"),i=n.n(a),s=n("V/h/");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=i.a.createContext,l=i.a.memo,f=i.a.useMemo,p=i.a.useRef,d=i.a.useEffect,h=i.a.useCallback,v=i.a.useContext,m=i.a.useState,y=c(null),g=c(null),b=c(null);function O(){return v(b)}function w(e){var t=e.initialState,n=e.actions,r=void 0===n?{}:n,a=e.children,u=p(t),c=m(t),l=Object(o.a)(c,2),v=l[0],O=l[1],w=h((function(){return u.current}),[]);d((function(){0}),[w]);var j=h((function(e,t){if("function"==typeof e)return e(j,w);var n=Object(s.a)(w(),t);n!==u.current&&(u.current=n,O(n))}),[w]),E=f((function(){return function e(t,n){var r={};for(var o in t){var a=t[o];"function"==typeof a?r[o]=x(a,n):"object"==typeof a&&(r[o]=e(a,n))}return r}(r,j)}),[r,j]);return i.a.createElement(y.Provider,{value:v},i.a.createElement(g.Provider,{value:j},i.a.createElement(b.Provider,{value:E},a)))}function j(e){return function(t){var n=l(t);return function(t){var o=v(y),a=function(e){for(var t=1;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},Wwog:function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n=0)&&a(e,!n)}e.exports=t.default},ZMKu:function(e,t,n){"use strict";n.d(t,"a",(function(){return la}));var r={};n.r(r),n.d(r,"reversed",(function(){return Z})),n.d(r,"mirrored",(function(){return ee})),n.d(r,"createReversedEasing",(function(){return te})),n.d(r,"createMirroredEasing",(function(){return ne})),n.d(r,"createExpoIn",(function(){return re})),n.d(r,"createBackIn",(function(){return oe})),n.d(r,"createAnticipateEasing",(function(){return ae})),n.d(r,"linear",(function(){return ie})),n.d(r,"easeIn",(function(){return se})),n.d(r,"easeOut",(function(){return ue})),n.d(r,"easeInOut",(function(){return ce})),n.d(r,"circIn",(function(){return le})),n.d(r,"circOut",(function(){return fe})),n.d(r,"circInOut",(function(){return pe})),n.d(r,"backIn",(function(){return de})),n.d(r,"backOut",(function(){return he})),n.d(r,"backInOut",(function(){return ve})),n.d(r,"anticipate",(function(){return me})),n.d(r,"bounceOut",(function(){return ye})),n.d(r,"bounceIn",(function(){return ge})),n.d(r,"bounceInOut",(function(){return be})),n.d(r,"cubicBezier",(function(){return Se}));var o=n("mrSG"),a=n("q1tI");var i,s=0,u="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-s));s=t+n,setTimeout((function(){return e(s)}),n)};!function(e){e.Read="read",e.Update="update",e.Render="render",e.PostRender="postRender",e.FixedUpdate="fixedUpdate"}(i||(i={}));var c=1/60*1e3,l=!0,f=!1,p=!1,d={delta:0,timestamp:0},h=[i.Read,i.Update,i.Render,i.PostRender],v=function(e){return f=e},m=h.reduce((function(e,t){var n,r,o,a,i,s,u,c,l,p=(n=v,r=[],o=[],a=0,i=!1,s=0,u=new WeakSet,c=new WeakSet,l={cancel:function(e){var t=o.indexOf(e);u.add(e),-1!==t&&o.splice(t,1)},process:function(e){var t,f;if(i=!0,r=(t=[o,r])[0],(o=t[1]).length=0,a=r.length)for(s=0;s4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(e){return"string"==typeof e&&M.test(e)||H(e)||U(e)},parse:function(e){return G.test(e)?G.parse(e):Y.test(e)?Y.parse(e):K.test(e)?K.parse(e):e},transform:function(e){return H(e)?G.transform(e):U(e)?Y.transform(e):e}},$=function(e){return"number"==typeof e?0:e},Q={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(k),r=e.match(T);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(T);r&&(t=t.replace(T,"${c}"),n.push.apply(n,r.map(J.parse)));var o=t.match(k);return o&&n.push.apply(n,o.map(R.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(T),o=r?r.length:0;if(r)for(var a=0;a=.001?function(t,r){for(var o=0,a=0;o<8;++o){if(0===(a=Ee(r,e,n)))return r;r-=(Ce(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Ce(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>1e-7&&++s<10);return i}(t,s,s+.1)};!function(){for(var t=0;t<11;++t)o[t]=Ce(.1*t,e,n)}();return function(o){return e===t&&n===r?o:0===o?0:1===o?1:Ce(a(o),t,r)}}var Pe={x:0,y:0,z:0},ke=function(e){return"number"==typeof e},Te=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Me=Te((function(e,t,n){return Math.min(Math.max(n,e),t)})),Re=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ae=function(e){return Re(e)&&e.hasOwnProperty("z")},De=function(e,t){return Math.abs(e-t)},_e=function(e,t){if(void 0===t&&(t=Pe),ke(e)&&ke(t))return De(e,t);if(Re(e)&&Re(t)){var n=De(e.x,t.x),r=De(e.y,t.y),o=Ae(e)&&Ae(t)?De(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Ie=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},Ne=function(e,t,n){return-n*e+n*t+e},Le=function(){return(Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;nd||o<-d;r(a?g+o:g),a||(b.update(O),n())}),!0);return{stop:function(){return b.update(O)}}}))}),{from:R.test,modifyTarget:function(e){return"function"==typeof e},velocity:R.test}),Qt=Kt((function(e){return void 0===e&&(e={}),zt((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,u=e.to,c=void 0===u?0:u,l=e.stiffness,f=void 0===l?100:l,p=e.damping,d=void 0===p?10:p,h=e.mass,v=void 0===h?1:h,m=e.restSpeed,y=void 0===m?.01:m,g=e.restDelta,O=void 0===g?.01:g,w=a?-a/1e3:0,j=0,x=c-s,C=s,S=C,P=E.update((function(e){var t=e.delta;j+=t;var o=d/(2*Math.sqrt(f*v)),i=Math.sqrt(f/v)/1e3;if(S=C,o<1){var s=Math.exp(-o*i*j),u=i*Math.sqrt(1-o*o);C=c-s*((w+o*i*x)/u*Math.sin(u*j)+x*Math.cos(u*j))}else{s=Math.exp(-i*j);C=c-s*(x+(w+i*x)*j)}a=Qe(C-S,t);var l=Math.abs(a)<=y,p=Math.abs(c-C)<=O;l&&p?(n(C=c),b.update(P),r()):n(C)}),!0);return{stop:function(){return b.update(P)}}}))}),{from:R.test,to:R.test,stiffness:R.test,damping:R.test,mass:R.test,velocity:R.test}),Zt=Kt((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,a=void 0===r?0:r,i=e.min,s=e.max,u=e.power,c=void 0===u?.8:u,l=e.timeConstant,f=void 0===l?700:l,p=e.bounceStiffness,d=void 0===p?500:p,h=e.bounceDamping,v=void 0===h?10:h,m=e.restDelta,y=void 0===m?1:m,g=e.modifyTarget;return zt((function(e){var t,r=e.update,u=e.complete,l=n,p=n,h=!1,m=function(e){return void 0!==i&&e<=i},b=function(e){return void 0!==s&&e>=s},O=function(e){return m(e)||b(e)},w=function(e){r(e),l=p,a=Qe((p=e)-l,x().delta),t&&!h&&function(e,t){return m(e)&&t<0||b(e)&&t>0}(e,a)&&E({from:e,velocity:a})},j=function(e,n){t&&t.stop(),t=e.start({update:w,complete:function(){n?n():u()}})},E=function(e){h=!0,j(Qt(Object(o.a)({},e,{to:m(e.from)?i:s,stiffness:d,damping:v,restDelta:y})))};if(O(n))E({from:n,velocity:a});else if(0!==a){var C=$t({from:n,velocity:a,timeConstant:f,power:c,restDelta:O(n)?20:y,modifyTarget:g});j(C,(function(){O(p)?E({from:p,velocity:a}):u()}))}else u();return{stop:function(){return t&&t.stop()}}}))}),{from:R.test,velocity:R.test,min:R.test,max:R.test,damping:R.test,stiffness:R.test,modifyTarget:function(e){return"function"==typeof e}}),en=Kt((function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?ie:a,s=e.reverseEase;return void 0!==s&&s&&(i=te(i)),zt((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return Ne(n,o,e)}))}),{ease:function(e){return"function"==typeof e},from:R.test,to:R.test}),tn=Me(0,1),nn=function(e){return void 0===e&&(e={}),zt((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,u=void 0===s?ue:s,c=e.flip,l=void 0===c?0:c,f=e.loop,p=void 0===f?0:f,d=e.yoyo,h=void 0===d?0:d,v=e.repeatDelay,m=void 0===v?0:v,y=e.from,g=void 0===y?0:y,O=e.to,w=void 0===O?1:O,j=e.elapsed,x=void 0===j?0:j,C=e.flipCount,S=void 0===C?0:C,P=e.yoyoCount,k=void 0===P?0:P,T=e.loopCount,M=void 0===T?0:T,R=en({from:g,to:w,ease:u}).start(r),A=0,D=!1,_=function(e){var t;void 0===e&&(e=!1),R=en({from:g=(t=[w,g])[0],to:w=t[1],ease:u,reverseEase:e}).start(r)},I=function(){A=tn(Ie(0,i,x)),R.seek(A)},N=function(){D=!0,n=E.update((function(e){var t,r=e.delta;x+=r,I(),!(t=D&&x>i+m)||(!t||p||l||h)&&(x=x-i-m,p&&M=e[o]&&i[a].seek(1);for(var n=1;nt||n===o);n++);var s=Ie(e[n-1],e[n],t);i[n-1].seek(rn(s))}}(a,u,e)}))},an=function(e,t,n){return zt((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},sn=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},un=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},cn=[sn()];if("undefined"!=typeof document){an(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches;!0;var n=t.length;cn.length=0;for(var r=0;r=3;if(t||n){var a=e.point,i=x().timestamp;r.history.push(Object(o.a)(Object(o.a)({},a),{timestamp:i}));var s=r.handlers,u=s.onStart,c=s.onMove;t||(u&&u(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,e)}}},!(hr(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=a;var i=Mr(yr(e),this.transformPagePoint),s=i.point,u=x().timestamp;this.history=[Object(o.a)(Object(o.a)({},s),{timestamp:u})];var c=t.onSessionStart;c&&c(e,Rr(i,this.history));var l=Cr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),f=Cr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){l&&l(),f&&f()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=Mr(t,this.transformPagePoint),dr(e)&&0===e.buttons?this.handlePointerUp(e,t):E.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=Rr(Mr(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),b.update(this.updatePoint),kr()},e}();function Mr(e,t){return t?{point:t(e.point)}:e}function Rr(e,t){var n=e.point;return{point:n,delta:gr.subtract(n,Dr(t)),offset:gr.subtract(n,Ar(t)),velocity:_r(t,.1)}}function Ar(e){return e[0]}function Dr(e){return e[e.length-1]}function _r(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Dr(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Gn(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Ir=function(e,t){return!!t&&(e===t||Ir(e,t.parentElement))},Nr=["whileHover","whileTap","whileDrag"],Lr=function(e){return Nr.indexOf(e)+1};function Fr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Wr=Fr("dragHorizontal"),Br=Fr("dragVertical");function zr(e){var t=!1;if("y"===e)t=Br();else if("x"===e)t=Wr();else{var n=Wr(),r=Br();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var Hr=Lr("whileTap");var Ur=Lr("whileHover"),Vr=function(e){return function(t,n){dr(t)&&e(t,n)}};function qr(e,t){!function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,i=e.onPanSessionStart,s=n||r||o||i,u=Object(a.useRef)(null),c=Object(a.useContext)(lr).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:n,onEnd:function(e,t){u.current=null,o&&o(e,t)}};null!==u.current&&u.current.updateHandlers(l),Sr(t,"pointerdown",s&&function(e){u.current=new Tr(e,l,{transformPagePoint:c})}),fr((function(){return u.current&&u.current.end()}))}(e,t),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,i=e.whileTap,s=e.controls,u=n||r||o||i,c=Object(a.useRef)(!1),l=Object(a.useRef)(null);function f(){l.current&&l.current(),l.current=null}i&&s&&s.setOverride(i,Hr);var p=Object(a.useRef)(null);p.current=function(e,r){var a=t.current;if(f(),c.current&&a){c.current=!1,s&&i&&s.clearOverride(Hr);var u=zr(!0);u&&(u(),Ir(a,e.target)?n&&n(e,r):o&&o(e,r))}},Sr(t,"pointerdown",u?function(e,n){f(),l.current=Cr(window,"pointerup",(function(e,t){return p.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),s&&i&&s.startOverride(Hr))}:void 0),fr(f)}(e,t),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,Ur),Sr(t,"pointerenter",Vr((function(e,t){r&&r(e,t),n&&a&&a.startOverride(Ur)}))),Sr(t,"pointerleave",Vr((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(Ur)})))}(e,t)}var Xr=function(e){return function(t){return e(t),null}},Gr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Yr={key:"gestures",shouldRender:function(e){return Gr.some((function(t){return e.hasOwnProperty(t)}))},Component:Xr((function(e){var t=e.innerRef;qr(Object(o.d)(e,["innerRef"]),t)}))},Kr=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},Jr=function(e){return e},$r=new Set(["INPUT","TEXTAREA","SELECT"]),Qr=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Jr},this.point={},this.origin={x:dn(0),y:dn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Tr(e,{onSessionStart:function(e){e.target&&!$r.has(e.target.tagName)&&(wr()||(e.preventDefault(),document.activeElement instanceof HTMLElement&&document.activeElement.blur())),Pr=!0,Zr((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=ro(o,n.ref,n.point,a),n.applyConstraintsToPoint()}Zr((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,u=i.dragPropagation;if(!s||u||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=zr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var c=n.props.onDragStart;c&&c(e,eo(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var u=n.props.onDrag;u&&u(e,eo(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){kr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var u=t.velocity;this.animateDragEnd(u)}else this.recordBoxInfo(this.constraints);s&&s(e,eo(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=yr(e).point,o=oo(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};Zr((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(no(e,r,this.currentDirection)&&a){var i=io(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,a=e.dragDirectionLock,i=void 0!==a&&a,s=e.dragPropagation,u=void 0!==s&&s,c=e.dragConstraints,l=void 0!==c&&c,f=e.dragElastic,p=void 0===f||f,d=e.dragMomentum,h=void 0===d||d,v=Object(o.d)(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(o.a)({drag:r,dragDirectionLock:i,dragPropagation:u,dragConstraints:l,dragElastic:p,dragMomentum:h},v);var m=v._dragValueX,y=v._dragValueY,g=v.dragOriginX,b=v.dragOriginY;g&&(this.origin.x=g),b&&(this.origin.y=b),Zr((function(e){if(no(e,r,t.currentDirection)){var n="x"===e?m:y;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=Kr(l),this.constraints=this.constraintsNeedResolution?this.constraints||!1:l},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),Zr((function(n){var r=t.point[n];r&&!r.isAnimating()&&io(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,a=n.dragMomentum,i=n.dragElastic,s=n.dragTransition,u=n._dragValueX,c=n._dragValueY,l=n._dragTransitionControls,f=Zr((function(n){var f;if(no(n,r,t.currentDirection)){var p=t.constraints?to(n,t.constraints):{},d=i?200:1e6,h=i?40:1e7,v=l||t.controls,m=Object(o.a)(Object(o.a)({type:"inertia",velocity:a?e[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1},s),p),y="x"===n?u:c;return y?Qn(n,y,0,m):v.start(((f={})[n]=0,f.transition=m,f))}}));return Promise.all(f).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(Kr(n)){var o=oo(n,r),a=oo(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=Cr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=pr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=ro(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function Zr(e){return[e("x"),e("y")]}function eo(e,t){return Object(o.a)(Object(o.a)({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function to(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function no(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function ro(e,t,n,r){null!==e.current&&t.current;var o=oo(e,r),a=oo(t,r),i=o.left-a.left+ao(n.x),s=o.top-a.top+ao(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function oo(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function ao(e){return e?e.get():0}function io(e,t,n,r){var o=t instanceof pn?t.get():t;if(!n)return o;var a=to(e,n),i=a.min,s=a.max;return void 0!==i&&os&&(o=r?so(s,o,r):Math.min(s,o)),t instanceof pn&&t.set(o),o}function so(e,t,n){return Ne(e,t,"number"==typeof n?n:.35)}var uo={key:"drag",shouldRender:function(e){return!!e.drag},Component:Xr((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var i=e.dragControls,s=Object(a.useContext)(lr).transformPagePoint,u=hn((function(){return new Qr({ref:t,values:n,controls:r})}));u.updateProps(Object(o.a)(Object(o.a)({},e),{transformPagePoint:s})),Object(a.useEffect)((function(){return i&&i.subscribe(u)}),[u]),Object(a.useEffect)((function(){return u.mount(t.current)}),[])}(Object(o.d)(e,["innerRef","values","controls"]),t,n,r)}))};function co(e){return"string"==typeof e&&e.startsWith("var(--")}var lo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fo(e,t,n){void 0===n&&(n=1);var r=function(e){var t=lo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i||(co(a)?fo(a,t,n+1):a)}}var po,ho=new Set(["width","height","top","left","right","bottom","x","y"]),vo=function(e){return ho.has(e)},mo=function(e,t){e.set(t,!1),e.set(t)},yo=function(e){return e===R||e===L};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(po||(po={}));var go=function(e,t){return parseFloat(e.split(", ")[t])},bo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return go(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return go(i[1],e)}},Oo=new Set(["x","y","z"]),wo=lt.filter((function(e){return!Oo.has(e)}));var jo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:bo(4,13),y:bo(5,14)},xo=function(e,t,n,r){void 0===r&&(r={}),n=Object(o.a)({},n),r=Object(o.a)({},r);var a=t.current,i=Lt(a),s=Object.keys(n).filter(vo),u=[],c=!1,l=s.reduce((function(t,o){var a=e.get(o);if(!a)return t;var s,l=a.get(),f=n[o],p=Nn(l);if(Rn(f))for(var d=f.length,h=null===f[0]?1:0;he.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}var c="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function l(e){cancelAnimationFrame(e.id)}function f(e,t){var n=c();var r={id:requestAnimationFrame((function o(){c()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var p=null;function d(e){if(void 0===e&&(e=!1),null===p||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?p="positive-descending":(t.scrollLeft=1,p=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),p}return p}var h=function(e,t){return e};function v(e){var t,n,u=e.getItemOffset,c=e.getEstimatedTotalSize,p=e.getItemSize,v=e.getOffsetForIndexAndAlignment,y=e.getStartIndexForOffset,g=e.getStopIndexForStartIndex,b=e.initInstanceProps,O=e.shouldResetStyleCacheOnItemSizeChange,w=e.validateProps;return n=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=b(n.props,a(a(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:a(a(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=Object(i.a)((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=Object(i.a)((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,o=r.direction,a=r.itemSize,i=r.layout,s=n._getItemStyleCache(O&&a,O&&i,O&&o);if(s.hasOwnProperty(e))t=s[e];else{var c,l=u(n.props,e,n._instanceProps),f=p(n.props,e,n._instanceProps),d="horizontal"===o||"horizontal"===i;s[e]=((c={position:"absolute"})["rtl"===o?"right":"left"]=d?l:0,c.top=d?0:l,c.height=d?"100%":f,c.width=d?f:"100%",t=c)}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=Object(i.a)((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,a=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,i=o;if("rtl"===t)switch(d()){case"negative":i=-o;break;case"positive-descending":i=a-r-o}return i=Math.max(0,Math.min(i,a-r)),{isScrolling:!0,scrollDirection:e.scrollOffset0)for(var T=S;T<=P;T++)k.push(Object(s.createElement)(t,{data:p,key:v(T,p),index:T,isScrolling:O?j:void 0,style:this._getItemStyle(T)}));var M=c(this.props,this._instanceProps);return Object(s.createElement)(y||g||"div",{className:n,onScroll:E,ref:this._outerRefSetter,style:r({position:"relative",height:a,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},Object(s.createElement)(u||l||"div",{children:k,ref:i,style:{height:x?"100%":M,pointerEvents:j?"none":void 0,width:x?M:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var a=this.state,i=a.scrollDirection,s=a.scrollOffset,u=a.scrollUpdateWasRequested;this._callOnScroll(i,s,u)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,a=r.scrollDirection,i=r.scrollOffset;if(0===t)return[0,0,0,0];var s=y(this.props,i,this._instanceProps),u=g(this.props,s,i,this._instanceProps),c=o&&"backward"!==a?1:Math.max(1,n),l=o&&"forward"!==a?1:Math.max(1,n);return[Math.max(0,s-c),Math.max(0,Math.min(t-1,u+l)),s,u]},t}(s.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var m=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},y=v({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,a=e.height,i=e.itemCount,s=e.itemSize,u=e.layout,c=e.width,l="horizontal"===o||"horizontal"===u?c:a,f=Math.max(0,i*s-l),p=Math.min(f,t*s),d=Math.max(0,t*s-l+s);switch("smart"===n&&(n=r>=d-l&&r<=p+l?"auto":"center"),n){case"start":return p;case"end":return d;case"center":var h=Math.round(d+(p-d)/2);return hf+Math.floor(l/2)?f:h;case"auto":default:return r>=d&&r<=p?r:r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=function(e){var t=e.color,n=e.size,r=u(e,["color","size"]);return o.a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polyline",{points:"6 9 12 15 18 9"}))};c.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},c.defaultProps={color:"currentColor",size:"24"},t.a=c},kGfw:function(e,t,n){e.exports={root:"_30oJwXNik9",logoLink:"_1SsCcpJvxN",logo:"_2r8EkOI78X",pulse:"_2KRqAfqV8c",rows:"_2vUQ0Hs_C5",row:"_8mEn9Wlw1n",rowActive:"_1WyHmd6t6y",label:"_2eMIYGbP9O",themeSwitchContainer:"nURY8qkFLS"}},ls82:function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof l?t:l,a=Object.create(o.prototype),i=new j(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return E()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=b(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(x([])));v&&v!==t&&n.call(v,o)&&(d=v);var m=p.prototype=l.prototype=Object.create(d);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function g(e,t){var r;this._invoke=function(o,a){function i(){return new t((function(r,i){!function r(o,a,i,s){var c=u(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(c.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},mrSG:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function c(){for(var e=[],t=0;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=function(e){var t=e.color,n=e.size,r=u(e,["color","size"]);return o.a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),o.a.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))};c.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},c.defaultProps={color:"currentColor",size:"24"},t.a=c},zCtg:function(e,t,n){e.exports={placeHolder:"duOnUwq-nI",connQty:"CCpULSE9Uh"}}},[[0,5,1,3]],[7,2,4,6]]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.623087d3dd2fb338b3d6.js.LICENSE.txt b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js.LICENSE.txt similarity index 100% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.623087d3dd2fb338b3d6.js.LICENSE.txt rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.97da0bf63bfa93de767f.js.LICENSE.txt diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.6649a23b1d13a5f65fc1.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.e768d5b23b7e7ef5d68d.js similarity index 54% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.6649a23b1d13a5f65fc1.js rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.e768d5b23b7e7ef5d68d.js index a3c68ffb3f..1044d45a35 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.6649a23b1d13a5f65fc1.js +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/core-js~app.e768d5b23b7e7ef5d68d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+2oP":function(t,n,r){"use strict";var e=r("I+eb"),o=r("hh1v"),i=r("6LWA"),c=r("I8vh"),u=r("UMSQ"),a=r("/GqU"),f=r("hBjN"),s=r("tiKp"),l=r("Hd5f"),p=r("rkAj"),v=l("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),d=s("species"),y=[].slice,g=Math.max;e({target:"Array",proto:!0,forced:!v||!h},{slice:function(t,n){var r,e,s,l=a(this),p=u(l.length),v=c(t,p),h=c(void 0===n?p:n,p);if(i(l)&&("function"!=typeof(r=l.constructor)||r!==Array&&!i(r.prototype)?o(r)&&null===(r=r[d])&&(r=void 0):r=void 0,r===Array||void 0===r))return y.call(l,v,h);for(e=new(void 0===r?Array:r)(g(h-v,0)),s=0;v")})),s="$0"==="a".replace(/./,"$0"),l=i("replace"),p=!!/./[l]&&""===/./[l]("a","$0"),v=!o((function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,n,r,l){var h=i(t),d=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),y=d&&!o((function(){var n=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[a]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return n=!0,null},r[h](""),!n}));if(!d||!y||"replace"===t&&(!f||!s||p)||"split"===t&&!v){var g=/./[h],x=r(h,""[t],(function(t,n,r,e,o){return n.exec===c?d&&!o?{done:!0,value:g.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),{REPLACE_KEEPS_$0:s,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),m=x[0],b=x[1];e(String.prototype,t,m),e(RegExp.prototype,h,2==n?function(t,n){return b.call(t,this,n)}:function(t){return b.call(t,this)})}l&&u(RegExp.prototype[h],"sham",!0)}},"1E5z":function(t,n,r){var e=r("m/L8").f,o=r("UTVS"),i=r("tiKp")("toStringTag");t.exports=function(t,n,r){t&&!o(t=r?t:t.prototype,i)&&e(t,i,{configurable:!0,value:n})}},"27RR":function(t,n,r){var e=r("I+eb"),o=r("g6v/"),i=r("Vu81"),c=r("/GqU"),u=r("Bs8V"),a=r("hBjN");e({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var n,r,e=c(t),o=u.f,f=i(e),s={},l=0;f.length>l;)void 0!==(r=o(e,n=f[l++]))&&a(s,n,r);return s}})},"2B1R":function(t,n,r){"use strict";var e=r("I+eb"),o=r("tycR").map,i=r("Hd5f"),c=r("rkAj"),u=i("map"),a=c("map");e({target:"Array",proto:!0,forced:!u||!a},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"2oRo":function(t,n,r){(function(n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||Function("return this")()}).call(this,r("yLpj"))},"33Wh":function(t,n,r){var e=r("yoRg"),o=r("eDl+");t.exports=Object.keys||function(t){return e(t,o)}},"3bBZ":function(t,n,r){var e=r("2oRo"),o=r("/byt"),i=r("4mDm"),c=r("kRJp"),u=r("tiKp"),a=u("iterator"),f=u("toStringTag"),s=i.values;for(var l in o){var p=e[l],v=p&&p.prototype;if(v){if(v[a]!==s)try{c(v,a,s)}catch(t){v[a]=s}if(v[f]||c(v,f,l),o[l])for(var h in i)if(v[h]!==i[h])try{c(v,h,i[h])}catch(t){v[h]=i[h]}}}},"4Brf":function(t,n,r){"use strict";var e=r("I+eb"),o=r("g6v/"),i=r("2oRo"),c=r("UTVS"),u=r("hh1v"),a=r("m/L8").f,f=r("6JNq"),s=i.Symbol;if(o&&"function"==typeof s&&(!("description"in s.prototype)||void 0!==s().description)){var l={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),n=this instanceof p?new s(t):void 0===t?s():s(t);return""===t&&(l[n]=!0),n};f(p,s);var v=p.prototype=s.prototype;v.constructor=p;var h=v.toString,d="Symbol(test)"==String(s("test")),y=/^Symbol\((.*)\)[^)]+$/;a(v,"description",{configurable:!0,get:function(){var t=u(this)?this.valueOf():this,n=h.call(t);if(c(l,t))return"";var r=d?n.slice(7,-1):n.replace(y,"$1");return""===r?void 0:r}}),e({global:!0,forced:!0},{Symbol:p})}},"4WOD":function(t,n,r){var e=r("UTVS"),o=r("ewvW"),i=r("93I0"),c=r("4Xet"),u=i("IE_PROTO"),a=Object.prototype;t.exports=c?Object.getPrototypeOf:function(t){return t=o(t),e(t,u)?t[u]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"4Xet":function(t,n,r){var e=r("0Dky");t.exports=!e((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},"4mDm":function(t,n,r){"use strict";var e=r("/GqU"),o=r("RNIs"),i=r("P4y1"),c=r("afO8"),u=r("fdAy"),a=c.set,f=c.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,n){a(this,{type:"Array Iterator",target:e(t),index:0,kind:n})}),(function(){var t=f(this),n=t.target,r=t.kind,e=t.index++;return!n||e>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},"4syw":function(t,n,r){var e=r("busE");t.exports=function(t,n,r){for(var o in n)e(t,o,n[o],r);return t}},"5Tg+":function(t,n,r){var e=r("tiKp");n.f=e},"5mdu":function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},"5s+n":function(t,n,r){"use strict";var e,o,i,c,u=r("I+eb"),a=r("xDBR"),f=r("2oRo"),s=r("0GbY"),l=r("/qmn"),p=r("busE"),v=r("4syw"),h=r("1E5z"),d=r("JiZb"),y=r("hh1v"),g=r("HAuM"),x=r("GarU"),m=r("xrYK"),b=r("iSVu"),S=r("ImZN"),E=r("HH4o"),O=r("SEBh"),w=r("LPSS").set,R=r("tXUg"),A=r("zfnd"),k=r("RN6c"),I=r("8GlL"),j=r("5mdu"),T=r("afO8"),P=r("lMq5"),M=r("tiKp"),L=r("LQDL"),D=M("species"),B="Promise",N=T.get,U=T.set,C=T.getterFor(B),G=l,W=f.TypeError,K=f.document,V=f.process,_=s("fetch"),J=I.f,F=J,H="process"==m(V),Y=!!(K&&K.createEvent&&f.dispatchEvent),q=P(B,(function(){if(!(b(G)!==String(G))){if(66===L)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(a&&!G.prototype.finally)return!0;if(L>=51&&/native code/.test(G))return!1;var t=G.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[D]=n,!(t.then((function(){}))instanceof n)})),Q=q||!E((function(t){G.all(t).catch((function(){}))})),z=function(t){var n;return!(!y(t)||"function"!=typeof(n=t.then))&&n},X=function(t,n,r){if(!n.notified){n.notified=!0;var e=n.reactions;R((function(){for(var o=n.value,i=1==n.state,c=0;e.length>c;){var u,a,f,s=e[c++],l=i?s.ok:s.fail,p=s.resolve,v=s.reject,h=s.domain;try{l?(i||(2===n.rejection&&nt(t,n),n.rejection=1),!0===l?u=o:(h&&h.enter(),u=l(o),h&&(h.exit(),f=!0)),u===s.promise?v(W("Promise-chain cycle")):(a=z(u))?a.call(u,p,v):p(u)):v(o)}catch(t){h&&!f&&h.exit(),v(t)}}n.reactions=[],n.notified=!1,r&&!n.rejection&&Z(t,n)}))}},$=function(t,n,r){var e,o;Y?((e=K.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),f.dispatchEvent(e)):e={promise:n,reason:r},(o=f["on"+t])?o(e):"unhandledrejection"===t&&k("Unhandled promise rejection",r)},Z=function(t,n){w.call(f,(function(){var r,e=n.value;if(tt(n)&&(r=j((function(){H?V.emit("unhandledRejection",e,t):$("unhandledrejection",t,e)})),n.rejection=H||tt(n)?2:1,r.error))throw r.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},nt=function(t,n){w.call(f,(function(){H?V.emit("rejectionHandled",t):$("rejectionhandled",t,n.value)}))},rt=function(t,n,r,e){return function(o){t(n,r,o,e)}},et=function(t,n,r,e){n.done||(n.done=!0,e&&(n=e),n.value=r,n.state=2,X(t,n,!0))},ot=function(t,n,r,e){if(!n.done){n.done=!0,e&&(n=e);try{if(t===r)throw W("Promise can't be resolved itself");var o=z(r);o?R((function(){var e={done:!1};try{o.call(r,rt(ot,t,e,n),rt(et,t,e,n))}catch(r){et(t,e,r,n)}})):(n.value=r,n.state=1,X(t,n,!1))}catch(r){et(t,{done:!1},r,n)}}};q&&(G=function(t){x(this,G,B),g(t),e.call(this);var n=N(this);try{t(rt(ot,this,n),rt(et,this,n))}catch(t){et(this,n,t)}},(e=function(t){U(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(G.prototype,{then:function(t,n){var r=C(this),e=J(O(this,G));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=H?V.domain:void 0,r.parent=!0,r.reactions.push(e),0!=r.state&&X(this,r,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new e,n=N(t);this.promise=t,this.resolve=rt(ot,t,n),this.reject=rt(et,t,n)},I.f=J=function(t){return t===G||t===i?new o(t):F(t)},a||"function"!=typeof l||(c=l.prototype.then,p(l.prototype,"then",(function(t,n){var r=this;return new G((function(t,n){c.call(r,t,n)})).then(t,n)}),{unsafe:!0}),"function"==typeof _&&u({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return A(G,_.apply(f,arguments))}}))),u({global:!0,wrap:!0,forced:q},{Promise:G}),h(G,B,!1,!0),d(B),i=s(B),u({target:B,stat:!0,forced:q},{reject:function(t){var n=J(this);return n.reject.call(void 0,t),n.promise}}),u({target:B,stat:!0,forced:a||q},{resolve:function(t){return A(a&&this===i?G:this,t)}}),u({target:B,stat:!0,forced:Q},{all:function(t){var n=this,r=J(n),e=r.resolve,o=r.reject,i=j((function(){var r=g(n.resolve),i=[],c=0,u=1;S(t,(function(t){var a=c++,f=!1;i.push(void 0),u++,r.call(n,t).then((function(t){f||(f=!0,i[a]=t,--u||e(i))}),o)})),--u||e(i)}));return i.error&&o(i.value),r.promise},race:function(t){var n=this,r=J(n),e=r.reject,o=j((function(){var o=g(n.resolve);S(t,(function(t){o.call(n,t).then(r.resolve,e)}))}));return o.error&&e(o.value),r.promise}})},"6JNq":function(t,n,r){var e=r("UTVS"),o=r("Vu81"),i=r("Bs8V"),c=r("m/L8");t.exports=function(t,n){for(var r=o(n),u=c.f,a=i.f,f=0;f1||"".split(/.?/).length?function(t,r){var e=String(c(this)),i=void 0===r?4294967295:r>>>0;if(0===i)return[];if(void 0===t)return[e];if(!o(t))return n.call(e,t,i);for(var u,a,f,s=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,d=new RegExp(t.source,p+"g");(u=l.call(d,e))&&!((a=d.lastIndex)>h&&(s.push(e.slice(h,u.index)),u.length>1&&u.index=i));)d.lastIndex===u.index&&d.lastIndex++;return h===e.length?!f&&d.test("")||s.push(""):s.push(e.slice(h)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n.call(this,t,r)}:n,[function(n,r){var o=c(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,o){var c=r(e,t,this,o,e!==n);if(c.done)return c.value;var l=i(t),p=String(this),v=u(l,RegExp),y=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(d?"y":"g"),x=new v(d?l:"^(?:"+l.source+")",g),m=void 0===o?4294967295:o>>>0;if(0===m)return[];if(0===p.length)return null===s(x,p)?[p]:[];for(var b=0,S=0,E=[];S1?arguments[1]:void 0)}},FMNM:function(t,n,r){var e=r("xrYK"),o=r("kmMV");t.exports=function(t,n){var r=t.exec;if("function"==typeof r){var i=r.call(t,n);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==e(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,n)}},FZtP:function(t,n,r){var e=r("2oRo"),o=r("/byt"),i=r("F8JR"),c=r("kRJp");for(var u in o){var a=e[u],f=a&&a.prototype;if(f&&f.forEach!==i)try{c(f,"forEach",i)}catch(t){f.forEach=i}}},"G+Rx":function(t,n,r){var e=r("0GbY");t.exports=e("document","documentElement")},GarU:function(t,n){t.exports=function(t,n,r){if(!(t instanceof n))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},HAuM:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},HH4o:function(t,n,r){var e=r("tiKp")("iterator"),o=!1;try{var i=0,c={next:function(){return{done:!!i++}},return:function(){o=!0}};c[e]=function(){return this},Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var r=!1;try{var i={};i[e]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},HNyW:function(t,n,r){var e=r("NC/Y");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(e)},HYAF:function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},Hd5f:function(t,n,r){var e=r("0Dky"),o=r("tiKp"),i=r("LQDL"),c=o("species");t.exports=function(t){return i>=51||!e((function(){var n=[];return(n.constructor={})[c]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},"I+eb":function(t,n,r){var e=r("2oRo"),o=r("Bs8V").f,i=r("kRJp"),c=r("busE"),u=r("zk60"),a=r("6JNq"),f=r("lMq5");t.exports=function(t,n){var r,s,l,p,v,h=t.target,d=t.global,y=t.stat;if(r=d?e:y?e[h]||u(h,{}):(e[h]||{}).prototype)for(s in n){if(p=n[s],l=t.noTargetGet?(v=o(r,s))&&v.value:r[s],!f(d?s:h+(y?".":"#")+s,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;a(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),c(r,s,p,t)}}},I8vh:function(t,n,r){var e=r("ppGB"),o=Math.max,i=Math.min;t.exports=function(t,n){var r=e(t);return r<0?o(r+n,0):i(r,n)}},ImZN:function(t,n,r){var e=r("glrk"),o=r("6VoE"),i=r("UMSQ"),c=r("A2ZE"),u=r("NaFW"),a=r("m92n"),f=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,r,s,l){var p,v,h,d,y,g,x,m=c(n,r,s?2:1);if(l)p=t;else{if("function"!=typeof(v=u(t)))throw TypeError("Target is not iterable");if(o(v)){for(h=0,d=i(t.length);d>h;h++)if((y=s?m(e(x=t[h])[0],x[1]):m(t[h]))&&y instanceof f)return y;return new f(!1)}p=v.call(t)}for(g=p.next;!(x=g.call(p)).done;)if("object"==typeof(y=a(p,m,x.value,s))&&y&&y instanceof f)return y;return new f(!1)}).stop=function(t){return new f(!0,t)}},JBy8:function(t,n,r){var e=r("yoRg"),o=r("eDl+").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},JfAA:function(t,n,r){"use strict";var e=r("busE"),o=r("glrk"),i=r("0Dky"),c=r("rW0t"),u=RegExp.prototype,a=u.toString,f=i((function(){return"/a/b"!=a.call({source:"a",flags:"b"})})),s="toString"!=a.name;(f||s)&&e(RegExp.prototype,"toString",(function(){var t=o(this),n=String(t.source),r=t.flags;return"/"+n+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in u)?c.call(t):r)}),{unsafe:!0})},JiZb:function(t,n,r){"use strict";var e=r("0GbY"),o=r("m/L8"),i=r("tiKp"),c=r("g6v/"),u=i("species");t.exports=function(t){var n=e(t),r=o.f;c&&n&&!n[u]&&r(n,u,{configurable:!0,get:function(){return this}})}},Junv:function(t,n,r){"use strict";var e=r("I+eb"),o=r("6LWA"),i=[].reverse,c=[1,2];e({target:"Array",proto:!0,forced:String(c)===String(c.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},LPSS:function(t,n,r){var e,o,i,c=r("2oRo"),u=r("0Dky"),a=r("xrYK"),f=r("A2ZE"),s=r("G+Rx"),l=r("zBJ4"),p=r("HNyW"),v=c.location,h=c.setImmediate,d=c.clearImmediate,y=c.process,g=c.MessageChannel,x=c.Dispatch,m=0,b={},S=function(t){if(b.hasOwnProperty(t)){var n=b[t];delete b[t],n()}},E=function(t){return function(){S(t)}},O=function(t){S(t.data)},w=function(t){c.postMessage(t+"",v.protocol+"//"+v.host)};h&&d||(h=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return b[++m]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},e(m),m},d=function(t){delete b[t]},"process"==a(y)?e=function(t){y.nextTick(E(t))}:x&&x.now?e=function(t){x.now(E(t))}:g&&!p?(i=(o=new g).port2,o.port1.onmessage=O,e=f(i.postMessage,i,1)):!c.addEventListener||"function"!=typeof postMessage||c.importScripts||u(w)?e="onreadystatechange"in l("script")?function(t){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),S(t)}}:function(t){setTimeout(E(t),0)}:(e=w,c.addEventListener("message",O,!1))),t.exports={set:h,clear:d}},LQDL:function(t,n,r){var e,o,i=r("2oRo"),c=r("NC/Y"),u=i.process,a=u&&u.versions,f=a&&a.v8;f?o=(e=f.split("."))[0]+e[1]:c&&(!(e=c.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=c.match(/Chrome\/(\d+)/))&&(o=e[1]),t.exports=o&&+o},"N+g0":function(t,n,r){var e=r("g6v/"),o=r("m/L8"),i=r("glrk"),c=r("33Wh");t.exports=e?Object.defineProperties:function(t,n){i(t);for(var r,e=c(n),u=e.length,a=0;u>a;)o.f(t,r=e[a++],n[r]);return t}},"NC/Y":function(t,n,r){var e=r("0GbY");t.exports=e("navigator","userAgent")||""},NaFW:function(t,n,r){var e=r("9d/t"),o=r("P4y1"),i=r("tiKp")("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[e(t)]}},O741:function(t,n,r){var e=r("hh1v");t.exports=function(t){if(!e(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},P4y1:function(t,n){t.exports={}},QWBl:function(t,n,r){"use strict";var e=r("I+eb"),o=r("F8JR");e({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},Qo9l:function(t,n,r){var e=r("2oRo");t.exports=e},RK3t:function(t,n,r){var e=r("0Dky"),o=r("xrYK"),i="".split;t.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},RN6c:function(t,n,r){var e=r("2oRo");t.exports=function(t,n){var r=e.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}},RNIs:function(t,n,r){var e=r("tiKp"),o=r("fHMY"),i=r("m/L8"),c=e("unscopables"),u=Array.prototype;null==u[c]&&i.f(u,c,{configurable:!0,value:o(null)}),t.exports=function(t){u[c][t]=!0}},ROdP:function(t,n,r){var e=r("hh1v"),o=r("xrYK"),i=r("tiKp")("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},SEBh:function(t,n,r){var e=r("glrk"),o=r("HAuM"),i=r("tiKp")("species");t.exports=function(t,n){var r,c=e(t).constructor;return void 0===c||null==(r=e(c)[i])?n:o(r)}},STAE:function(t,n,r){var e=r("0Dky");t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},SYor:function(t,n,r){"use strict";var e=r("I+eb"),o=r("WKiH").trim;e({target:"String",proto:!0,forced:r("yNLB")("trim")},{trim:function(){return o(this)}})},TWQb:function(t,n,r){var e=r("/GqU"),o=r("UMSQ"),i=r("I8vh"),c=function(t){return function(n,r,c){var u,a=e(n),f=o(a.length),s=i(c,f);if(t&&r!=r){for(;f>s;)if((u=a[s++])!=u)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===r)return t||s||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},TeQF:function(t,n,r){"use strict";var e=r("I+eb"),o=r("tycR").filter,i=r("Hd5f"),c=r("rkAj"),u=i("filter"),a=c("filter");e({target:"Array",proto:!0,forced:!u||!a},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},ToJy:function(t,n,r){"use strict";var e=r("I+eb"),o=r("HAuM"),i=r("ewvW"),c=r("0Dky"),u=r("pkCn"),a=[],f=a.sort,s=c((function(){a.sort(void 0)})),l=c((function(){a.sort(null)})),p=u("sort");e({target:"Array",proto:!0,forced:s||!l||!p},{sort:function(t){return void 0===t?f.call(i(this)):f.call(i(this),o(t))}})},UMSQ:function(t,n,r){var e=r("ppGB"),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},UTVS:function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},UxlC:function(t,n,r){"use strict";var e=r("14Sl"),o=r("glrk"),i=r("ewvW"),c=r("UMSQ"),u=r("ppGB"),a=r("HYAF"),f=r("iqWW"),s=r("FMNM"),l=Math.max,p=Math.min,v=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,d=/\$([$&'`]|\d\d?)/g;e("replace",2,(function(t,n,r,e){var y=e.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=e.REPLACE_KEEPS_$0,x=y?"$":"$0";return[function(r,e){var o=a(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,e):n.call(String(o),r,e)},function(t,e){if(!y&&g||"string"==typeof e&&-1===e.indexOf(x)){var i=r(n,t,this,e);if(i.done)return i.value}var a=o(t),v=String(this),h="function"==typeof e;h||(e=String(e));var d=a.global;if(d){var b=a.unicode;a.lastIndex=0}for(var S=[];;){var E=s(a,v);if(null===E)break;if(S.push(E),!d)break;""===String(E[0])&&(a.lastIndex=f(v,c(a.lastIndex),b))}for(var O,w="",R=0,A=0;A=R&&(w+=v.slice(R,I)+L,R=I+k.length)}return w+v.slice(R)}];function m(t,r,e,o,c,u){var a=e+t.length,f=o.length,s=d;return void 0!==c&&(c=i(c),s=h),n.call(u,s,(function(n,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,e);case"'":return r.slice(a);case"<":u=c[i.slice(1,-1)];break;default:var s=+i;if(0===s)return n;if(s>f){var l=v(s/10);return 0===l?n:l<=f?void 0===o[l-1]?i.charAt(1):o[l-1]+i.charAt(1):n}u=o[s-1]}return void 0===u?"":u}))}}))},VpIT:function(t,n,r){var e=r("xDBR"),o=r("xs3f");(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.4",mode:e?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},Vu81:function(t,n,r){var e=r("0GbY"),o=r("JBy8"),i=r("dBg+"),c=r("glrk");t.exports=e("Reflect","ownKeys")||function(t){var n=o.f(c(t)),r=i.f;return r?n.concat(r(t)):n}},WJkJ:function(t,n){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},WKiH:function(t,n,r){var e=r("HYAF"),o="["+r("WJkJ")+"]",i=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),u=function(t){return function(n){var r=String(e(n));return 1&t&&(r=r.replace(i,"")),2&t&&(r=r.replace(c,"")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},XGwC:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},ZUd8:function(t,n,r){var e=r("ppGB"),o=r("HYAF"),i=function(t){return function(n,r){var i,c,u=String(o(n)),a=e(r),f=u.length;return a<0||a>=f?t?"":void 0:(i=u.charCodeAt(a))<55296||i>56319||a+1===f||(c=u.charCodeAt(a+1))<56320||c>57343?t?u.charAt(a):i:t?u.slice(a,a+2):c-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},ZfDv:function(t,n,r){var e=r("hh1v"),o=r("6LWA"),i=r("tiKp")("species");t.exports=function(t,n){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?e(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)}},afO8:function(t,n,r){var e,o,i,c=r("f5p1"),u=r("2oRo"),a=r("hh1v"),f=r("kRJp"),s=r("UTVS"),l=r("93I0"),p=r("0BK2"),v=u.WeakMap;if(c){var h=new v,d=h.get,y=h.has,g=h.set;e=function(t,n){return g.call(h,t,n),n},o=function(t){return d.call(h,t)||{}},i=function(t){return y.call(h,t)}}else{var x=l("state");p[x]=!0,e=function(t,n){return f(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(n){var r;if(!a(n)||(r=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},busE:function(t,n,r){var e=r("2oRo"),o=r("kRJp"),i=r("UTVS"),c=r("zk60"),u=r("iSVu"),a=r("afO8"),f=a.get,s=a.enforce,l=String(String).split("String");(t.exports=function(t,n,r,u){var a=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,p=!!u&&!!u.noTargetGet;"function"==typeof r&&("string"!=typeof n||i(r,"name")||o(r,"name",n),s(r).source=l.join("string"==typeof n?n:"")),t!==e?(a?!p&&t[n]&&(f=!0):delete t[n],f?t[n]=r:o(t,n,r)):f?t[n]=r:c(n,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||u(this)}))},"dBg+":function(t,n){n.f=Object.getOwnPropertySymbols},"dG/n":function(t,n,r){var e=r("Qo9l"),o=r("UTVS"),i=r("5Tg+"),c=r("m/L8").f;t.exports=function(t){var n=e.Symbol||(e.Symbol={});o(n,t)||c(n,t,{value:i.f(t)})}},"eDl+":function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},ewvW:function(t,n,r){var e=r("HYAF");t.exports=function(t){return Object(e(t))}},f5p1:function(t,n,r){var e=r("2oRo"),o=r("iSVu"),i=e.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},fHMY:function(t,n,r){var e,o=r("glrk"),i=r("N+g0"),c=r("eDl+"),u=r("0BK2"),a=r("G+Rx"),f=r("zBJ4"),s=r("93I0"),l=s("IE_PROTO"),p=function(){},v=function(t){return" + - + - + diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.49fb4634cda581289b5a.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.49fb4634cda581289b5a.js deleted file mode 100644 index fb997f73d0..0000000000 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.49fb4634cda581289b5a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{D46e:function(e,t,a){e.exports={header:"_3PCSxT0l14",list:"_1yYRIyvlRd",proxy:"_1OcDlvlM5R",proxySelectable:"_3oAxPKtZFv"}},FWZb:function(e,t,a){e.exports={proxy:"NpfXwxWAxo",now:"_2zD7drviYH",error:"_2bylJNYYdN",proxyType:"_1rVl-Kdmss",row:"aS2noEcBcP",proxyName:"_3kdi5nima5",proxySmall:"_3NpxWygDxO"}},L5YO:function(e,t,a){e.exports={group:"_1myfcMimT9"}},RL2M:function(e,t,a){e.exports={header:"_37wt2_a2Gx",arrow:"L80zPM0Rx0",isOpen:"_36RO7_wtuv",qty:"_1s98xvUoBx"}},RbL9:function(e,t,a){e.exports={proxyLatency:"_2V-RqIAl7n"}},wyCT:function(e,t,a){"use strict";a.r(t);a("2B1R");var n=a("q1tI"),r=a.n(n),c=a("WfPo"),l=a("DKqX"),i=(a("TeQF"),a("ToJy"),a("KQm4")),o=a("ODXe"),u=a("TSYQ"),s=a.n(u),m=a("Wwog"),p=a("HGr0"),f=a("j7o3"),v=a("riol"),d=a("5Wrh"),b=a("RL2M"),y=a.n(b);function E(e){var t=e.name,a=e.type,n=e.toggle,c=e.isOpen,l=e.qty;return r.a.createElement("div",{className:y.a.header},r.a.createElement("div",{onClick:n,style:{cursor:"pointer"}},r.a.createElement(v.b,{name:t,type:a})),"number"==typeof l?r.a.createElement("span",{className:y.a.qty},l):null,r.a.createElement(d.a,{kind:"minimal",onClick:n},r.a.createElement("span",{className:s()(y.a.arrow,{[y.a.isOpen]:c})},r.a.createElement(f.a,{size:20}))))}var x=a("RbL9"),O=a.n(x);function h(e){var t=e.number,a=e.color;return r.a.createElement("span",{className:O.a.proxyLatency,style:{color:a}},r.a.createElement("span",null,t," ms"))}var w=a("FWZb"),g=a.n(w),j=r.a.useMemo,N="#67c23a",k="#d4b75c",C="#e67f3c",_="#909399";function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.number;e.error;return t<200?N:t<400?k:"number"==typeof t?C:_}var T=function(e,t){var a=t.name,n=Object(p.c)(e),r=Object(p.b)(e);return{proxy:n[a],latency:r[a]}},S=Object(c.a)(T)((function(e){var t=e.now,a=e.name,n=e.proxy,c=e.latency,l=j((function(){return A(c)}),[c]);return r.a.createElement("div",{className:s()(g.a.proxy,{[g.a.now]:t,[g.a.error]:c&&c.error})},r.a.createElement("div",{className:g.a.proxyName},a),r.a.createElement("div",{className:g.a.row},r.a.createElement("span",{className:g.a.proxyType,style:{opacity:t?.6:.2}},n.type),c&&c.number?r.a.createElement(h,{number:c.number,color:l}):null))})),R=Object(c.a)(T)((function(e){var t=e.now,a=e.name,n=(e.proxy,e.latency),c=j((function(){return A(n)}),[n]),l=j((function(){var e=a;return n&&"number"==typeof n.number&&(e+=" "+n.number+" ms"),e}),[a,n]);return r.a.createElement("div",{title:l,className:s()(g.a.proxySmall,{[g.a.now]:t}),style:{backgroundColor:c}})})),D=r.a.useState,L=r.a.useCallback;var P=a("D46e"),F=a.n(P),q=r.a.useCallback,z=r.a.useMemo;function M(e){var t=e.all,a=e.now,n=e.isSelectable,c=e.itemOnTapCallback,l=e.sortedAll||t;return r.a.createElement("div",{className:F.a.list},l.map((function(e){var t=s()(F.a.proxy,{[F.a.proxySelectable]:n});return r.a.createElement("div",{className:t,key:e,onClick:function(){n&&c&&c(e)}},r.a.createElement(S,{name:e,now:e===a}))})))}var H=function(e,t){return void 0===e?0:!e.error&&e.number>0?e.number:t};var Q=Object(m.a)((function(e,t,a){var n=Object(i.a)(e);return a&&(n=function(e,t){return e.filter((function(e){var a=t[e];return void 0===a||!a.error&&0!==a.number}))}(e,t)),n.sort((function(e,a){return H(t[e],999999)-H(t[a],999999)}))}));function W(e){var t=e.all,a=e.now,n=e.isSelectable,c=e.itemOnTapCallback;return r.a.createElement("div",{className:F.a.list},t.map((function(e){var t=s()(F.a.proxy,{[F.a.proxySelectable]:n});return r.a.createElement("div",{className:t,key:e,onClick:function(){n&&c&&c(e)}},r.a.createElement(R,{name:e,now:e===a}))})))}var Y=Object(c.a)((function(e,t){var a=t.name,n=t.delay,r=Object(p.c)(e),c=Object(p.f)(e),l=r[a],i=l.all,o=l.type,u=l.now;return{all:Q(i,n,c),type:o,now:u}}))((function(e){var t=e.name,a=e.all,n=e.type,c=e.now,l=e.apiConfig,i=e.dispatch,u=z((function(){return"Selector"===n}),[n]),s=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=D(e),a=Object(o.a)(t,2),n=a[0],r=a[1],c=L((function(){return r((function(e){return!e}))}),[]);return[n,c]}(!0),m=Object(o.a)(s,2),f=m[0],v=m[1],d=q((function(e){u&&i(Object(p.j)(l,t,e))}),[l,i,t,u]);return r.a.createElement("div",{className:F.a.group},r.a.createElement(E,{name:t,type:n,toggle:v,qty:a.length,isOpen:f}),f?r.a.createElement(M,{all:a,now:c,isSelectable:u,itemOnTapCallback:d}):r.a.createElement(W,{all:a}))})),Z=a("8/mu"),K=a("ySHw"),U=a("fIvA"),I=a("o0o1"),V=a.n(I),B=(a("ls82"),a("HaE+")),J=a("OAQO"),X=a("FVam"),G=a("ZMKu"),$=a("bdgK"),ee=r.a.memo,te=r.a.useState,ae=r.a.useRef,ne=r.a.useEffect;var re={initialOpen:{height:"auto",transition:{duration:0}},open:function(e){return{height:e,opacity:1,visibility:"visible",transition:{duration:.3}}},closed:{height:0,opacity:0,visibility:"hidden",transition:{duration:.3}}},ce={open:{x:0},closed:{x:20}},le=ee((function(e){var t,a,n=e.children,c=e.isOpen,l=(t=c,a=ae(),ne((function(){a.current=t}),[t]),a.current),i=function(){var e=ae(),t=te({height:0}),a=Object(o.a)(t,2),n=a[0],r=a[1];return ne((function(){var t=new $.a((function(e){var t=Object(o.a)(e,1)[0];return r(t.contentRect)}));return e.current&&t.observe(e.current),function(){return t.disconnect()}}),[]),[e,n]}(),u=Object(o.a)(i,2),s=u[0],m=u[1].height;return r.a.createElement("div",null,r.a.createElement(G.a.div,{animate:c&&l===c?"initialOpen":c?"open":"closed",custom:m,variants:re},r.a.createElement(G.a.div,{variants:ce,ref:s},n)))})),ie=a("OADI"),oe=a("x5hA"),ue=a.n(oe),se=r.a.useState,me=r.a.useCallback;var pe={rest:{scale:1},pressed:{scale:.95}},fe={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function ve(){return r.a.createElement(G.a.div,{className:ue.a.refresh,variants:pe,initial:"rest",whileHover:"hover",whileTap:"pressed"},r.a.createElement(G.a.div,{className:"flexCenter",variants:fe},r.a.createElement(J.a,{size:16})))}var de=Object(c.a)((function(e,t){var a=t.proxies,n=Object(p.f)(e),r=Object(p.b)(e);return{apiConfig:Object(ie.b)(e),proxies:Q(a,r,n)}}))((function(e){var t=e.name,a=e.proxies,n=e.vehicleType,c=e.updatedAt,l=e.dispatch,i=e.apiConfig,u=se(!1),s=Object(o.a)(u,2),m=s[0],f=s[1],v=me((function(){return l(Object(p.l)(i,t))}),[i,l,t]),b=me(Object(B.a)(V.a.mark((function e(){return V.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,l(Object(p.g)(i,t));case 3:f(!1);case 4:case"end":return e.stop()}}),e)}))),[i,l,t,f]),y=se(!1),x=Object(o.a)(y,2),O=x[0],h=x[1],w=me((function(){return h((function(e){return!e}))}),[]),g=Object(X.a)(new Date(c),new Date);return r.a.createElement("div",{className:ue.a.body},r.a.createElement(E,{name:t,toggle:w,type:n,isOpen:O,qty:a.length}),r.a.createElement("div",{className:ue.a.updatedAt},r.a.createElement("small",null,"Updated ",g," ago")),r.a.createElement(le,{isOpen:O},r.a.createElement(M,{all:a}),r.a.createElement("div",{className:ue.a.actionFooter},r.a.createElement(d.a,{text:"Update",start:r.a.createElement(ve,null),onClick:v}),r.a.createElement(d.a,{text:"Health Check",start:r.a.createElement(K.a,{size:16}),onClick:b,isLoading:m}))),r.a.createElement(le,{isOpen:!O},r.a.createElement(W,{all:a})))}));var be=function(e){var t=e.items;return 0===t.length?null:r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"Proxy Provider"}),r.a.createElement("div",null,t.map((function(e){return r.a.createElement(de,{key:e.name,name:e.name,proxies:e.proxies,type:e.type,vehicleType:e.vehicleType,updatedAt:e.updatedAt})}))))},ye=a("cq0i"),Ee=(a("z9QD"),a("L5YO")),xe=a.n(Ee),Oe=r.a.useEffect,he=r.a.useCallback,we=r.a.useRef;t.default=Object(c.a)((function(e){return{apiConfig:Object(ie.b)(e),groupNames:Object(p.d)(e),proxyProviders:Object(p.e)(e),delay:Object(p.b)(e),filterZeroRT:Object(p.f)(e)}}))((function(e){var t=e.dispatch,a=e.groupNames,n=e.delay,i=e.proxyProviders,o=e.apiConfig,u=e.filterZeroRT,s=we({}),m=Object(c.c)().toggleUnavailableProxiesFilter,f=he((function(){return t(Object(p.i)(o))}),[o,t]),v=he((function(){s.current.startAt=new Date,t(Object(p.a)(o)).then((function(){s.current.completeAt=new Date}))}),[o,t]);return Oe((function(){v();var e=function(){s.current.startAt&&new Date-s.current.startAt>3e4&&v()};return window.addEventListener("focus",e,!1),function(){return window.removeEventListener("focus",e,!1)}}),[v]),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"Proxies"}),r.a.createElement("div",null,a.map((function(e){return r.a.createElement("div",{className:xe.a.group,key:e},r.a.createElement(Y,{name:e,delay:n,apiConfig:o,dispatch:t}))}))),r.a.createElement(be,{items:i}),r.a.createElement("div",{style:{height:60}}),r.a.createElement(ye.b,{icon:r.a.createElement(Z.a,null)},r.a.createElement(ye.a,{text:"Test Latency",onClick:f},r.a.createElement(K.a,{width:16})),r.a.createElement(ye.a,{text:(u?"Show":"Hide")+" Unavailable Proxies",onClick:m},r.a.createElement(U.a,{width:16}))))}))},x5hA:function(e,t,a){e.exports={updatedAt:"_3GVE9k27aM",body:"_1PV2l5z2zN",actionFooter:"_1b5XrAhEUm",refresh:"_2t6Q6BkZ73"}},z9QD:function(e,t,a){}}]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.bdb3659841c50b543b0e.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.bdb3659841c50b543b0e.js new file mode 100644 index 0000000000..f5d02909be --- /dev/null +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.bdb3659841c50b543b0e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{D46e:function(e,t,a){e.exports={header:"_3PCSxT0l14",list:"_1yYRIyvlRd",proxy:"_1OcDlvlM5R",proxySelectable:"_3oAxPKtZFv"}},FWZb:function(e,t,a){e.exports={proxy:"NpfXwxWAxo",now:"_2zD7drviYH",error:"_2bylJNYYdN",proxyType:"_1rVl-Kdmss",row:"aS2noEcBcP",proxyName:"_3kdi5nima5",proxySmall:"_3NpxWygDxO"}},L5YO:function(e,t,a){e.exports={group:"_1myfcMimT9"}},RL2M:function(e,t,a){e.exports={header:"_37wt2_a2Gx",arrow:"L80zPM0Rx0",isOpen:"_36RO7_wtuv",btn:"_2XKN3NArpV",qty:"_1s98xvUoBx"}},RbL9:function(e,t,a){e.exports={proxyLatency:"_2V-RqIAl7n"}},wyCT:function(e,t,a){"use strict";a.r(t);a("2B1R");var n=a("q1tI"),r=a.n(n),c=a("WfPo"),l=a("DKqX"),o=(a("TeQF"),a("ToJy"),a("KQm4")),i=a("TSYQ"),u=a.n(i),s=a("Wwog"),m=a("HGr0"),p=a("OADI"),d=a("j7o3"),v=a("riol"),f=a("5Wrh"),b=a("RL2M"),y=a.n(b);function E(e){var t=e.name,a=e.type,n=e.toggle,c=e.isOpen,l=e.qty;return(r.a.createElement("div",{className:y.a.header},r.a.createElement("div",{onClick:n,style:{cursor:"pointer"}},r.a.createElement(v.b,{name:t,type:a})),"number"==typeof l?r.a.createElement("span",{className:y.a.qty},l):null,r.a.createElement(f.a,{kind:"minimal",onClick:n,className:y.a.btn},r.a.createElement("span",{className:u()(y.a.arrow,{[y.a.isOpen]:c})},r.a.createElement(d.a,{size:20})))))}var O=a("RbL9"),x=a.n(O);function h(e){var t=e.number,a=e.color;return(r.a.createElement("span",{className:x.a.proxyLatency,style:{color:a}},r.a.createElement("span",null,t," ms")))}var w=a("FWZb"),g=a.n(w),j=r.a.useMemo,N="#67c23a",k="#d4b75c",C="#e67f3c",_="#909399";function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.number;e.error;return t<200?N:t<400?k:"number"==typeof t?C:_}var T=function(e,t){var a=t.name,n=Object(m.c)(e),r=Object(m.b)(e);return{proxy:n[a],latency:r[a]}},R=Object(c.a)(T)((function(e){var t=e.now,a=e.name,n=e.proxy,c=e.latency,l=j((function(){return A(c)}),[c]);return r.a.createElement("div",{className:u()(g.a.proxy,{[g.a.now]:t,[g.a.error]:c&&c.error})},r.a.createElement("div",{className:g.a.proxyName},a),r.a.createElement("div",{className:g.a.row},r.a.createElement("span",{className:g.a.proxyType,style:{opacity:t?.6:.2}},n.type),c&&c.number?r.a.createElement(h,{number:c.number,color:l}):null))})),S=Object(c.a)(T)((function(e){var t=e.now,a=e.name,n=(e.proxy,e.latency),c=j((function(){return A(n)}),[n]),l=j((function(){var e=a;return n&&"number"==typeof n.number&&(e+=" "+n.number+" ms"),e}),[a,n]);return r.a.createElement("div",{title:l,className:u()(g.a.proxySmall,{[g.a.now]:t}),style:{backgroundColor:c}})})),D=a("D46e"),P=a.n(D),L=r.a.useCallback,F=r.a.useMemo;function q(e){var t=e.all,a=e.now,n=e.isSelectable,c=e.itemOnTapCallback,l=e.sortedAll||t;return r.a.createElement("div",{className:P.a.list},l.map((function(e){var t=u()(P.a.proxy,{[P.a.proxySelectable]:n});return(r.a.createElement("div",{className:t,key:e,onClick:function(){n&&c&&c(e)}},r.a.createElement(R,{name:e,now:e===a})))})))}var z=function(e,t){return void 0===e?0:!e.error&&e.number>0?e.number:t};var M=Object(s.a)((function(e,t,a){var n=Object(o.a)(e);return a&&(n=function(e,t){return e.filter((function(e){var a=t[e];return void 0===a||!a.error&&0!==a.number}))}(e,t)),n.sort((function(e,a){return z(t[e],999999)-z(t[a],999999)}))}));function H(e){var t=e.all,a=e.now,n=e.isSelectable,c=e.itemOnTapCallback;return(r.a.createElement("div",{className:P.a.list},t.map((function(e){var t=u()(P.a.proxy,{[P.a.proxySelectable]:n});return(r.a.createElement("div",{className:t,key:e,onClick:function(){n&&c&&c(e)}},r.a.createElement(S,{name:e,now:e===a})))}))))}var I=Object(c.a)((function(e,t){var a=t.name,n=t.delay,r=Object(m.c)(e),c=Object(m.f)(e),l=Object(p.c)(e),o=r[a],i=o.all,u=o.type,s=o.now;return{all:M(i,n,c),type:u,now:s,isOpen:l[`proxyGroup:${a}`]}}))((function(e){var t=e.name,a=e.all,n=e.type,l=e.now,o=e.isOpen,i=e.apiConfig,u=e.dispatch,s=F((function(){return"Selector"===n}),[n]),p=Object(c.c)().app.updateCollapsibleIsOpen,d=L((function(){p("proxyGroup",t,!o)}),[o,p,t]),v=L((function(e){s&&u(Object(m.j)(i,t,e))}),[i,u,t,s]);return r.a.createElement("div",{className:P.a.group},r.a.createElement(E,{name:t,type:n,toggle:d,qty:a.length,isOpen:o}),o?r.a.createElement(q,{all:a,now:l,isSelectable:s,itemOnTapCallback:v}):r.a.createElement(H,{all:a}))})),K=a("8/mu"),Q=a("ySHw"),W=a("fIvA"),Y=a("o0o1"),Z=a.n(Y),U=(a("ls82"),a("HaE+")),V=a("ODXe"),G=a("OAQO"),X=a("FVam"),B=a("ZMKu"),J=a("bdgK"),$=r.a.memo,ee=r.a.useState,te=r.a.useRef,ae=r.a.useEffect;var ne={initialOpen:{height:"auto",transition:{duration:0}},open:function(e){return{height:e,opacity:1,visibility:"visible",transition:{duration:.3}}},closed:{height:0,opacity:0,visibility:"hidden",transition:{duration:.3}}},re={open:{x:0},closed:{x:20}},ce=$((function(e){var t,a,n=e.children,c=e.isOpen,l=(t=c,a=te(),ae((function(){a.current=t}),[t]),a.current),o=function(){var e=te(),t=ee({height:0}),a=Object(V.a)(t,2),n=a[0],r=a[1];return ae((function(){var t=new J.a((function(e){var t=Object(V.a)(e,1)[0];return r(t.contentRect)}));return e.current&&t.observe(e.current),function(){return t.disconnect()}}),[]),[e,n]}(),i=Object(V.a)(o,2),u=i[0],s=i[1].height;return r.a.createElement("div",null,r.a.createElement(B.a.div,{animate:c&&l===c?"initialOpen":c?"open":"closed",custom:s,variants:ne},r.a.createElement(B.a.div,{variants:re,ref:u},n)))})),le=a("x5hA"),oe=a.n(le),ie=r.a.useState,ue=r.a.useCallback;var se={rest:{scale:1},pressed:{scale:.95}},me={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function pe(){return r.a.createElement(B.a.div,{className:oe.a.refresh,variants:se,initial:"rest",whileHover:"hover",whileTap:"pressed"},r.a.createElement(B.a.div,{className:"flexCenter",variants:me},r.a.createElement(G.a,{size:16})))}var de=Object(c.a)((function(e,t){var a=t.proxies,n=t.name,r=Object(m.f)(e),c=Object(m.b)(e),l=Object(p.c)(e);return{apiConfig:Object(p.b)(e),proxies:M(a,c,r),isOpen:l[`proxyProvider:${n}`]}}))((function(e){var t=e.name,a=e.proxies,n=e.vehicleType,l=e.updatedAt,o=e.isOpen,i=e.dispatch,u=e.apiConfig,s=ie(!1),p=Object(V.a)(s,2),d=p[0],v=p[1],b=ue((function(){return i(Object(m.l)(u,t))}),[u,i,t]),y=ue(Object(U.a)(Z.a.mark((function e(){return Z.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),e.next=3,i(Object(m.g)(u,t));case 3:v(!1);case 4:case"end":return e.stop()}}),e)}))),[u,i,t,v]),O=Object(c.c)().app.updateCollapsibleIsOpen,x=ue((function(){O("proxyProvider",t,!o)}),[o,O,t]),h=Object(X.a)(new Date(l),new Date);return r.a.createElement("div",{className:oe.a.body},r.a.createElement(E,{name:t,toggle:x,type:n,isOpen:o,qty:a.length}),r.a.createElement("div",{className:oe.a.updatedAt},r.a.createElement("small",null,"Updated ",h," ago")),r.a.createElement(ce,{isOpen:o},r.a.createElement(q,{all:a}),r.a.createElement("div",{className:oe.a.actionFooter},r.a.createElement(f.a,{text:"Update",start:r.a.createElement(pe,null),onClick:b}),r.a.createElement(f.a,{text:"Health Check",start:r.a.createElement(Q.a,{size:16}),onClick:y,isLoading:d}))),r.a.createElement(ce,{isOpen:!o},r.a.createElement(H,{all:a})))}));var ve=function(e){var t=e.items;return 0===t.length?null:r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"Proxy Provider"}),r.a.createElement("div",null,t.map((function(e){return r.a.createElement(de,{key:e.name,name:e.name,proxies:e.proxies,type:e.type,vehicleType:e.vehicleType,updatedAt:e.updatedAt})}))))},fe=a("cq0i"),be=(a("z9QD"),a("L5YO")),ye=a.n(be),Ee=r.a.useEffect,Oe=r.a.useCallback,xe=r.a.useRef;t.default=Object(c.a)((function(e){return{apiConfig:Object(p.b)(e),groupNames:Object(m.d)(e),proxyProviders:Object(m.e)(e),delay:Object(m.b)(e),filterZeroRT:Object(m.f)(e)}}))((function(e){var t=e.dispatch,a=e.groupNames,n=e.delay,o=e.proxyProviders,i=e.apiConfig,u=e.filterZeroRT,s=xe({}),p=Object(c.c)().toggleUnavailableProxiesFilter,d=Oe((function(){return t(Object(m.i)(i))}),[i,t]),v=Oe((function(){s.current.startAt=new Date,t(Object(m.a)(i)).then((function(){s.current.completeAt=new Date}))}),[i,t]);return Ee((function(){v();var e=function(){s.current.startAt&&new Date-s.current.startAt>3e4&&v()};return window.addEventListener("focus",e,!1),function(){return window.removeEventListener("focus",e,!1)}}),[v]),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"Proxies"}),r.a.createElement("div",null,a.map((function(e){return r.a.createElement("div",{className:ye.a.group,key:e},r.a.createElement(I,{name:e,delay:n,apiConfig:i,dispatch:t}))}))),r.a.createElement(ve,{items:o}),r.a.createElement("div",{style:{height:60}}),r.a.createElement(fe.b,{icon:r.a.createElement(K.a,null)},r.a.createElement(fe.a,{text:"Test Latency",onClick:d},r.a.createElement(Q.a,{width:16})),r.a.createElement(fe.a,{text:(u?"Show":"Hide")+" Unavailable Proxies",onClick:p},r.a.createElement(W.a,{width:16}))))}))},x5hA:function(e,t,a){e.exports={updatedAt:"_3GVE9k27aM",body:"_1PV2l5z2zN",actionFooter:"_1b5XrAhEUm",refresh:"_2t6Q6BkZ73"}},z9QD:function(e,t,a){}}]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.1041caa2a300c5b850ba.css b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.cea47222a686cf441cb9.css similarity index 95% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.1041caa2a300c5b850ba.css rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.cea47222a686cf441cb9.css index 9aa5db1ea5..b2f1cf6a61 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.1041caa2a300c5b850ba.css +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/proxies.cea47222a686cf441cb9.css @@ -1,4 +1,4 @@ -._37wt2_a2Gx{display:flex;align-items:center}._37wt2_a2Gx .L80zPM0Rx0{display:inline-flex;transform:rotate(0deg);transition:transform .3s}._37wt2_a2Gx .L80zPM0Rx0._36RO7_wtuv{transform:rotate(180deg)}._37wt2_a2Gx .L80zPM0Rx0:focus{outline:var(--color-focus-blue) solid 1px}._1s98xvUoBx{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px} +._37wt2_a2Gx{display:flex;align-items:center}._37wt2_a2Gx .L80zPM0Rx0{display:inline-flex;transform:rotate(0deg);transition:transform .3s}._37wt2_a2Gx .L80zPM0Rx0._36RO7_wtuv{transform:rotate(180deg)}._37wt2_a2Gx .L80zPM0Rx0:focus{outline:var(--color-focus-blue) solid 1px}._2XKN3NArpV{margin-left:5px}._1s98xvUoBx{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px} ._2V-RqIAl7n{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width:30em){._2V-RqIAl7n{font-size:1em}} .NpfXwxWAxo{position:relative;padding:5px;border-radius:8px;overflow:hidden;max-width:280px;background-color:var(--color-bg-proxy)}@media screen and (min-width:30em){.NpfXwxWAxo{min-width:200px;border-radius:10px;padding:10px}}.NpfXwxWAxo._2zD7drviYH{background-color:var(--color-focus-blue);color:#ddd}.NpfXwxWAxo._2bylJNYYdN{opacity:.5}._1rVl-Kdmss{font-family:var(--font-mono);font-size:.6em}@media screen and (min-width:30em){._1rVl-Kdmss{font-size:1em}}.aS2noEcBcP{display:flex;align-items:center;justify-content:space-between}._3kdi5nima5{width:100%;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px;font-size:.85em}@media screen and (min-width:30em){._3kdi5nima5{font-size:1.1em}}._3NpxWygDxO{width:12px;height:12px;border-radius:8px}._3NpxWygDxO ._2zD7drviYH{outline:1px solid pink} ._3PCSxT0l14{margin-bottom:12px}._1yYRIyvlRd{display:flex;flex-wrap:wrap;margin-top:8px}._1OcDlvlM5R{margin-right:5px;margin-bottom:5px;transition:transform .2s ease-in-out}@media screen and (min-width:30em){._1OcDlvlM5R{margin-right:10px;margin-bottom:10px}}._1OcDlvlM5R._3oAxPKtZFv{cursor:pointer}._1OcDlvlM5R._3oAxPKtZFv:hover{transform:translateY(-2px)} diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html index cb103cf7c8..6175b4b3c3 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html @@ -3,7 +3,7 @@ - yacd [14 Mar 2020 at 08:01] + yacd [21 Mar 2020 at 05:39] diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/rules.9d27c78e021c1d86e02d.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/rules.efdab873e544c5738c5c.js similarity index 100% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/rules.9d27c78e021c1d86e02d.js rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/rules.efdab873e544c5738c5c.js diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.3f467867c30e4422dade.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.c72e8723983b31413a8e.js similarity index 92% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.3f467867c30e4422dade.js rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.c72e8723983b31413a8e.js index 66f9545b8c..ad9cbaf4a1 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.3f467867c30e4422dade.js +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.c72e8723983b31413a8e.js @@ -1 +1 @@ -!function(e){function t(t){for(var n,o,i=t[0],l=t[1],s=t[2],f=t[3]||[],d=0,h=[];d/dev/null |sed 's/\"//g' 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\t/ /g' 2>/dev/null >/tmp/yaml_group.yaml 2>&1 else awk '/Proxy Group:/,/Rule:/{print}' "$CONFIG_FILE" 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\t/ /g' 2>/dev/null >/tmp/yaml_group.yaml 2>&1 -fi +fi 2>/dev/null -if [ "$servers_update" -ne "1" ] || [ "$servers_if_update" != "1" ] || [ -z "$(grep "config groups" "$CFG_FILE")" ]; then +if [ "$servers_update" -ne "1" ] || [ "$servers_if_update" != "1" ] || [ -z "$(grep "config groups" "$CFG_FILE" 2>/dev/null)" ]; then echo "正在删除旧配置..." >$START_LOG #删除策略组 group_num=$(grep "config groups" "$CFG_FILE" |wc -l) for ((i=$group_num;i>=0;i--)) do - if [ "$(uci get openclash.@groups["$i"].config)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@groups["$i"].config)" = "all" ]; then + if [ "$(uci get openclash.@groups["$i"].config 2>/dev/null)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@groups["$i"].config 2>/dev/null)" = "all" ]; then uci delete openclash.@groups["$i"] 2>/dev/null uci commit openclash fi @@ -70,18 +70,18 @@ echo "正在删除旧配置..." >$START_LOG server_num=$(grep "config servers" "$CFG_FILE" |wc -l) for ((i=$server_num;i>=0;i--)) do - if [ "$(uci get openclash.@servers["$i"].config)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@servers["$i"].config)" = "all" ]; then - if [ "$(uci get openclash.@servers["$i"].enabled)" = "1" ]; then + if [ "$(uci get openclash.@servers["$i"].config 2>/dev/null)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@servers["$i"].config 2>/dev/null)" = "all" ]; then + if [ "$(uci get openclash.@servers["$i"].enabled 2>/dev/null)" = "1" ]; then uci delete openclash.@servers["$i"] 2>/dev/null uci commit openclash fi fi done #删除启用代理集 - provider_num=$(grep "config proxy-provider" "$CFG_FILE" |wc -l) + provider_num=$(grep "config proxy-provider" "$CFG_FILE" 2>/dev/null |wc -l) for ((i=$provider_num;i>=0;i--)) do - if [ "$(uci get openclash.@proxy-provider["$i"].config)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@proxy-provider["$i"].config)" = "all" ]; then + if [ "$(uci get openclash.@proxy-provider["$i"].config 2>/dev/null)" = "$CONFIG_NAME" ] || [ "$(uci get openclash.@proxy-provider["$i"].config 2>/dev/null)" = "all" ]; then if [ "$(uci get openclash.@proxy-provider["$i"].enabled)" = "1" ]; then uci delete openclash.@proxy-provider["$i"] 2>/dev/null uci commit openclash @@ -97,12 +97,12 @@ count=1 file_count=1 match_group_file="/tmp/Proxy_Group" group_file="/tmp/yaml_group.yaml" -line=$(sed -n '/name:/=' $group_file) -num=$(grep -c "name:" $group_file) +line=$(sed -n '/name:/=' $group_file 2>/dev/null) +num=$(grep -c "name:" $group_file 2>/dev/null) cfg_get() { - echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)" + echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed "s/^\'//g" 2>/dev/null |sed "s/\'$//g" 2>/dev/null)" } for n in $line @@ -138,11 +138,8 @@ do uci_name_tmp=$(uci add $name groups) uci_set="uci -q set $name.$uci_name_tmp." uci_add="uci -q add_list $name.$uci_name_tmp." - if [ "$servers_update" -eq "1" ]; then - ${uci_set}config="all" - else - ${uci_set}config="$CONFIG_NAME" - fi + + ${uci_set}config="$CONFIG_NAME" ${uci_set}name="$group_name" ${uci_set}old_name="$group_name" ${uci_set}old_name_cfg="$group_name" @@ -151,14 +148,15 @@ do ${uci_set}test_interval="$group_test_interval" #other_group - cat $single_group |while read line + if [ "$group_type" = "select" ]; then + cat $single_group |while read -r line do if [ -z "$(echo "$line" |grep "^ \{0,\}-")" ]; then continue fi - group_name1=$(echo "$line" |grep -v "name:" 2>/dev/null |grep "^ \{0,\}-" 2>/dev/null |awk -F '^ \{0,\}-' '{print $2}' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null) - group_name2=$(echo "$line" |awk -F 'proxies: \\[' '{print $2}' 2>/dev/null |sed 's/].*//' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed 's/ \{0,\}, \{0,\}/#,#/g' 2>/dev/null) + group_name1=$(echo "$line" |grep -v "name:" 2>/dev/null |grep "^ \{0,\}-" 2>/dev/null |awk -F '^ \{0,\}-' '{print $2}' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed "s/^\'//g" 2>/dev/null |sed "s/\'$//g" 2>/dev/null) + group_name2=$(echo "$line" |awk -F 'proxies: \\[' '{print $2}' 2>/dev/null |sed 's/].*//' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed "s/^\'//g" 2>/dev/null |sed "s/\'$//g" 2>/dev/null |sed 's/ \{0,\}, \{0,\}/#,#/g' 2>/dev/null) proxies_len=$(sed -n '/proxies:/=' $single_group 2>/dev/null) use_len=$(sed -n '/use:/=' $single_group 2>/dev/null) name1_len=$(sed -n "/${group_name1}/=" $single_group 2>/dev/null) @@ -177,7 +175,7 @@ do if [ "$name1_len" -ge "$proxies_len" ] && [ ! -z "$(grep -F "$group_name1" $match_group_file)" ] && [ "$group_name1" != "$group_name" ]; then ${uci_add}other_group="$group_name1" fi - fi + fi 2>/dev/null elif [ -z "$group_name1" ] && [ ! -z "$group_name2" ]; then group_num=$(expr $(echo "$group_name2" |grep -c "#,#") + 1) if [ "$group_num" -le 1 ]; then @@ -198,7 +196,7 @@ do fi done - + fi file_count=$(expr "$file_count" + 1) done diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_name_ch.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_name_ch.sh index 116eddd877..4951833a32 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_name_ch.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_name_ch.sh @@ -24,9 +24,12 @@ cfg_groups_set() fi #名字变化时处理配置文件 - if [ "$name" != "$old_name_cfg" ]; then - sed -i "s/\'${old_name_cfg}\'/\'${name}\'/g" $CFG_FILE 2>/dev/null - sed -i "s/old_name \'${name}\'/old_name \'${old_name}\'/g" $CFG_FILE 2>/dev/null + if [ "$name" != "$old_name_cfg" ] && [ ! -z "$old_name_cfg" ]; then + sed -i "s/old_name_cfg \'${old_name_cfg}\'/old_name_cfg \'${name}\'/g" $CFG_FILE 2>/dev/null + sed -i "s/groups \'${old_name_cfg}/groups \'${name}/g" $CFG_FILE 2>/dev/null + sed -i "s/other_group \'${old_name_cfg}/other_group \'${name}/g" $CFG_FILE 2>/dev/null + sed -i "s/new_servers_group \'${old_name_cfg}/new_servers_group \'${name}/g" $CFG_FILE 2>/dev/null + sed -i "s/relay_groups \'${old_name_cfg}/relay_groups \'${name}/g" $CFG_FILE 2>/dev/null config_load "openclash" fi diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh index 8695a0d7d7..af4f2e7490 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh @@ -29,33 +29,6 @@ if [ -z "$CONFIG_NAME" ]; then CONFIG_NAME="config.yaml" fi -#加入节点 -yml_servers_add() -{ - - local section="$1" - config_get_bool "enabled" "$section" "enabled" "1" - config_get "config" "$section" "config" "" - config_get "name" "$section" "name" "" - - if [ ! -z "$config" ] && [ "$config" != "$CONFIG_NAME" ] && [ "$config" != "all" ]; then - return - fi - - if [ "$enabled" = "0" ]; then - return - else - if [ -z "$3" ]; then - config_list_foreach "$section" "groups" set_groups "$name" "$2" - fi - - if [ ! -z "$if_game_group" ] && [ -z "$(grep -F $name /tmp/yaml_proxy.yaml)" ]; then - /usr/share/openclash/yml_proxys_set.sh "$name" "proxy" - fi - fi - -} - set_groups() { if [ -z "$1" ]; then @@ -69,6 +42,53 @@ set_groups() } +set_relay_groups() +{ + if [ -z "$1" ]; then + return + fi + + if [ ! -z "$(echo "$1" |grep "#relay#")" ]; then + server_relay_num=$(echo "$1" |awk -F '#relay#' '{print $2}') + server_group_name=$(echo "$1" |awk -F '#relay#' '{print $1}') + fi + + if [ ! -z "$server_relay_num" ] && [ "$server_group_name" = "$3" ]; then + set_group=1 + echo "$server_relay_num # - \"${2}\"" >>/tmp/relay_server + fi +} + +#加入节点 +yml_servers_add() +{ + + local section="$1" + config_get_bool "enabled" "$section" "enabled" "1" + config_get "config" "$section" "config" "" + config_get "name" "$section" "name" "" + config_get "relay_groups" "$section" "relay_groups" "" + + if [ ! -z "$config" ] && [ "$config" != "$CONFIG_NAME" ] && [ "$config" != "all" ]; then + return + fi + + if [ "$enabled" = "0" ]; then + return + else + if [ -z "$4" ] && [ "$3" = "relay" ] && [ ! -z "$relay_groups" ]; then + config_list_foreach "$section" "relay_groups" set_relay_groups "$name" "$2" + elif [ -z "$4" ]; then + config_list_foreach "$section" "groups" set_groups "$name" "$2" + fi + + if [ ! -z "$if_game_group" ] && [ -z "$(grep -F $name /tmp/yaml_proxy.yaml)" ]; then + /usr/share/openclash/yml_proxys_set.sh "$name" "proxy" + fi + fi + +} + #加入其它策略组 set_other_groups() { @@ -117,6 +137,7 @@ set_provider_groups() fi } + #创建策略组 yml_groups_set() { @@ -131,8 +152,6 @@ yml_groups_set() if [ ! -z "$if_game_group" ] && [ "$if_game_group" != "$name" ]; then return - elif [ "$servers_update" -eq "1" ] && [ "$config" != "all" ]; then - return fi if [ ! -z "$config" ] && [ "$config" != "$CONFIG_NAME" ] && [ "$config" != "all" ]; then @@ -147,13 +166,13 @@ yml_groups_set() return fi - if [ -z "$test_url" ] || [ -z "$test_interval" ] && [ "$type" != "select" ]; then + if [ -z "$test_url" ] || [ -z "$test_interval" ] && [ "$type" != "select" ] && [ "$type" != "relay" ]; then return fi #游戏策略组存在时判断节点是否存在 if [ ! -z "$if_game_group" ] && [ ! -z "$(grep "^ \{0,\}- name: $if_game_group" "$CONFIG_GROUP_FILE")" ]; then - config_foreach yml_servers_add "servers" "$name" "check" #加入服务器节点 + config_foreach yml_servers_add "servers" "$name" "$type" "check" #加入服务器节点 config_foreach set_proxy_provider "proxy-provider" "$group_name" "check" #加入代理集 return fi @@ -169,19 +188,31 @@ yml_groups_set() if [ "$name" != "$old_name" ] && [ ! -z "$old_name" ]; then sed -i "s/,${old_name}/,${name}#d/g" "$CONFIG_FILE" 2>/dev/null sed -i "s/:${old_name}$/:${name}#d/g" "$CONFIG_FILE" 2>/dev/null #修改第三方规则分组对应标签 - sed -i "s/\'${old_name}\'/\'${name}\'/g" "$CFG_FILE" 2>/dev/null + sed -i "s/old_name \'${old_name}/old_name \'${name}/g" "$CFG_FILE" 2>/dev/null config_load "openclash" fi set_group=0 set_proxy_provider=0 - - config_list_foreach "$section" "other_group" set_other_groups #加入其他策略组 - config_foreach yml_servers_add "servers" "$name" #加入服务器节点 + + if [ "$type" = "select" ]; then + config_list_foreach "$section" "other_group" set_other_groups #加入其他策略组 + fi + + config_foreach yml_servers_add "servers" "$name" "$type" #加入服务器节点 + + if [ "$type" = "relay" ] && [ -s "/tmp/relay_server" ]; then + cat /tmp/relay_server |sort -k 1 |awk -F '#' '{print $2}' > /tmp/relay_server.list 2>/dev/null + sed -i "/^ \{0,\}proxies: ${group_name}/r/tmp/relay_server.list" "$GROUP_FILE" 2>/dev/null + rm -rf /tmp/relay_server 2>/dev/null + fi echo " use: $group_name" >>$GROUP_FILE - config_foreach set_proxy_provider "proxy-provider" "$group_name" #加入代理集 + if [ "$type" != "relay" ]; then + config_foreach set_proxy_provider "proxy-provider" "$group_name" #加入代理集 + fi + if [ "$set_group" -eq 1 ]; then sed -i "/^ \{0,\}proxies: ${group_name}/c\ proxies:" $GROUP_FILE else @@ -224,6 +255,7 @@ if [ "$create_config" = "0" ] || [ "$servers_if_update" = "1" ] || [ ! -z "$if_g config_load "openclash" config_foreach yml_groups_set "groups" sed -i "s/#d//g" "$CONFIG_FILE" 2>/dev/null + rm -rf /tmp/relay_server.list 2>/dev/null echo "配置文件【$CONFIG_NAME】的策略组写入完成!" >$START_LOG fi fi diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh index 2762ef3a35..aad61e59b8 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh @@ -4,6 +4,7 @@ status=$(ps|grep -c /usr/share/openclash/yml_proxys_get.sh) START_LOG="/tmp/openclash_start.log" CONFIG_FILE=$(uci get openclash.config.config_path 2>/dev/null) +SERVER_RELAY="/tmp/relay_server" CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null) UPDATE_CONFIG_FILE=$(uci get openclash.config.config_update_path 2>/dev/null) UPDATE_CONFIG_NAME=$(echo "$UPDATE_CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null) @@ -80,29 +81,22 @@ provider_count=1 cfg_get() { - echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)" + echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed "s/^\'//g" 2>/dev/null |sed "s/\'$//g" 2>/dev/null)" } cfg_get_alpn() { - echo "$(grep "^ \{0,\}$1" "$2" 2>/dev/null |grep -v "^ \{0,\}- name:" |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)" + echo "$(grep "^ \{0,\}$1" "$2" 2>/dev/null |grep -v "^ \{0,\}- name:" |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed "s/^\'//g" 2>/dev/null |sed "s/\'$//g" 2>/dev/null)" } echo "开始更新【$CONFIG_NAME】的代理集配置..." >$START_LOG -[ "$servers_update" -eq "1" ] && { -echo "" >"$match_provider" -provider_nums=0 -config_load "openclash" -config_foreach yml_provider_name_get "proxy-provider" -} - yml_provider_name_get() { local section="$1" config_get "name" "$section" "name" "" [ ! -z "$name" ] && { - echo "$provider_nums"."$name" >>"$match_provider" + echo "$provider_nums.$name" >>"$match_provider" } provider_nums=$(( $provider_nums + 1 )) } @@ -116,6 +110,13 @@ cfg_new_provider_groups_get() ${uci_add}groups="${1}" } +[ "$servers_update" -eq "1" ] && { +echo "" >"$match_provider" +provider_nums=0 +config_load "openclash" +config_foreach yml_provider_name_get "proxy-provider" +} + for n in $provider_line do [ "$provider_count" -eq 1 ] && { @@ -225,20 +226,20 @@ do proxies_line=$(sed -n '/^ \{0,\}proxies:/=' $single_group) if [ "$use_line" -le "$proxies_line" ]; then if [ ! -z "$(sed -n "${use_line},${proxies_line}p" "$single_group" |grep -F "$provider_name")" ]; then - group_name=$(grep "name:" $single_group 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null) + group_name=$(cfg_get "name:" "$single_group") ${uci_add}groups="$group_name" fi elif [ "$use_line" -ge "$proxies_line" ]; then if [ ! -z "$(sed -n "${use_line},\$p" "$single_group" |grep -F "$provider_name")" ]; then - group_name=$(grep "name:" $single_group 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null) + group_name=$(cfg_get "name:" "$single_group") ${uci_add}groups="$group_name" fi elif [ ! -z "$use_line" ] && [ -z "$proxies_line" ]; then if [ ! -z "$(grep -F "$provider_name" $single_group)" ]; then - group_name=$(grep "name:" $single_group 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null) + group_name=$(cfg_get "name:" "$single_group") ${uci_add}groups="$group_name" fi - fi + fi 2>/dev/null done fi fi @@ -266,7 +267,7 @@ yml_servers_name_get() local section="$1" config_get "name" "$section" "name" "" [ ! -z "$name" ] && { - echo "$server_num"."$name" >>"$match_servers" + echo "$server_num.$name" >>"$match_servers" } server_num=$(( $server_num + 1 )) } @@ -624,8 +625,22 @@ do for ((i=1;i<=$group_num;i++)) do single_group="/tmp/group_$i.yaml" - if [ ! -z "$(grep -F "$server_name" "$single_group")" ]; then - group_name=$(grep "name:" $single_group 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null) + group_type="$(cfg_get "type:" "$single_group")" + if [ ! -z "$(grep -F "$server_name" "$single_group")" ] && [ "$group_type" = "relay" ]; then + group_name=$(cfg_get "name:" "$single_group") + grep "^ \{0,\}-" "$single_group" 2>/dev/null |grep -v "^ \{0,\}- name:" 2>/dev/null > $SERVER_RELAY + s=1 + cat $SERVER_RELAY |while read -r line + do + if [ ! -z "$(echo "$line" |grep -F "$server_name" 2>/dev/null)" ]; then + ${uci_add}groups="$group_name" + ${uci_add}relay_groups="$group_name#relay#$s" + else + s=$(expr "$s" + 1) + fi + done + elif [ ! -z "$(grep -F "$server_name" "$single_group")" ]; then + group_name=$(cfg_get "name:" "$single_group") ${uci_add}groups="$group_name" fi done @@ -643,7 +658,7 @@ if [ "$servers_if_update" = "1" ]; then if [ -z "$line" ]; then continue fi - if [ "$(uci get openclash.@servers["$line"].manual)" = "0" ] && [ "$(uci get openclash.@servers["$line"].config)" = "$CONFIG_NAME" ]; then + if [ "$(uci get openclash.@servers["$line"].manual 2>/dev/null)" = "0" ] && [ "$(uci get openclash.@servers["$line"].config 2>/dev/null)" = "$CONFIG_NAME" ]; then uci delete openclash.@servers["$line"] 2>/dev/null fi done @@ -665,3 +680,4 @@ rm -rf /tmp/provider.yaml 2>/dev/null rm -rf /tmp/provider_gen.yaml 2>/dev/null rm -rf /tmp/provider_che.yaml 2>/dev/null rm -rf /tmp/match_provider.list 2>/dev/null +rm -rf /tmp/relay_server 2>/dev/null diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh index 1f2bf7d182..2bd8d8b7a7 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh @@ -183,63 +183,24 @@ yml_servers_set() fi fi - if [ ! -z "$udp" ] && [ "$obfs" = "none" ] && [ "$type" = "ss" ]; then - udp=", udp: $udp" - fi - - if [ ! -z "$udp" ] && [ "$type" != "trojan" ] && [ "$type" != "ss" ]; then - udp=", udp: $udp" - fi - - if [ "$obfs_snell" = "none" ]; then - obfs_snell="" - fi - if [ "$obfs_vmess" != "none" ]; then - obfs_vmess=", network: ws" - else - obfs_vmess="" - fi - - if [ ! -z "$host" ]; then - host="host: $host" + obfs_vmess="network: ws" fi if [ ! -z "$custom" ] && [ "$type" = "vmess" ]; then - custom=", ws-headers: { Host: $custom }" - fi - - if [ ! -z "$tls" ] && [ "$type" != "ss" ]; then - tls=", tls: $tls" - elif [ ! -z "$tls" ]; then - tls="tls: $tls" + custom="Host: $custom" fi if [ ! -z "$path" ]; then if [ "$type" != "vmess" ]; then path="path: '$path'" else - path=", ws-path: $path" + path="ws-path: $path" fi fi - - if [ ! -z "$skip_cert_verify" ] && [ "$type" != "ss" ] && [ "$type" != "trojan" ]; then - skip_cert_verify=", skip-cert-verify: $skip_cert_verify" - elif [ ! -z "$skip_cert_verify" ]; then - skip_cert_verify="skip-cert-verify: $skip_cert_verify" - fi - - if [ ! -z "$auth_name" ]; then - auth_name=", username: $auth_name" - fi - - if [ ! -z "$auth_pass" ]; then - auth_pass=", password: $auth_pass" - fi - if [ "$type" = "ss" ] && [ "$obfs" = "none" ]; then - echo "- { name: \"$name\", type: $type, server: $server, port: $port, cipher: $cipher, password: \"$password\"$udp }" >>$SERVER_FILE - elif [ "$type" = "ss" ] && [ "$obfs" != "none" ]; then +#ss + if [ "$type" = "ss" ]; then cat >> "$SERVER_FILE" <<-EOF - name: "$name" type: $type @@ -248,59 +209,159 @@ cat >> "$SERVER_FILE" <<-EOF cipher: $cipher password: "$password" EOF - if [ ! -z "$udp" ]; then + if [ ! -z "$udp" ]; then cat >> "$SERVER_FILE" <<-EOF udp: $udp EOF - fi -if [ ! -z "$obfss" ] && [ ! -z "$host" ]; then + fi + if [ ! -z "$obfss" ] && [ ! -z "$host" ]; then cat >> "$SERVER_FILE" <<-EOF $obfss plugin-opts: mode: $obfs - $host + host: $host EOF - fi - if [ ! -z "$tls" ]; then + if [ "$obfss" = "plugin: v2ray-plugin" ]; then + if [ ! -z "$tls" ]; then cat >> "$SERVER_FILE" <<-EOF - $tls + tls: $tls EOF - fi - if [ ! -z "$skip_cert_verify" ]; then + fi + if [ ! -z "$skip_cert_verify" ]; then cat >> "$SERVER_FILE" <<-EOF - $skip_cert_verify + skip-cert-verify: $skip_cert_verify EOF - fi - if [ ! -z "$path" ]; then + fi + if [ ! -z "$path" ]; then cat >> "$SERVER_FILE" <<-EOF $path EOF - fi - if [ ! -z "$mux" ]; then + fi + if [ ! -z "$mux" ]; then cat >> "$SERVER_FILE" <<-EOF mux: $mux EOF - fi - if [ ! -z "$custom" ]; then + fi + if [ ! -z "$custom" ]; then cat >> "$SERVER_FILE" <<-EOF headers: custom: $custom EOF - fi + fi + fi + fi fi - + +#vmess if [ "$type" = "vmess" ]; then - echo "- { name: \"$name\", type: $type, server: $server, port: $port, uuid: $uuid, alterId: $alterId, cipher: $securitys$udp$skip_cert_verify$obfs_vmess$path$custom$tls }" >>$SERVER_FILE +cat >> "$SERVER_FILE" <<-EOF +- name: "$name" + type: $type + server: $server + port: $port + uuid: $uuid + alterId: $alterId + cipher: $securitys +EOF + if [ ! -z "$udp" ]; then +cat >> "$SERVER_FILE" <<-EOF + udp: $udp +EOF + fi + if [ ! -z "$tls" ]; then +cat >> "$SERVER_FILE" <<-EOF + tls: $tls +EOF + fi + if [ ! -z "$skip_cert_verify" ]; then +cat >> "$SERVER_FILE" <<-EOF + skip-cert-verify: $skip_cert_verify +EOF + fi + if [ "$obfs_vmess" != "none" ]; then +cat >> "$SERVER_FILE" <<-EOF + $obfs_vmess +EOF + if [ ! -z "$path" ]; then +cat >> "$SERVER_FILE" <<-EOF + $path +EOF + fi + if [ ! -z "$custom" ]; then +cat >> "$SERVER_FILE" <<-EOF + ws-headers: + $custom +EOF + fi + fi fi - + +#socks5 if [ "$type" = "socks5" ]; then - echo "- { name: \"$name\", type: $type, server: $server, port: $port$auth_name$auth_pass$udp$skip_cert_verify$tls }" >>$SERVER_FILE +cat >> "$SERVER_FILE" <<-EOF +- name: "$name" + type: $type + server: $server + port: $port +EOF + if [ ! -z "$auth_name" ]; then +cat >> "$SERVER_FILE" <<-EOF + username: $auth_name +EOF + fi + if [ ! -z "$auth_pass" ]; then +cat >> "$SERVER_FILE" <<-EOF + password: $auth_pass +EOF + fi + if [ ! -z "$udp" ]; then +cat >> "$SERVER_FILE" <<-EOF + udp: $udp +EOF + fi + if [ ! -z "$skip_cert_verify" ]; then +cat >> "$SERVER_FILE" <<-EOF + skip-cert-verify: $skip_cert_verify +EOF + fi + if [ ! -z "$tls" ]; then +cat >> "$SERVER_FILE" <<-EOF + tls: $tls +EOF + fi fi - + +#http if [ "$type" = "http" ]; then - echo "- { name: \"$name\", type: $type, server: $server, port: $port$auth_name$auth_pass$skip_cert_verify$tls }" >>$SERVER_FILE +cat >> "$SERVER_FILE" <<-EOF +- name: "$name" + type: $type + server: $server + port: $port +EOF + if [ ! -z "$auth_name" ]; then +cat >> "$SERVER_FILE" <<-EOF + username: $auth_name +EOF + fi + if [ ! -z "$auth_pass" ]; then +cat >> "$SERVER_FILE" <<-EOF + password: $auth_pass +EOF + fi + if [ ! -z "$skip_cert_verify" ]; then +cat >> "$SERVER_FILE" <<-EOF + skip-cert-verify: $skip_cert_verify +EOF + fi + if [ ! -z "$tls" ]; then +cat >> "$SERVER_FILE" <<-EOF + tls: $tls +EOF + fi fi - + +#trojan if [ "$type" = "trojan" ]; then cat >> "$SERVER_FILE" <<-EOF - name: "$name" @@ -327,11 +388,12 @@ EOF fi if [ ! -z "$skip_cert_verify" ]; then cat >> "$SERVER_FILE" <<-EOF - $skip_cert_verify + skip-cert-verify: $skip_cert_verify EOF fi fi - + +#snell if [ "$type" = "snell" ]; then cat >> "$SERVER_FILE" <<-EOF - name: "$name" @@ -344,7 +406,7 @@ EOF cat >> "$SERVER_FILE" <<-EOF obfs-opts: mode: $obfs_snell - $host + host: $host EOF fi fi diff --git a/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po b/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po index f7a421e406..b53b38ec12 100644 --- a/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po +++ b/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po @@ -651,6 +651,9 @@ msgstr "Fallback【故障切换】" msgid "Load-Balance" msgstr "Load-Balance【负载均衡】" +msgid "Relay Traffic" +msgstr "Relay【嵌套中转】" + msgid "Other Group" msgstr "包含其他策略组(请勿重复添加)"