From a1981cc846beab67bcdd319e05428b639725717a Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Wed, 30 Mar 2022 21:19:22 -0700 Subject: [PATCH] Show sent payments and received payments for pubkey (#2101) * Got sent payments working for profile page * Show received payments in profile page * Fix infinite scroll of received payments for profile page * Update frontend build --- frontend/src/api/client.js | 36 ++++++++ frontend/src/components/Profile/index.js | 85 ++++++++++++------- .../src/features/payments/ReceivedPayments.js | 2 + .../src/features/payments/SentPayments.js | 2 + .../src/features/payments/paymentsSlice.js | 12 +++ .../webapp/static/build/asset-manifest.json | 34 ++++---- .../admin/webapp/static/build/index.html | 2 +- ...nifest.cd28673d075bf2731e351fd5dcf09cd2.js | 54 ------------ ...nifest.dd47f226d16dea85b0faa073346e53cb.js | 54 ++++++++++++ .../webapp/static/build/service-worker.js | 2 +- .../build/static/js/2.34efa20b.chunk.js | 3 + ...SE.txt => 2.34efa20b.chunk.js.LICENSE.txt} | 0 ...2.chunk.js.map => 2.34efa20b.chunk.js.map} | 2 +- .../build/static/js/2.72b7acf2.chunk.js | 3 - ....f8daaa08.chunk.js => 3.2d2d34d3.chunk.js} | 4 +- ...8.chunk.js.map => 3.2d2d34d3.chunk.js.map} | 2 +- ....57c210f1.chunk.js => 4.13c6f568.chunk.js} | 4 +- ...1.chunk.js.map => 4.13c6f568.chunk.js.map} | 2 +- .../build/static/js/5.2d635141.chunk.js | 2 + .../build/static/js/5.2d635141.chunk.js.map | 1 + .../build/static/js/5.98c7883d.chunk.js | 2 - .../build/static/js/5.98c7883d.chunk.js.map | 1 - .../build/static/js/main.6a7c927e.chunk.js | 2 + .../static/js/main.6a7c927e.chunk.js.map | 1 + .../build/static/js/main.9dc2a676.chunk.js | 2 - .../static/js/main.9dc2a676.chunk.js.map | 1 - ...n.d6eba3d2.js => runtime-main.05610a5d.js} | 4 +- ...d2.js.map => runtime-main.05610a5d.js.map} | 2 +- squeaknode/node/squeak_controller.py | 24 ++++++ squeaknode/node/squeak_store.py | 24 ++++++ 30 files changed, 245 insertions(+), 124 deletions(-) delete mode 100644 squeaknode/admin/webapp/static/build/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js create mode 100644 squeaknode/admin/webapp/static/build/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js create mode 100644 squeaknode/admin/webapp/static/build/static/js/2.34efa20b.chunk.js rename squeaknode/admin/webapp/static/build/static/js/{2.72b7acf2.chunk.js.LICENSE.txt => 2.34efa20b.chunk.js.LICENSE.txt} (100%) rename squeaknode/admin/webapp/static/build/static/js/{2.72b7acf2.chunk.js.map => 2.34efa20b.chunk.js.map} (99%) delete mode 100644 squeaknode/admin/webapp/static/build/static/js/2.72b7acf2.chunk.js rename squeaknode/admin/webapp/static/build/static/js/{3.f8daaa08.chunk.js => 3.2d2d34d3.chunk.js} (86%) rename squeaknode/admin/webapp/static/build/static/js/{3.f8daaa08.chunk.js.map => 3.2d2d34d3.chunk.js.map} (97%) rename squeaknode/admin/webapp/static/build/static/js/{4.57c210f1.chunk.js => 4.13c6f568.chunk.js} (98%) rename squeaknode/admin/webapp/static/build/static/js/{4.57c210f1.chunk.js.map => 4.13c6f568.chunk.js.map} (99%) create mode 100644 squeaknode/admin/webapp/static/build/static/js/5.2d635141.chunk.js create mode 100644 squeaknode/admin/webapp/static/build/static/js/5.2d635141.chunk.js.map delete mode 100644 squeaknode/admin/webapp/static/build/static/js/5.98c7883d.chunk.js delete mode 100644 squeaknode/admin/webapp/static/build/static/js/5.98c7883d.chunk.js.map create mode 100644 squeaknode/admin/webapp/static/build/static/js/main.6a7c927e.chunk.js create mode 100644 squeaknode/admin/webapp/static/build/static/js/main.6a7c927e.chunk.js.map delete mode 100644 squeaknode/admin/webapp/static/build/static/js/main.9dc2a676.chunk.js delete mode 100644 squeaknode/admin/webapp/static/build/static/js/main.9dc2a676.chunk.js.map rename squeaknode/admin/webapp/static/build/static/js/{runtime-main.d6eba3d2.js => runtime-main.05610a5d.js} (77%) rename squeaknode/admin/webapp/static/build/static/js/{runtime-main.d6eba3d2.js.map => runtime-main.05610a5d.js.map} (98%) diff --git a/frontend/src/api/client.js b/frontend/src/api/client.js index c941b133..c817262c 100644 --- a/frontend/src/api/client.js +++ b/frontend/src/api/client.js @@ -151,6 +151,10 @@ import { GetReceivedPaymentsForSqueakReply, GetPaymentSummaryForPubkeyRequest, GetPaymentSummaryForPubkeyReply, + GetSentPaymentsForPubkeyRequest, + GetSentPaymentsForPubkeyReply, + GetReceivedPaymentsForPubkeyRequest, + GetReceivedPaymentsForPubkeyReply, } from '../proto/squeak_admin_pb'; import axios from 'axios' @@ -418,6 +422,22 @@ export const getSentPaymentsForSqueak = (squeakHash, limit, lastSentPayment) => }); } +export const getSentPaymentsForPubkey = (pubkey, limit, lastSentPayment) => { + console.log('Calling getSentPaymentsForPubkey'); + const request = new GetSentPaymentsForPubkeyRequest(); + request.setPubkey(pubkey); + request.setLimit(limit); + if (lastSentPayment) { + request.setLastSentPayment(lastSentPayment); + } + const deser = GetSentPaymentsForPubkeyReply.deserializeBinary; + return baseRequest({ + url: '/getsentpaymentsforpubkey', + req: request, + deser: deser, + }); +} + export const getReceivedPayments = (limit, lastReceivedPayment) => { console.log('Calling getReceivedPayments'); const request = new GetReceivedPaymentsRequest(); @@ -449,6 +469,22 @@ export const getReceivedPaymentsForSqueak = (squeakHash, limit, lastReceivedPaym }); } +export const getReceivedPaymentsForPubkey = (pubkey, limit, lastReceivedPayment) => { + console.log('Calling getReceivedPaymentsForPubkey'); + const request = new GetReceivedPaymentsForPubkeyRequest(); + request.setPubkey(pubkey); + request.setLimit(limit); + if (lastReceivedPayment) { + request.setLastReceivedPayment(lastReceivedPayment); + } + const deser = GetReceivedPaymentsForPubkeyReply.deserializeBinary; + return baseRequest({ + url: '/getreceivedpaymentsforpubkey', + req: request, + deser: deser, + }); +} + export const getSearchSqueaks = (searchText, limit, lastSqueak) => { console.log('Calling getSearchSqueaks'); const request = new GetSearchSqueakDisplaysRequest(); diff --git a/frontend/src/components/Profile/index.js b/frontend/src/components/Profile/index.js index c2fb4e0f..308b6758 100644 --- a/frontend/src/components/Profile/index.js +++ b/frontend/src/components/Profile/index.js @@ -39,6 +39,10 @@ import { selectPaymentSummaryForPubkey, } from '../../features/payments/paymentsSlice' +import SentPayments from '../../features/payments/SentPayments' +import ReceivedPayments from '../../features/payments/ReceivedPayments' + + const Profile = (props) => { const [activeTab, setActiveTab] = useState('Squeaks') @@ -50,7 +54,7 @@ const Profile = (props) => { const [exportModalOpen, setExportModalOpen] = useState(false) const [spendingModalOpen, setSpendingModalOpen] = useState(false) const [createModalOpen, setCreateModalOpen] = useState(false) - const [tab, setTab] = useState('Sats Spent') + const [tab, setTab] = useState('Sent Payments') const [styleBody, setStyleBody] = useState(false) const userParam = props.match.params.username @@ -424,12 +428,12 @@ const Profile = (props) => {
{/* TODO: Implement sats spent */} -
toggleSpendingModal('members','Sats Spent')}> +
toggleSpendingModal('members','Sent Payments')}>

{paymentSummary && paymentSummary.getAmountSpentMsat() / 1000}

sats spent

{/* TODO: Implement sats eaned */} -
toggleSpendingModal('members', 'Sats Earned')}> +
toggleSpendingModal('members', 'Received Payments')}>

{paymentSummary && paymentSummary.getAmountEarnedMsat() / 1000}

sats earned

@@ -562,41 +566,58 @@ const Profile = (props) => {
-
setTab('Sats Spent')} className={tab =='Sats Spent' ? `explore-nav-item activeTab` : `explore-nav-item`}> - Sats Spent +
setTab('Sent Payments')} className={tab =='Sent Payments' ? `explore-nav-item activeTab` : `explore-nav-item`}> + Sent Payments
-
setTab('Sats Earned')} className={tab =='Sats Earned' ? `explore-nav-item activeTab` : `explore-nav-item`}> - Sats Earned +
setTab('Received Payments')} className={tab =='Received Payments' ? `explore-nav-item activeTab` : `explore-nav-item`}> + Received Payments
-
+ {tab === 'Sent Payments' ? + <> + + + + : + tab === 'Received Payments' ? + <> + + + :
+ Nothing to see here .. +
+ Try searching for people, usernames, or keywords +
-
+ }
- - {/* Modal for create contact profile */} -
toggleCreateModal()} style={{display: createModalOpen ? 'block' : 'none'}} className="modal-edit"> -
handleModalClick(e)} className="modal-content"> -
-
-
toggleCreateModal()} className="modal-closeIcon-wrap"> - -
-
-

Add Contact Profile

-
- -
- -
-
-
- -
- ) - } +
- export default withRouter(Profile) + {/* Modal for create contact profile */} +
toggleCreateModal()} style={{display: createModalOpen ? 'block' : 'none'}} className="modal-edit"> +
handleModalClick(e)} className="modal-content"> +
+
+
toggleCreateModal()} className="modal-closeIcon-wrap"> + +
+
+

Add Contact Profile

+
+ +
+ +
+
+
+ + +
+ + ) +} + +export default withRouter(Profile) diff --git a/frontend/src/features/payments/ReceivedPayments.js b/frontend/src/features/payments/ReceivedPayments.js index cf4fdf16..a42ed4d7 100644 --- a/frontend/src/features/payments/ReceivedPayments.js +++ b/frontend/src/features/payments/ReceivedPayments.js @@ -29,6 +29,7 @@ const ReceivedPayments = (props) => { dispatch(clearReceivedPayments()); dispatch(fetchReceivedPayments({ squeakHash: props.squeakHash, + pubkey: props.pubkey, limit: 10, lastReceivedPayment: null, })); @@ -37,6 +38,7 @@ const ReceivedPayments = (props) => { const fetchMore = () => { dispatch(fetchReceivedPayments({ squeakHash: props.squeakHash, + pubkey: props.pubkey, limit: 10, lastReceivedPayment: lastReceivedPayment, })); diff --git a/frontend/src/features/payments/SentPayments.js b/frontend/src/features/payments/SentPayments.js index 9c99f3ea..7f45b02b 100644 --- a/frontend/src/features/payments/SentPayments.js +++ b/frontend/src/features/payments/SentPayments.js @@ -29,6 +29,7 @@ const SentPayments = (props) => { dispatch(clearSentPayments()); dispatch(fetchSentPayments({ squeakHash: props.squeakHash, + pubkey: props.pubkey, limit: 10, lastSentPayment: null, })); @@ -37,6 +38,7 @@ const SentPayments = (props) => { const fetchMore = () => { dispatch(fetchSentPayments({ squeakHash: props.squeakHash, + pubkey: props.pubkey, limit: 10, lastSentPayment: lastSentPayment, })); diff --git a/frontend/src/features/payments/paymentsSlice.js b/frontend/src/features/payments/paymentsSlice.js index 189844cd..6f9fc136 100644 --- a/frontend/src/features/payments/paymentsSlice.js +++ b/frontend/src/features/payments/paymentsSlice.js @@ -7,11 +7,13 @@ import { import { getSentPayments, getSentPaymentsForSqueak, + getSentPaymentsForPubkey, getReceivedPayments, getReceivedPaymentsForSqueak, getPaymentSummary, getPaymentSummaryForSqueak, getPaymentSummaryForPubkey, + getReceivedPaymentsForPubkey, } from '../../api/client' const initialState = { @@ -33,6 +35,11 @@ export const fetchSentPayments = createAsyncThunk( values.limit, values.lastSentPayment, ) + : values.pubkey ? await getSentPaymentsForPubkey( + values.pubkey, + values.limit, + values.lastSentPayment, + ) : await getSentPayments( values.limit, values.lastSentPayment, @@ -49,6 +56,11 @@ export const fetchReceivedPayments = createAsyncThunk( values.limit, values.lastReceivedPayment, ) + : values.pubkey ? await getReceivedPaymentsForPubkey( + values.pubkey, + values.limit, + values.lastReceivedPayment, + ) : await getReceivedPayments( values.limit, values.lastReceivedPayment, diff --git a/squeaknode/admin/webapp/static/build/asset-manifest.json b/squeaknode/admin/webapp/static/build/asset-manifest.json index fdb1bff1..b0d40a93 100644 --- a/squeaknode/admin/webapp/static/build/asset-manifest.json +++ b/squeaknode/admin/webapp/static/build/asset-manifest.json @@ -1,35 +1,35 @@ { "files": { "main.css": "/static/css/main.be11d9c8.chunk.css", - "main.js": "/static/js/main.9dc2a676.chunk.js", - "main.js.map": "/static/js/main.9dc2a676.chunk.js.map", - "runtime-main.js": "/static/js/runtime-main.d6eba3d2.js", - "runtime-main.js.map": "/static/js/runtime-main.d6eba3d2.js.map", - "static/js/2.72b7acf2.chunk.js": "/static/js/2.72b7acf2.chunk.js", - "static/js/2.72b7acf2.chunk.js.map": "/static/js/2.72b7acf2.chunk.js.map", + "main.js": "/static/js/main.6a7c927e.chunk.js", + "main.js.map": "/static/js/main.6a7c927e.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.05610a5d.js", + "runtime-main.js.map": "/static/js/runtime-main.05610a5d.js.map", + "static/js/2.34efa20b.chunk.js": "/static/js/2.34efa20b.chunk.js", + "static/js/2.34efa20b.chunk.js.map": "/static/js/2.34efa20b.chunk.js.map", "static/css/3.1f6bb621.chunk.css": "/static/css/3.1f6bb621.chunk.css", - "static/js/3.f8daaa08.chunk.js": "/static/js/3.f8daaa08.chunk.js", - "static/js/3.f8daaa08.chunk.js.map": "/static/js/3.f8daaa08.chunk.js.map", + "static/js/3.2d2d34d3.chunk.js": "/static/js/3.2d2d34d3.chunk.js", + "static/js/3.2d2d34d3.chunk.js.map": "/static/js/3.2d2d34d3.chunk.js.map", "static/css/4.6512f3a3.chunk.css": "/static/css/4.6512f3a3.chunk.css", - "static/js/4.57c210f1.chunk.js": "/static/js/4.57c210f1.chunk.js", - "static/js/4.57c210f1.chunk.js.map": "/static/js/4.57c210f1.chunk.js.map", + "static/js/4.13c6f568.chunk.js": "/static/js/4.13c6f568.chunk.js", + "static/js/4.13c6f568.chunk.js.map": "/static/js/4.13c6f568.chunk.js.map", "static/css/5.3aaab79d.chunk.css": "/static/css/5.3aaab79d.chunk.css", - "static/js/5.98c7883d.chunk.js": "/static/js/5.98c7883d.chunk.js", - "static/js/5.98c7883d.chunk.js.map": "/static/js/5.98c7883d.chunk.js.map", + "static/js/5.2d635141.chunk.js": "/static/js/5.2d635141.chunk.js", + "static/js/5.2d635141.chunk.js.map": "/static/js/5.2d635141.chunk.js.map", "index.html": "/index.html", - "precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js": "/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js", + "precache-manifest.dd47f226d16dea85b0faa073346e53cb.js": "/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js", "service-worker.js": "/service-worker.js", "static/css/3.1f6bb621.chunk.css.map": "/static/css/3.1f6bb621.chunk.css.map", "static/css/4.6512f3a3.chunk.css.map": "/static/css/4.6512f3a3.chunk.css.map", "static/css/5.3aaab79d.chunk.css.map": "/static/css/5.3aaab79d.chunk.css.map", "static/css/main.be11d9c8.chunk.css.map": "/static/css/main.be11d9c8.chunk.css.map", - "static/js/2.72b7acf2.chunk.js.LICENSE.txt": "/static/js/2.72b7acf2.chunk.js.LICENSE.txt", + "static/js/2.34efa20b.chunk.js.LICENSE.txt": "/static/js/2.34efa20b.chunk.js.LICENSE.txt", "static/media/icon.a0c2d343.svg": "/static/media/icon.a0c2d343.svg" }, "entrypoints": [ - "static/js/runtime-main.d6eba3d2.js", - "static/js/2.72b7acf2.chunk.js", + "static/js/runtime-main.05610a5d.js", + "static/js/2.34efa20b.chunk.js", "static/css/main.be11d9c8.chunk.css", - "static/js/main.9dc2a676.chunk.js" + "static/js/main.6a7c927e.chunk.js" ] } \ No newline at end of file diff --git a/squeaknode/admin/webapp/static/build/index.html b/squeaknode/admin/webapp/static/build/index.html index 8fea3ff5..fe6658fa 100644 --- a/squeaknode/admin/webapp/static/build/index.html +++ b/squeaknode/admin/webapp/static/build/index.html @@ -1 +1 @@ -Squeaknode
\ No newline at end of file +Squeaknode
\ No newline at end of file diff --git a/squeaknode/admin/webapp/static/build/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js b/squeaknode/admin/webapp/static/build/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js deleted file mode 100644 index 6cb9bfeb..00000000 --- a/squeaknode/admin/webapp/static/build/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js +++ /dev/null @@ -1,54 +0,0 @@ -self.__precacheManifest = (self.__precacheManifest || []).concat([ - { - "revision": "70a7a8ad4224f2dd157bd8706ddaa6b7", - "url": "/index.html" - }, - { - "revision": "54c1e9d2b8060e37a08a", - "url": "/static/css/3.1f6bb621.chunk.css" - }, - { - "revision": "19b2fac41bfd8bf51af9", - "url": "/static/css/4.6512f3a3.chunk.css" - }, - { - "revision": "29eb539d0d52d68ac636", - "url": "/static/css/5.3aaab79d.chunk.css" - }, - { - "revision": "bd0b0d93c7704f3b47cf", - "url": "/static/css/main.be11d9c8.chunk.css" - }, - { - "revision": "edaadb0ff70b3a4b34eb", - "url": "/static/js/2.72b7acf2.chunk.js" - }, - { - "revision": "a569361d31625f49e7e30aea21628ed5", - "url": "/static/js/2.72b7acf2.chunk.js.LICENSE.txt" - }, - { - "revision": "54c1e9d2b8060e37a08a", - "url": "/static/js/3.f8daaa08.chunk.js" - }, - { - "revision": "19b2fac41bfd8bf51af9", - "url": "/static/js/4.57c210f1.chunk.js" - }, - { - "revision": "29eb539d0d52d68ac636", - "url": "/static/js/5.98c7883d.chunk.js" - }, - { - "revision": "bd0b0d93c7704f3b47cf", - "url": "/static/js/main.9dc2a676.chunk.js" - }, - { - "revision": "3d8cbe3cffbdee6a722d", - "url": "/static/js/runtime-main.d6eba3d2.js" - }, - { - "revision": "a0c2d343127a93b025409da6fd970700", - "url": "/static/media/icon.a0c2d343.svg" - } -]); \ No newline at end of file diff --git a/squeaknode/admin/webapp/static/build/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js b/squeaknode/admin/webapp/static/build/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js new file mode 100644 index 00000000..3d297647 --- /dev/null +++ b/squeaknode/admin/webapp/static/build/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js @@ -0,0 +1,54 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "18bdf187ee95230950f194530b73c2c4", + "url": "/index.html" + }, + { + "revision": "b231ad02f3f1cc4d806e", + "url": "/static/css/3.1f6bb621.chunk.css" + }, + { + "revision": "73f49a16160afba90031", + "url": "/static/css/4.6512f3a3.chunk.css" + }, + { + "revision": "8671e1a9be8d91740510", + "url": "/static/css/5.3aaab79d.chunk.css" + }, + { + "revision": "8f5e1c1f2d6d6f4df7e1", + "url": "/static/css/main.be11d9c8.chunk.css" + }, + { + "revision": "d847f8d7fccd469909c7", + "url": "/static/js/2.34efa20b.chunk.js" + }, + { + "revision": "a569361d31625f49e7e30aea21628ed5", + "url": "/static/js/2.34efa20b.chunk.js.LICENSE.txt" + }, + { + "revision": "b231ad02f3f1cc4d806e", + "url": "/static/js/3.2d2d34d3.chunk.js" + }, + { + "revision": "73f49a16160afba90031", + "url": "/static/js/4.13c6f568.chunk.js" + }, + { + "revision": "8671e1a9be8d91740510", + "url": "/static/js/5.2d635141.chunk.js" + }, + { + "revision": "8f5e1c1f2d6d6f4df7e1", + "url": "/static/js/main.6a7c927e.chunk.js" + }, + { + "revision": "a02b2d7c374aeb856b49", + "url": "/static/js/runtime-main.05610a5d.js" + }, + { + "revision": "a0c2d343127a93b025409da6fd970700", + "url": "/static/media/icon.a0c2d343.svg" + } +]); \ No newline at end of file diff --git a/squeaknode/admin/webapp/static/build/service-worker.js b/squeaknode/admin/webapp/static/build/service-worker.js index a533faf4..a3a15415 100644 --- a/squeaknode/admin/webapp/static/build/service-worker.js +++ b/squeaknode/admin/webapp/static/build/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/precache-manifest.cd28673d075bf2731e351fd5dcf09cd2.js" + "/precache-manifest.dd47f226d16dea85b0faa073346e53cb.js" ); self.addEventListener('message', (event) => { diff --git a/squeaknode/admin/webapp/static/build/static/js/2.34efa20b.chunk.js b/squeaknode/admin/webapp/static/build/static/js/2.34efa20b.chunk.js new file mode 100644 index 00000000..54869086 --- /dev/null +++ b/squeaknode/admin/webapp/static/build/static/js/2.34efa20b.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.34efa20b.chunk.js.LICENSE.txt */ +(this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[]).push([[2],[function(e,t,r){"use strict";e.exports=r(70)},function(e,t,r){e.exports=r(108)},,function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return _}));var n=r(0),o=r.n(n),i=(r(33),o.a.createContext(null));var a=function(e){e()},s={notify:function(){}};function u(){var e=a,t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var l=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}();var c=function(e){var t=e.store,r=e.context,a=e.children,s=Object(n.useMemo)((function(){var e=new l(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=Object(n.useMemo)((function(){return t.getState()}),[t]);Object(n.useEffect)((function(){var e=s.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,u]);var c=r||i;return o.a.createElement(c.Provider,{value:s},a)},g=(r(6),r(22),r(31),r(45),"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?n.useLayoutEffect:n.useEffect);r(29);function f(){return Object(n.useContext)(i)}function d(e){void 0===e&&(e=i);var t=e===i?f:function(){return Object(n.useContext)(e)};return function(){return t().store}}var p=d();function h(e){void 0===e&&(e=i);var t=e===i?p:d(e);return function(){return t().dispatch}}var m=h(),y=function(e,t){return e===t};function b(e){void 0===e&&(e=i);var t=e===i?f:function(){return Object(n.useContext)(e)};return function(e,r){void 0===r&&(r=y);var o=t(),i=function(e,t,r,o){var i,a=Object(n.useReducer)((function(e){return e+1}),0)[1],s=Object(n.useMemo)((function(){return new l(r,o)}),[r,o]),u=Object(n.useRef)(),c=Object(n.useRef)(),f=Object(n.useRef)(),d=Object(n.useRef)(),p=r.getState();try{i=e!==c.current||p!==f.current||u.current?e(p):d.current}catch(h){throw u.current&&(h.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),h}return g((function(){c.current=e,f.current=p,d.current=i,u.current=void 0})),g((function(){function e(){try{var e=c.current(r.getState());if(t(e,d.current))return;d.current=e}catch(h){u.current=h}a()}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[r,s]),i}(e,r,o.store,o.subscription);return Object(n.useDebugValue)(i),i}}var v,_=b(),S=r(32);v=S.unstable_batchedUpdates,a=v},,function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:d(e)?3:0}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===s(e)?e.get(t):e[t]}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function g(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return W&&e instanceof Map}function d(e){return H&&e instanceof Set}function p(e){return e.o||e.t}function h(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=q(e);delete t[$];for(var r=K(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0))}function y(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=X[e];return t||n(18,e),t}function _(e,t){X[e]||(X[e]=t)}function S(){return B}function E(e,t){t&&(v("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){T(e),e.p.forEach(A),e.p=null}function T(e){e===B&&(B=e.l)}function O(e){return B={p:[],l:B,h:e,m:!0,_:0}}function A(e){var t=e[$];0===t.i||1===t.i?t.j():t.g=!0}function C(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.O||v("ES5").S(t,e,o),o?(r[$].P&&(w(t),n(4)),i(e)&&(e=j(t,e),t.l||x(t,e)),t.u&&v("Patches").M(r[$],e,t.u,t.s)):e=j(t,r,[]),w(t),t.u&&t.v(t.u,t.s),e!==z?e:void 0}function j(e,t,r){if(b(t))return t;var n=t[$];if(!n)return a(t,(function(o,i){return R(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return x(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=h(n.k):n.o;a(3===n.i?new Set(o):o,(function(t,i){return R(e,n,o,t,i,r)})),x(e,o,!1),r&&e.u&&v("Patches").R(n,r,e.u,e.s)}return n.o}function R(e,t,r,n,a,s){if(o(a)){var l=j(e,a,s&&t&&3!==t.i&&!u(t.D,n)?s.concat(n):void 0);if(c(r,n,l),!o(l))return;e.m=!1}if(i(a)&&!b(a)){if(!e.h.N&&e._<1)return;j(e,a),t&&t.A.l||x(e,a)}}function x(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&m(t,r)}function k(e,t){var r=e[$];return(r?p(r):e)[t]}function M(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function N(e){e.o||(e.o=h(e.t))}function P(e,t,r){var n=f(t)?v("MapSet").T(t,r):d(t)?v("MapSet").F(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:S(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=Z;r&&(o=[n],i=Q);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return n.k=u,n.j=s,u}(t,r):v("ES5").J(t,r);return(r?r.A:S()).p.push(n),n}function D(e){return o(e)||n(22,e),function e(t){if(!i(t))return t;var r,n=t[$],o=s(t);if(n){if(!n.P&&(n.i<4||!v("ES5").K(n)))return n.t;n.I=!0,r=L(t,o),n.I=!1}else r=L(t,o);return a(r,(function(t,o){n&&l(n.t,t)===o||c(r,t,e(o))})),3===o?new Set(r):r}(e)}function L(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return h(e)}function U(){function e(e,t){var r=i[e];return r?r.enumerable=t:i[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[$];return Z.get(t,e)},set:function(t){var r=this[$];Z.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][$];if(!o.P)switch(o.i){case 5:n(o)&&I(o);break;case 4:r(o)&&I(o)}}}function r(e){for(var t=e.t,r=e.k,n=K(r),o=n.length-1;o>=0;o--){var i=n[o];if(i!==$){var a=t[i];if(void 0===a&&!u(t,i))return!0;var s=r[i],l=s&&s[$];if(l?l.t!==a:!g(s,a))return!0}}var c=!!t[$];return n.length!==K(t).length+(c?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}var i={};_("ES5",{J:function(t,r){var n=Array.isArray(t),o=function(t,r){if(t){for(var n=Array(r.length),o=0;o1?n-1:0),s=1;s1?r-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var i=v("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t.slice(r+1))}))},e}()),ee=J.produce,te=(J.produceWithPatches.bind(J),J.setAutoFreeze.bind(J),J.setUseProxies.bind(J),J.applyPatches.bind(J),J.createDraft.bind(J),J.finishDraft.bind(J),ee),re=r(29);r(21);function ne(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"===typeof o?o(r,n,e):t(o)}}}}var oe=ne();oe.withExtraArgument=ne;var ie=oe;function ae(){return(ae=Object.assign||function(e){for(var t=1;t=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}var a=i;"string"===typeof e[a]&&(t[a]=e[a])}return t}return{message:String(e)}};function we(e,t,r){var n=ye(e+"/fulfilled",(function(e,t,r){return{payload:e,meta:{arg:r,requestId:t}}})),o=ye(e+"/pending",(function(e,t){return{payload:void 0,meta:{arg:t,requestId:e}}})),i=ye(e+"/rejected",(function(e,t,r,n){var o=!!e&&"AbortError"===e.name,i=!!e&&"ConditionError"===e.name;return{payload:n,error:Ee(e||"Rejected"),meta:{arg:r,requestId:t,aborted:o,condition:i}}})),a="undefined"!==typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(s,u,l){var c,g=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}(),f=new a,d=new Promise((function(e,t){return f.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:c||"Aborted"})}))})),p=!1;var h=function(){try{var a,c=function(e){return h?e:(r&&!r.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a)},h=!1,m=function(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}((function(){if(r&&r.condition&&!1===r.condition(e,{getState:u,extra:l}))throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return p=!0,s(o(g,e)),Promise.resolve(Promise.race([d,Promise.resolve(t(e,{dispatch:s,getState:u,extra:l,requestId:g,signal:f.signal,rejectWithValue:function(e){return new Se(e)}})).then((function(t){return t instanceof Se?i(null,g,e,t.value):n(t,g,e)}))])).then((function(e){a=e}))}),(function(t){a=i(t,g,e)}));return Promise.resolve(m&&m.then?m.then(c):c(m))}catch(y){return Promise.reject(y)}}();return Object.assign(h,{abort:function(e){p&&(c=e,f.abort())}})}}),{pending:o,rejected:i,fulfilled:n,typePrefix:e})}function Te(e){if("error"in e)throw e.error;return e.payload}U()},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return function(){for(var r=arguments.length,n=new Array(r),i=0;i=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"";return String.prototype.replace.call(e,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,n=String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t){return null!==e&&void 0!==e?e[t]:e}),e);return void 0===n||n===e?r:n},D=function(e){return".".concat(e).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},L=function(e,t){var r=D(t),n=function(e){return e.replace(D(e),"").replace(/\./,"")}(t),o=r?P(e,r):e;return!(!o||!Object.hasOwnProperty.call(o,n.replace(/\[(.*)\]/,"$1")))},U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t,n,o){return n===o.length-1?(e[t]=r,e[t]):"object"!==i(e[t])?(Number.isInteger(+o[n+1])?e[t]=[]:e[t]={},e[t]):(Number.isInteger(+o[n+1])&&!Array.isArray(e[t])&&(e[t]=[]),e[t])}),e)},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=!1;return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t,n,o){return void 0===e?e:n===o.length-1?(delete e[t],r=!0,e[t]):e[t]}),e),r},B=function(e){var t=N(e);return Number.isInteger(+t[t.length-1])},V=function(){function e(){a(this,e)}return u(e,null,[{key:"empty",value:function(e){for(var t in e)return!1;return!0}},{key:"get",value:function(e,t){return P(e,t)}},{key:"has",value:function(e,t){return L(e,t)}},{key:"set",value:function(t,r,n){if(void 0!==n)I("Setting",r,n),U(t,r,n);else if(B(r)&&void 0!==e.get(t,r)){I("Special case SETTING",r,"to undefined"),U(t,r,void 0);var o=N(r);W(t,o=o.slice(0,o.length-1))}else B(r)||void 0===e.get(t,r)||(I("Special case REMOVING",r,"from object completley"),e.delete(t,r))}},{key:"delete",value:function(e,t){I("DELETE",t),B(t)?(I("ARRAY PATH",t),this.pullOut(e,t)):F(e,t);var r=N(t);W(e,r=r.slice(0,r.length-1)),I("DELETED",t)}},{key:"pullOut",value:function(e,t){var r=N(t),n=r[r.length-1];r=r.slice(0,r.length-1),I("Pulling out:",r,"index",n);var o=P(e,r);I("Array Before",o),Array.isArray(o)&&function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,r,n,o){return void 0===e?e:n===o.length-1&&Array.isArray(e)?(t=e.splice(r,1),e[r]):e[r]}),e)}(o,n),I("Array After",o),W(e,r)}},{key:"purge",value:function(t){var r=Array.isArray(t)?[]:{};return Object.keys(t).forEach((function(n){"object"===i(t[n])?(r[n]=e.purge(t[n]),0===Object.keys(r[n]).length&&delete r[n]):void 0!==t[n]&&(r[n]=t[n])})),r}},{key:"swap",value:function(e,t,r,n){console.log("Swaping out out:",t,r,n);var o=P(e,t);console.log("Array",o),Array.isArray(o)&&function(e,t,r){if(e[t]&&e[r]){var n=e[t],o=e[r];e[t]=o,e[r]=n}else console.warn("Attempted to swap ".concat(t," with ").concat(r," but one of them does not exist :("))}(o,r,n)}}]),e}();function W(e,t){if(0!==t.length){var r=P(e,t);(Array.isArray(r)?r.every((function(e){return null==e})):"{}"===JSON.stringify(r))&&F(e,t),W(e,t.slice(0,t.length-1))}}var H=Object(M.a)("informed:utils\t"),Y=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};function z(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n={};return function(){for(var o=arguments.length,i=new Array(o),a=0;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(e.inner);try{for(n.s();!(r=n.n()).done;){var o=r.value;V.get(t,o.path)||V.set(t,o.path,o.message)}}catch(o){n.e(o)}finally{n.f()}}return t},q=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(r){return function(e){if(e.inner){if(0===e.inner.length)return;return e.inner[0].message}}(r)}},X=function(e,t,r){var n=r.required,o=r.minimum,i=r.maximum,a=r.minLength,s=r.maxLength,u=r.pattern,l=r.getErrorMessage;return function(r,c){var g;return n&&void 0!==(g=function(e,t,r){if(t&&(null==e||""===e))return"string"===typeof t?t:r("required")||"This field is required"}(r,n,l))||o&&void 0!==(g=function(e,t,r){if(null!=t&&et)return r("maximum")||"This field should NOT be more than ".concat(t)}(r,i,l))||a&&void 0!==(g=function(e,t,r){if(null!=t&&(null===e||void 0===e?void 0:e.length)t)return r("maxLength")||"This field should NOT be more than ".concat(t," characters")}(r,s,l))||u&&void 0!==(g=function(e,t,r){if(null!=t&&!new RegExp(t).test(e)&&e)return r("pattern")||'This field should match pattern "'.concat(t,'";')}(r,u,l))||t&&void 0!==(g=q(t,r))||e&&(g=e(r,c)),g}},Z=function(e){return e.split("").map((function(e){return"#"===e?/\d/:"*"===e?/[\w]/:e}))},Q=function(e,t,r){if("object"===i(t)&&!Array.isArray(t)){var n={},o={};return Object.keys(e).forEach((function(i){if(t[i]){var a=J(e[i],t[i],r?r[e]:void 0,e),s=a.value,u=a.offset;n[i]=s,o[i]=u}else n[i]=e[i],o[i]=0})),{value:n,offset:o}}return J(e,t,r,e)},J=function(e,t,r,n){if(H("Formatting",e),H("Full Value",n),!e)return{value:e,offset:0};var o="".concat(e),i=function(e,t,r){if("string"===typeof e)return Z(e);if("function"===typeof e){var n=e(t,r);return"string"===typeof n?Z(n):n}if(Array.isArray(e))return e;throw new Error("Formatter must be string, array, or function")}(t,o,n),a=i.findIndex((function(e){return"string"!=typeof e})),s=i.length-d(i).reverse().findIndex((function(e){return"string"!=typeof e})),u=[],l=o.split(""),c=0,g=0,f=function(e,t){for(var r=0,n=-1,o=!0;o&&r-1&&(c=f+1,u=u.concat(i.slice(0,f+1)),g=f+1),f<0&&(u=u.concat(i.slice(0,a)),g=a);for(var p=g;p=s))break;u.push(h)}}var b=u.join(""),v=o?b.length-o.length:0;return o&&r&&o.length=s&&(v=0),{value:b,offset:v}},ee=function(e){var t=e.replace(/\./g,".properties.").replace(/\[\d+\]/g,".items");return t="properties.".concat(t)},te=function(e,t,r){var n=t["ui:control"],i=t["ui:props"],a=t["ui:before"],s=t["ui:after"],u=t.oneOf,l=t.items,c=t.enum,g=t.title,f=t.minimum,d=t.maximum,p=t.minLength,h=t.maxLength,m=t.pattern,y=t.required,b=t.type,v=t.properties,_=t.allOf,S=t.propertyOrder,E=Y();i&&i.id&&(E=i.id);var w={componentType:null!==n&&void 0!==n?n:b,name:r?"".concat(r,".").concat(e):e,type:b,uiBefore:a,uiAfter:s,properties:"object"===b?v:void 0,allOf:"object"===b?_:void 0,propertyOrder:"object"===b?S:void 0,items:"array"===b?l:void 0,propertyName:e,required:y,props:o({label:g,id:E,minimum:f,maximum:d,minLength:p,maxLength:h,pattern:m},i)};if(u){var T=t.oneOf.map((function(e){var t=e["ui:props"],r=void 0===t?{}:t;return o({value:e.const,label:e.title},r)}));w.props.options=T}if(c){var O=t.enum.map((function(e){return{value:e,label:e}}));w.props.options=O}if(l&&l.oneOf){var A=l.oneOf.map((function(e){var t=e["ui:props"],r=void 0===t?{}:t;return o({value:e.const,label:e.title},r)}));w.props.options=A}return w};function re(e,t){return Object.entries(e).every((function(e){var r=f(e,2),n=r[0],o=r[1];switch(n){case"const":return t===o;case"minimum":return t>=o;case"exclusiveMinimum":return t>o;case"maximum":return t<=o;case"exclusiveMaximum":return t3&&void 0!==arguments[3])||arguments[3],o=ne(),i=Object(m.useMemo)((function(){return n?t.map((function(e){return o(e)})):t}),[t]),a=x();Object(m.useEffect)((function(){var t=function(t){("_ALL_"===t||i.includes(t)||t&&i.some((function(e){return G(e,t)})))&&(oe("subscription ".concat(e," triggered with target ").concat(t," for"),i),r(t))};return a.emitter.on(e,t),function(){a.emitter.removeListener(e,t)}}),[t])},ae=Object(M.a)("informed:useRelevance\t"),se=function(e){var t=e.name,r=e.relevant,n=e.relevanceWhen,o=void 0===n?[]:n,i=e.relevanceDeps,a=void 0===i?[]:i,s=x(),u=Object(m.useContext)(j),l=Object(m.useRef)(u);l.current=u;var c=f(k((function(){return!r||r({formState:s.getFormState(),formApi:s.getFormApi(),scope:u,relevanceDeps:a})})),3),g=c[0],p=c[1],h=c[2],y="function"===typeof o?[]:o,b=Object(m.useMemo)((function(){return"function"===typeof o?o(u):o}),[].concat(d(y),[u]));return ie("field-value",b,(function(e){ae("re-evaluating relevance for ".concat(t," because of ").concat(e));var n=r({formState:s.getFormState(),formApi:s.getFormApi(),scope:l.current,relevanceDeps:a});h()!=n&&p(n)}),!("function"===typeof o)),Object(m.useEffect)((function(){if(r&&"function"!==typeof o&&0===o.length){var e=function(e){ae("re-evaluating relevance for ".concat(t," because of ").concat(e));var n=r({formState:s.getFormState(),formApi:s.getFormApi(),scope:l.current,relevanceDeps:a});h()!=n&&p(n)};return s.emitter.on("field",e),function(){s.emitter.removeListener("field",e)}}}),[]),Object(m.useEffect)((function(){r&&p(r({formState:s.getFormState(),formApi:s.getFormApi(),scope:u,relevanceDeps:a}))}),[t].concat(d(a))),g},ue=function(e){var t=e.when,r=e.relevanceWhen,n=e.relevanceDeps,o=e.children,i=x(),a=Object(m.useContext)(j),s=se({relevant:t,relevanceWhen:r,relevanceDeps:n}),u=Object(m.useMemo)((function(){return{isRelevant:s,relevant:function(){return t({formState:i.getFormState(),formApi:i.getFormApi(),scope:a,relevanceDeps:n})}}}),[s,a,n]);return y.a.createElement(A.Provider,{value:u},s?o:null)};function le(){return Object(m.useContext)(v)}function ce(e){var t=Object(m.useContext)(j);return t===e?e:t&&e?"".concat(t,".").concat(e):e}var ge=function(e,t){return{getValue:function(){return e.getValue(t)},setValue:function(r,n,o){return e.setValue(t,r,n,o)},getTouched:function(){return e.getTouched(t)},setTouched:function(r,n){return e.setTouched(t,r,n)},getError:function(){return e.getError(t)},setError:function(r){return e.setError(t,r)},getFocused:function(){return e.getFocused(t)},setFocused:function(r,n){return e.setFocused(t,r,n)},getData:function(){return e.getData(t)},reset:function(r){return e.resetField(t,r)},validate:function(){return e.validateField(t)},getDirty:function(){return e.getDirty(t)},getPristine:function(){return e.getPristine(t)},getMaskedValue:function(){return e.getMaskedValue(t)},clearValue:function(){return e.clearValue(t)}}};function fe(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=le(),n=t?ce(e):e,o=Object(m.useMemo)((function(){return ge(r,n)}),[n]);return o}var de=Object(M.a)("informed:useArrayField\t"),pe=function(e){var t=e.name,r=e.initialValue,n=e.arrayFieldApiRef,i=ce(t),a=Object(m.useContext)(b),s=fe(i),u=f(Object(m.useState)((function(){return new Map})),1)[0],l=f(k((function(){return a.getValue(i)?a.getValue(i):r||a.getInitialValue(i)||[]})),3),c=l[0],g=l[1],p=l[2],h=f(k(c?c.map((function(){return Y()})):[]),3),v=h[0],_=h[1],S=h[2],T=function(e,t){de("Swapping","".concat(i,"[").concat(e,"] and ").concat(i,"[").concat(t,"]")),a.swap(i,e,t);var r=S(),n=d(r);r[e]&&r[t]?(n[e]=r[t],n[t]=r[e]):console.warn("Attempted to swap ".concat(e," with ").concat(t," but one of them does not exist :(")),_(n)},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=S();if("number"!==typeof e||!Number(e)||e<=0)t.push(Y());else for(var r=0;r1&&void 0!==arguments[1])||arguments[1],r=t?ce(e):e,n=x(),o=he();return Object(m.useEffect)((function(){var e=function(e){("_ALL_"===e||e===r||e&&G(r,e))&&(me("Updating",r),o())};return n.emitter.on("field",e),o(),function(){n.emitter.removeListener("field",e)}}),[r]),n.getFieldState(r)};var be=["relevant","relevanceWhen","relevanceDeps","name"],ve=["children"],_e=Object(M.a)("informed:ArrayField\t"),Se=function(e){var t=e.relevant,r=e.relevanceWhen,n=e.relevanceDeps,o=e.name,i=g(e,be);return t?y.a.createElement(ue,{when:t,relevanceWhen:r,relevanceDeps:n},y.a.createElement(Ee,c({name:o},i))):y.a.createElement(Ee,c({name:o},i))},Ee=function(e){var t=e.children,r=g(e,ve),n=pe(r),i=n.render,a=n.arrayFieldState,s=n.arrayFieldApi;return i("function"===typeof t?t(o(o({arrayFieldApi:s,arrayFieldState:a},s),a)):t)},we=function(e){var t=e.arrayFieldItemState,r=e.arrayFieldItemApi,n=e.children,i=x(),a=f(Object(m.useState)((function(){return new Map})),1)[0],s=ye(t.name),u=function(e){var t=le();return Object(m.useMemo)((function(){return function(e,t){return{getValue:function(r){return t.getValue("".concat(e,".").concat(r))},setValue:function(r,n,o,i){return t.setValue("".concat(e,".").concat(r),n,o,i)},getTouched:function(r){return t.getTouched("".concat(e,".").concat(r))},setTouched:function(r,n){return t.setTouched("".concat(e,".").concat(r),n)},getFocused:function(r){return t.getFocused("".concat(e,".").concat(r))},setFocused:function(r,n){return t.setFocused("".concat(e,".").concat(r),n)},getError:function(r){return t.getError("".concat(e,".").concat(r))},setError:function(r,n){return t.setError("".concat(e,".").concat(r),n)},getData:function(r){return t.getData("".concat(e,".").concat(r))},resetField:function(r){return t.resetField("".concat(e,".").concat(r))},validate:function(r){return t.validate("".concat(e,".").concat(r))},getDirty:function(r){return t.getDirty("".concat(e,".").concat(r))},getPristine:function(r){return t.getPristine("".concat(e,".").concat(r))},getMaskedValue:function(r){return t.getMaskedValue("".concat(e,".").concat(r))},clearValue:function(r){return t.clearValue("".concat(e,".").concat(r))}}}(e,t)}),[e])}(t.name),l=Object(m.useMemo)((function(){return o(o({},i),{},{register:function(e,t){a.set(e,t),i.register(e,t)},deregister:function(e,r){a.delete(e),i.deregister(e,r);var n=i.getRemovalLocked();_e("DEREGISTER",e,"SIZE",a.size,"INDEX",t.index,"LOCKEDUNTIL",n),null==n||n.index!==t.index||n.name!==t.parent||Array.from(a.keys()).some((function(e){return e.includes("".concat(t.parent,"[").concat(n.index,"]"))}))||(_e("UNLOCKING"),i.unlockRemoval())}})}),[t.index]),c=Object(m.useCallback)((function(){a.forEach((function(e){e.current.fieldApi.reset()}))}),[t.name,t.index]),g=o(o({},t),{},{values:s.value,errors:s.error,touched:s.touched}),d=Object(m.useMemo)((function(){return o(o(o({},r),u),{},{reset:c})}),[t.name,t.index]);return"function"===typeof n?y.a.createElement(b.Provider,{value:l},y.a.createElement(T.Provider,{value:d},y.a.createElement(O.Provider,{value:g},y.a.createElement(j.Provider,{value:t.name},n(o(o({},d),{},{name:t.name,index:t.index})))))):y.a.createElement(b.Provider,{value:l},y.a.createElement(T.Provider,{value:r},y.a.createElement(O.Provider,{value:t},y.a.createElement(j.Provider,{value:t.name},n))))};Se.Items=function(e){var t=e.children;return Object(m.useContext)(E).fields.map((function(e){var r=e.arrayFieldItemState,n=e.arrayFieldItemApi,o=r.key;return y.a.createElement(we,{key:o,arrayFieldItemApi:n,arrayFieldItemState:r},t)}))};var Te=function(e){var t,r=e.scope,n=e.children,o=Object(m.useContext)(j);return t=o?"".concat(o,".").concat(r):r,y.a.createElement(j.Provider,{value:t},n)},Oe=function(e,t){var r=Object(m.useRef)(!0),n=r.current;Object(m.useEffect)((function(){if(!n)return e();r.current=!1}),t)},Ae=["id","type","name","onBlur","onChange","onFocus","validate","asyncValidate","gatherData","yupSchema","multiple","field","keepState","keepStateIfRelevant","debug","inputRef","inputRefs","relevant","defaultValue","initialValue","autocomplete","showErrorIfError","showErrorIfTouched","showErrorIfDirty","formatter","parser","maintainCursor","required","minimum","maximum","minLength","maxLength","pattern","allowEmptyString","validateOnMount","validateOn","validateWhen","formatterDependencies","formController","initialize","errorMessage","initializeValueIfPristine","relevanceWhen","relevanceDeps"],Ce=Object(M.a)("informed:useField\t"),je=function(e){var t=e.id,r=e.type,n=e.name,i=e.onBlur,a=e.onChange,s=e.onFocus,u=e.validate,l=e.asyncValidate,c=e.gatherData,p=e.yupSchema,h=e.multiple,b=e.field,v=e.keepState,_=e.keepStateIfRelevant,E=e.debug,w=e.inputRef,T=e.inputRefs,O=e.relevant,C=e.defaultValue,j=e.initialValue,R=e.autocomplete,M=e.showErrorIfError,I=e.showErrorIfTouched,N=e.showErrorIfDirty,P=e.formatter,D=e.parser,L=e.maintainCursor,U=e.required,F=e.minimum,B=e.maximum,V=e.minLength,W=e.maxLength,H=e.pattern,z=e.allowEmptyString,G=e.validateOnMount,$=e.validateOn,K=e.validateWhen,q=void 0===K?[]:K,Z=e.formatterDependencies,Q=void 0===Z?[]:Z,J=e.formController,ee=e.initialize,te=e.errorMessage,re=e.initializeValueIfPristine,ne=e.relevanceWhen,oe=void 0===ne?[]:ne,ae=e.relevanceDeps,ue=void 0===ae?[]:ae,le=g(e,Ae),ge=ce(null!==n&&void 0!==n?n:b);ge||console.warn("name is a required prop!!!!");var de=null!==L&&void 0!==L?L:!!P,pe=null!==J&&void 0!==J?J:x(),he=null!==R&&void 0!==R?R:pe.options.current.autocomplete,me=null!==M&&void 0!==M?M:pe.options.current.showErrorIfError,be=null!==I&&void 0!==I?I:pe.options.current.showErrorIfTouched,ve=null!==N&&void 0!==N?N:pe.options.current.showErrorIfDirty,_e=null!==G&&void 0!==G?G:pe.options.current.validateOnMount,Se=null!==$&&void 0!==$?$:pe.options.current.validateOn,Ee=null!==v&&void 0!==v?v:pe.options.current.keepState,we=null!==_&&void 0!==_?_:pe.options.current.keepStateIfRelevant,Te=null!==z&&void 0!==z?z:pe.options.current.allowEmptyStrings,je=function(){var e;return null!==(e=null!==j&&void 0!==j?j:pe.getInitialValue(ge))&&void 0!==e?e:C},Re=f(Object(m.useState)((function(){return je()})),1)[0],xe=ye(ge,!1),ke=fe(ge,!1),Me=Object(m.useContext)(S),Ie=se({name:ge,relevant:O,relevanceWhen:oe,relevanceDeps:ue}),Ne=Object(m.useContext)(A),Pe=Object(m.useRef)(null),De=y.a.useMemo((function(){return w||Pe}),[]),Le=f(Object(m.useState)((function(){return t||Y()})),1)[0],Ue=function(e){var t=e.value,r=e.inputRef,n=e.inputRefs,i=e.maintainCursor,a=void 0!==i&&i,s=Object(m.useMemo)((function(){if(!n)return 0;var e={};Object.keys(n).forEach((function(t){return e[t]=0}))}),[]),u=f(k(s),3),l=u[0],c=u[1],g=u[2],d=f(k(s),3),p=d[0],h=d[1],y=d[2],b=Object(m.useCallback)((function(e,t){if(t){var r=o({},g());r[t]=e,c(r)}else c(e)}),[]),v=Object(m.useCallback)((function(e,t){if(t){var r=o({},g());r[t]=e[t],h(r)}else h(e)}),[]);return Object(m.useEffect)((function(){if(!n&&null!=r.current&&g()){var e=y()<0?0:y(),t=g()+e;a&&r.current.setSelectionRange(t,t)}n&&g()&&Object.keys(n).forEach((function(e){var t=y()[e]<0?0:y()[e],r=g()[e]+t;a&&n[e].current.setSelectionRange(r,r)}))}),[t,l]),{setCursorOffset:v,setCursor:b,cursor:l,getCursor:g,cursorOffset:p}}({value:xe.value,inputRef:De,maintainCursor:de,inputRefs:T}),Fe=Ue.setCursor,Be=Ue.setCursorOffset,Ve=Object(m.useMemo)((function(){return X(u,p,{required:U,minimum:F,maximum:B,minLength:V,maxLength:W,pattern:H,getErrorMessage:function(e){return pe.getErrorMessage(e,ge)}})}),[U,F,B,V,W,H]),We={name:ge,type:r,onBlur:i,onChange:a,onFocus:s,initialValue:Re,keepState:Ee,keepStateIfRelevant:we,initializeValueIfPristine:re,fieldApi:ke,getInitialValue:je,formatter:P,parser:D,setCursorOffset:Be,setCursor:Fe,validate:Ve,yupSchema:p,validateOn:null!==Se&&void 0!==Se?Se:"blur",validateOnMount:_e,validateWhen:q,showErrorIfError:me,showErrorIfTouched:be,showErrorIfDirty:ve,asyncValidate:l,gatherData:c,initialize:ee,errorMessage:te,allowEmptyString:Te},He=Object(m.useRef)(We);He.current=We,Object(m.useEffect)((function(){return Ce("Register",ge,He.current),pe.register(ge,He),function(){Ce("De-Register",ge,He.current),pe.deregister(ge)}}),[ge]),Object(m.useEffect)((function(){var e=He.current;Ie||Ee||(Ce("RELEVANT REMOVING",e.name),pe.remove(e.name),Ce("RELEVANT De-Register",e.name),pe.deregister(e.name)),Ie&&(Ce("RELEVANT Initialize",e.name),pe.initialize(e.name,He),Ce("RELEVANT register",e.name),pe.register(e.name,He))}),[Ie]),Object(m.useEffect)((function(){return function(){var e=!1,t=He.current;Ce("CLEANUP REMOVING",t.name),t.keepState?e=!0:Ne&&!Ne.relevant()?e=!1:(we||Me)&&(e=!0),e||pe.remove(t.name)}}),[]),Oe((function(){pe.reformat(He.current.name)}),d(Q)),ie("field-value",q,(function(e){Ce("revalidating for ".concat(He.current.name," because of ").concat(e)),pe.validateField(He.current.name)})),Object(m.useLayoutEffect)((function(){E&&De&&De.current&&(De.current.style.background="orange",setTimeout((function(){De.current&&(De.current.style.background="grey")}),300))}));var Ye=function(e){var t=e.fieldType,r=e.setValue,n=e.multiple,o=e.ref,i=function(e){return r(e)};return"text"!==t&&"textArea"!==t&&"number"!==t||(i=function(e){r(e.target.value,e)}),"select"===t&&(i=function(e){var t=Array.from(o.current).filter((function(e){return e.selected})).map((function(e){return e.value}));r(n?t:t[0]||"",e)}),"checkbox"===t&&(i=function(e){r(e.target.checked,e)}),function(e){i(e)}}({fieldType:r,setValue:ke.setValue,multiple:h,ref:De}),ze=function(e){var t=e.setTouched;return function(e){t(!0,e)}}({setTouched:ke.setTouched}),Ge=function(e){var t=e.setFocused;return function(e){t(!0,e)}}({setFocused:ke.setFocused}),$e=function(e){var t=e.fieldType,r=e.maskedValue,n=e.multiple,o=e.value;switch(t){case"text":case"number":return r||0===r?r:"";case"textArea":return r||"";case"select":return o||(n?[]:"");case"checkbox":return!!o;default:return o}}({fieldType:r,maskedValue:xe.maskedValue,multiple:le.multiple,value:xe.value});return{fieldState:xe,fieldApi:ke,userProps:o({id:Le,name:ge,type:r,multiple:h,autoComplete:he,required:U,min:F,max:B,minLength:V,maxLength:W,pattern:H},le),informed:{onChange:Ye,onBlur:ze,onFocus:Ge,value:$e},ref:De,render:function(e){return Ie?e:null}}},Re=["label","id"],xe=y.a.memo((function(e){var t=je(e),r=t.render,n=t.userProps,o=t.ref,i=t.fieldState,a=t.fieldApi,s=a.setValue,u=a.setTouched,l=a.setFocused,f=i.maskedValue,d=i.showError,p=i.error,h=n.label,m=n.id,b=g(n,Re);return r(y.a.createElement(y.a.Fragment,null,h?y.a.createElement("label",{htmlFor:m},h):null,y.a.createElement("input",c({ref:o,id:m},b,{value:f||0===f?f:"",onChange:function(e){s(e.target.value,e)},onBlur:function(e){u(!0,e)},onFocus:function(e){l(!0,e)},"aria-invalid":!!d,"aria-describedby":"".concat(m,"-error")})),d?y.a.createElement("small",{role:"alert",id:"".concat(m,"-error")},p):null))})),ke=y.a.memo((function(e){var t=je(e),r=t.render,n=t.userProps,o=t.ref,i=t.fieldState,a=t.fieldApi,s=a.setValue,u=a.setTouched,l=a.setFocused,g=i.maskedValue,f=i.showError,d=i.error,p=n.label,h=n.id;return r(y.a.createElement(y.a.Fragment,null,p?y.a.createElement("label",{htmlFor:h},p):null,y.a.createElement("textarea",c({ref:o},n,{value:g||"",onChange:function(e){s(e.target.value,e)},onBlur:function(e){u(!0,e)},onFocus:function(e){l(!0,e)},"aria-invalid":!!f,"aria-describedby":"".concat(h,"-error")})),f?y.a.createElement("small",{role:"alert",id:"".concat(h,"-error")},d):null))})),Me=["id","onBlur","onChange","multiple","label","options","children"],Ie=function(e){var t=je(e),r=t.render,n=t.userProps,o=t.fieldState,i=t.fieldApi,a=t.ref,s=i.setValue,u=i.setTouched,l=o.value,f=o.showError,d=o.error,p=n.id,h=n.onBlur,m=n.onChange,b=n.multiple,v=n.label,_=n.options,S=n.children,E=g(n,Me);return r(y.a.createElement(y.a.Fragment,null,v?y.a.createElement("label",{htmlFor:p}," ",v," "):null,y.a.createElement("select",c({},E,{id:p,multiple:b,ref:a,value:l||(b?[]:""),"aria-invalid":!!f,"aria-describedby":"".concat(p,"-error"),onChange:function(e){var t=Array.from(a.current).filter((function(e){return e.selected})).map((function(e){return e.value}));s(b?t:t[0]||""),m&&e&&m(e)},onBlur:function(e){u(!0),h&&h(e)}}),_?_.map((function(e){return y.a.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label)})):S),f?y.a.createElement("small",{role:"alert",id:"".concat(p,"-error")},d):null))},Ne=["onBlur","onChange","id","label"],Pe=function(e){var t=je(e),r=t.render,n=t.userProps,o=t.fieldState,i=t.fieldApi,a=i.setValue,s=i.setTouched,u=o.value,l=o.error,f=o.showError,d=n.onBlur,p=n.onChange,h=n.id,m=n.label,b=g(n,Ne);return r(y.a.createElement(y.a.Fragment,null,m?y.a.createElement("label",{htmlFor:h},m):null,y.a.createElement("input",c({},b,{id:h,checked:!!u,"aria-invalid":!!f,"aria-describedby":"".concat(h,"-error"),onChange:function(e){a(e.target.checked),p&&p(e)},onBlur:function(e){s(!0),d&&d(e)},type:"checkbox"})),f?y.a.createElement("small",{role:"alert",id:"".concat(h,"-error")},l):null))};var De=["label","value","onChange","onBlur"],Le=function(e){var t=e.label,r=e.value,n=e.onChange,o=e.onBlur,i=g(e,De),a=Object(m.useContext)(C),s=a.radioGroupApi,u=a.radioGroupState,l=a.onChange,f=a.onBlur,d=s.setValue,p=s.setTouched,h=u.value,b=u.showError;return y.a.createElement("label",null,t,y.a.createElement("input",c({},i,{"aria-invalid":!!b,value:r,checked:h===r,onChange:function(e){e.target.checked&&(d(r),n&&n(e),l&&l(e))},onBlur:function(e){p(!0),o&&o(e),f&&f(e)},type:"radio"})))};var Ue=function(e){var t=e.components,r=x().fieldMap;return t?t.map((function(e,t){var n=e["ui:control"],o=e["ui:props"],i=r[n];return y.a.createElement(i,c({key:"ui-comp-".concat(t)},o))})):null},Fe=["name","schema"],Be=Object(M.a)("informed:FormField\t"),Ve=function(e){var t,r,n=e.name,i=e.schema,a=g(e,Fe),s=x(),u=s.fieldMap,l=s.getOptions,d=s.emitter,p=ce(n),h=l(),b=f(Object(m.useState)({}),2),v=b[0],_=b[1],S=i?n:p,E=null!==i&&void 0!==i?i:h.schema,w=ee(S),T=V.get(E,w);if(!T&&(E.allOf&&E.allOf.forEach((function(e){e.if&&(T=V.get(e.then,w),r=e.if)})),!T))return null;var O=Object(m.useMemo)((function(){return te(n,T)}),[n]),A=O.props,C=O.type,j=O.properties,R=O.items,k=O.componentType,M=O.uiBefore,I=O.uiAfter;Object(m.useEffect)((function(){var e=function(e,t){e===n&&(Be("Updating field props for ".concat(e),te(n,t)),_(te(n,t)))},t=function(e){e===n&&_({})};return d.on("update-combine",e),d.on("update-remove",t),function(){d.removeListener("update-combine",e),d.removeListener("update-remove",t)}}),[n]);var N=Object(m.useMemo)((function(){var e=v.props,t=$(A),r=$(e),i=o(o(o({},t),r),a);return Be("Schema Props for ".concat(n),t),Be("Cond Props for ".concat(n),r),Be("New Props for ".concat(n),i),i}),[v]),P=null!==(t=u[k])&&void 0!==t?t:h.components?h.components[k]:null;if(A.options&&u.withOptions&&!R&&(P=u.withOptions[k]||P),Be("Rendering Field",n,O),!P&&"object"===C&&j)return y.a.createElement(Te,{scope:n},y.a.createElement(Ye,{schema:O}));if(P&&"object"===C&&j)return y.a.createElement(Te,{scope:n},y.a.createElement(P,N,y.a.createElement(Ye,{schema:O})));if(!P&&"array"===C&&R)return y.a.createElement(ArrayField,c({name:n,items:R,uiBefore:M,uiAfter:I},N));if(P&&"array"===k&&R&&"array"===C)return y.a.createElement(P,c({name:n,items:R,uiBefore:M,uiAfter:I},N));if(!P)return null;if(r){var D=r.properties,L=function(e){var t=e.formApi,r=e.scope;return Object.entries(D).every((function(e){var n=f(e,2),o=n[0];return re(n[1],t.getValue(r?"".concat(r,".").concat(o):o))}))},U=function(){return y.a.createElement(ue,{when:L},y.a.createElement(P,c({name:n},N)))};return y.a.createElement(U,null)}return y.a.createElement(P,c({name:n},N))},We=Object(M.a)("informed:FormField\t"),He=function(e){var t=e.schema,r=x();return Object(m.useEffect)((function(){return Object.entries(t).forEach((function(e){var t=f(e,2),n=t[0],o=t[1];We("update-combine ".concat(n),o),r.emitter.emit("update-combine",n,o)})),function(){Object.entries(t).forEach((function(e){var t=f(e,1)[0];We("update-remove ".concat(t)),r.emitter.emit("update-remove",t)}))}}),[]),null},Ye=function e(t){var r=t.schema,n=t.onlyValidateSchema,i=(0,x().getOptions)().components;return Object(m.useMemo)((function(){var t=function(e,t){if(!e||t)return{properties:[],conditions:[],components:[]};var r=e.properties,n=void 0===r?{}:r,i=e.allOf,a=e.propertyOrder,s=void 0===a?[]:a;if(Object.keys(n).length>0){var u=Object.keys(n).sort((function(e,t){var r=s.indexOf(e),n=s.indexOf(t);return(r>-1?r:s.length+1)-(n>-1?n:s.length+1)})).map((function(e){return e})),l=[],c=[];return i&&i.forEach((function(e){if(e.if){var t=o({},e);t.then={properties:{}},t.thenProps={},Object.keys(e.then.properties).forEach((function(r){u.includes(r)?t.thenProps[r]=e.then.properties[r]:t.then.properties[r]=e.then.properties[r]})),l.push(t)}else c.push(e)})),{properties:u,conditions:l,components:c}}return{properties:[],conditions:[],components:[]}}(r,n),a=t.properties,s=t.conditions,u=t.components,l=a.map((function(e,t){if(e.includes("ui:")&&3!==e.split(":").length)return{$id:e.split("ui:")[1]};var n=!(!r.required||!r.required.includes(e))||void 0;return{Component:y.a.createElement(Ve,{name:e,schema:r,key:"schema-field-".concat(e,"-").concat(t),required:n})}})),c=u.map((function(t){if(t["ui:control"]){var r=i[t["ui:control"]];return{Component:y.a.createElement(r,null,y.a.createElement(e,{schema:t})),$id:t.$id}}})),g=s.map((function(t,r){var n=t.then,o=t.$id,i=t.thenProps,a=t.if.properties;return{Component:y.a.createElement(ue,{key:"Conditional-ScheamField-".concat(r),when:function(e){var t=e.formApi,r=e.scope;return Object.entries(a).every((function(e){var n=f(e,2),o=n[0];return re(n[1],t.getValue(r?"".concat(r,".").concat(o):o))}))}},n?y.a.createElement(e,{schema:n}):null,i?y.a.createElement(He,{schema:i}):null),$id:o}})),d=[];return l.forEach((function(e){var t=e.$id,r=e.Component;if(r)d.push(r);else{if(!t)throw new Error("Found property with no ID or component...");var n=g.find((function(e){return e.$id===t})),o=c.find((function(e){return e.$id===t}));if(n){d.push(n.Component);var i=g.findIndex((function(e){return e.$id===t}));g.splice(i,1)}else{if(!o)throw console.log("MappedConditionals",g),new Error("Unable to find mapping for ".concat(t));d.push(o.Component)}}})),g.forEach((function(e){var t=e.Component;d.push(t)})),d}),[r])},ze=["name","items","uiBefore","uiAfter"],Ge={string:xe,number:xe,boolean:Pe,select:Ie,input:xe,textarea:ke,checkbox:Pe,radio:function(e){var t=je(e),r=t.fieldApi,n=t.fieldState,i=t.userProps,a=o({radioGroupApi:r,radioGroupState:n},e),s=i.label,u=i.id,l=i.options,c=i.children,g=n.showError,f=n.error;return y.a.createElement(C.Provider,{value:a},y.a.createElement("fieldset",{"aria-describedby":"".concat(u,"-error")},s?y.a.createElement("legend",null,s):null,l?l.map((function(e){return y.a.createElement("label",{key:e.value},e.label," ",y.a.createElement(Le,{value:e.value}))})):c,g?y.a.createElement("small",{role:"alert",id:"".concat(u,"-error")},f):null))},add:function(e){var t=e.text,r=Object(m.useContext)(w).add;return y.a.createElement("button",{onClick:function(){r()},type:"button"},t||"Add")},remove:function(e){var t=e.text,r=Object(m.useContext)(T).remove;return y.a.createElement("button",{onClick:function(){r()},type:"button"},t||"Remove")},array:function(e){var t=e.name,r=e.items,n=e.uiBefore,o=e.uiAfter,i=g(e,ze);return y.a.createElement(Se,c({name:t},i),y.a.createElement(Ue,{components:n}),y.a.createElement(Se.Items,null,(function(){return y.a.createElement(y.a.Fragment,null,y.a.createElement(Ye,{schema:r}))})),y.a.createElement(Ue,{components:o}))},withOptions:{string:Ie}},$e=Object(M.a)("informed:FormController\t"),Ke=function(e,t){var r=t.formatter,n=t.parser,o=t.initialize;if(null!=e)return o&&!n?o(e):r&&!n?Q(e,r).value:e},qe=function(e,t){var r=t.formatter,n=t.initialize;return n?n(e):r?Q(e,r).value:e},Xe=function(){function e(t){a(this,e),this.options=t,this.subscriptions=new Map;var r=t.current,n=r.ajv,o=r.schema,i=r.fieldMap,s=r.adapter;this.ajv=n?new n({allErrors:!0}):null,this.ajvValidate=n?this.ajv.compile(o):null,this.fieldMap=s||i||Ge,this.emitter=this,this.fieldsMap=new Map,this.validationRequests=new Map,this.dataRequests=new Map,this.removalLocked=void 0,this.state={pristine:!0,dirty:!1,submitted:!1,invalid:!1,valid:!0,submitting:!1,validating:0,gathering:0,values:{},errors:{},touched:{},maskedValues:{},dirt:{},focused:{},data:{},initialValues:this.options.current.initialValues||{}},this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.setTheseValues=this.setTheseValues.bind(this),this.getMaskedValue=this.getMaskedValue.bind(this),this.setMaskedValue=this.setMaskedValue.bind(this),this.getTouched=this.getTouched.bind(this),this.setTouched=this.setTouched.bind(this),this.getFocused=this.getFocused.bind(this),this.setFocused=this.setFocused.bind(this),this.getError=this.getError.bind(this),this.setError=this.setError.bind(this),this.reset=this.reset.bind(this),this.validate=this.validate.bind(this),this.asyncValidate=this.asyncValidate.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.getFormState=this.getFormState.bind(this),this.getFormApi=this.getFormApi.bind(this),this.getFieldState=this.getFieldState.bind(this),this.getValid=this.getValid.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.remove=this.remove.bind(this),this.swap=this.swap.bind(this),this.register=this.register.bind(this),this.deregister=this.deregister.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.initialize=this.initialize.bind(this),this.reformat=this.reformat.bind(this),this.lockRemoval=this.lockRemoval.bind(this),this.unlockRemoval=this.unlockRemoval.bind(this),this.resetField=this.resetField.bind(this),this.getRemovalLocked=this.getRemovalLocked.bind(this),this.isRemovalLocked=this.isRemovalLocked.bind(this),this.submitForm=this.submitForm.bind(this),this.touchAllFields=this.touchAllFields.bind(this),this.keyDown=this.keyDown.bind(this),this.validateAsync=this.validateAsync.bind(this),this.gatherData=this.gatherData.bind(this),this.validated=this.validated.bind(this),this.debouncedValidateAsync=z(this.validateAsync),this.debouncedGatherInfo=z(this.gatherData),this.getOptions=this.getOptions.bind(this),this.validateField=this.validateField.bind(this),this.getErrorMessage=this.getErrorMessage.bind(this),this.clearValue=this.clearValue.bind(this),this.getData=this.getData.bind(this)}return u(e,[{key:"getOptions",value:function(){return this.options.current}},{key:"getValue",value:function(e){return V.get(this.state.values,e)}},{key:"getMaskedValue",value:function(e){return V.get(this.state.maskedValues,e)}},{key:"setMaskedValue",value:function(e,t){return V.set(this.state.maskedValues,e,t)}},{key:"setValues",value:function(e){this.fieldsMap.forEach((function(t){var r=V.get(e,t.current.name);t.current.fieldApi.setValue(r)}))}},{key:"setTheseValues",value:function(e){this.fieldsMap.forEach((function(t){var r=V.get(e,t.current.name);null!=r&&t.current.fieldApi.setValue(r)}))}},{key:"setValue",value:function(e,t,r,n){var o;$e("setValue ".concat(e),t);var a=(null===(o=this.fieldsMap.get(e))||void 0===o?void 0:o.current)||{};try{r&&r.target&&r.target.selectionStart&&a.setCursor(r.target.selectionStart,n)}catch(r){if(!(r instanceof TypeError))throw r}if(""===t)a.allowEmptyString?($e("Setting ".concat(e,"'s value to '' because allowEmptyString is set")),V.set(this.state.values,e,t),V.set(this.state.maskedValues,e,t)):($e("Setting ".concat(e,"'s value to undefiend")),V.set(this.state.values,e,void 0),V.set(this.state.maskedValues,e,void 0));else if("number"===(null===a||void 0===a?void 0:a.type)&&void 0!==t)$e("Setting ".concat(e,"'s value to ").concat(+t)),V.set(this.state.values,e,+t),V.set(this.state.maskedValues,e,+t);else{var s=t,u=t;if(a.formatter){var l=Q(s,a.formatter,this.getMaskedValue(e));a.setCursorOffset(l.offset,n),s=u=l.value}a.parser&&(s=null!=s?function(e,t){if("object"===i(t)&&!Array.isArray(t)){var r={};return Object.keys(e).forEach((function(n){if(t[n]){var o=t[n](e[n]);r[n]=o}else r[n]=e[n]})),r}return t(e)}(s,a.parser):s),$e("Setting ".concat(e,"'s value to"),s),V.set(this.state.values,e,s),$e("Setting ".concat(e,"'s maskedValue to"),u),V.set(this.state.maskedValues,e,u)}if(a.validate&&a.validateOn.includes("change")){var c=V.get(this.state.values,e);$e("Validating after change ".concat(e," ").concat(c)),V.set(this.state.errors,e,a.validate(c,this.state.values))}if(a.yupSchema&&a.validateOn.includes("change")&&void 0===this.getError(e)){var g=V.get(this.state.values,e);$e("Validating YUP after change ".concat(e," ").concat(g)),V.set(this.state.errors,e,q(a.yupSchema,g))}if(a.asyncValidate&&"change"===a.validateOn&&void 0===this.getError(e)&&this.debouncedValidateAsync(e),this.state.pristine=!1,this.state.dirty=!this.state.pristine,V.set(this.state.dirt,e,!0),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,a.onChange){var f=this.getFieldState(e);a.onChange(f,r)}a.gatherData&&this.debouncedGatherInfo(e),this.emit("field",e),this.emit("field-value",e),this.emit("field-modified",e)}},{key:"validateField",value:function(e){var t,r=null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current;if(r.validate){var n=V.get(this.state.values,e);$e("Validating field ".concat(e," via validateField with value ").concat(n)),V.set(this.state.errors,e,r.validate(n,this.state.values))}if(r.yupSchema&&void 0===this.getError(e)){var o=V.get(this.state.values,e);$e("Validating YUP field via validateField ".concat(e," ").concat(o)),V.set(this.state.errors,e,q(r.yupSchema,o))}this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field",e)}},{key:"getFocused",value:function(e){return V.get(this.state.focused,e)}},{key:"setFocused",value:function(e,t,r){var n;$e("Setting ".concat(e,"'s focused to ").concat(t));var o=(null===(n=this.fieldsMap.get(e))||void 0===n?void 0:n.current)||{};if(V.set(this.state.focused,e,t),o.onFocus){var i=this.getFieldState(e);o.onFocus(i,r)}this.emit("field",e)}},{key:"getTouched",value:function(e){return V.get(this.state.touched,e)}},{key:"setTouched",value:function(e,t,r){var n;$e("Setting ".concat(e,"'s touched to ").concat(t));var o=(null===(n=this.fieldsMap.get(e))||void 0===n?void 0:n.current)||{};if(V.set(this.state.touched,e,t),o.validate&&(o.validateOn.includes("blur")||o.validateOn.includes("change"))){var i=V.get(this.state.values,e);$e("Validating after blur ".concat(e," ").concat(i)),V.set(this.state.errors,e,o.validate(i,this.state.values))}if(!o.asyncValidate||"blur"!==o.validateOn&&"change-blur"!==o.validateOn&&"change"!==o.validateOn||void 0===this.getError(e)&&this.validateAsync(e),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,o.onBlur){var a=this.getFieldState(e);o.onBlur(a,r)}this.emit("field",e)}},{key:"getData",value:function(e){return V.get(this.state.data,e)}},{key:"getError",value:function(e){return V.get(this.state.errors,e)}},{key:"setError",value:function(e,t){$e("Setting ".concat(e,"'s error to ").concat(t)),V.set(this.state.errors,e,t),this.emit("field",e)}},{key:"getInitialValue",value:function(e){return V.get(this.state.initialValues,e)}},{key:"getDirty",value:function(e){return!!V.get(this.state.dirt,e)}},{key:"getPristine",value:function(e){return!this.getDirty(e)}},{key:"getValid",value:function(e){return void 0===V.get(this.state.errors,e)}},{key:"getFormState",value:function(){return this.state}},{key:"clearValue",value:function(e){this.setValue(e,void 0)}},{key:"getFormApi",value:function(){return{getValue:this.getValue,setValue:this.setValue,getMaskedValue:this.getMaskedValue,setMaskedValue:this.setMaskedValue,getTouched:this.getTouched,setTouched:this.setTouched,getError:this.getError,setError:this.setError,getFocused:this.getFocused,setFocused:this.setFocused,getData:this.getData,resetField:this.resetField,reset:this.reset,getFormState:this.getFormState,getPristine:this.getPristine,getDirty:this.getDirty,validateField:this.validateField,getFieldState:this.getFieldState,getInitialValue:this.getInitialValue,touchAllFields:this.touchAllFields,validate:this.validate,asyncValidate:this.asyncValidate,setValues:this.setValues,setTheseValues:this.setTheseValues,submitForm:this.submitForm,clearValue:this.clearValue}}},{key:"getFieldState",value:function(e){var t,r=(null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current)||{},n=this.getError(e),o=!!this.getFocused(e),i=this.getDirty(e),a=this.getValid(e),s=!!this.getTouched(e),u=!i,l=!!this.validationRequests.get(e),c=!!this.dataRequests.get(e),g=!1;return r&&r.showErrorIfError?g=void 0!==n:r&&r.showErrorIfDirty?g=void 0!==n&&i:r&&r.showErrorIfTouched&&(g=void 0!==n&&s),{value:this.getValue(e),maskedValue:this.getMaskedValue(e),touched:s,error:this.getError(e),data:this.getData(e),pristine:u,dirty:i,valid:a,invalid:!a,showError:g,validating:l,gathering:c,focused:o}}},{key:"remove",value:function(e){$e("Remove",e),this.removalLocked?$e("Removal locked so NOT removing",e):($e("Delete Value",e),V.delete(this.state.values,e),$e("Delete Masked",e),V.delete(this.state.maskedValues,e),$e("Delete Touched",e),V.delete(this.state.touched,e),$e("Delete Errors",e),V.delete(this.state.errors,e),$e("Delete Dirt",e),V.delete(this.state.dirt,e),$e("Delete Focused",e),V.delete(this.state.focused,e),$e("Delete Info",e),V.delete(this.state.data,e),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field",e),this.emit("field-value",e),this.emit("field-modified",e))}},{key:"swap",value:function(e,t,r){$e("Swap",e,t,r),V.swap(this.state.values,e,t,r),V.swap(this.state.maskedValues,e,t,r),V.swap(this.state.touched,e,t,r),V.swap(this.state.errors,e,t,r),V.swap(this.state.dirt,e,t,r),V.swap(this.state.focused,e,t,r),V.swap(this.state.data,e,t,r),this.state.pristine=!1,this.state.dirty=!this.state.pristine}},{key:"pullOut",value:function(e){$e("Pull",e),V.delete(this.state.values,e),V.delete(this.state.maskedValues,e),V.delete(this.state.touched,e),V.delete(this.state.errors,e),V.delete(this.state.dirt,e),V.delete(this.state.focused,e),V.delete(this.state.data,e),this.state.pristine=!1,this.state.dirty=!this.state.pristine}},{key:"register",value:function(e,t){$e("Register",e,t),this.fieldsMap.get(e)||(this.fieldsMap.set(e,t),this.emit("field",e))}},{key:"deregister",value:function(e){$e("De-Register",e),this.fieldsMap.get(e)&&(this.fieldsMap.delete(e),this.emit("field",e))}},{key:"initialize",value:function(e,t){if($e("Initialize",e,this.state),!this.getValue(e)&&null!=t.current.initialValue&&(!t.current.initializeValueIfPristine||this.state.pristine)){var r=t.current,n=r.formatter,o=r.parser,i=r.initialize,a=Ke(t.current.initialValue,{formatter:n,parser:o,initialize:i}),s=qe(t.current.initialValue,{formatter:n,initialize:i});$e("Initializing ".concat(e,"'s value to ").concat(a)),V.set(this.state.values,e,a),$e("Initializing ".concat(e,"'s maskedValue to ").concat(s)),V.set(this.state.maskedValues,e,s)}if(t.current.validate&&t.current.validateOnMount){var u=V.get(this.state.values,e);$e("Validating on mount ".concat(e," ").concat(u),this.state),V.set(this.state.errors,e,t.current.validate(u,this.state.values))}t.current.asyncValidate&&!0===t.current.validateOnMount&&void 0===this.getError(e)&&this.validateAsync(e),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field",e),this.emit("field-value",e)}},{key:"validated",value:function(e,t){if($e("Setting ".concat(e,"'s error to ").concat(t," with ").concat(this.state.validating," validations left")),V.set(this.state.errors,e,t),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.validationRequests.delete(e),this.state.validating>0)return $e("Still validating ".concat(this.state.validating," others so just update state.")),void this.emit("field",e);this.state.submitting&&(this.valid()?($e("Submit",this.state),this.emit("field",e),this.emit("submit")):($e("Submit",this.state),this.emit("field",e),this.emit("failure")),this.state.submitting=!1),this.done&&(this.valid()&&this.done(),this.done=void 0),this.emit("field",e)}},{key:"gathered",value:function(e,t){$e("Setting ".concat(e,"'s data to ").concat(t," with ").concat(this.state.gathering," gatherers left")),V.set(this.state.data,e,t),this.dataRequests.delete(e),this.emit("field",e)}},{key:"validateAsync",value:function(e){var t,r=this;$e("VALIDATING ASYNC",e);var n=null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current,o=this.getValue(e);if(n&&n.asyncValidate){this.state.validating=this.state.validating+1;var i=Y();$e("REQUEST",i),this.validationRequests.set(e,{uuid:i,value:o}),this.emit("field",e),n.asyncValidate(o,this.state.values).then((function(t){r.state.validating=r.state.validating-1;var n=r.validationRequests.get(e).uuid!==i,a=r.validationRequests.get(e).value!==r.getValue(e);n||a?$e("".concat(n?"STALE":"INVALID"," THEN"),i,o,r.getValue(e)):($e("FINISH",i),r.validated(e,t))})).catch((function(t){r.state.validating=r.state.validating-1;var n=r.validationRequests.get(e).uuid!==i,a=r.validationRequests.get(e).value!==r.getValue(e);n||a?$e("".concat(n?"STALE":"INVALID"," THEN"),i,o,r.getValue(e)):($e("FINISH",i),r.validated(e,t.message))}))}}},{key:"gatherData",value:function(e){var t,r=this;$e("EXECUTING INFO ASYNC",e);var n=null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current,o=this.getValue(e);if(n&&n.gatherData){this.state.gathering=this.state.gathering+1;var i=Y();$e("DATA REQUEST",i),this.dataRequests.set(e,{uuid:i,value:o}),this.emit("field",e),n.gatherData(o,this.state).then((function(t){r.state.gathering=r.state.gathering-1;var n=r.dataRequests.get(e).uuid!==i,a=r.dataRequests.get(e).value!==r.getValue(e);n||a?$e("".concat(n?"STALE":"INVALID"," THEN"),i,o,r.getValue(e)):($e("DATA FINISH",i),r.gathered(e,t))})).catch((function(t){r.state.gathering=r.state.gathering-1;var n=r.dataRequests.get(e).uuid!==i,a=r.dataRequests.get(e).value!==r.getValue(e);n||a?$e("".concat(n?"STALE":"INVALID"," THEN"),i,o,r.getValue(e)):($e("DATA FINISH",i),r.gathered(e,t.message))}))}}},{key:"reset",value:function(){this.state={pristine:!0,dirty:!1,submitted:!1,invalid:!1,valid:!0,submitting:!1,validating:0,gathering:0,values:{},errors:{},touched:{},maskedValues:{},dirt:{},focused:{},data:{},initialValues:this.options.current.initialValues||{}},this.fieldsMap.forEach((function(e){e.current.fieldApi.reset()})),this.emit("reset")}},{key:"resetField",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$e("Resetting",e);var n=(null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current)||{},o=n.formatter,i=n.parser,a=n.initialize,s=r.value,u=r.resetError,l=void 0===u||u,c=r.resetTouched,g=void 0===c||c,f=r.resetDirt,d=void 0===f||f;if(s){var p=Ke(s,{formatter:o,parser:i,initialize:a});$e("Resetting ".concat(e,"'s value to ").concat(p)),V.set(this.state.values,e,p);var h=qe(s,{formatter:o,parser:i});$e("Resetting ".concat(e,"'s maskedValue to ").concat(h)),V.set(this.state.maskedValues,e,h)}else{var m=Ke(n.getInitialValue&&n.getInitialValue(),{formatter:o,parser:i,initialize:a}),y=qe(n.getInitialValue&&n.getInitialValue(),{formatter:o,initialize:a});$e("Resetting ".concat(e,"'s value to ").concat(m)),V.set(this.state.values,e,m),$e("Resetting ".concat(e,"'s maskedValue to ").concat(y)),V.set(this.state.maskedValues,e,y)}l&&($e("Resetting ".concat(e,"'s error")),V.delete(this.state.errors,e)),g&&($e("Resetting ".concat(e,"'s touched")),V.delete(this.state.touched,e)),d&&($e("Resetting ".concat(e,"'s dirt")),V.delete(this.state.dirt,e)),this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field",e),this.emit("field-value",e),this.emit("field-modified",e)}},{key:"reformat",value:function(e){var t;$e("Reformatting",e);var r=null===(t=this.fieldsMap.get(e))||void 0===t?void 0:t.current,n=V.get(this.state.values,e),o=r.formatter,i=r.parser,a=r.initialize,s=Ke(n,{formatter:o,parser:i,initialize:a}),u=qe(n,{formatter:o});$e("Reformatting ".concat(e,"'s value to ").concat(s)),V.set(this.state.values,e,s),$e("Reformatting ".concat(e,"'s maskedValue to ").concat(u)),V.set(this.state.maskedValues,e,u),this.emit("field",e),this.emit("field-value",e),this.emit("field-modified",e)}},{key:"lockRemoval",value:function(e){$e("LOCKREMOVAL",e),this.removalLocked=e}},{key:"unlockRemoval",value:function(){$e("UNLOCK REMOVAL"),this.removalLocked=void 0}},{key:"getRemovalLocked",value:function(){return this.removalLocked}},{key:"isRemovalLocked",value:function(){return null!=this.removalLocked}},{key:"valid",value:function(){var e=this.state.errors;return!!V.empty(e)}},{key:"keyDown",value:function(e){if(13==e.keyCode&&this.options.current.preventEnter)return e.preventDefault(e),!1}},{key:"validate",value:function(){var e=this;$e("Validating all fields");var t=this.state.values,r={};if(this.options.current.yupSchema){var n=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(r){return K(r)}}(this.options.current.yupSchema,t);r=o(o({},r),n)}if(this.options.current.schema&&this.options.current.ajv){var i=function(e,t){e(t);var r={};return e.errors&&e.errors.forEach((function(e){var t=e.message,n=e.dataPath,o=e.keyword,i=e.params,a=n;"required"===o&&(a="".concat(a,".").concat(i.missingProperty)),a=a.replace(".",""),V.set(r,a,t)})),r}(this.ajvValidate,t);r=o(o({},r),i)}if(this.options.current.validateFields){var a=this.options.current.validateFields(t);r=o(o({},r),a),r=V.purge(r)}this.fieldsMap.forEach((function(n){var o=n.current,i=e.getValue(o.name),a=o.validate?o.validate(i,t):void 0;null!=a&&V.set(r,o.name,a)})),this.state.errors=r,this.state.valid=V.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field","_ALL_")}},{key:"asyncValidate",value:function(e){var t=this;$e("Async Validating all fields"),this.done=e,this.fieldsMap.forEach((function(e){var r=e.current.name;void 0===t.getError(r)&&t.validateAsync(r)}))}},{key:"getErrorMessage",value:function(e,t){var r;$e("Getting ".concat(e," error message for ").concat(t," Validating all fields"));var n=t;if(this.options.current.schema){for($e("We have schema so looking in there for error message");""!==n;){$e("Looking for message at ".concat(n));var o=ee(n),i=V.get(this.options.current.schema,o);if(i.errorMessage){var a="string"===typeof i.errorMessage?i.errorMessage:i.errorMessage[e];if(a)return a}$e("Did not find message in schema for ".concat(o),i),n=n.substring(0,n.lastIndexOf("."))}var s=this.options.current.schema;if(s.errorMessage){var u="string"===typeof s.errorMessage?s.errorMessage:s.errorMessage[e];if(u)return u}}var l=null===(r=this.fieldsMap.get(n))||void 0===r?void 0:r.current;if(l&&l.errorMessage){var c="string"===typeof l.errorMessage?l.errorMessage:l.errorMessage[e];if(c)return c}if(this.options.current.errorMessage){var g="string"===typeof this.options.current.errorMessage?this.options.current.errorMessage:this.options.current.errorMessage[e];if(g)return g}}},{key:"touchAllFields",value:function(){var e=this;this.fieldsMap.forEach((function(t){t.current.arrayField||($e("TouchAllFields - setting ".concat(t.current.name,"'s touched to true")),V.set(e.state.touched,t.current.name,!0))}))}},{key:"submitForm",value:function(e){this.state.submitting=!0,!this.options.current.dontPreventDefault&&e&&e.preventDefault(e),this.validate(),this.touchAllFields(),this.emit("field","_ALL_"),this.asyncValidate(),this.valid()&&0===this.state.validating?($e("Submit",this.state),this.state.submitted=!0,this.emit("submit")):($e("Fail",this.state),this.emit("failure")),0===this.state.validating&&(this.state.submitting=!1),this.emit("field")}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)a(e,t)&&r.push(t);return r};var k=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,M=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},N={};function P(e,t,r,n){var o=n;"string"===typeof n&&(o=function(){return this[n]()}),e&&(N[e]=o),t&&(N[t[0]]=function(){return x(o.apply(this,arguments),t[1],t[2])}),r&&(N[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function D(e,t){return e.isValid()?(t=L(t,e.localeData()),I[t]=I[t]||function(e){var t,r,n,o=e.match(k);for(t=0,r=o.length;t=0&&M.test(e);)e=e.replace(M,n),M.lastIndex=0,r-=1;return e}var U={};function F(e,t){var r=e.toLowerCase();U[r]=U[r+"s"]=U[t]=e}function B(e){return"string"===typeof e?U[e]||U[e.toLowerCase()]:void 0}function V(e){var t,r,n={};for(r in e)a(e,r)&&(t=B(r))&&(n[t]=e[r]);return n}var W={};function H(e,t){W[e]=t}function Y(e){return e%4===0&&e%100!==0||e%400===0}function z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=z(t)),r}function $(e,t){return function(r){return null!=r?(q(this,e,r),n.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&Y(e.year())&&1===e.month()&&29===e.date()?(r=G(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Se(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}var X,Z=/\d/,Q=/\d\d/,J=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,re=/\d\d?/,ne=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,ae=/\d{1,4}/,se=/[+-]?\d{1,6}/,ue=/\d+/,le=/[+-]?\d+/,ce=/Z|[+-]\d\d:?\d\d/gi,ge=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function de(e,t,r){X[e]=C(t)?t:function(e,n){return e&&r?r:t}}function pe(e,t){return a(X,e)?X[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,o){return t||r||n||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var me,ye={};function be(e,t){var r,n=t;for("string"===typeof e&&(e=[e]),l(t)&&(n=function(e,r){r[t]=G(e)}),r=0;r68?1900:2e3)};var Me=$("FullYear",!0);function Ie(e,t,r,n,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,o,i,a),s}function Ne(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Pe(e,t,r){var n=7+t-r;return-(7+Ne(e,0,n).getUTCDay()-t)%7+n-1}function De(e,t,r,n,o){var i,a,s=1+7*(t-1)+(7+r-n)%7+Pe(e,n,o);return s<=0?a=ke(i=e-1)+s:s>ke(e)?(i=e+1,a=s-ke(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Le(e,t,r){var n,o,i=Pe(e.year(),t,r),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?n=a+Ue(o=e.year()-1,t,r):a>Ue(e.year(),t,r)?(n=a-Ue(e.year(),t,r),o=e.year()+1):(o=e.year(),n=a),{week:n,year:o}}function Ue(e,t,r){var n=Pe(e,t,r),o=Pe(e+1,t,r);return(ke(e)-n+o)/7}function Fe(e,t){return e.slice(t,7).concat(e.slice(0,t))}P("w",["ww",2],"wo","week"),P("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),H("week",5),H("isoWeek",5),de("w",re),de("ww",re,Q),de("W",re),de("WW",re,Q),ve(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=G(e)})),P("d",0,"do","day"),P("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),P("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),P("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),P("e",0,0,"weekday"),P("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),de("d",re),de("e",re),de("E",re),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);null!=o?t.d=o:p(r).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,r,n){t[n]=G(e)}));var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),He=fe,Ye=fe,ze=fe;function Ge(e,t,r){var n,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=d([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(o=me.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=me.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=me.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=me.call(this._weekdaysParse,a))||-1!==(o=me.call(this._shortWeekdaysParse,a))||-1!==(o=me.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=me.call(this._shortWeekdaysParse,a))||-1!==(o=me.call(this._weekdaysParse,a))||-1!==(o=me.call(this._minWeekdaysParse,a))?o:null:-1!==(o=me.call(this._minWeekdaysParse,a))||-1!==(o=me.call(this._weekdaysParse,a))||-1!==(o=me.call(this._shortWeekdaysParse,a))?o:null}function $e(){function e(e,t){return t.length-e.length}var t,r,n,o,i,a=[],s=[],u=[],l=[];for(t=0;t<7;t++)r=d([2e3,1]).day(t),n=he(this.weekdaysMin(r,"")),o=he(this.weekdaysShort(r,"")),i=he(this.weekdays(r,"")),a.push(n),s.push(o),u.push(i),l.push(n),l.push(o),l.push(i);a.sort(e),s.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function qe(e,t){P(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}P("H",["HH",2],0,"hour"),P("h",["hh",2],0,Ke),P("k",["kk",2],0,(function(){return this.hours()||24})),P("hmm",0,0,(function(){return""+Ke.apply(this)+x(this.minutes(),2)})),P("hmmss",0,0,(function(){return""+Ke.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)})),P("Hmm",0,0,(function(){return""+this.hours()+x(this.minutes(),2)})),P("Hmmss",0,0,(function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)})),qe("a",!0),qe("A",!1),F("hour","h"),H("hour",13),de("a",Xe),de("A",Xe),de("H",re),de("h",re),de("k",re),de("HH",re,Q),de("hh",re,Q),de("kk",re,Q),de("hmm",ne),de("hmmss",oe),de("Hmm",ne),de("Hmmss",oe),be(["H","HH"],3),be(["k","kk"],(function(e,t,r){var n=G(e);t[3]=24===n?0:n})),be(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),be(["h","hh"],(function(e,t,r){t[3]=G(e),p(r).bigHour=!0})),be("hmm",(function(e,t,r){var n=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n)),p(r).bigHour=!0})),be("hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n,2)),t[5]=G(e.substr(o)),p(r).bigHour=!0})),be("Hmm",(function(e,t,r){var n=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n))})),be("Hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n,2)),t[5]=G(e.substr(o))}));var Ze,Qe=$("Hours",!0),Je={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ee,monthsShort:we,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:We,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function rt(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(n=ot(o.slice(0,t).join("-")))return n;if(r&&r.length>=t&&rt(o,r)>=t-1)break;t--}i++}return Ze}(e)}function ut(e){var t,r=e._a;return r&&-2===p(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>Se(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}var lt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ct=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],dt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((-?\d+)/i,ht=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,r,n,o,i,a,s=e._i,u=lt.exec(s)||ct.exec(s);if(u){for(p(e).iso=!0,t=0,r=ft.length;t7)&&(u=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=Le(Ot(),i,a),r=_t(t.gg,e._a[0],l.year),n=_t(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i),n<1||n>Ue(r,i,a)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=De(r,n,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=_t(e._a[0],o[0]),(e._dayOfYear>ke(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),r=Ne(a,0,e._dayOfYear),e._a[1]=r.getUTCMonth(),e._a[2]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=o[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ne:Ie).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}function Et(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],p(e).empty=!0;var t,r,o,i,a,s,u=""+e._i,l=u.length,c=0;for(o=L(e._f,e._locale).match(k)||[],t=0;t0&&p(e).unusedInput.push(a),u=u.slice(u.indexOf(r)+r.length),c+=r.length),N[i]?(r?p(e).empty=!1:p(e).unusedTokens.push(i),_e(i,r,e)):e._strict&&!r&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-c,u.length>0&&p(e).unusedInput.push(u),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=p(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),St(e),ut(e)}else vt(e);else yt(e)}function wt(e){var t=e._i,r=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===r&&""===t?m({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new _(ut(t)):(c(t)?e._d=t:o(r)?function(e){var t,r,n,o,i,a,s=!1;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:m()}));function jt(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Ot();for(r=t[0],n=1;n=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function nr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function or(e,t){return t.erasAbbrRegex(e)}function ir(){var e,t,r=[],n=[],o=[],i=[],a=this.eras();for(e=0,t=a.length;e(i=Ue(e,n,o))&&(t=i),ur.call(this,e,t,r,n,o))}function ur(e,t,r,n,o){var i=De(e,t,r,n,o),a=Ne(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}P("N",0,0,"eraAbbr"),P("NN",0,0,"eraAbbr"),P("NNN",0,0,"eraAbbr"),P("NNNN",0,0,"eraName"),P("NNNNN",0,0,"eraNarrow"),P("y",["y",1],"yo","eraYear"),P("y",["yy",2],0,"eraYear"),P("y",["yyy",3],0,"eraYear"),P("y",["yyyy",4],0,"eraYear"),de("N",or),de("NN",or),de("NNN",or),de("NNNN",(function(e,t){return t.erasNameRegex(e)})),de("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?p(r).era=o:p(r).invalidEra=e})),de("y",ue),de("yy",ue),de("yyy",ue),de("yyyy",ue),de("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),P(0,["gg",2],0,(function(){return this.weekYear()%100})),P(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ar("gggg","weekYear"),ar("ggggg","weekYear"),ar("GGGG","isoWeekYear"),ar("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),de("G",le),de("g",le),de("GG",re,Q),de("gg",re,Q),de("GGGG",ae,ee),de("gggg",ae,ee),de("GGGGG",se,te),de("ggggg",se,te),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=G(e)})),ve(["gg","GG"],(function(e,t,r,o){t[o]=n.parseTwoDigitYear(e)})),P("Q",0,"Qo","quarter"),F("quarter","Q"),H("quarter",7),de("Q",Z),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),P("D",["DD",2],"Do","date"),F("date","D"),H("date",9),de("D",re),de("DD",re,Q),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=G(e.match(re)[0])}));var lr=$("Date",!0);P("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),H("dayOfYear",4),de("DDD",ie),de("DDDD",J),be(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=G(e)})),P("m",["mm",2],0,"minute"),F("minute","m"),H("minute",14),de("m",re),de("mm",re,Q),be(["m","mm"],4);var cr=$("Minutes",!1);P("s",["ss",2],0,"second"),F("second","s"),H("second",15),de("s",re),de("ss",re,Q),be(["s","ss"],5);var gr,fr,dr=$("Seconds",!1);for(P("S",0,0,(function(){return~~(this.millisecond()/100)})),P(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),P(0,["SSS",3],0,"millisecond"),P(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),P(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),P(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),P(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),P(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),P(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),F("millisecond","ms"),H("millisecond",16),de("S",ie,Z),de("SS",ie,Q),de("SSS",ie,J),gr="SSSS";gr.length<=9;gr+="S")de(gr,ue);function pr(e,t){t[6]=G(1e3*("0."+e))}for(gr="S";gr.length<=9;gr+="S")be(gr,pr);fr=$("Milliseconds",!1),P("z",0,0,"zoneAbbr"),P("zz",0,0,"zoneName");var hr=_.prototype;function mr(e){return e}hr.add=Gt,hr.calendar=function(e,t){1===arguments.length&&(qt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0));var r=e||Ot(),o=Dt(r,this).startOf("day"),i=n.calendarFormat(this,o)||"sameElse",a=t&&(C(t[i])?t[i].call(this,r):t[i]);return this.format(a||this.localeData().calendar(i,this,Ot(r)))},hr.clone=function(){return new _(this)},hr.diff=function(e,t,r){var n,o,i;if(!this.isValid())return NaN;if(!(n=Dt(e,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),t=B(t)){case"year":i=Zt(this,n)/12;break;case"month":i=Zt(this,n);break;case"quarter":i=Zt(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-o)/864e5;break;case"week":i=(this-n-o)/6048e5;break;default:i=this-n}return r?i:z(i)},hr.endOf=function(e){var t,r;if(void 0===(e=B(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?nr:rr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tr(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tr(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tr(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},hr.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=D(this,e);return this.localeData().postformat(t)},hr.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Ot(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hr.fromNow=function(e){return this.from(Ot(),e)},hr.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Ot(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hr.toNow=function(e){return this.to(Ot(),e)},hr.get=function(e){return C(this[e=B(e)])?this[e]():this},hr.invalidAt=function(){return p(this).overflow},hr.isAfter=function(e,t){var r=S(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=B(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()9999?D(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",D(r,"Z")):D(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},hr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",o="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!==typeof Symbol&&null!=Symbol.for&&(hr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),hr.toJSON=function(){return this.isValid()?this.toISOString():null},hr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hr.unix=function(){return Math.floor(this.valueOf()/1e3)},hr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hr.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hr.isLocal=function(){return!!this.isValid()&&!this._isUTC},hr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hr.isUtc=Ut,hr.isUTC=Ut,hr.zoneAbbr=function(){return this._isUTC?"UTC":""},hr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hr.dates=w("dates accessor is deprecated. Use date instead.",lr),hr.months=w("months accessor is deprecated. Use month instead",Re),hr.years=w("years accessor is deprecated. Use year instead",Me),hr.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),hr.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=wt(t))._a?(e=t._isUTC?d(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,r){var n,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var yr=R.prototype;function br(e,t,r,n){var o=st(),i=d().set(n,t);return o[r](i,e)}function vr(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return br(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=br(e,n,r,"month");return o}function _r(e,t,r,n){"boolean"===typeof e?(l(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,l(t)&&(r=t,t=void 0),t=t||"");var o,i=st(),a=e?i._week.dow:0,s=[];if(null!=r)return br(t,(r+a)%7,n,"day");for(o=0;o<7;o++)s[o]=br(t,(o+a)%7,n,"day");return s}yr.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return C(n)?n.call(t,r):n},yr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(k).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},yr.invalidDate=function(){return this._invalidDate},yr.ordinal=function(e){return this._ordinal.replace("%d",e)},yr.preparse=mr,yr.postformat=mr,yr.relativeTime=function(e,t,r,n){var o=this._relativeTime[r];return C(o)?o(e,t,r,n):o.replace(/%d/i,e)},yr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return C(r)?r(t):r.replace(/%s/i,t)},yr.set=function(e){var t,r;for(r in e)a(e,r)&&(C(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},yr.eras=function(e,t){var r,o,i,a=this._eras||st("en")._eras;for(r=0,o=a.length;r=0)return u[n]},yr.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r},yr.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||ir.call(this),e?this._erasAbbrRegex:this._erasRegex},yr.erasNameRegex=function(e){return a(this,"_erasNameRegex")||ir.call(this),e?this._erasNameRegex:this._erasRegex},yr.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||ir.call(this),e?this._erasNarrowRegex:this._erasRegex},yr.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Te).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},yr.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Te.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},yr.monthsParse=function(e,t,r){var n,o,i;if(this._monthsParseExact)return Ce.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=d([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},yr.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||xe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Ae),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},yr.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||xe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},yr.week=function(e){return Le(e,this._week.dow,this._week.doy).week},yr.firstDayOfYear=function(){return this._week.doy},yr.firstDayOfWeek=function(){return this._week.dow},yr.weekdays=function(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Fe(r,this._week.dow):e?r[e.day()]:r},yr.weekdaysMin=function(e){return!0===e?Fe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},yr.weekdaysShort=function(e){return!0===e?Fe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},yr.weekdaysParse=function(e,t,r){var n,o,i;if(this._weekdaysParseExact)return Ge.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=d([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},yr.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=He),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},yr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ye),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},yr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ze),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},yr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},yr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=w("moment.lang is deprecated. Use moment.locale instead.",it),n.langData=w("moment.langData is deprecated. Use moment.localeData instead.",st);var Sr=Math.abs;function Er(e,t,r,n){var o=Vt(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function wr(e){return e<0?Math.floor(e):Math.ceil(e)}function Tr(e){return 4800*e/146097}function Or(e){return 146097*e/4800}function Ar(e){return function(){return this.as(e)}}var Cr=Ar("ms"),jr=Ar("s"),Rr=Ar("m"),xr=Ar("h"),kr=Ar("d"),Mr=Ar("w"),Ir=Ar("M"),Nr=Ar("Q"),Pr=Ar("y");function Dr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Lr=Dr("milliseconds"),Ur=Dr("seconds"),Fr=Dr("minutes"),Br=Dr("hours"),Vr=Dr("days"),Wr=Dr("months"),Hr=Dr("years"),Yr=Math.round,zr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gr(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}var $r=Math.abs;function Kr(e){return(e>0)-(e<0)||+e}function qr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,o,i,a,s,u=$r(this._milliseconds)/1e3,l=$r(this._days),c=$r(this._months),g=this.asSeconds();return g?(e=z(u/60),t=z(e/60),u%=60,e%=60,r=z(c/12),c%=12,n=u?u.toFixed(3).replace(/\.?0+$/,""):"",o=g<0?"-":"",i=Kr(this._months)!==Kr(g)?"-":"",a=Kr(this._days)!==Kr(g)?"-":"",s=Kr(this._milliseconds)!==Kr(g)?"-":"",o+"P"+(r?i+r+"Y":"")+(c?i+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(u?s+n+"S":"")):"P0D"}var Xr=xt.prototype;return Xr.isValid=function(){return this._isValid},Xr.abs=function(){var e=this._data;return this._milliseconds=Sr(this._milliseconds),this._days=Sr(this._days),this._months=Sr(this._months),e.milliseconds=Sr(e.milliseconds),e.seconds=Sr(e.seconds),e.minutes=Sr(e.minutes),e.hours=Sr(e.hours),e.months=Sr(e.months),e.years=Sr(e.years),this},Xr.add=function(e,t){return Er(this,e,t,1)},Xr.subtract=function(e,t){return Er(this,e,t,-1)},Xr.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=B(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Tr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Or(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Xr.asMilliseconds=Cr,Xr.asSeconds=jr,Xr.asMinutes=Rr,Xr.asHours=xr,Xr.asDays=kr,Xr.asWeeks=Mr,Xr.asMonths=Ir,Xr.asQuarters=Nr,Xr.asYears=Pr,Xr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},Xr._bubble=function(){var e,t,r,n,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*wr(Or(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=z(i/1e3),u.seconds=e%60,t=z(e/60),u.minutes=t%60,r=z(t/60),u.hours=r%24,a+=z(r/24),o=z(Tr(a)),s+=o,a-=wr(Or(o)),n=z(s/12),s%=12,u.days=a,u.months=s,u.years=n,this},Xr.clone=function(){return Vt(this)},Xr.get=function(e){return e=B(e),this.isValid()?this[e+"s"]():NaN},Xr.milliseconds=Lr,Xr.seconds=Ur,Xr.minutes=Fr,Xr.hours=Br,Xr.days=Vr,Xr.weeks=function(){return z(this.days()/7)},Xr.months=Wr,Xr.years=Hr,Xr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,o=!1,i=zr;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(o=e),"object"===typeof t&&(i=Object.assign({},zr,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=this.localeData(),n=function(e,t,r,n){var o=Vt(e).abs(),i=Yr(o.as("s")),a=Yr(o.as("m")),s=Yr(o.as("h")),u=Yr(o.as("d")),l=Yr(o.as("M")),c=Yr(o.as("w")),g=Yr(o.as("y")),f=i<=r.ss&&["s",i]||i0,f[4]=n,Gr.apply(null,f)}(this,!o,i,r),o&&(n=r.pastFuture(+this,n)),r.postformat(n)},Xr.toISOString=qr,Xr.toString=qr,Xr.toJSON=qr,Xr.locale=Qt,Xr.localeData=er,Xr.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qr),Xr.lang=Jt,P("X",0,0,"unix"),P("x",0,0,"valueOf"),de("x",le),de("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,r){r._d=new Date(G(e))})),n.version="2.26.0",t=Ot,n.fn=hr,n.min=function(){var e=[].slice.call(arguments,0);return jt("isBefore",e)},n.max=function(){var e=[].slice.call(arguments,0);return jt("isAfter",e)},n.now=function(){return Date.now?Date.now():+new Date},n.utc=d,n.unix=function(e){return Ot(1e3*e)},n.months=function(e,t){return vr(e,t,"months")},n.isDate=c,n.locale=it,n.invalid=m,n.duration=Vt,n.isMoment=S,n.weekdays=function(e,t,r){return _r(e,t,r,"weekdays")},n.parseZone=function(){return Ot.apply(null,arguments).parseZone()},n.localeData=st,n.isDuration=kt,n.monthsShort=function(e,t){return vr(e,t,"monthsShort")},n.weekdaysMin=function(e,t,r){return _r(e,t,r,"weekdaysMin")},n.defineLocale=at,n.updateLocale=function(e,t){if(null!=t){var r,n,o=Je;null!=et[e]&&null!=et[e].parentLocale?et[e].set(j(et[e]._config,t)):(null!=(n=ot(e))&&(o=n._config),t=j(o,t),null==n&&(t.abbr=e),(r=new R(t)).parentLocale=et[e],et[e]=r),it(e)}else null!=et[e]&&(null!=et[e].parentLocale?(et[e]=et[e].parentLocale,e===it()&&it(e)):null!=et[e]&&delete et[e]);return et[e]},n.locales=function(){return T(et)},n.weekdaysShort=function(e,t,r){return _r(e,t,r,"weekdaysShort")},n.normalizeUnits=B,n.relativeTimeRounding=function(e){return void 0===e?Yr:"function"===typeof e&&(Yr=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==zr[e]&&(void 0===t?zr[e]:(zr[e]=t,"s"===e&&(zr.ss=t-1),!0))},n.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},n.prototype=hr,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}).call(this,r(106)(e))},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=function(e,t){return e===t};function o(e,t){var r="object"===typeof t?t:{equalityCheck:t},o=r.equalityCheck,i=void 0===o?n:o,a=r.maxSize,s=void 0===a?1:a,u=r.resultEqualityCheck,l=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return"NOT_FOUND"}return{get:n,put:function(t,o){"NOT_FOUND"===n(t)&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(s,l);function g(){var t=c.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),u){var r=c.getEntries(),n=r.find((function(e){return u(e.value,t)}));n&&(t=n.value)}c.put(arguments,t)}return t}return g.clearCache=function(){return c.clear()},g}function i(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var r=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function a(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(56),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r=0;f--){var d=a[f];"."===d?i(a,f):".."===d?(i(a,f),g++):g&&(i(a,f),g--)}if(!l)for(;g--;g)a.unshift("..");!l||""===a[0]||a[0]&&o(a[0])||a.unshift("");var p=a.join("/");return r&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every((function(t,n){return e(t,r[n])}));if("object"===typeof t||"object"===typeof r){var n=s(t),o=s(r);return n!==t||o!==r?e(n,o):Object.keys(Object.assign({},t,r)).every((function(n){return e(t[n],r[n])}))}return!1},l=r(25);function c(e){return"/"===e.charAt(0)?e:"/"+e}function g(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,r=e.search,n=e.hash,o=t||"/";return r&&"?"!==r&&(o+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(o+="#"===n.charAt(0)?n:"#"+n),o}function h(e,t,r,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",r="",n="",o=t.indexOf("#");-1!==o&&(n=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(r=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n}}(e)).state=t:(void 0===(i=Object(n.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return r&&(i.key=r),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,o){if(null!=e){var i="function"===typeof e?e(t,r):e;"string"===typeof i?"function"===typeof n?n(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;nt?r.splice(t,r.length-t,n):r.push(n),g({action:"PUSH",location:n,index:t,entries:r})}}))},replace:function(e,t){var n=h(e,t,f(),_.location);c.confirmTransitionTo(n,"REPLACE",r,(function(e){e&&(_.entries[_.index]=n,g({action:"REPLACE",location:n}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return _}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return g}));var n=r(26);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function i(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function a(){for(var e=[],t=0;t Promise))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},d=f;function p(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,d(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var h=new Set;function m(){for(var e=[],t=0;t0;)n.splice(r-1,2);return n}function A(e,t){if(t.match(/^.*?\/\//)||t.match(/^data\:/))return t.startsWith("//")?t.includes("..")?""+location.protocol+O(e,t).join("/"):""+location.protocol+t:t;var r=T(e);if(t.startsWith("/"))return T(r.protocol+"//"+r.host+t).href;var n=r.pathname.split("/");return n[n.length-1].match(/\.[a-z]+$/i)&&n.pop(),n=O(e,t),T(r.protocol+"//"+r.host+"/"+n.join("/")).href}function C(){for(var e=[],t=0;t=10){if(u-s1e3)return!0;for(var t=0,r=0;r1e3)return!0;return!1}(t))!i||z()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):a||($(o=function(){return n.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),a=!0),i=!0;else{var r=function(e){var t=new Set,r=new Set,n=new Set;e.forEach((function(e){E(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),E(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?n.add(e):r.add(e))}))})),n.forEach((function(e){return t.delete(e)}));var o=[],i=[];return t.forEach((function(e){t.has(e.parentElement)&&o.push(e)})),r.forEach((function(e){r.has(e.parentElement)&&i.push(e)})),o.forEach((function(e){return t.delete(e)})),i.forEach((function(e){return r.delete(e)})),{additions:t,moves:n,deletions:r}}(t);n.forEach((function(e){return(0,e.onMinorMutations)(r)}))}}))).observe(e,{childList:!0,subtree:!0}),q.set(e,r),n=new Set,X.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),o&&K(o),0===n.size&&(r.disconnect(),X.delete(r),q.delete(e))}}}function Q(e){var t=e.h,r=e.s,n=e.l,o=e.a,a=void 0===o?1:o;if(0===r){var s=i([n,n,n].map((function(e){return Math.round(255*e)})),3),u=s[0],l=s[1];return{r:u,g:s[2],b:l,a:a}}var c=(1-Math.abs(2*n-1))*r,g=c*(1-Math.abs(t/60%2-1)),f=n-c/2,d=i((t<60?[c,g,0]:t<120?[g,c,0]:t<180?[0,c,g]:t<240?[0,g,c]:t<300?[g,0,c]:[c,0,g]).map((function(e){return Math.round(255*(e+f))})),3);return{r:d[0],g:d[1],b:d[2],a:a}}function J(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=void 0===o?1:o,a=t/255,s=r/255,u=n/255,l=Math.max(a,s,u),c=Math.min(a,s,u),g=l-c,f=(l+c)/2;if(0===g)return{h:0,s:0,l:f,a:i};var d=60*(l===a?(s-u)/g%6:l===s?(u-a)/g+2:(a-s)/g+4);return d<0&&(d+=360),{h:d,s:g/(1-Math.abs(2*f-1)),l:f,a:i}}function ee(e,t){void 0===t&&(t=0);var r=e.toFixed(t);if(0===t)return r;var n=r.indexOf(".");if(n>=0){var o=r.match(/0+$/);if(o)return o.index===n+1?r.substring(0,n):r.substring(0,o.index)}return r}function te(e){var t=e.h,r=e.s,n=e.l,o=e.a;return null!=o&&o<1?"hsla("+ee(t)+", "+ee(100*r)+"%, "+ee(100*n)+"%, "+ee(o,2)+")":"hsl("+ee(t)+", "+ee(100*r)+"%, "+ee(100*n)+"%)"}var re=/^rgba?\([^\(\)]+\)$/,ne=/^hsla?\([^\(\)]+\)$/,oe=/^#[0-9a-f]+$/i;function ie(e){var t=e.trim().toLowerCase();if(t.match(re))return function(e){var t=i(ae(e,se,ue,le),4),r=t[0],n=t[1],o=t[2],a=t[3];return{r:r,g:n,b:o,a:void 0===a?1:a}}(t);if(t.match(ne))return function(e){var t=i(ae(e,ce,ge,fe),4),r=t[0],n=t[1],o=t[2],a=t[3];return Q({h:r,s:n,l:o,a:void 0===a?1:a})}(t);if(t.match(oe))return function(e){var t=e.substring(1);switch(t.length){case 3:case 4:var r=i([0,1,2].map((function(e){return parseInt(""+t[e]+t[e],16)})),3),n=r[0],o=r[1],a=r[2],s=3===t.length?1:parseInt(""+t[3]+t[3],16)/255;return{r:n,g:o,b:a,a:s};case 6:case 8:var u=i([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return n=u[0],o=u[1],a=u[2],s=6===t.length?1:parseInt(t.substring(6,8),16)/255,{r:n,g:o,b:a,a:s}}throw new Error("Unable to parse "+e)}(t);if(de.has(t))return function(e){var t=de.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if(pe.has(t))return function(e){var t=pe.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if("transparent"===e)return{r:0,g:0,b:0,a:0};throw new Error("Unable to parse "+e)}function ae(e,t,r,n){var o=e.split(t).filter((function(e){return e})),a=Object.entries(n);return o.map((function(e){return e.trim()})).map((function(e,t){var n,o=a.find((function(t){var r=i(t,1)[0];return e.endsWith(r)}));return n=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*r[t]:parseFloat(e),r[t]>1?Math.round(n):n}))}var se=/rgba?|\(|\)|\/|,|\s/gi,ue=[255,255,255,1],le={"%":100},ce=/hsla?|\(|\)|\/|,|\s/gi,ge=[360,1,1,1],fe={"%":100,deg:360,rad:2*Math.PI,turn:1},de=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),pe=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=i(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})));function he(e,t,r,n,o){return(e-t)*(o-n)/(r-t)+n}function me(e,t,r){return Math.min(r,Math.max(t,e))}function ye(e,t){for(var r=[],n=0;n=0}))).map((function(e){var t=i(e,2);return t[0]+":"+t[1]})).join(";");if(n.has(o))return n.get(o);var a=Q(r(J(e))),s=a.r,u=a.g,l=a.b,c=a.a,g=i(function(e,t){var r=i(e,3),n=ye(t,[[r[0]/255],[r[1]/255],[r[2]/255],[1],[1]]);return[0,1,2].map((function(e){return me(Math.round(255*n[e][0]),0,255)}))}([s,u,l],ve(t)),3),f=g[0],d=g[1],p=g[2],h=1===c?function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return"#"+(null!=o&&o<1?[t,r,n,Math.round(255*o)]:[t,r,n]).map((function(e){return(e<16?"0":"")+e.toString(16)})).join("")}({r:f,g:d,b:p}):function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return null!=o&&o<1?"rgba("+ee(t)+", "+ee(r)+", "+ee(n)+", "+ee(o,2)+")":"rgb("+ee(t)+", "+ee(r)+", "+ee(n)+")"}({r:f,g:d,b:p,a:c});return n.set(o,h),h}function Te(e){return e}function Oe(e){var t=e.h,r=e.s,n=e.l,o=e.a,i=he(n,0,1,0,.9),a=t,s=r;return(n<.2||n>.8||r<.36)&&(s=n<.4?he(n,0,.4,.16,0):he(n,.4,1,0,.16),a=n<.4?205:40),{h:a,s:s,l:i,a:o}}function Ae(e){var t=e.h,r=e.s,n=e.l,o=e.a,i=he(r,0,1,.25,.4),a=t,s=r;return(n>=.8&&t>200&&t<280||r<.12)&&(s=.05,a=205),{h:a,s:s,l:n205&&t<=245,a=he(r,0,1,i?he(t,205,245,.7,.7):.7,.6),s=n<.5?he(n,0,.5,.9,a):n.7&&y++);var b=i*a,v=b-h;return{isDark:m/v>=.7,isLight:y/v>=.7,isTransparent:h/b>=.1,isLarge:n>=48e4}}(o),[2,t({src:e,dataURL:r,width:o.naturalWidth,height:o.naturalHeight},i)]}}))}))}function Ve(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return function(e){return e.match(/^(.*?\/{2,3})?(.+?)(\/|$)/)[2]}(e)!==location.host?[3,2]:[4,c(e)];case 1:return[2,t.sent()];case 2:return[4,Fe({url:e,responseType:"data-url"})];case 3:return[2,t.sent()]}}))}))}function We(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return r("Unable to load image "+e)},n.src=e}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var t=e.type,r=e.data,n=e.error,o=e.id;if("fetch-response"===t){var i=Le.get(o),a=Ue.get(o);Le.delete(o),Ue.delete(o),n?a&&a(n):i&&i(r)}}));var He=new Set;function Ye(e,t){for(var r=e.dataURL,n=e.width,o=e.height,i=['',"",'','',"","",'',""].join(""),a=new Uint8Array(i.length),s=0;s=0&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e){if(l=function(e,t){if(qe.has(t.toLowerCase()))return t;try{var r=Ze(t);return e.indexOf("background")>=0?function(e){return Ce(r,e)}:e.indexOf("border")>=0||e.indexOf("outline")>=0?function(e){return ke(r,e)}:function(e){return Re(r,e)}}catch(n){return j("Color parse error",n),null}}(e,o))return{property:e,value:l,important:s,sourceValue:u}}else if("background-image"===e||"list-style-image"===e){if(l=function(e,o,i,a){var s=this;try{var u=be(Je,o),l=be(I,o);if(0===l.length&&0===u.length)return o;var c=function(e){var t=0;return e.map((function(e){var r=o.indexOf(e,t);return t=r+e.length,{match:e,index:r}}))},g=c(l).map((function(e){return t({type:"url"},e)})).concat(c(u).map((function(e){return t({type:"gradient"},e)}))).sort((function(e,t){return e.index-t.index})),f=function(e,r){var n,o=e.isDark,i=e.isLight,a=e.isTransparent,s=e.isLarge,u=e.width;return o&&a&&1===r.mode&&!s&&u>2?(C("Inverting dark image "+e.src),n='url("'+Ye(e,t(t({},r),{sepia:me(r.sepia+10,0,100)}))+'")'):i&&!a&&1===r.mode?s?n="none":(C("Dimming light image "+e.src),n='url("'+Ye(e,r)+'")'):0===r.mode&&i&&!s?(C("Applying filter to image "+e.src),n='url("'+Ye(e,t(t({},r),{brightness:me(r.brightness-10,5,200),sepia:me(r.sepia+10,0,100)}))+'")'):n=null,n},d=[],p=0;return g.forEach((function(e,t){var u=e.match,l=e.type,c=e.index,h=p,m=c+u.length;p=m,d.push((function(){return o.substring(h,c)})),d.push("url"===l?function(e){var t=P(e);if(i.parentStyleSheet.href){var o=D(i.parentStyleSheet.href);t=A(o,t)}else t=i.parentStyleSheet.ownerNode&&i.parentStyleSheet.ownerNode.baseURI?A(i.parentStyleSheet.ownerNode.baseURI,t):A(location.origin,t);var u='url("'+t+'")';return function(e){return r(s,void 0,void 0,(function(){var r,o;return n(this,(function(n){switch(n.label){case 0:return et.has(t)?(r=et.get(t),[3,7]):[3,1];case 1:return n.trys.push([1,6,,7]),tt.has(t)?(o=tt.get(t),[4,new Promise((function(e){return o.push(e)}))]):[3,3];case 2:return(r=n.sent())?[3,5]:[2,null];case 3:return tt.set(t,[]),[4,Be(t)];case 4:r=n.sent(),et.set(t,r),tt.get(t).forEach((function(e){return e(r)})),tt.delete(t),n.label=5;case 5:return a()?[2,null]:[3,7];case 6:return j(n.sent()),tt.has(t)&&(tt.get(t).forEach((function(e){return e(null)})),tt.delete(t)),[2,u];case 7:return[2,f(r,e)||u]}}))}))}}(u):function(e){var t=e.match(/^(.*-gradient)\((.*)\)$/),r=t[1],n=t[2],o=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,i=be(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?[^\(\),]*),?/g,n,1).map((function(e){var t=Qe(e=e.trim());if(t)return function(e){return Me(t,e)};var r=e.lastIndexOf(" ");if(t=Qe(e.substring(0,r)))return function(n){return Me(t,n)+" "+e.substring(r+1)};var n=e.match(o);return n&&(t=Qe(n[3]))?function(e){return n[1]+"("+(n[2]?n[2]+", ":"")+Me(t,e)+")"}:function(){return e}}));return function(e){return r+"("+i.map((function(t){return t(e)})).join(", ")+")"}}(u)),t===g.length-1&&d.push((function(){return o.substring(m)}))})),function(e){var t=d.map((function(t){return t(e)}));return t.some((function(e){return e instanceof Promise}))?Promise.all(t).then((function(e){return e.join("")})):t.join("")}}catch(h){return j("Unable to parse gradient "+o,h),null}}(0,o,i,a))return{property:e,value:l,important:s,sourceValue:u}}else if(e.indexOf("shadow")>=0){var l;if(l=function(e,t){try{var r=0,n=be(/(^|\s)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,t,2),o=n.map((function(e,o){var i=r,a=t.indexOf(e,r),s=a+e.length;r=s;var u=Qe(e);return u?function(e){return""+t.substring(i,a)+function(e,t){return Ce(e,t)}(u,e)+(o===n.length-1?t.substring(s):"")}:function(){return t.substring(i,s)}}));return function(e){return o.map((function(t){return t(e)})).join("")}}catch(i){return j("Unable to parse shadow "+t,i),null}}(0,o))return{property:e,value:l,important:s,sourceValue:u}}return null}function $e(e,r){var n=[];return r||(n.push("html {"),n.push(" background-color: "+Ce({r:255,g:255,b:255},e)+" !important;"),n.push("}")),n.push((r?"":"html, body, ")+"input, textarea, select, button {"),n.push(" background-color: "+Ce({r:255,g:255,b:255},e)+";"),n.push("}"),n.push("html, body, input, textarea, select, button {"),n.push(" border-color: "+ke({r:76,g:76,b:76},e)+";"),n.push(" color: "+Re({r:0,g:0,b:0},e)+";"),n.push("}"),n.push("a {"),n.push(" color: "+Re({r:0,g:64,b:255},e)+";"),n.push("}"),n.push("table {"),n.push(" border-color: "+ke({r:128,g:128,b:128},e)+";"),n.push("}"),n.push("::placeholder {"),n.push(" color: "+Re({r:169,g:169,b:169},e)+";"),n.push("}"),n.push("input:-webkit-autofill,"),n.push("textarea:-webkit-autofill,"),n.push("select:-webkit-autofill {"),n.push(" background-color: "+Ce({r:250,g:255,b:189},e)+" !important;"),n.push(" color: "+Re({r:0,g:0,b:0},e)+" !important;"),n.push("}"),e.scrollbarColor&&n.push(function(e){var r,n,o,i,a,s,u=[];if("auto"===e.scrollbarColor)r=Ce({r:241,g:241,b:241},e),n=Re({r:96,g:96,b:96},e),o=Ce({r:176,g:176,b:176},e),i=Ce({r:144,g:144,b:144},e),a=Ce({r:96,g:96,b:96},e),s=Ce({r:255,g:255,b:255},e);else{var l=J(ie(e.scrollbarColor)),c=l.l>.5,g=function(e){return t(t({},l),{l:me(l.l+e,0,1)})},f=function(e){return t(t({},l),{l:me(l.l-e,0,1)})};r=te(f(.4)),n=te(c?f(.4):g(.4)),o=te(l),i=te(g(.1)),a=te(g(.2))}return u.push("::-webkit-scrollbar {"),u.push(" background-color: "+r+";"),u.push(" color: "+n+";"),u.push("}"),u.push("::-webkit-scrollbar-thumb {"),u.push(" background-color: "+o+";"),u.push("}"),u.push("::-webkit-scrollbar-thumb:hover {"),u.push(" background-color: "+i+";"),u.push("}"),u.push("::-webkit-scrollbar-thumb:active {"),u.push(" background-color: "+a+";"),u.push("}"),u.push("::-webkit-scrollbar-corner {"),u.push(" background-color: "+s+";"),u.push("}"),u.push("* {"),u.push(" scrollbar-color: "+r+" "+o+";"),u.push("}"),u.join("\n")}(e)),e.selectionColor&&n.push(function(e){var t,r,n=[];if("auto"===e.selectionColor)t=Ce({r:0,g:96,b:212},e),r=Re({r:255,g:255,b:255},e);else{var o=J(ie(e.selectionColor));t=e.selectionColor,r=o.l<.5?"#FFF":"#000"}return["::selection","::-moz-selection"].forEach((function(e){n.push(e+" {"),n.push(" background-color: "+t+" !important;"),n.push(" color: "+r+" !important;"),n.push("}")})),n.join("\n")}(e)),n.join("\n")}function Ke(e,t){var r=t.strict,n=[];return n.push("html, body, "+(r?"body :not(iframe)":"body > :not(iframe)")+" {"),n.push(" background-color: "+Ce({r:255,g:255,b:255},e)+" !important;"),n.push(" border-color: "+ke({r:64,g:64,b:64},e)+" !important;"),n.push(" color: "+Re({r:0,g:0,b:0},e)+" !important;"),n.push("}"),n.join("\n")}var qe=new Set(["inherit","transparent","initial","currentcolor","none","unset"]),Xe=new Map;function Ze(e){if(e=e.trim(),Xe.has(e))return Xe.get(e);var t=ie(e);return Xe.set(e,t),t}function Qe(e){try{return Ze(e)}catch(t){return null}}var Je=/[\-a-z]+gradient\(([^\(\)]*(\(([^\(\)]*(\(.*?\)))*[^\(\)]*\))){0,15}[^\(\)]*\)/g,et=new Map,tt=new Map;function rt(){Xe.clear(),Ee.clear(),et.clear(),ze(),tt.clear()}var nt={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor",store:new WeakSet},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage",store:new WeakSet},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border",store:new WeakSet},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom",store:new WeakSet},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left",store:new WeakSet},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right",store:new WeakSet},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top",store:new WeakSet},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow",store:new WeakSet},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color",store:new WeakSet},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill",store:new WeakSet},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke",store:new WeakSet},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline",store:new WeakSet}},ot=Object.values(nt),it=["style","fill","stroke","bgcolor","color"],at=it.map((function(e){return"["+e+"]"})).join(", ");function st(){return ot.map((function(e){var t=e.dataAttr,r=e.customProp;return["["+t+"] {"," "+e.cssProp+": var("+r+") !important;","}"].join("\n")})).join("\n")}var ut=new Map,lt=new Map;function ct(e,t,r){ut.has(e)&&(ut.get(e).disconnect(),lt.get(e).disconnect());var n=new WeakSet;function o(e){(function(e){var t=[];return e instanceof Element&&e.matches(at)&&t.push(e),(e instanceof Element||e instanceof ShadowRoot||e instanceof Document)&&w(t,e.querySelectorAll(at)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),Y(e,(function(o){n.has(e)||(n.add(e),r(o.shadowRoot),ct(o.shadowRoot,t,r))}))}var i=Z(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return o(e)}))},onHugeMutations:function(){o(e)}});ut.set(e,i);var a=new MutationObserver((function(e){e.forEach((function(e){it.includes(e.attributeName)&&t(e.target),ot.filter((function(t){var r=t.store,n=t.dataAttr;return r.has(e.target)&&!e.target.hasAttribute(n)})).forEach((function(t){var r=t.dataAttr;return e.target.setAttribute(r,"")}))}))}));a.observe(e,{attributes:!0,attributeFilter:it.concat(ot.map((function(e){return e.dataAttr}))),subtree:!0}),lt.set(e,a)}var gt=new WeakMap,ft=["brightness","contrast","grayscale","sepia","mode"];function dt(e,t){return it.map((function(t){return t+'="'+e.getAttribute(t)+'"'})).concat(ft.map((function(e){return e+'="'+t[e]+'"'}))).join(" ")}function pt(e,t,r){if(dt(e,t)!==gt.get(e)){var n=new Set(Object.keys(nt));if(r.length>0&&function(e,t){for(var r=0;r32||u>32}l("fill",i?"background-color":"color",o)}e.hasAttribute("stroke")&&(o=e.getAttribute("stroke"),l("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",o)),e.style&&x(e.style,(function(e,t){"background-image"===e&&t.indexOf("url")>=0||nt.hasOwnProperty(e)&&l(e,e,t)})),e.style&&e instanceof SVGTextElement&&e.style.fill&&l("fill","color",e.style.getPropertyValue("fill")),E(n,(function(t){var r=nt[t],n=r.store,o=r.dataAttr;n.delete(e),e.removeAttribute(o)})),gt.set(e,dt(e,t))}}function l(r,o,i){var a=nt[r],s=a.customProp,u=a.dataAttr,l=Ge(o,i,null,null);if(l){var c=l.value;"function"===typeof c&&(c=c(t)),e.style.setProperty(s,c),e.hasAttribute(u)||e.setAttribute(u,""),n.delete(r)}}}var ht=null,mt=null;function yt(e,t){ht=ht||e.content;try{var r=ie(ht);e.content=Ce(r,t)}catch(n){j(n)}}function bt(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&!e.disabled)&&!e.classList.contains("darkreader")&&"print"!==e.media&&!e.classList.contains("stylus")}function vt(e,t){return void 0===t&&(t=[]),bt(e)?t.push(e):(e instanceof Element||e instanceof ShadowRoot||e===document)&&(E(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return vt(e,t)})),Y(e,(function(e){return vt(e.shadowRoot,t)}))),t}var _t=function(){var e=[],t=null;function r(){for(var r;r=e.shift();)r();t=null}return{add:function(n){e.push(n),t||(t=requestAnimationFrame(r))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function St(e,t){for(var o=t.update,a=t.loadingStart,s=t.loadingEnd,u=[],l=e;(l=l.nextElementSibling)&&l.matches(".darkreader");)u.push(l);var c=u.find((function(e){return e.matches(".darkreader--cors")}))||null,g=u.find((function(e){return e.matches(".darkreader--sync")}))||null,f=null,d=null,p=!1;function h(){return p}var m=new MutationObserver((function(){o()})),y={attributes:!0,childList:!0,characterData:!0};function b(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(N)}function v(){return c?c.sheet.cssRules:b()?null:U()}function _(){c?(e.nextSibling!==c&&e.parentNode.insertBefore(c,e.nextSibling),c.nextSibling!==g&&e.parentNode.insertBefore(g,c.nextSibling)):e.nextSibling!==g&&e.parentNode.insertBefore(g,e.nextSibling)}var S=!1,E=!1;function w(){return r(this,void 0,void 0,(function(){var t,r,o,a,s,u,l;return n(this,(function(n){switch(n.label){case 0:if(!(e instanceof HTMLLinkElement))return[3,7];if(o=i(L(),2),a=o[0],(s=o[1])&&j(s),!(a&&!s||(d=s,d&&d.message&&d.message.includes("loading"))))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(g=e,new Promise((function(e,t){var r=function(){g.removeEventListener("load",n),g.removeEventListener("error",o)},n=function(){r(),e()},o=function(){r(),t("Link loading failed "+g.href)};g.addEventListener("load",n),g.addEventListener("error",o)})))];case 2:return n.sent(),[3,4];case 3:return j(n.sent()),E=!0,[3,4];case 4:if(p)return[2,null];l=i(L(),2),a=l[0],(s=l[1])&&j(s),n.label=5;case 5:return null!=a?[2,a]:[4,Et(e.href)];case 6:return t=n.sent(),r=D(e.href),p?[2,null]:[3,8];case 7:if(!b())return[2,null];t=e.textContent.trim(),r=D(location.href),n.label=8;case 8:if(!t)return[3,13];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,wt(t,r)];case 10:return u=n.sent(),c=function(e,t){if(!t)return null;var r=document.createElement("style");return r.classList.add("darkreader"),r.classList.add("darkreader--cors"),r.media="screen",r.textContent=t,e.parentNode.insertBefore(r,e.nextSibling),r.sheet.disabled=!0,r}(e,u),[3,12];case 11:return j(n.sent()),[3,12];case 12:if(c)return f=H(c,"prev-sibling"),[2,c.sheet.cssRules];n.label=13;case 13:return[2,null]}var g,d}))}))}var T=0,O=new Map,A=new Map,C=null,M=!1,I=null,P=null;function L(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(t){return[null,t]}}function U(){var e=i(L(),2),t=e[0],r=e[1];return r?(j(r),null):t}function F(){var e=U();e&&(I=e.length)}function V(){F(),Y(),function e(){(function(){var e=U();return e&&e.length!==I})()&&(F(),o()),P=requestAnimationFrame(e)}()}function Y(){cancelAnimationFrame(P)}function z(){m.disconnect(),p=!0,f&&f.stop(),d&&d.stop(),Y()}var G=0;return{details:function(){var e=v();return e?{variables:function(e){var t=new Map;return e&&R(e,(function(e){e.style&&x(e.style,(function(e,r){k(e)&&t.set(e,r)}))})),t}(e)}:(S||E||(S=!0,a(),w().then((function(e){S=!1,s(),e&&o()})).catch((function(e){j(e),S=!1,s()}))),null)},render:function(t,r){var n=v();if(n){p=!1;var o=0===A.size,i=new Set(A.keys()),a=function(e){return["mode","brightness","contrast","grayscale","sepia"].map((function(t){return t+":"+e[t]})).join(";")}(t),s=a!==C,u=[];if(R(n,(function(t){var n=t.cssText,a=!1;i.delete(n),O.has(n)||(O.set(n,n),a=!0);var s=null,l=null;if(r.size>0||n.includes("var(")){var c=B(n,r);O.get(n)!==c&&(O.set(n,c),a=!0,(s=document.createElement("style")).classList.add("darkreader"),s.classList.add("darkreader--vars"),s.media="screen",s.textContent=c,e.parentNode.insertBefore(s,e.nextSibling),l=s.sheet.cssRules[0])}if(a){o=!0;var g=[],f=l||t;f&&f.style&&x(f.style,(function(e,r){var n=Ge(e,r,t,h);n&&g.push(n)}));var d=null;g.length>0&&(d={selector:t.selectorText,declarations:g},t.parentRule instanceof CSSMediaRule&&(d.media=t.parentRule.media.mediaText),u.push(d)),A.set(n,d),W(s)}else u.push(A.get(n))})),i.forEach((function(e){O.delete(e),A.delete(e)})),C=a,M||o||s){T++,M=!1;var l=[],c=new Map,f=0;u.filter((function(e){return e})).forEach((function(e){var r=e.selector,n=e.declarations,o=e.media;n.forEach((function(e){var n=e.property,i=e.value,a=e.important,s=e.sourceValue;if("function"===typeof i){var u=i(t);if(u instanceof Promise){var g=l.length,d=f++;l.push({media:o,selector:r,property:n,value:null,important:a,asyncKey:d,sourceValue:s});var h=T;u.then((function(e){e&&!p&&h===T&&(l[g].value=e,_t.add((function(){p||h!==T||function(e){var t=c.get(e),r=t.declarations,n=t.target,o=t.index;n.deleteRule(o),m(n,o,r),c.delete(e)}(d)})))}))}else l.push({media:o,selector:r,property:n,value:u,important:a,sourceValue:s})}else l.push({media:o,selector:r,property:n,value:i,important:a,sourceValue:s})}))})),function t(){var r=[];l.forEach((function(e,t){var n,o,i=0===t?null:l[t-1],a=i&&i.media===e.media,s=i&&a&&i.selector===e.selector;a?n=r[r.length-1]:(n=[],r.push(n)),s?o=n[n.length-1]:(o=[],n.push(o)),o.push(e)})),g||((g=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),g.classList.add("darkreader--sync"),g.media="screen"),d&&d.stop(),_(),null==g.sheet&&(g.textContent="");for(var n=g.sheet,o=n.cssRules.length-1;o>=0;o--)n.deleteRule(o);r.forEach((function(e){var t,r=e[0][0].media;r?(n.insertRule("@media "+r+" {}",n.cssRules.length),t=n.cssRules[n.cssRules.length-1]):t=n,e.forEach((function(e){var r=e.filter((function(e){return null==e.value}));r.length>0&&r.forEach((function(r){var n=r.asyncKey;return c.set(n,{declarations:e,target:t,index:t.cssRules.length})})),m(t,t.cssRules.length,e)}))})),d?d.run():d=H(g,"prev-sibling",t)}()}}function m(e,t,r){var n=r[0].selector;e.insertRule(n+" {}",t);var o=e.cssRules.item(t).style;r.forEach((function(e){var t=e.property,r=e.value,n=e.important,i=e.sourceValue;o.setProperty(t,null==r?i:r,n?"important":"")}))}},pause:z,destroy:function(){z(),W(c),W(g)},watch:function(){m.observe(e,y),e instanceof HTMLStyleElement&&V()},restore:function(){if(g)if(++G>10)j("Style sheet was moved multiple times",e);else{j("Restore style",g,e);var t=null==g.sheet||g.sheet.cssRules.length>0;_(),t&&(M=!0,F(),o())}}}}function Et(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:return[2,t.sent()];case 3:return[4,Fe({url:e,responseType:"text",mimeType:"text/css"})];case 4:return[2,t.sent()]}}))}))}function wt(e,t){return r(this,void 0,void 0,(function(){var r,i,a,s,u,l,c,g,f,d;return n(this,(function(n){switch(n.label){case 0:e=function(e,t){return e.replace(I,(function(e){var r=P(e);return'url("'+A(t,r)+'")'}))}(e=function(e){return e.replace(U,"")}(e=e.replace(L,"")),t),r=be(N,e),n.label=1;case 1:n.trys.push([1,10,11,12]),i=o(r),a=i.next(),n.label=2;case 2:if(a.done)return[3,9];s=a.value,u=P(s.substring(8).replace(/;$/,"")),l=A(t,u),c=void 0,n.label=3;case 3:return n.trys.push([3,6,,7]),[4,Et(l)];case 4:return[4,wt(c=n.sent(),D(l))];case 5:return c=n.sent(),[3,7];case 6:return j(n.sent()),c="",[3,7];case 7:e=e.split(s).join(c),n.label=8;case 8:return a=i.next(),[3,2];case 9:return[3,12];case 10:return g=n.sent(),f={error:g},[3,12];case 11:try{a&&!a.done&&(d=i.return)&&d.call(i)}finally{if(f)throw f.error}return[7];case 12:return[2,e=e.trim()]}}))}))}var Tt,Ot,At=[],Ct=new Map;function jt(e){(function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}})()&&E(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();Ct.has(t)||(Ct.set(t,new Set),function(e){return new Promise((function(t){window.customElements&&"function"===typeof window.customElements.whenDefined?customElements.whenDefined(e).then(t):requestAnimationFrame((function r(){var n=Ct.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))}))}))}(t).then((function(){if(Ot){var e=Ct.get(t);Ct.delete(t),Ot(Array.from(e))}}))),Ct.get(t).add(e)}))}function Rt(e,t){xt();var r=new Set(e),n=new WeakMap,o=new WeakMap;function i(e){n.set(e,e.previousElementSibling),o.set(e,e.nextElementSibling)}function a(e){var a=e.createdStyles,s=e.removedStyles,u=e.movedStyles;a.forEach((function(e){return i(e)})),u.forEach((function(e){return i(e)})),s.forEach((function(e){return t=e,n.delete(t),void o.delete(t);var t})),a.forEach((function(e){return r.add(e)})),s.forEach((function(e){return r.delete(e)})),a.size+s.size+u.size>0&&t({created:Array.from(a),removed:Array.from(s),moved:Array.from(u),updated:[]})}function s(e){var t=e.additions,r=e.moves,n=e.deletions,o=new Set,i=new Set,s=new Set;t.forEach((function(e){return vt(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return vt(e).forEach((function(e){return i.add(e)}))})),r.forEach((function(e){return vt(e).forEach((function(e){return s.add(e)}))})),a({createdStyles:o,removedStyles:i,movedStyles:s}),t.forEach((function(e){Y(e,g),jt(e)}))}function u(e){var t=new Set(vt(e)),i=new Set,s=new Set,u=new Set;t.forEach((function(e){r.has(e)||i.add(e)})),r.forEach((function(e){t.has(e)||s.add(e)})),t.forEach((function(e){var t;i.has(e)||s.has(e)||(t=e).previousElementSibling===n.get(t)&&t.nextElementSibling===o.get(t)||u.add(e)})),a({createdStyles:i,removedStyles:s,movedStyles:u}),Y(e,g),jt(e)}function l(e){var r=new Set;e.forEach((function(e){bt(e.target)&&e.target.isConnected&&r.add(e.target)})),r.size>0&&t({updated:Array.from(r),created:[],removed:[],moved:[]})}function c(e){var t=Z(e,{onMinorMutations:s,onHugeMutations:u}),r=new MutationObserver(l);r.observe(e,{attributes:!0,attributeFilter:["rel","disabled"],subtree:!0}),At.push(t,r),Tt.add(e)}function g(e){null==e.shadowRoot||Tt.has(e.shadowRoot)||c(e.shadowRoot)}e.forEach(i),c(document),Y(document.documentElement,g),Ot=function(e){var r=[];e.forEach((function(e){return w(r,vt(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){return g(e)}))},jt(document)}function xt(){At.forEach((function(e){return e.disconnect()})),At.splice(0,At.length),Tt=new WeakSet,Ot=null,Ct.clear()}var kt=new Map,Mt=new Map,It=null,Nt=null,Pt=null;function Dt(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector("."+e);return r||((r=document.createElement("style")).classList.add("darkreader"),r.classList.add(e),r.media="screen"),r}var Lt=new Map;function Ut(e,t){Lt.has(t)&&Lt.get(t).stop(),Lt.set(t,H(e,"parent"))}function Ft(){var e=Dt("darkreader--fallback");e.textContent=Ke(It,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),Ut(e,"fallback");var r=Dt("darkreader--user-agent");r.textContent=$e(It,Pt),document.head.insertBefore(r,e.nextSibling),Ut(r,"user-agent");var n=Dt("darkreader--text");It.useFont||It.textStroke>0?n.textContent=function(e){var t=[];return t.push("*:not(pre) {"),e.useFont&&e.fontFamily&&t.push(" font-family: "+e.fontFamily+" !important;"),e.textStroke>0&&(t.push(" -webkit-text-stroke: "+e.textStroke+"px !important;"),t.push(" text-stroke: "+e.textStroke+"px !important;")),t.push("}"),t.join("\n")}(It):n.textContent="",document.head.insertBefore(n,e.nextSibling),Ut(n,"text");var o=Dt("darkreader--invert");Nt&&Array.isArray(Nt.invert)&&Nt.invert.length>0?o.textContent=[Nt.invert.join(", ")+" {"," filter: "+Ie(t(t({},It),{contrast:0===It.mode?It.contrast:me(It.contrast-10,0,100)}))+" !important;","}"].join("\n"):o.textContent="",document.head.insertBefore(o,n.nextSibling),Ut(o,"invert");var i=Dt("darkreader--inline");i.textContent=st(),document.head.insertBefore(i,o.nextSibling),Ut(i,"inline");var a=Dt("darkreader--override");a.textContent=Nt&&Nt.css?Nt.css.replace(/\${(.+?)}/g,(function(e,t){try{var r=Ze(t);return we(r,It,Te)}catch(n){return j(n),t}})):"",document.head.appendChild(a),Ut(a,"override")}var Bt=new Set;function Vt(e){var t=Dt("darkreader--inline",e);t.textContent=st(),e.insertBefore(t,e.firstChild),Bt.add(e)}function Wt(){var e=document.head.querySelector(".darkreader--fallback");e&&(e.textContent="")}var Ht=0,Yt=new Set;function zt(e){if(!kt.has(e)){var t=++Ht,r=St(e,{update:function(){var e=r.details();e&&(0===e.variables.size?r.render(It,Mt):(Gt(e.variables),Kt()))},loadingStart:function(){if(!z()||!Qt){Yt.add(t);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=Ke(It,{strict:!1}))}},loadingEnd:function(){Yt.delete(t),0===Yt.size&&z()&&Wt()}});return kt.set(e,r),r}}function Gt(e){0!==e.size&&(e.forEach((function(e,t){return Mt.set(t,e)})),Mt.forEach((function(e,t){return Mt.set(t,B(e,Mt))})))}function $t(e){var t=kt.get(e);t&&(t.destroy(),kt.delete(e))}var Kt=V((function(e){kt.forEach((function(e){return e.render(It,Mt)})),e&&e()})),qt=function(){Kt.cancel()};function Xt(){0===Yt.size&&Wt()}var Zt=null,Qt=!document.hidden;function Jt(){document.removeEventListener("visibilitychange",Zt),Zt=null}function er(){function e(){!function(){qt(),Gt(M(document.documentElement));var e=vt(document).filter((function(e){return!kt.has(e)})).map((function(e){return zt(e)})),t=e.map((function(e){return e.details()})).filter((function(e){return e&&e.variables.size>0})).map((function(e){return e.variables}));0===t.length?(kt.forEach((function(e){return e.render(It,Mt)})),0===Yt.size&&Wt()):(t.forEach((function(e){return Gt(e)})),Kt((function(){0===Yt.size&&Wt()}))),e.forEach((function(e){return e.watch()}));var r=function(e){for(var t=[],r=0,n=e.length;r0&&(Vt(e.shadowRoot),w(r,t))}));var n=Nt&&Array.isArray(Nt.ignoreInlineStyle)?Nt.ignoreInlineStyle:[];r.forEach((function(e){return pt(e,It,n)}))}(),function(){Rt(Array.from(kt.keys()),(function(e){var t=e.created,r=e.updated,n=e.removed,o=e.moved,i=n,a=t.concat(r).concat(o).filter((function(e){return!kt.has(e)})),s=o.filter((function(e){return kt.has(e)}));i.forEach((function(e){return $t(e)}));var u=a.map((function(e){return zt(e)})),l=u.map((function(e){return e.details()})).filter((function(e){return e&&e.variables.size>0})).map((function(e){return e.variables}));0===l.length?u.forEach((function(e){return e.render(It,Mt)})):(l.forEach((function(e){return Gt(e)})),Kt()),u.forEach((function(e){return e.watch()})),s.forEach((function(e){return kt.get(e).restore()}))}));var e,t,r=Nt&&Array.isArray(Nt.ignoreInlineStyle)?Nt.ignoreInlineStyle:[];e=function(e){if(pt(e,It,r),e===document.documentElement){var t=M(document.documentElement);t.size>0&&(Gt(t),Kt())}},t=function(e){var t=e.querySelectorAll(at);t.length>0&&(Vt(e),E(t,(function(e){return pt(e,It,r)})))},ct(document,e,t),Y(document.documentElement,(function(r){ct(r.shadowRoot,e,t)})),$(Xt)}()}Ft(),document.hidden?function(e){var t=Boolean(Zt);Zt=function(){document.hidden||(Jt(),e(),Qt=!0)},t||document.addEventListener("visibilitychange",Zt)}(e):e(),function(e){var t=document.querySelector('meta[name="theme-color"]');t?yt(t,e):(mt&&mt.disconnect(),(mt=new MutationObserver((function(t){e:for(var r=0;r1)for(var r=1;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u}).call(this,r(38))},function(e,t,r){"use strict";(function(e){var n=r(0),o=r.n(n),i=r(24),a=r(33),s=r.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(r,n){e=r,t.forEach((function(t){return t(e,n)}))}}}var c=o.a.createContext||function(e,t){var r,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return u[e]=(u[e]||0)+1}()+"__",c=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(i.a)(r,e);var n=r.prototype;return n.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},n.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var r,n=this.props.value,o=e.value;((i=n)===(a=o)?0!==i||1/i===1/a:i!==i&&a!==a)?r=0:(r="function"===typeof t?t(n,o):1073741823,0!==(r|=0)&&this.emitter.set(e.value,r))}var i,a},n.render=function(){return this.props.children},r}(n.Component);c.childContextTypes=((r={})[a]=s.a.object.isRequired,r);var g=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,r){0!==((0|e.observedBits)&r)&&e.setState({value:e.getValue()})},e}Object(i.a)(r,t);var n=r.prototype;return n.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},n.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},n.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},n.getValue=function(){return this.context[a]?this.context[a].get():e},n.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},r}(n.Component);return g.contextTypes=((o={})[a]=s.a.object,o),{Provider:c,Consumer:g}};t.a=c}).call(this,r(43))},function(e,t,r){var n=r(113);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return s(i(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var r,n=[],i=0,a=0,s="",c=t&&t.delimiter||"/";null!=(r=o.exec(e));){var g=r[0],f=r[1],d=r.index;if(s+=e.slice(a,d),a=d+g.length,f)s+=f[1];else{var p=e[a],h=r[2],m=r[3],y=r[4],b=r[5],v=r[6],_=r[7];s&&(n.push(s),s="");var S=null!=h&&null!=p&&p!==h,E="+"===v||"*"===v,w="?"===v||"*"===v,T=r[2]||c,O=y||b;n.push({name:m||i++,prefix:h||"",delimiter:T,optional:w,repeat:E,partial:S,asterisk:!!_,pattern:O?l(O):_?".*":"[^"+u(T)+"]+?"})}}return a=n}}),"es6","es3"),$jscomp.polyfill("Array.prototype.find",(function(e){return e||function(e,t){return $jscomp.findInternal(this,e,t).v}}),"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",(function(e){return e||function(e,t){var r=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var n=r.length,o=e.length;t=Math.max(0,Math.min(0|t,r.length));for(var i=0;i=o}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(e){return e||function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return r}}),"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return void 0!==e},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||"undefined"==typeof r.execScript||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}},goog.define=function(e,t){if(!COMPILED){var r=goog.global.CLOSURE_UNCOMPILED_DEFINES,n=goog.global.CLOSURE_DEFINES;r&&void 0===r.nodeType&&Object.prototype.hasOwnProperty.call(r,e)?t=r[e]:n&&void 0===n.nodeType&&Object.prototype.hasOwnProperty.call(n,e)&&(t=n[e])}return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var r=e;(r=r.substring(0,r.lastIndexOf(".")))&&!goog.getObjectByName(r);)goog.implicitNamespaces_[r]=!0}goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED){if(e in goog.loadedModules_)return goog.loadedModules_[e].exports;if(!goog.implicitNamespaces_[e])return null!=(e=goog.getObjectByName(e))?e:null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&("function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath())},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(e in goog.loadedModules_)throw Error('Module with namespace "'+e+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var r=0;r>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"===typeof e.clone)return e.clone();for(var r in t="array"==t?[]:{},e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e,t,r){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,r){if(!e)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var r=this.createRequiresTranspilation_();this.requiresTranspilation_=r.map,this.transpilationTarget_=this.transpilationTarget_||r.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function r(){n&&(goog.global.setTimeout(n,0),n=null)}var n=t;if(e.length){t=[];for(var o=0;o<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(n):n)}else{var o=t.createElement("script");o.defer=goog.Dependency.defer_,o.async=!1,o.type="text/javascript",(n=goog.getScriptNonce())&&o.setAttribute("nonce",n),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(e.loaded(),e.resume())}):o.onload=function(){o.onload=null,e.loaded()},o.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(o)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,r,n,o){goog.Dependency.call(this,e,t,r,n,o)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,r=this;if(goog.isDocumentLoading_()){var n=function(e,r){e=r?'